HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jan 31, 2015, 01:32 AM
FPV in Hawaii
iskess's Avatar
United States, HI, Kailua
Joined Feb 2012
2,474 Posts
Quote:
Originally Posted by ttabbal View Post
The charset is a separate project. Download the Arduino IDE and get it installed. Open the character uploader INO file in there and verify. That will build the .hex file. From here you upload the hex and reset the board. It will flash the LED for a while, then that program is done. You can upload the main firmware now. All this is just due to lack of space on those atmel chips..

You might be able to upload to the board with an FTDI. Some of them have the bootloader, but mine from witespy didn't. Could have just been my unit. Give it a go, if it fails to communicate with the bootloader after a couple tries, you probably need a USBASP. You can also try swapping TX/RX. Some boards in Arduino land mark the pins crossed-over and some don't.

You also asked about GPS settings. The code does auto-baud detection, so bitrate doesn't really matter much. I think mine was 57600. I don't remember which protocol I was using though, UBX I think. But NMEA just about always works too.
Thank you ttabal. That was much easier than I expected. It worked using the FTDI.
I haven't got the GPS working yet, but I'm out of time for tonight (date night).

Quote:
Originally Posted by irun4fundotca View Post
Thanks for the pinout. It looks like pins 27 and 28 are SDA and SCL.
iskess is offline Find More Posts by iskess
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 06, 2015, 10:30 PM
Joined Aug 2011
1,470 Posts
@Dennis or anyone else.
Has anyone ever experienced an apparent brown-out of the MAX7456 chip, where the video will black out for a second and then come back with no OSD overlay?

I'm experiencing this somewhat random problem with MinimOSD's and 2-3 different OSD firmwares. In each case, the ATMega328 continues to run fine but the MAX appears to glitch out and cease to process the SPI commands for the overlay graphics, even though it still passes the incoming video through to the output. Rebooting the MINIM brings the max back online.

The issue is fairly random and hard to debug or reproduce. In each case, I'm fairly certain that my lipo voltage has been well above 10V, and it doesn't happen during any periods of heavy servo or motor load(s).

I have one of these HK low RF noise adjustable UBECS powering the Minim:
http://www.hobbyking.com/hobbyking/s...Reduction.html

it's set to 5V and powering only the OSD, FC, GPS, and BT serial module (i.e., only a steady light load, and no heavy burst loads from any servos or anything else).

The datasheet for the Maxim says that the minimum voltage for both analog&digital power supplies is 4.75. I'm not sure what happens to the MAX if the voltage sags below 4.75V as I don't currently have a means to precisely control the input voltage in order to test it out (perhaps someone with a lab power supply might be able to help out with this?). Still, I'd find it strange that the UBEC was randomly dropping down to ~4.5V during mid-flight.

I've tested to see what happens if the video input from the camera is removed (in case there was a loose connection or a brown-out in the camera), and I've verified that the Minim simply keeps outputting the OSD over a black screen.

Any other ideas on what might be going on here or how to fix the problem? Might there be some way in code to detect if the Minim has browned-out and needs to be reset/reconfigured?
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 06, 2015, 11:11 PM
FPV in Hawaii
iskess's Avatar
United States, HI, Kailua
Joined Feb 2012
2,474 Posts
Quote:
Originally Posted by irun4fundotca View Post
Looking at this micro MinimOSD I see some pins broken out to little pads.
I see:
#29 = Reset
#17 = SCK
#16 = MISO
#15 = MOSI
#1 = D3


Is this enough to program the bootloader?
iskess is offline Find More Posts by iskess
Reply With Quote
Old Feb 07, 2015, 03:39 AM
Joined Aug 2011
1,470 Posts
Quote:
Originally Posted by changosurf View Post
@Dennis or anyone else.
Has anyone ever experienced an apparent brown-out of the MAX7456 chip, where the video will black out for a second and then come back with no OSD overlay?

I'm experiencing this somewhat random problem with MinimOSD's and 2-3 different OSD firmwares. In each case, the ATMega328 continues to run fine but the MAX appears to glitch out and cease to process the SPI commands for the overlay graphics, even though it still passes the incoming video through to the output. Rebooting the MINIM brings the max back online.

