Diy osd (MAX7456 version, OpenSource)
This thread is mainly a deviation of the original "Diy osd (Arduino and opensource)" project.
By using a MAX7456 OSD-chip instead, this makes it a lot easier to implement extra sensors and features.
Flight from Mike_o
There is a lot of possibilities available in the config-file, some of them are:
Furthermore, the flight-summary will show:
Max LOS is increased to around 500km :)
An Atmega328 microcontroller is used to do all the data-processing and a MAX7456 OSD-chip is used to make the video-overlay. It can be made with an Arduino and MAX7456 breakout-board, uploaded to other OSD's using MAX7456 and Atmega controller etc.
Code can be found at:
Can't upload to google code anymore, newest version can be found here
(NOTE: Caps mounted wrong on picture)
The first test-version
Hook-up diagram by Rick:
(Note - attopilot have voltage-divider build-in and should not have extra voltage-divider as shown here)
The project is compatible with Arduino, but a dedicated hardware design is developed as well.
The latest version of the PCB can be found here:
PCB can be ordered from Seeedstudio, BatchPCB, OSHpark or similiar.
Seeedstudio is 14$ for 10 pieces shipping included.
Just upload the file "OSD_PCB_V1_1.rar" and you are good to go. (If you order from BatchPCB you need to upload as a zip-file, and GM1 must be chosen as board outline).
The list of components can be found here (List made by Bob4432 - thanks):
(Please be aware that crystals should be 16MHz = 887-1086-1-ND and 27MHz = 887-1093-1-ND)
Mouser-list (List made by bstott2 - thanks)
A little explanation of the different components>
1) The slow decoupling-caps are meant as energy-storage, to maintain a stable supply-voltage. They have been placed, to act as a little filter if camera and video-transmitter are connected directly.
2 x 22uF, 10V, X5R, 1206
7 x 10uF, 10V, X5R, 0805
2) Theses caps are used to remove high-frequency noise, and supply the fast current needed for MAX7456 and Atmega328P.
5 x 100nF, 10V, X7R, 0805
3) This is used to AC-couple the output video-signal. The input-video signal is AC-coupled with a small 100nF capacitor, as the input is high-impedance.
2 x 47uF, 6.3V, tantalum, 1206
4) This is the voltage-divider used to measure battery-voltage. 3.3K and 10K have been chosen as default for 4S max.
1 x 3.3K 0805 1%
1 x 10K 0805 1%
5) Resistors used to set the video-impedance. The normal video-impedance is 70 ohm.
2 x 75R 0805 1%
6) Load crystals for Atmega 16MHz crystal
2 x 22pF, NP0, 0805 (perhaps 0603 as the space is a little tight)
7) Pull-up resistors for the Sync-signal etc. on MAX7456 and also a series-resistance on RSSI-input (can be used as any analog input)
4 x 1K 0805 1%
8) Pull-up resistor for Atmega reset-pin
1 x 10K 0805 1% (Note 10K resistor is also used in default voltage-divider)
9) Caps for the 3.3V regulator used for I2C devicces.
2 x 1uF, 10V, X7R 0805
It's a free project with open hardware-design and OpenSource. I have no intention to actually earn money on this project, but as a few have expressed, that they would like to donate a little for the time spent and money used on development etc. I've added a donate-button.
I've started a short documentation, but it's yet pretty small.
Job well done! :D
Yup, nice work! :)
Thanks guys :)
I'll upload a beta-version later tonight, when last changes have been done.
|| “Rick, in config you have to change #define VOLT_GAIN 1 It should match your voltage-divider. If you used 3.3K and 10K try with something like 5.12
The value is calculated something like this;
// Calculated by (1024)/(50*divider)
Edit: Think I might have done it different this time, might by 1/x instead. That gives something like 0.195 in your case " ||
So, I changed the 1 in “#define VOLT_GAIN 1” to a 0.195 → no change? So then I changed it to the 5.12 still no change ?
I noticed in config.h
// Input pins
#define VOLT_MEAS 1
#define CURRENT_MEAS 2
But didn't you have me draw up in the schematic Volt measure pin = A0 and Current pin = A2
Shouldn't VOLT_MEAS 1 be VOLT_MEAS 0 ?
Year, sorry about that. Your schematic is right, but my default config was just a quick setup. I just used the pin-config for what I had hooked up when testing on Arduino. It should be:
// Input pins
#define VOLT_MEAS 0
#define CURRENT_MEAS 1
And please try with the value 0.195 for volt_gain, should be right ;)
Will have a new software-version available later. Testing 10Hz GPS atm
Ha, you don't need to be sorry - I'm having a blast - must mean I can partly understand what you are doing :)
By the way, if you are truly going to keep this Open Source, I think it will be "very" popular - One thing that I would like to see is for you to go overboard with documentation for folks that want to tweak things and learn as I do -
So..... Trial and error ended up with a Volt_GAIN of 3.8 to give the correct 11.0V of the pack ?
Now I see the pack has gone to 10.9 and the OSD is jumping from the 11.0 to 10.6. What happened to the 10.9, 10.8 and 10.7 - I am beginning to suspect the sensor. Do these go bad? I'm using the one as in the schematic.
Maybe I should go back to playing with the ASC756 :) I notice the ASC756 is what EmmersionRC and Eagle Tree use in their OSD. :) Is the ASC756 more accurate and/or sensitive?
I'll check the voltage-reading later. What you are describing (and your value 3.8) doesn't sounds right.
The current-sensor shouldn't have any influcence on the measured voltage, only the voltage-divider and settings in the software.
So I put on a charged pack, the meter reads 12.2 Volts. The OSD is reading from 12.1 to 12.5 back and forth. So what happened to 12.2, 12.3 and 12.4. Maybe the same problem?
Rick, I just checked. It works fine here with something like 3.3K and 10K resistor and the voltage gain at 0.195.
No jumping voltage etc.. Will just check the remaining ports, 2 sec
Just checked, analog input 0 and 1, works as expected :)
Try with your multimeter and measure the voltage from the voltage-divider. It should be something like 3 volt.
I don't have the time to sell anything anyway :p
I will keep it openSource, and document some, but as I don't earn anything in this - and documenting is the borring part, I rarely get it done very good..
I get 0.17V when measured from ground to pin 0.
You can see my voltage-divider
Ha - maybe I used wrong resistors - maybe my sensor is shot ?
Voltage sense is accomplished by scaling to 3.3V ADC range by a precision resistor divider.
That explains the problem. In that case you can just ignore the external voltage-divider.
You might loose a little precision as it's meant for 52 volt and only 3.3 volt ADC. If it doesn't work well, you can just use the voltage-divider you already made and connect directly to + on battery instead (actually, desolder the resistor from V and just put it directly on the + pad might be better. Up to you).
I'll experiment, and if that is the case, I'll yank the voltage divider from the schematic so as not to confuse folks that plan to use this particular sensor :)
So which current sensor are you using ?
You said above, "I currently have this hardware I'll look at when i feel like it
3-axis accelerometer and 3 axis gyro for artificial horizon
Pressure-sensor for thermal/altitude
Plug-in memory to log GPS-data, voltage, current etc"
I was glad to see you considering a pressure sensor, "when you feel like it" :) What pressure sensor do you have?
These gps units seem + or - several meters in elevation :(
|All times are GMT -5. The time now is 11:45 AM.|