trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #45 on: December 23, 2020, 01:06:36 am »
Ok. Measured the voltage coming into the batt1 pin on the scope. less than 100mv of noise, all high frequency (10Mhz or so). I conveniently broke off the pad going to the pin, so traced back the pin to the 16k resistor it lead to (oddly, it measures 8k on my DMM - a Fluke). Painfully resoldered a tiny wire to it and hooked all back up - operationally seems to be the same. Still fluctuates a lot. Its possible it's the RF xmtr. The Hawkeye Little Pilot monitor/rcvr I have has a video in - but I can't seem to get it to switch to the AV in! Arg. I tried the auto search - it just scans all the RF channels - never sees the AV in even when I have it connected with no RF on.

Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #46 on: December 23, 2020, 11:47:29 am »
That scope isn't going to show 5.8GHz noise...  :)

Did you try with FPV Tx powered off?

Could also be switching voltage regulator putting noise there.  Those can be from kHz to MHz.  Besides stand alones, they can be built into things like cameras.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #47 on: December 23, 2020, 07:10:20 pm »
That's what I was trying to do with the LCDs AV input. I tried two other displays - at least one of them shows the camera input but neither will show the output of the OSD. The only thing that works is the video xmtr. And obviously then it is on. I checked the signal with my scope - it looks fine.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #48 on: December 23, 2020, 08:06:41 pm »
I also tried adding a 10uf tantalum cap to the power supply leads to the xmtr. No difference in the battery voltages jumping around. It also is not powering up properly, it won't always sync after powering up, and the camera input now doesn't work. I've gone from two working OPOSDs to none.

Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #49 on: December 23, 2020, 10:44:25 pm »
Sorry to hear that.  :(

:)  If the wild voltage happens with more than one OSD, I would get the video displaying without the FPV transmitter.  It doesn't have to be pretty.  :)  If there was still a problem with OSD voltage I would remove things that have switching power supplies, one at a time, even if that means temporarily changing my switching main power converter to a linear one or 4.8V battery for a test.  Even if that means using a different brand of camera (or other video signal source) for a test.

A thought about going through several OSDs...  I know one thing I have to tell myself is to avoid plugging / unplugging most any connector when there is power on.  That goes mainly for any connector that has 3 or more wires.  The problem is that sometimes the ground is the last to make connection by a small fraction of a second.  Plugging in a 3 wire camera (Sig, +5, Gnd) connection to a powered OSD, you have +5 and signal connected, but no ground.  With R and C between the two (in the camera), that can be as bad as connecting +5 straight to the OSD video in from the OSD's viewpoint.  I helped a guy reconfigure his quad because one of his six 3-pin-servo FC connectors stopped working for probably this reason.

Edit: The other thing that comes to mind about several OSDs becoming non-functional is that enough electrical noise on the power lines could make your voltage regulator output the wrong voltage or even make an OSD act like it is the wrong voltage.
« Last Edit: December 26, 2020, 09:31:20 am by TheOtherCliff »

jdl

  • ***
  • 246
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #50 on: December 24, 2020, 07:53:07 pm »
...so traced back the pin to the 16k resistor it lead to (oddly, it measures 8k on my DMM - a Fluke).

This, in fact, is a 15k resistor, probably marked 18C (EIA-96 code). You had probably (unintentionally) touched with one of the probes both this and its neighbour (that goes to batt2) resistor's pads, then the DMM really reads approx. 8k resistance. If you carefully touch with probes just the pads of this 15k resistor, DMM displays 15kohm, as expected - I've tested that right now.

Hantek 2D72 looks nice, I'm tempted to buy myself one, too! :)

Sorry about the toasted OSD module, its MAX7456 is probably dead...

TheOtherCliff pointed the probable cause. I've also burned one MicroMinimOSD some time ago, doing the same. And two MobiusMini cameras too, but that's a different story... :D

Merry Christmas to all!   :)

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #51 on: December 30, 2020, 08:00:49 am »
Well, I got 3 more PCBs today that look identical to the last batch - with the same little QC label on one side. Wired up, tested in the quad. Acts like the other ones - except battery voltage reads 3.05V and only 1 cell on a fully charge, 4.17V battery. The divisor ratio and the current sense value are the defaults.
I used the latest .hex with the softreset.
I changed the divisor to 21 and now it reads 4.18V. Close enough.
I have more from a different (the source you recommended) on the way. Should be here soon.

jdl

  • ***
  • 246
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #52 on: December 30, 2020, 10:59:24 am »
@trust, I guess I've found what causes your issue! Or, at least, I've found a flaw in the code...   :-[

If OSD is configured to monitor Voltage AND CURRENT, both sensors connected to MinimOSD board directly,  the readings would be probably unstable.

This is caused by an "improvement" (attempted to widen the acceptable voltage range coming from current sensors) I had made when I first started to tackle with MinOPOSD code (and Arduino at all - year 2016 :) ). Actually, I've never used current sensor connected to OSD, so I've never realized there is a problem there...

