Multi Wii Copter LCD Config
- 1 About
- 2 Hardware
- 3 Gallery
LCD_Config is a hardware and software solution to program the Multi Wii Copters on flying field, also it contains the possibility to log data while flying and playback the log files to the MultiWiiConf.
It is an open-source project and is copyleft licensed under the GNU General Public License.
- Versions prior to 4.0 work with MultiWiiCopter (MWC) Software Versions 1.5 - 1.7, Version 4.0 with MWC Version 1.8, Version 4.1 with MWC Version 1.8 and 1.9
- Automatic configuration to MWC version (starting from v4.0)
- Serial communication (like the MultiWiiConfig tool)
- Presentation and editing of the complete set of parameters
- Emulation of a serial TEXTSTAR LCD to use the built-in configuration mode in the MWC software
- Profile management to test different settings
- Logging to SD cards (optional), playback of Logfiles via MultiWiiConfig or via LogView
- Support for APC220 Wireless Module (optional)
- Highly configurable (footprint of executable ranges from 13k to 28k).
- Optionally displays the maximum and minimum values of the received data
- Simple graphic output for servo channels and inclination angles (and bar-charts in TEXTSTAR mode)
(a large variety of hardware solutions exists, the following describes the easiest configuration, i.e., usage of standard components)
- An Arduino board Boards (Arduino Uno/Duemilanove, Pro Mini, Nano...) with ATMega168 or ATMega328 (preferred)
- A HD4408 or compatible LCD (e.g., DFRobot LCD Keypad Shield) (other options exists, e.g., Eagle Tree Power Panel or a Serial LCD) - see schematic below
- Four push-buttons (as provided by the LCD Keypad Shield) or a two-axis analog joystick (or both), push-buttons can be connected either on separate input ports or via cascading resistors.
- (Optional) SD Card interface (e.g., DFRobot Interface Shield) for Logging
- (Optional) APC220 Wireless Module (simulates a standard serial connection)
- Arduino v022 (Version prior to v4.2)
- Arduino 1.0 (v4.2 and higher)
(Note: the version of the LCD_Config does not correspond to the version of the MultiWiiCopter software.)
V3.2: http://www.rc-heli-fan.org/viewtopic.php?f=255&t=80336&start=810#p1264382 (last version supporting MWC version 1.5-1.7)
V4.0: http://www.rc-heli-fan.org/viewtopic.php?f=255&t=80336&p=1279371#p1279371 (supporting MWC version 1.8)
V4.1 beta 1: http://www.rc-heli-fan.org/viewtopic.php?f=255&t=80336&start=915#p1314499 (supporting MWC version 1.8-1.9)
V4.2: http://www.rc-heli-fan.org/quadrocopter-co-f255/multiwiikopter-konfigurationsprogramm-fur-arduino-t80336-960.html#p1325500 (v4.1 ported to Arduino 1.0)
V4.3: (internal unpublished Version)
V0.8 to V1.4 see 
- check trailing 'A' char in serial communication to detect frame errors,
- KEY_LEFT cancels reading when no serial connection is present (important to reset wrong settings!)
- optimization of format routines (merged two routines, invalid values are displayed as ###)
- bugfix in logging (logMode=-1 was stored in flash, so logging was permanently disabled)
- Min/max values show up again (optional)
- Fixed some issues on compiling with different options
- Adaptation to MWC version 1.preter6 (new config "Flying Wing", new data format)
- Changed arrangement of parameters in state "0 - Config"
- Bug 'logMode=-1' finally solved
- Swapped motors 4 and 5 in 'Esc Out' for versions 1.5 and 1.6prebis
- Changed behaviour of UP and DOWN for consistency (UP decrements, DOWN increments values)
- Added version V1.6
- Output logfiles in LogView format [OPTIONAL] (file numbers starting from 500, extension ".lvw")
- Added JOYSTICK option to replace input buttons by an analog joystick [experimental]
- Display 'invalid' values in graphics
- Heavy optimizations (!) due to space restrictions
- Removed WAIT_FOR_INIT option, changed start state to 31 instead
- Bugfix in deserialize() with v1.6
- Joystick handling was improved (calibration, use of pullups, can be used in parallel to buttons)
- Added 'Play LogFile' state
- Easter egg function to display internal configuration :)
- BUGFIX: RC Rate multiplied by factor 2 for MWC Versions >v1.5, minimum of 20% for RC Rate (0% makes no sense)
- Added random offsets in TEST mode
- Cancel in Logfile Playback (press LEFT_KEY)
- Settings of "Baud Rate", serialRead() has been adapted to work with different COM speeds
- Greater flexibility in changing the Settings
- (Log) Delay Time was moved to Settings state and is used as the time interval of polling the MWC board
- Changed internal representation of state machine and strings
- Support for v1.7pre (I-/P-Level instead of AutoLevelStrength, trigger calibration, 8 instead of 5 receiver
- channels, configuration of activation modes for Aux1/Aux2, ...)
- Software Version is now stored in Logfile
- APC220 Option (disables APC220 module via pin D2 during playback of logfiles, experimental)
- Swapped Angle and Baro/Comp/Cycle states
- Added 'Config' parameter to LogFiles, show Config and Version in selectLogFile
- Use of blinking Cursor instead of Arrows in Enter mode
- LogView mode: corrected order of receiver channels
- Greater robustness in serialWrite() method
- Simultaneous setting of Roll and Pitch PID values ("2 PID -> Roll/Pitch")
- Support for v1.7prebis (replaced v1.7pre) and also v1.7preter
- (Profiles generated with older versions are automatically converted to v.17prebis profiles)
- CHECK_INPUT option to visualize the joystick input (hidden state, press RIGHT key in start state for >1 sec)
- BATTERY_LEVEL option (experimental), visualisation of battery status on LCD and via Status LEDS, 4 warn levels can be defined
- Internal optimizations
- Added consistency check in serialRead, removed strange behaviour after framelength errors.
- Improved error handling when communication fails (more detailed description than "Inv. FrameLength")
- Show MWC version in start state
- Show current values in "Settings" state, added blinking cursor when entering values
- Number of Profiles can be configured (constant NUM_PROFILES)
- Removed BATTERY_LEVEL problem in conjunction with APC220
- Flashing in battery status display to indicate warn levels
- Bugfix in setting of delay time
- KEY_PIN can be undefined if no cascading Buttons are used
- Changed default values for Version (highest version) and Baudrate (115200)
- Added Option "Dump Buffer" to show the contents of the data buffer when an invalid frame is received (for debugging)
- DEFAULT_BAUDRATE can be configured, USE_DEFAULT_BAUDRATE ignores stored Baudrate params (Baudrate can still be adjusted manually)
- Bugfix in state "Enter R/C Rate / Expo" (no action on RIGHT)
- Bugfix concerning Battery level (removed leading extra byte)
- Bugfix in "Enter PID Level" state
- deleted JS_INV_SELECT_KEY - the Joystick SELECT Button must be connected to GND.
- Support of EagleTree PowerPanel (thx to Danal Estes) and Sparkfun Serial LCD
- Bugfix in "restoreParams()"
- Changed Serial LCD from SoftwareSerial lib to NewSoftSerial lib - see http://arduiniana.org/libraries/NewSoftSerial/
- Added EMULATE_SERIAL_LCD option to use the LCD_Config as a Serial LCD (option LCD_CONF has to be enabled in MWC software). To enter the emulation state press KEY_RIGHT during the initial 'Reading' state. This feature allows you to use the LCD_Config with MWC versions not supported by LCD_Config (i.e., the developer version).
- In "Reading..." state, the characters '<' and '>' indicate which keys are currently selectable. ('<' to cancel, '>' to enter the fabulous 'Serial LCD Emulation' mode.)
- Extracted option section to separate Header file and moved all #includes to the beginning of the sketch, the user should ONLY edit this file and the comments in the #includes
- Full support for MWC v1.8
- Versions <v1.8 are no longer supported (except via the EMULATE_TEXTSTAR / LCD_CONF Option)
- EMULATE_SERIAL_LCD replaced by the more powerful EMULATE_TEXTSTAR Option
- Removed BATTERY_LEVEL Option (now mandatory), added support for POWERMETER
- Added new config "Octocopter"
- Added "Calibrate Mag(neto)"
- Supports LCD_TELEMETRY Displays (incl. Bar charts) via EMULATE_TEXTSTAR
- Support for MWC v1.9
- Bugfix in Serialisation
- Bugfix in Profile Management
- Bugfix "Enter PowerTrigger" value
- Presentation of MWC Version when selecting Profiles
- Changed menu structure of the State "0 - Config". Press RIGHT to show sensor status, trigger calibration or set activation modes.
- Presentation of GPS data (not yet fully supported by the MWC software)
- Presentation of 'Debug' values
- Configuration of Key Ids
- Support for Arduino 1.0
- Bugfixes, Changes in handling of input keys and serial communication
- Removed Options "LOGGING", "APC220" and "STANDALONE"
- Splitted source file
- Bugfix in DrawAngle() routine (only in Graphics mode)
- New layout for Profiles, reduced max. number of profiles (profile size increased from 48 bytes to 84 bytes)
- Extended character set for Profile names
- Support for MWC 2.0, i.e.:
- renamed receiver channels 6 and 7 to Aux3 and Aux4
- 6 new configurations: OctFlat+, OctFlatX, Airplane, Heli_120, Heli_90, VTail4 (Airplane and Heli do not seem to be implemented in MWC yet)
- number of servos increased to 8, adapted servo indexes for TRI and BI
- added status variable "i2c_errorCount" (new substate of "Sensors" state)
- new activation modes: PassThru, Headfree, Beeper
- new scheme to enter activation modes
LCD Keypad Shield
This is the original LCD used with the LCD_Config app:
Emulation of the four required input buttons via an analog Joystick (like the one used in Wii Nunchuks). Requires two analog input pins and (optional) one digital or analog input pin for the Select key.
If you like to use normal hardware keys on digital ports use this schematic to connect them:
Then remove the comment signs // in front of line:
Define the ports to use here:
// Input pins of the hardbuttons: (used when HWKEYS is defined) #define HW_RIGHT 10 #define HW_UP 9 #define HW_DOWN 11 #define HW_LEFT 8 #define HW_SELECT 6
It is possible to control everything without the Select key, so you don't need this key.
Shift Register LCD
Using 3 wires interface for the display:
Adjust the ports used here:
ShiftRegLCD lcd(3, 2, 4, 2); // (Datapin, Clockpin, Enablepin or TWO_WIRE [, Lines [, Font]]])
Eagle Tree Power Panel
via I2C, see comments in the LCD_Config sketch
via a second serial port (requires the NewSoftSerial lib), see comments in LCD_Config sketch
Connection of SD Card: standard SPI interface, i.e.,
pin 13 SCK SPI clock pin 12 MISO SPI master in, slave out pin 11 MOSI SPI master out, slave in pin 10 SS SPI slave select
Logfiles are written either in binary format, in that way they can be sent to and visualized by the MultiWiiConf software, or (starting from Version 2.0) in LogView OpenFormat, to display them in LogView. A corresponding device file for LogView (.ini) is included in the archive beginning from Version 2.0. For more details, check out www.logview.info (and don't forget to donate :)).
Primary goal of this option is to give some visual feedback on the internal state when no LCD is connected. Three LEDs are supported, named RED, YELLOW and GREEN (like a traffic light).
The red LED signals errors (slow flashing, e.g., when the application is halted), or recoverable exceptional states (fast flashing, e.g., the app is waiting for input from the serial connection).
Yellow LED: blinking means I/O, it is permanently on when the app is waiting for user input
The green LED signals logging.
LEDs are connected through 220-500 Ohm resistors to some of the unused ports (default: A3 - Red, A4 - Yellow, A5 - Green).
The status leds are also used when the battery status is displayed on the screen. Five different levels can be defined (green, green/yellow, yellow, yellow/red, red).
Port settings are defined here:
// include routines to show the state of the application with three leds // (red: error, yellow: busy/waiting for input, green: logging) #define STATUS_LEDS #define RED_LED A3 #define YELLOW_LED A4 #define GREEN_LED A5
Emulation of TEXTSTAR display
When the EMULATE_TEXTSTAR option is enabled in the LCD_Config sketch, it is possible to use the built-in configuration routines of the MWC software directly. You have to uncomment the lines
#define LCD_CONFIG #define LCD_TEXTSTAR
in the MWC sketch. The push-buttons of the LCD_Config can be used to select and enter values (bidirectional communication).
The emulation mode is entered by pressing the RIGHT button immediately after initialisation. To stop, press the SELECT key (or RESET).
Enables setting of the Backlight intensity of a HD44780 based LCD.
Useful to calibrate the I/O devices. Shows the state of the input ports connected to the push-buttons or joystick axes. To enter this state, press the LEFT button for more than one second in State "0 - Config".
Offline Test-mode for Development
If activated, dumps the contents of the read buffer in hexadecimal on the LCD when an invalid frame is read. Useful to track problems on the Serial interface.
(!!!the state chart is not up to date!!!)