|Aug 25, 2008, 09:45 AM|
my FPV instrument panel
This is my FPV Instrument Panel project (still under construction), and I thought to share the project with those guys who want to build something similar and have some experience in building electronic circuits.
The reason I build this device:
I needed some more realism in my FPV flights; flying an RC glider with video goggles the altimeter and variometer are needed gadgets, and it is also important to know the indicated airspeed (GPS can provide only the ground speed which is useless in wind).
OSDs are formidable devices, but they are expensive to buy, and they don't have the cockpit feeling what real instruments give. An other thing is that analog indicators can be read easier than numeric indicators, and there is also the fact that I am looking at the instruments when I want, in the rest of time I have undisturbed image of the landscape - no need for turn the OSD on/off; vario has audio feedback so I don't need to see it.
This panel can measure the followings:
- indicated airspeed (analog) using differential pressure sensor with Pitot tube
- altitude (analog/numeric) using absolute pressure sensor
- variometer (led/sound) using the amplified difference signal from the altitude sensor
- main battery current (lcd analog)
- main battery voltage (lcd analog)
- power consumption in mAh (numeric)
- rpm (numeric) using an optical sensor on the shaft of the motor
- camera battery voltage
The panel is not at scale, and it doesn't respect any standard; the design and functionality is only from my imagination.
The two analog instruments are done with two pico sized servo. The numeric indications are done by a 2x16 alphanumeric display. The hardware is done using SMD component to save space and weight. The panel has only 24grams.
Follows: some pictures; technical details; projects; how to do it; how to configure it
|Aug 26, 2008, 08:39 AM|
Now I follow with some technical details:
There are (will be) 4 main modules:
- the actual instrument panel containing the microcontroller, display, servos for analog gauges. I have chosen the ATMega8 microcontroller. (status: ready)
- power board - this does the power distribution providing power for ESC, instrument panel, BEC, sensor boards. It does also the signal conditioning for current and battery voltage measurements. Current is measured by an ACS712 30A single chip current sensor. (status: ready)
- altitude/vario sensor board - this will provide the analog signals for altitude and vario, using an MPXA6115A absolute pressure sensor. I will set the signal conditioning circuit to provide 0 - 5V for a 0 - 4000m range. (under construction)
- airspeed sensor board - this will provide the analog signal for airspeed measured by an MPX2010 differential pressure sensor. (under construction)
All the analog signals are processed by the instrument panel. The panel has a 10k by 10k resistive divider for each analog input at the ADC. I used the 2.51V internal reference of the microcontroller so the input voltage on each channel should be betveen 0 - 5V for maximum resolution.
The digital resolution and measurement limmitation for each input is the following:
- airspeed: 10bit measurement, calculated value is 8bit, calculation is done using a 7 point user programmable approximation curve. (airspeed measurement is non linear). 255 point resolution for analog gauge servo (unit doesn't matter).
- altitude: 10bit measurement, calculated value is 16bit, calculation is done using a 4 point user programmable approximation curve. Indicated values: 0-9999 (unit doesn't matter).
The analog gauge will indicate the relative altitude (base measured at power on), the numeric display will indicate the absolute altitude.
- variometer: 8bit measurement. The signal need to have a ~2.5V offset for steady state. Any variation up or down will be indicated by flashing the corresponding LED on the panel and generating the characteristic vario sound on audio output.
The offset is sampled at power on. Maximum resolution is 126 steps up or down. The sensitivity is dependent of the vario sensor board's design.
- battery voltage: 8bit measurement, no calculation. It is indicated by a 20pixel bar graph on the LCD display. I set up mine to indicate minimum and maximum between 9.6V and 12.6V. (min and max are user setable parameters)
- camera battery voltage: 8bit measurement, no calculation. It isn't yet indicated on the LCD (I am thinking on it where to display) but it can generate alarm.
- current: 10bit measurement, calculated value is 16bit (used also at consumption measurement), units are mA, so maximum 65,5A can be measured. Indication is done on a 20pixel bar graph; I set up mine to have 0-18A limits. (note: resolution in mA decreases with higher current measurement limit)
- consumption: using a 32bit summator it samples the current from the above calculated value, sampling is done at 50Hz. Maximum indicated value is 9999mAh.
- rpm: 16bit calculation. minimum detectable rotation is 1000rpm. Displaying is done on 3digits in RMP x100, so it can display max 65500rpm.
The servos for the two analog gauges are controlled at 50Hz, the min/max values for pulse width can be set by the user, this way we can use the maximum constructive range of the servo. My 60deg. servos have 180deg. maximum range. (note: out of constructive range values can burn out the servo)
There are 27 setable parameters, I tried to design the firmware to be configurable at maximum without reprogramming so to be adaptable for any plane/hardware, the only limitations to be those from abowe.
Measured raw data can be read also, It is used for parameter setup and calibration.
The configuration can be done in command line stile using any serial terminal (like HyperTerminal from Windows, Minicom from Linux) configured to 9600bps 8N1, using a serial cable. All the configurations are stored in the microcontroller's EEPROM memory.
The firmware is also updateable trough the serial cable, using the AVRProg from AVRStudio (free). Special programming hardware is needed only at first programming when the bootloader needs to be uploaded. I am using PonyProg for that (free).
Follows: schematics and pcb design for the main instrument panel, after that software stuff and the other desigs.
Some pictures about my build, and a schematic drawing about the cabling of the modules in the plane:
|Aug 26, 2008, 04:09 PM|
I did the first test flight with the panel powered. It measured only the current, voltage and consumption. It looked well, amperage and voltage were correctly indicated. The panel indicated 1610mAh after five flights, and the battery was used before only shortly at bench test (arround 50mAh). After charging the charger indicated 1690mAh, so the panel is pretty accurate
This is the video I recorded at the first test flight:
Watch it from youtube to be able to see in high quality
|Aug 27, 2008, 11:22 AM|
Schemes and firmware of the instrument panel:
1. Some informations:
The main components of the panel are the ATmega8 with TQFP package (DIP doesn't have the ADC6 and ADC7 pins); a 2x16 chr alphanumeric LCD display with the standard 14pin interface; two small sized servos.
I recommend to use a reset generator device in place of R1 resistor. The EEPROM memory can be corrupted when power supply for the microcontroller is unstable - in this case the default parameters from the firmware will be enforced.
There is no need to respect the PCB layout I did. Anybody can design his own layout, the only thing is to take care of the analog routes, and design a ground plane underneath them to eliminate noise. Same precaution needed for AVCC/L1/C12 net.
The values of the sound output's resistors and capacitors are not mandatory, it is important only to have 1Vpp (pulse to pulse voltage) and to obtain some kind of sinus or triangle signal, can be tuned with an oscilloscope. (Board need to be functional for this phase, vario can be simulated by an adjustable input signal between 0 - 5V).
Servo1 is the airspeed gauge servo and Servo2 is the altitude gauge servo.
For LEDs D1, D2, D3 use some high luminosity narrow angle low power LEDs. D1 is "vario down", D2 is "vario up" and D3 is the "alert" LED. Do not connect LED D3 until uploading the bootloader (first programming) - it disturbs the PonyProg's interface.
The jumpers J6-J9 are testpoint like pads on PCB for first programming (uploading the bootloader) using the ISP feature of the microcontroller. I used PhonyProg to do that. Easy to do programmer schemes can be found on PonyProg's webpage.
At the Display connect the R/W pin and the D0-D3 pins to ground (I left D0-D3 in air - it is working this way also).
2. First programming: ( In case of PonyProg )
After the PCB is completed, components mounted, carefully check each connection, make connection from J6-J9 with the Ponyprog's interface (Mosi, Miso, SC, Reset pins) and power up the board from the same power source that Ponyprog's interface has (5V).
!! Do not connect the power for servos !!
NOTE: PonyProg serial interface isn't working with USB-Serial adapters.
a. Fuse bits (Security and Configuration bits) need to be set to:
- Internal RC oscillator with 8MHz: configuration on CKSEL = 0100 which means CKSEL3(on) CKSEL2(off) CKSEL1(on) CKSEL0(on)
- Bootloader activated: BOOTRST(on)
- Bootloader size: 512word which means: BOOTSZ1(on), BOOTSZ0(off)
Write these configurations in the microcontroller
b. Download the bootloader from http://www.dl5neg.de/bootloader/bootloader.html and modify in the Bootloader_Mega8.asm the line 219 from .equ UBR = 23 to .equ UBR = 25 - this is the communication speed 19.2kbps on 8MHz needed for serial programming. Rebuild the .asm file in AVRstudio and write the newly generated .hex binary in the microcontroller using the PonyProg.
c. Disconnect the J6-J9, power up the board (do not power the servos). If everything was done ok then the "vario down" led need to flash 10 times.
d. Connect the LED D3; if the bootloader was properly uploaded and fuse bits configured then there is no more need for PonyProg interface.
The serial interface (UART port J4) of this board is with 5V TTL levels. For connecting it with PC need to do an adapter circuit with a MAX232 chip. Various schemes can be found on Internet. You can get power for this circuit on J4 port.
3. Uploading the firmware using the serial interface:
Check if the bootloader is working properly: Start a serial terminal program (Hyperterminal or minicom ), set to 19.2kbps 8N1; connect the board to the PC, power it up, and when the "vario down" LED flashes press "ESC" immediately - a message should appear from the bootloader.
Close the serial terminal program, start AVRProg from AVRStudio and write the provided firmware binary file. If everything is ok then it should be done in ~30sec.
NOTE: AVRprog can use only COM1 to COM4 ports. USB-Serial adapters can have bigger values, try other USB ports. I have on my PC two USB ports which are working as COM3 and COM4 - the AVRProg can be used only with those.
Restart the board, the LED flashes 10 times (~8sec) then it should start up (values displayed on the LCD screen). Because servos can be different, if they are doing noise then disconnect their power immediately to prevent burning out. Default values in the firmware are for the servos I use.
Comming: Set up parameters from servo limits, list of parameters.
|Aug 27, 2008, 01:43 PM|
unfortunately there is lot to work with those sensor boards, analog signals are complicated stuff, vario is the worst.
|Sep 01, 2008, 03:20 AM|
Yes, I have seen that one a couple of mounts ago, and that inspired me to build an instrument panel
|Dec 14, 2008, 11:41 AM|
Romania, Dolj, Craiova
Joined Sep 2007
"OSDs are formidable devices, but they are expensive to buy"
Did you seen the BlackStork OSD, what they offer for 120 Euro?
|Dec 14, 2008, 01:15 PM|
Eagletree has a nice one for $45US but have to use it with their system although with a bit of brainstorming could probably be used with other equipment..
|Dec 14, 2008, 02:03 PM|
Romania, Dolj, Craiova
Joined Sep 2007
Th $45 piece do nothing alone.
Same functions of BlackStork costs more done with EagleTree, not counting the transport to Europe and customs, which are zero for BlackStork.
|Dec 14, 2008, 02:40 PM|
That BlackStork looks good, need to get one for my heli.
But the basic idea of the panel was not the price reduction. For the plane I will remain with this. Currently I am waiting for some SMD resistors and high sensitivity opamps to finish the sensor boards.
I am planing to build also a Piper scale FPV plane, and want to do a more scale-like cockpit for it.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Tigermoth sem-scale instrument panel rear||sky guy||Parkflyers||22||Dec 13, 2005 06:14 PM|
|Switchback Instrument Panel||Steven9026||Parkflyers||6||Dec 29, 2002 08:53 PM|
|Tm Instrument Panel||SKY HIGH||Parkflyers||2||Oct 21, 2002 08:25 PM|
|Switchback clear canopy? = instrument panel||Wright Flyer||Parkflyers||3||Oct 11, 2002 02:14 PM|
|My Cessna 180 Panel||KeithLuneau||Parkflyers||5||Oct 02, 2002 01:41 PM|