In short, the suggestion is that the issue lays in switching analogReference from INTERNAL (1.1V) to DEFAULT (5V)  and vice-versa between immediate consecutive analogRead (for voltage and current). This is possible, but few extra dummy ADC reads after each analogReference change are required.
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

Quote
Notes and Warnings
After changing the analog reference, the first few readings from analogRead() may not be accurate.



I'm going to correct this and update the sources on github.

Meanwhile, setting (in MinOPOSD JDL Config tool) the Current Sensor Amps Per Volt to 0.00 should fix the issue for you.

In any case, when no current sensor is connected to OSD, it is advisable to set the Current Sensor Amps Per Volt to 0.00.



Btw, did the charset upload succeed with these MicroMinimOSD boards?

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #53 on: December 30, 2020, 07:49:08 pm »
Interesting!
I just did a flight test on the quad in somewhat windy conditions - not the best but wanted to see if the voltage tracked properly under loads.
It seems like it did reasonably well - after landing and checking battery voltage vs display, only off by a few hundredths of volts.
Overlay looked good - I don't have power going to the Runcam 4K - I'm using it's internal battery power to see if I can eliminate a noise source. And it looked much better than before. Pretty clear even on the recorded OSD data on the ground.
Of note was the sag in the 4000mah 4s battery under load - reading 20% lower at 50% throttle than after landing.
I'll try setting the current sense parm to 0 - I'm not using a current sensor.
And yes, the charset uploaded fine - although I don't know whether there was one there first as I didn't check.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #54 on: December 30, 2020, 08:10:01 pm »
I changed the current sense parm to 0 - then the voltage reading was 5 cells and 20.xx volts!
So I changed the voltage multiplier back to the default - it was off by 1.8% so I set it to 15.67 and now its within a hundredth of a volt.
Now it reads 4 cells and 15.63 volts - which is correct.
Glad you found this - devils in the details!

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #55 on: December 30, 2020, 08:53:11 pm »
I also did a flight test with these changes. The sag issue disappeared. Now voltage and capacity drops slowly and evenly as I would have expected.
Excellent!

jdl

  • ***
  • 246
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #56 on: December 30, 2020, 10:04:52 pm »
Great! Happy it finally works for you and thanks for your cooperation in resolving this mystery!

Really, sometimes one has to step back and look from a different angle :)  No matter how thoroughly I was going through the code, I just kept skipping the section for current reading as I've assumed it is not used. I've also assumed it is effectively disabled by setting the Current Sensor Amps Per Volt to 0.00, just because it was the logical setup when not using current sensor at all. Reading your comment about setting current sense value to defaults led me to the insight :)

I'm going to restore the analogReference for current reading to 1.1V as it was in the original MinOPOSD code, in case anyone might wish to use a current sensor connected to OSD.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #57 on: January 07, 2021, 01:17:07 am »
Update on noise issues. I migrated the GPS+OPOSD to the Atom FC Micro Hellaplane V2  today and tested.
Video all looks great until motors run - then the overlay blinks on and off with the motor power.
I disconnected the 7V power from the battery powering the camera and tested again. It has a battery so runs fine without external power.
Then the overlay looked pretty much fine even with the motors running, although the camera image had some banding from motor noise. Usable although not great.
Added a 100uf tantalum cap across the power leads of the OSD. No appreciable difference.
Note the camera/xmtr combo works fine with no noise when no OSD in place - just direct connect from camera to xmtr. There is still a common ground, and up to today camera was powered also by same supply as xmtr.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #58 on: January 28, 2021, 10:31:11 pm »
I got some 330uH inductors and 1000uf electrolytic caps & added these to all 3 OPOSD systems I have. Cap directly across the OPOSD power leads, inductor in line with 5V supply. Should be a pretty effective low pass filter. 220Hz Fc
  On the sk450 quad, it was a significant improvement - not perfect, but most motor noise considerably reduced - maybe by a factor of 3 (visually on screen).
  On both of the Hellaplanes, which have motors running at higher speeds (and less bypass on the power leads at the esc's), it cut the noise by maybe half. The OSD display is pretty solid - just the video input has some banding with the motor noise.
  I now use the battery power on the Runcams to supply them with power for the video feed, so it shouldn't be getting power supply noise. That made a big difference previously.

trust

  • ****
  • 299
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #59 on: March 04, 2021, 02:44:35 am »
I upgraded Hell8ious - the 8 motor, large Hellaplane (85 lbs thrust) to the bimode electronics, with OPOSD. I added the 1000uf cap and inductor on the OSD. Interestingly - there was virtually no noise on the video link at all even with motors running in hover mode.
  I note on the YEP ESCs running 6S, they have two 470uf caps on the power input lines on EACH esc.
On the small planes, there are NO extra caps on the ESCs - only what the little 20A bare PCBs have on board (can't tell what they are, all surface mount).
  I imagine if I added caps on each of the 20A ESC boards themselves, it would greatly reduce the video noise.