The issue is fairly random and hard to debug or reproduce. In each case, I'm fairly certain that my lipo voltage has been well above 10V, and it doesn't happen during any periods of heavy servo or motor load(s).

I have one of these HK low RF noise adjustable UBECS powering the Minim:
http://www.hobbyking.com/hobbyking/s...Reduction.html

it's set to 5V and powering only the OSD, FC, GPS, and BT serial module (i.e., only a steady light load, and no heavy burst loads from any servos or anything else).

The datasheet for the Maxim says that the minimum voltage for both analog&digital power supplies is 4.75. I'm not sure what happens to the MAX if the voltage sags below 4.75V as I don't currently have a means to precisely control the input voltage in order to test it out (perhaps someone with a lab power supply might be able to help out with this?). Still, I'd find it strange that the UBEC was randomly dropping down to ~4.5V during mid-flight.

I've tested to see what happens if the video input from the camera is removed (in case there was a loose connection or a brown-out in the camera), and I've verified that the Minim simply keeps outputting the OSD over a black screen.

Any other ideas on what might be going on here or how to fix the problem? Might there be some way in code to detect if the Minim has browned-out and needs to be reset/reconfigured?
update:
I managed to do some testing where I controlled the incoming voltage to the minim using an adjustable drop-down regulator. I was able to get to about 4.3V before the MAX appeared to give out (blinking LED on pin D13 from SPI commands would cease). Raising the voltage just above that would bring the video back & the SPI SCK LED flashing would resume, but there'd be no OSD overlay graphics.

I initially thought that maybe the ATMega328 was browning out, but I verified that the BOD fuse was set to 2.7V, and I confirmed it by dropping the voltage down to around ~2V, at which point, the ATMega would reboot.

I guess the problem is that, once the MAX7456 browns out, it needs to be re-initiated, yet the ATMega isn't aware that the MAX chip has reset. So, it continues to send SPI graphics config commands to the MAX, which are silently ignored/misinterpreted since the chip hasn't been correctly re-configured after the reset.

Anyway, in addition to replacing that UBEC and figuring out what the heck is going on with that crazy voltage drop, I guess I'll need to figure out if I can actually monitor the incoming voltage to the ATMega accurately enough to detect if the voltage has dropped below 4.4V. Does anyone know if it's possible to do something like this?

I guess I could connect the 5V power rail to one of the analog pins in order to measure it, but I'm assuming that the AVR does its ADC conversions based on the current Vcc. Can the AVR actually measure&output its own Vcc via the ADC's???
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 07, 2015, 06:53 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,243 Posts
Quote:
Originally Posted by changosurf View Post
update:
I managed to do some testing where I controlled the incoming voltage to the minim using an adjustable drop-down regulator. I was able to get to about 4.3V before the MAX appeared to give out (blinking LED on pin D13 from SPI commands would cease). Raising the voltage just above that would bring the video back & the SPI SCK LED flashing would resume, but there'd be no OSD overlay graphics.

I initially thought that maybe the ATMega328 was browning out, but I verified that the BOD fuse was set to 2.7V, and I confirmed it by dropping the voltage down to around ~2V, at which point, the ATMega would reboot.

I guess the problem is that, once the MAX7456 browns out, it needs to be re-initiated, yet the ATMega isn't aware that the MAX chip has reset. So, it continues to send SPI graphics config commands to the MAX, which are silently ignored/misinterpreted since the chip hasn't been correctly re-configured after the reset.

Anyway, in addition to replacing that UBEC and figuring out what the heck is going on with that crazy voltage drop, I guess I'll need to figure out if I can actually monitor the incoming voltage to the ATMega accurately enough to detect if the voltage has dropped below 4.4V. Does anyone know if it's possible to do something like this?

