SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Nov 24, 2012, 08:10 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Discussion
Diy osd (MAX7456 version, OpenSource)

This thread is mainly a deviation of the original "Diy osd (Arduino and opensource)" project.
http://www.rcgroups.com/forums/showt...1473207&pp=100
By using a MAX7456 OSD-chip instead, this makes it a lot easier to implement extra sensors and features.

Flight from Mike_o
FPV Falcon Flying Wing, Seaside (4 min 26 sec)


Early test
Another OSD test (2 min 37 sec)


There is a lot of possibilities available in the config-file, some of them are:
  • Speed from GPS
  • Altitude from GPS
  • Altitude from pressure sensur
  • Bar showing sink/lift for thermal(with BMP085 pressure sensor)
  • Sink/lift rate shown as number (with BMP085 pressure sensor)
  • Flight timer
  • LOS/Distance home
  • Battery-voltage
  • Battery-current
  • mAh used
  • Direction home
  • Plane position relative to yourself
  • Small GPS coordinates
  • PAL and NTSC support
  • Flexible layout
  • Low voltage alarm
  • mah alarm
  • Metric and imperial support
  • PPM input
  • Menu controlled with RC-transmitter (require PPM)
  • Plane direction relative to your home-position (used to point antenna etc)
  • Button to reset home-position
  • Support for EzUHF RSSI and link quality in PPM-stream.
  • Number of satellites
  • Avg mah/km
  • Current mah/km
  • Km left with current usage
  • Callsign
  • Auto baud detection
  • Menu system
  • different start-functions for flight-timer
  • Temperature control (for weather-balloon)
  • Servo-release on failsafe (for weather-balloon)

Furthermore, the flight-summary will show:
  • Max altitude
  • Max Speed
  • Max LOS
  • Total distance
  • Avg. speed
  • More?

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:
http://code.google.com/p/diy-osd-max7456/downloads/list
Can't upload to google code anymore, newest version can be found here
https://dl.dropboxusercontent.com/u/..._OSD_v0_22.zip

Latest version
(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)


Known "issues":
  • Altitude limited to 9999 (feet or meter doesn't matter)

The hardware
----------------------------------------------------------------------------------

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:
https://dl.dropbox.com/u/3947315/OSD_PCB_V1_1.rar

PCB can be ordered from Seeedstudio, BatchPCB, OSHpark or similiar.
Seeedstudio is 14$ for 10 pieces shipping included.
http://www.seeedstudio.com/depot/fus...html?cPath=185

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)
http://www.bobsquads.com/MAX7456-DIY-OSD.html

Mouser-list (List made by bstott2 - thanks)
https://se.mouser.com/ProjectManager...sID=7bc3013532

Component placement:


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.
https://dl.dropboxusercontent.com/u/...OSD_manual.pdf
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Mar 31, 2014 at 11:54 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 24, 2012, 08:18 AM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,700 Posts
Job well done!
rimshotcopter is online now Find More Posts by rimshotcopter
Reply With Quote
Old Nov 24, 2012, 10:39 AM
Registered User
Old Blighty
Joined Apr 2010
1,687 Posts
Yup, nice work!
Ian Davidson is offline Find More Posts by Ian Davidson
Reply With Quote
Old Nov 24, 2012, 11:54 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Thanks guys
I'll upload a beta-version later tonight, when last changes have been done.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Nov 24, 2012, 12:05 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

You said,
|| “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 ?


Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Nov 24, 2012, 12:10 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

You said,
|| “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 ?


Rick
Hi Rick
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
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Nov 24, 2012 at 12:41 PM.
Reply With Quote
Old Nov 24, 2012, 02:15 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

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?
Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Nov 24, 2012, 02:24 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

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?
Rick
Year, the config-file should be pretty straight forward
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.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Nov 24, 2012, 02:36 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,
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
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Nov 24, 2012, 02:37 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
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
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Nov 24, 2012, 02:43 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
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.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Nov 24, 2012, 02:51 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

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 -
Rick

I don't have the time to sell anything anyway

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..
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Nov 24, 2012, 03:14 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Quote:
Originally Posted by Dennis Frie View Post
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.
On this schematic (see pict) - ( UNO NO NANO
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 ?

Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Nov 24, 2012, 03:21 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
898 Posts
Quote:
Originally Posted by RickEis View Post
On this schematic (see pict) - ( UNO NO NANO
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 ?

Rick
Well - apparently the current-sensor from attopilot have voltage-divider onboard:
From sparkfun:
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).
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Nov 24, 2012 at 03:28 PM.
Reply With Quote
Old Nov 24, 2012, 03:38 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Quote:
Originally Posted by Dennis Frie View Post
Well - apparently the current-sensor from attopilot have voltage-divider onboard:
From sparkfun:
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).
Dennis,

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

Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! OSD version UNKNOWN and fail to update (error) dROb Eagle Tree Systems 9 May 16, 2012 05:12 PM
Sold EASY OSD (Version 1.2) Brand New . $75 shipped. LHTPlane FPV Equipment (FS/W) 7 Mar 20, 2012 10:45 PM
For Sale MAX7456 OSD Break out board. ziomatrixacs FPV Equipment (FS/W) 4 Jun 18, 2011 03:50 PM