New Products Flash Sale
Thread Tools
Old Jun 01, 2015, 12:40 PM
ardufriki is offline
Find More Posts by ardufriki
Registered User
Joined Jun 2014
44 Posts
hi, I have tested again with the following results:

- Little mod in MWOSD code to have a "sanity led" working in D7 (pin 11 in Atmega 328p).

- I power with 5V the circuit and I get the clock blue led blinking (no other conections to GPS nor FC, just 5V power). And I also have the pin11 "blinking" now.

- I decrease the supply until the "clock led" switches off. It comes at 4.2V.

- I check the sanity led then and It is always ON, no more blinks, so I think the avr is frozen at this stage. It is weird, so It should freeze much lower.

- Then I increase the supply to 4.5V again, and I have the avr working (flashing pin11) , but the blue led goes ON and no blink. I increase the supply to 5V and I have again the blue led blinking (sometimes this lasts a while).

So you are right, the problem comes from MAX7456, but IMHO the avr also freezes, but no hangs, so if I increase voltage it works again.

Anyway, in my flights the behaviour is not the same than the tests, because I have to land in order to reset all and have again the blinking led.....

All of this not tested with video signals attached.
ardufriki is offline Find More Posts by ardufriki
Last edited by ardufriki; Jun 01, 2015 at 01:04 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 01, 2015, 04:23 PM
changosurf is offline
Find More Posts by changosurf
Joined Aug 2011
1,664 Posts
Quote:
Originally Posted by ardufriki View Post
hi, I have tested again with the following results:

- Little mod in MWOSD code to have a "sanity led" working in D7 (pin 11 in Atmega 328p).

- I power with 5V the circuit and I get the clock blue led blinking (no other conections to GPS nor FC, just 5V power). And I also have the pin11 "blinking" now.

- I decrease the supply until the "clock led" switches off. It comes at 4.2V.

- I check the sanity led then and It is always ON, no more blinks, so I think the avr is frozen at this stage. It is weird, so It should freeze much lower.

- Then I increase the supply to 4.5V again, and I have the avr working (flashing pin11) , but the blue led goes ON and no blink. I increase the supply to 5V and I have again the blue led blinking (sometimes this lasts a while).

So you are right, the problem comes from MAX7456, but IMHO the avr also freezes, but no hangs, so if I increase voltage it works again.

Anyway, in my flights the behaviour is not the same than the tests, because I have to land in order to reset all and have again the blinking led.....

All of this not tested with video signals attached.
I've tested it multiple minimOSD's, with video attached and a variable voltage power supply. Trust me, it's the MAX and not the AVR.

As you may know, the 328's can easily be run down to around 3V, as many setups have them running at 3.3V with no problems. Now, if you're claiming that the AVR is freezing, then perhaps it might have to do with some kind of interrupt problem or an issue with how the SPI code works when communicating with the MAX; i.e., maybe it's getting temporarily hung up waiting for something to happen when the MAX browns out. I haven't bothered hooking up an extra LED to a free pin on the ATMega, and the minim's only have a single LED on pin13 which is the SPI clock pin, so I can't do the same test.