I guess I could connect the 5V power rail to one of the analog pins in order to measure it, but I'm assuming that the AVR does its ADC conversions based on the current Vcc. Can the AVR actually measure&output its own Vcc via the ADC's???
Trying to measure the voltage-drop directly, is not the way to go. The voltage reference for the ADC is tied to the 5-volt supply as default. When the supply drops, the ADC reference level drops and you don't get proper readings. You have to either change the reference voltage to another level or make some tricks. IIRC Atmega328P supports some internal reference levels you can use. Think I used the internal bandgap reference level at some point, but didn't find it very accurate.
My best guess is to do it by software. I haven't checked, but I guess you can check/poll MAX7456 information now and then and detect, if it have been reset "for some reason". That would be the easiest/best solution.

If you do decide to make actual hardware for detecting brown-out, I would use something like a simple zener diode and a transistor or zener-diode and comparator. You can add a bit of hysteresis and connect it directly to the Atmega pin-change interrupt.

If you go with the ADC's and another reference level, you can consider to use the analog comparator on Atmega328P.
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Feb 07, 2015, 03:57 PM
Joined Aug 2011
1,470 Posts
Quote:
Originally Posted by Dennis Frie View Post
Trying to measure the voltage-drop directly, is not the way to go. The voltage reference for the ADC is tied to the 5-volt supply as default. When the supply drops, the ADC reference level drops and you don't get proper readings. You have to either change the reference voltage to another level or make some tricks. IIRC Atmega328P supports some internal reference levels you can use. Think I used the internal bandgap reference level at some point, but didn't find it very accurate.
My best guess is to do it by software. I haven't checked, but I guess you can check/poll MAX7456 information now and then and detect, if it have been reset "for some reason". That would be the easiest/best solution.

If you do decide to make actual hardware for detecting brown-out, I would use something like a simple zener diode and a transistor or zener-diode and comparator. You can add a bit of hysteresis and connect it directly to the Atmega pin-change interrupt.

If you go with the ADC's and another reference level, you can consider to use the analog comparator on Atmega328P.
Thanks Dennis,
Yes, I was hoping to simply do it in software. Any ideas on how this could be setup? What registers on the MAX could be polled & checked in order to determine if the chip has been reset and needs to be initialized?
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 07, 2015, 04:46 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,243 Posts
Quote:
Originally Posted by changosurf View Post
Thanks Dennis,
Yes, I was hoping to simply do it in software. Any ideas on how this could be setup? What registers on the MAX could be polled & checked in order to determine if the chip has been reset and needs to be initialized?
Sorry, I can't remember much of the initialization done on MAX7456 - but if you are completely lost let me know, and I can check the code.
You might be able to check one of the registers changed on initialization (if any) and use that.
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Feb 08, 2015, 12:34 AM
Joined Aug 2011
1,470 Posts
Quote:
Originally Posted by Dennis Frie View Post
Sorry, I can't remember much of the initialization done on MAX7456 - but if you are completely lost let me know, and I can check the code.
You might be able to check one of the registers changed on initialization (if any) and use that.
ok, I think I've got something that works: read the value of register VM0 (address 0x80) on the MAX7456 and check if the OSD Enable bit is set (bit 3, 0x08). If not, re-initilize the chip.

I tested it out by setting it to check every five seconds from the main loop. If the test fails, it disabled interrupts and re-configures the MAX7456. I then dropped the voltage down until the MAX browned out, brought it back to the point where the passthru video would return, and waited to see if the OSD would come back online... and... success, it works great...

One thing I found interesting is that apparently the BO voltage for the MAX7456's can vary greatly from chip to chip. The OSD on my plane has a MAX that will brown out at around 4.3V, yet another Minim I was bench-testing with was able to go down to about 3.2V before browning out.
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 12, 2015, 05:39 PM
Joined Aug 2011
1,470 Posts
Does anyone know what kind of graphics chip other OSD's such as the Eagle Tree and RVOSD use? Or, are they doing the graphics processing & OSD overlay using some other method?
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 12, 2015, 10:22 PM
Flying Wood For Fun
irun4fundotca's Avatar
Canada, ON, Harrowsmith
Joined Jan 2012
8,326 Posts
heres something Changosurf
http://tronixstuff.com/2011/05/30/tu...-your-arduino/
http://tronixstuff.com/2011/05/14/ki...gn-hackvision/