I think if you really wanted to see if it was hanging, you'd have to write another dummy sketch that simply initializes the MAX, performs no further communication with it, and then simply dumps something on the serial port (ex. from the main loop, print millis() & then delay 1 second ). That way, you'd be able to verify if the AVR is able to survive the voltage sags (I'm betting it will).

Different MAX chips can vary in how low they can go. My "best" minim can actually go down to around 3.8V and still survive; at that point, the OSD slowly fades out and becomes grainy before the MAX completely stops and you get a full black-out/black screen/no video.

I've come up with two solutions, a hardware one and a software one:

The software is like I stated previously; I periodically check the status register on the MAX and see if the OSD is enabled. If so, do nothing. If not, re-initialize the MAX registers just like after first boot. This makes sure that I'll get the OSD back within a couple of seconds after a brown-out.

FYI, I'm also running MWOSD, and I do have a patch, but I haven't considered submitting it. The few times I've brought this issue up, I've been met with indifference, crickets(no response), or 'meh' attitudes, so I basically just gave up on it.

However, the above patch doesn't solve the other half of the problem which is that you'll actually LOSE VIDEO if there's a brown-out, which can cause a scary/dangerous situation. So, I came up with a simple hardware solution to add a resistor between the VideoIN and VideoOut pins on my minim's, with a value of around 200 Ohms. What this does is permit some of the input video to 'bleed through' to the output line just enough so that you still get an image when the MAX goes black. The only side-effect of this is that it makes the OSD overlay a bit dimmer. Larger resistance values give a brighter overlay, but at the cost of a much dimmer bypass image when the MAX goes black. So, it's up to you to decide what resistance value works for you. I found the 200 Ohm value to be a good compromise between OSD overlay brightness & a bypass video signal that was clear/bright enough to use.

A lot of people have simply said "well, it's never happened to me" and/or "why don't you just provide a solid 5V to the minim???" They apparently don't realize that, in the real world, voltage sag can&does happen, even to 5V BEC's. Well, it's happened to me in different setups and using different minim's, so I'm convinced it *is* an issue. Trust me, it sucks losing the video during a brown-out, and then not having the OSD overlay come back afterwards when your plane is a couple of KM's out & you're forced to fly back 'blind'/with no flight stats
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Jun 02, 2015, 02:05 AM
ardufriki is offline
Find More Posts by ardufriki
Registered User
Joined Jun 2014
44 Posts
What a good explanation, man.

I have now two MAVLINK-OSD V2.0, loaded with MWOSD firm. I believe that in this design there must be the 200 ohm resistor (not checked), because when I have the brownouts I still have video in my goggles to come back, and as you said that is waaaay good !! (I also have RTH, but RTH w/o video is scary ).

The tests I did yesterday were finally made with a logic probe in pin 11, I changed the code in R1.3 MWOSD:
Code:
  // Blink Basic Sanity Test Led at 1hz
  if(timer.tenthSec>10)
    digitalWrite(LEDPIN,HIGH);
  else
    digitalWrite(LEDPIN,LOW);
to this:

Code:
  // Blink Basic Sanity Test Led at 1hz
  if(timer.tenthSec % 10)
    digitalWrite(LEDPIN,HIGH);
  else
    digitalWrite(LEDPIN,LOW);
, so the LEDPIN (PIN11) now blinks (but it is not 1Hz ).

I tested whit a logic probe with led, so I could see how the led stops blinking when CLKIN led switchtes off. It is easy, but you have to be very precise to touch the 11th pin of the avr.. I dont know how the hanged CLKIN line of the MAX can affect the avr and hang it, but it seems it does. Weird thing.

As I am curious, I will make more tests as you said, with a dummy sketch, but for now I would like to have you software solution.

In the "todo list" of MWOSD page I have seen something about this issue, may be they will include the solution in next version.

PD: Please, could you post briefly your solution, I would try something like this:
Code:
//this in the main loop, every 1 second

if (MAX7456_Read (VM0_reg) ==0){

// force soft reset on Max7456
  digitalWrite(MAX7456SELECT,LOW);
  MAX7456_Send(VM0_reg, MAX7456_reset);
  delay(500);
}
the problem is I cant find a MAX7456_Read function in MWOSD code, so I need here some help

something like this??
Code:
//code to read MAX7456 register. NOT TESTED.

uint8_t MAX7456_Read (uint8_t add)
{
  uint8_t  a;
  a = spi_transfer(add);
   return a;
}
ardufriki is offline Find More Posts by ardufriki
Last edited by ardufriki; Jun 02, 2015 at 05:42 AM.
Reply With Quote
Old Jun 02, 2015, 05:58 AM
montis is offline
Find More Posts by montis
Registered User
Lithuania, Vilnius County, Vilnius
Joined Dec 2006
127 Posts
Hi, changosurf

Quote:
Originally Posted by changosurf View Post
...
Different MAX chips can vary in how low they can go. My "best" minim can actually go down to around 3.8V and still survive; at that point, the OSD slowly fades out and becomes grainy before the MAX completely stops and you get a full black-out/black screen/no video.

I've come up with two solutions, a hardware one and a software one:

The software is like I stated previously; I periodically check the status register on the MAX and see if the OSD is enabled. If so, do nothing. If not, re-initialize the MAX registers just like after first boot. This makes sure that I'll get the OSD back within a couple of seconds after a brown-out.
...
Be aware that there are a lot of FAKE MAX7456 chips that possibly _MAY_ be very intollerant to the voltage brownouts or sags. These fake chips are some kind of microcontroller with simple video circuit and a some chineese firmware to enulate the functiuons. New cheap minimOSD boards are most probably populated with FAKE MAX. These fakes are known to have issues with fast SPI communications and there was a patch in Deniss firmware to make these fakes work.

You can google for "Fake MAX7456" or read very goot topic here:
http://www.eevblog.com/forum/project...ble-when-cold/
Also wisit one of my favorite sites for looking into FAKES anatomy:
http://zeptobars.ru/en/read/FTDI-FT2...-fake-supereal


Quote:
Originally Posted by changosurf View Post
...
FYI, I'm also running MWOSD, and I do have a patch, but I haven't considered submitting it. The few times I've brought this issue up, I've been met with indifference, crickets(no response), or 'meh' attitudes, so I basically just gave up on it.

...
I'am very interested in Your patch as one of my minimOSD occured to be with FAKE MAX. I am not currently using it but plan to install it on my miniquad. And I'm afraid I will be having the same issues. So I really appreciate if You would share Your solution.
montis is offline Find More Posts by montis
Last edited by montis; Jun 02, 2015 at 06:05 AM.
Reply With Quote
Old Jun 02, 2015, 08:58 PM
changosurf is offline
Find More Posts by changosurf
Joined Aug 2011
1,664 Posts
Quote:
Originally Posted by montis View Post
Be aware that there are a lot of FAKE MAX7456 chips that possibly _MAY_ be very intollerant to the voltage brownouts or sags. These fake chips are some kind of microcontroller with simple video circuit and a some chineese firmware to enulate the functiuons. New cheap minimOSD boards are most probably populated with FAKE MAX. These fakes are known to have issues with fast SPI communications and there was a patch in Deniss firmware to make these fakes work.

You can google for "Fake MAX7456" or read very goot topic here:
http://www.eevblog.com/forum/project...ble-when-cold/
Also wisit one of my favorite sites for looking into FAKES anatomy:
http://zeptobars.ru/en/read/FTDI-FT2...-fake-supereal

I'am very interested in Your patch as one of my minimOSD occured to be with FAKE MAX. I am not currently using it but plan to install it on my miniquad. And I'm afraid I will be having the same issues. So I really appreciate if You would share Your solution.
yes, I'm aware of the fake chip issues, and I'm pretty much convinced that 99% of the minim's on the market are fake, as they all come from China and are priced so low that there's no way they could have real chips in them. The MAX7456 appears to be an older technology that MAXIM is slowly moving away from, and the chips themselves are almost $10 last time I checked from vendors such as Mouser/Digikey.

The fact that they're fake is just a 'part of life' fact for me, as there's no way I'm going to invest in buying a bunch of real MAX chips in order to fix all of my OSD modules, nor am I going to stop buying minim's from China. So, I'm ok with simply finding work-arounds to the existing problems.

I'll try to dig up the patch when I have some more time, but it's fairly simple to code something similar if you know what you're doing.
changosurf is offline Find More Posts by changosurf
Reply With Quote
Old Jul 26, 2015, 05:54 PM
denys.sene is offline
Find More Posts by denys.sene
Registered User
Joined Oct 2013
64 Posts
Hi, I'm looking for an OSD breakout for arduino but MAX7456 in sparkfun site says this is retired. I coudn't read all the thread, but what are you using in the place of it?
I'm interested in add some info to my video in my ground station, like the RSSI of my video downlink. What do you recommend?
denys.sene is offline Find More Posts by denys.sene
Reply With Quote
Old Jul 28, 2015, 03:20 PM
badlands is online now
Find More Posts by badlands
When in doubt, throttle out...
badlands's Avatar
Joined Mar 2010
1,784 Posts
Breakout still here
badlands is online now Find More Posts by badlands
RCG Plus Member
Reply With Quote
Old Jul 28, 2015, 05:50 PM
irun4fundotca is online now
Find More Posts by irun4fundotca
Flying Wood For Fun
irun4fundotca's Avatar
Canada, ON, Harrowsmith
Joined Jan 2012
9,488 Posts
the red expensive one here
http://www.canakit.com/breakout-boar...bob-09168.html

another style here
http://www.mikroe.com/click/osd/
irun4fundotca is online now Find More Posts by irun4fundotca
RCG Plus Member
Last edited by irun4fundotca; Jul 28, 2015 at 05:58 PM.
Reply With Quote


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