arduino-tvout
http://code.google.com/p/arduino-tvout/downloads/list
irun4fundotca is online now Find More Posts by irun4fundotca
RCG Plus Member
Last edited by irun4fundotca; Feb 12, 2015 at 10:31 PM.
Reply With Quote
Old Feb 19, 2015, 08:29 PM
Joined Aug 2011
1,470 Posts
thanks man, I'll check it out.
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 19, 2015, 08:38 PM
Joined Aug 2011
1,470 Posts
question:
for the long-range flyers using this OSD, which metric do you happen to find most useful for battery/distance management? The "Avg/Curr MAH/Km" metric or the "Km left with current usage" metric?

I've made a bunch of mod's to my OSD code, and now I'm running low on flash space for new features. Since I'm starting to mess around more with fixed-wing/long-range, I'm trying to figure out what the best tool(s) are for monitoring current consumption while going on long-range flights. Any thoughts?

I believe that the Eagle Tree OSD offers a "flight time left" metric that's based on the amount of battery being consumed. I'm not sure how useful something like that would be in practice but I thought I'd mention it.
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Feb 19, 2015, 08:48 PM
Flying Wood For Fun
irun4fundotca's Avatar
Canada, ON, Harrowsmith
Joined Jan 2012
8,326 Posts
that sounds good to me or mah left

maybe "point of no return limit"

is there a compiled sketch for this board somewhere? I still haven't flashed mine, arduino has been messed up on me
and the few other atmel boards I can compile, I cant risk loosing the ability to compile for them trying to fix it for this

edit - found an earlier one I compiled have to try that yet
http://www.rcgroups.com/forums/showpost.php?p=28232443

EDIT - still no luck think my usbasp is foobar
anyone want an osd? might take some tinkering to get it working
the max chip is from a storm or breeze osd (used a sparkfun hot air wand) so it might need replacement too
just pm me your addy and ill send it out next post office trip
irun4fundotca is online now Find More Posts by irun4fundotca
RCG Plus Member
Last edited by irun4fundotca; Feb 19, 2015 at 09:56 PM.
Reply With Quote
Old Feb 21, 2015, 01:34 AM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
179 Posts
Naza diy max7456 osd

Hey Dennis,

Hope all is well with you.
Just wanted to thank you again for your patience and willingness to teach me all I know about the Max7456 and a lot more a few years back. Last year with all you taught and some awesome work by pawelsky, here on rcgroups, I was able to get all kinds of data from the NAZA onto my OSD.
Just for fun here is the very basic schematic
Thanks again,

Rick
RickEis is online now Find More Posts by RickEis
Last edited by RickEis; Feb 21, 2015 at 12:29 PM.
Reply With Quote
Old Feb 21, 2015, 05:21 PM
Registered User
mike_o's Avatar
Denmark, Nrum
Joined Jan 2012
1,796 Posts
Strange current readings with Flytron current sensor

EDIT: I may have found the problem: Unstable reference voltage.

After initial success (video in post #1), I've been having problems with the current reading lately. Almost identical problems in two set-ups in different planes. I'm using Flytron's INA139 based sensor.



The transfer function for the INA139 is:
IO= gm (VIN+)– (VIN–) (1)
where gm = 1000A/V (2)

or 100mV sensor output into a 100kOhm resistor per Amp current in a 1mOhm shunt.

Both sensors seem to work OK before connected to the OSD, but when connected, the voltage starts cycling up and down. And so does the reading, of course.

http://youtu.be/eDZI5fTHmyk

If I short the OSD current sensor input, the reading goes to 0 as it should.

Now, why is it that the load of the OSD affects the reading? And dynamically so.

EDIT: May have found the problem - reference voltage unstable...
mike_o is offline Find More Posts by mike_o
Last edited by mike_o; Feb 23, 2015 at 11:51 AM.
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 06:12 PM
Sold EASY OSD (Version 1.2) Brand New . $75 shipped. LHTPlane FPV Equipment (FS/W) 7 Mar 20, 2012 11:45 PM
For Sale MAX7456 OSD Break out board. ziomatrixacs FPV Equipment (FS/W) 4 Jun 18, 2011 04:50 PM