trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #30 on: November 26, 2020, 07:08:55 pm »
I'm using bare ESCs - no battery eliminator. I generate my 5V from a LM1085 3A regulator with a fairly big heat sink and 10uf caps on in/out.
1000uf cap LC filter! Wow. OK! I may try that or at least a big cap.
I did add a 10uf cap on the GPS/mag 5V cable - it seemed to help with the GPS/mag issues.
My 5V power goes to the rcvr, then the throttle 3 pin cable supplies power to (almost) everything else - GPS/mag, OPLINK, and OPOSD through their respective cables from the FC. I get ground for the servos from the receiver, as the FC doesn't provide a decent high current ground.
The Runcam (an older 2K) gets power from a separate cable that is driven from the 5 pin charging plug of the battery. I tap the 2s point for power - otherwise the xmtrs get way too hot on 4s, even though they're supposed to work. I have an extra heat sink on it.
I tried several DC-DC switching converters to power the cam/xmtr combo, but they tended to blow up or the xmtr would not work. I had one that worked for a while, until I noticed the rating was only good to 15V in - so I pulled it and went back to the tap approach. Yes, I balance my packs religiously.
 So ground for the cam/OPOSD/xmtr comes from the battery charging cable. The runcam has a two wire plug with ground that I plug into the video input, same 2 wire with video output. Batteries share the black ground, so that is the ccomon ground point. But unfortunately that can cause ground loops to the OPOSD through the video ground cables. If I don't ground the video cables, I get WAY higher noise on the video output.
Not the best approach,

Cliff, yes I was referring to your KV mod OPOSDs.
I just want to find a source for one of these small square units that works reliably with this new code! The ones I have I guess are usable even if they don't quite work properly with the battery monitor code. As long as I can get values I can check for battery level that track the actual battery capacity (don't need high accuracy) I'm happy. I have a rcvr/DVR I set to record the flights so I can look at the data that's lightweight and convenient.
Does anyone know current sources for these OSD boards?

trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #31 on: November 26, 2020, 07:31:37 pm »
A HUGE Thanks to you two and the Librepilot community for all the help you've supplied. We would never have been able to accomplish what we have - and had fun doing it! - without your help. Hopefully we can also help with testing and feedback - let us know if there are things you want us to try.

trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #32 on: November 27, 2020, 08:21:56 pm »
FYI - I added a 10uf cap right on the PCB power in leads - it definitely helped the flickering issue - now it still flickers a little, but not too bad. So I've ordered some 100uf 10V caps - will try those when they arrive. Biggest ones radial dipped I can find - the 1000uf are much pricier and axial leads. Judging by the improvement with 10uf the 100uf may be good enough, or adding the inductor to make a low-pass filter.

jdl

  • ***
  • 232
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #33 on: December 02, 2020, 04:50:46 pm »
Updated sources (discussed fixes included) and precompiled firmwares (v2.53).

LP16.09 compatible precompiled firmwares are also available for download.


FYI - I added a 10uf cap right on the PCB power in leads - it definitely helped the flickering issue - now it still flickers a little, but not too bad. So I've ordered some 100uf 10V caps - will try those when they arrive. Biggest ones radial dipped I can find - the 1000uf are much pricier and axial leads. Judging by the improvement with 10uf the 100uf may be good enough, or adding the inductor to make a low-pass filter.

100uF is better but may still not be enough.

https://www.aliexpress.com/item/32334407922.html - Just for reference, you definitely don't need 100pcs.

Miniature electrolytic caps (470uF or 1000uF/6.3V) can be scavenged from old PC motherboards ;)


Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #34 on: December 03, 2020, 10:18:10 am »
One of my favorite electronics salvage pieces is a dead PC power supply.  The living ones from dead PC's get repurposed into 12V power supplies for charging lipos and bench lipo replacement power and 5V for bench power.

But eBay has all kinds of assortments.  I bought myself some resistor and capacitor assortments for Christmas a few years ago.

120 electrolytics 0.22uf to 470uf for about $3 shipped.
https://www.ebay.com/itm/Portable-120PCS-Set-12-Values-0-22UF-470UF-Electrolytic-Capacitor-Assortment-Kit/114531752679

a search for capacitor assortment (sort it by price)
https://www.ebay.com/sch/i.html?_nkw=capacitor+assortment


And everybody needs one of these, an inductance, capacitance, resistance (LCR) meter.  To tell you if your capacitors are good or dried out.  Troubleshoot AC start capacitors!  It also tells you what your mystery 3 pin devices are, transistor, triac, etc, etc.  It's just magic.  :)  I think this one is assembled and not a kit.  For searches, make sure you are buying a meter, not just the case.  Make sure you file a "not received" if it doesn't arrive on time.
https://www.ebay.com/itm/LCR-T4-ESR-Meter-Transistor-Tester-Diode-Triode-Capacitance-Inductance-SCR-U9H6/303643622349
« Last Edit: December 03, 2020, 10:54:17 am by TheOtherCliff »

jdl

  • ***
  • 232
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #35 on: December 03, 2020, 10:53:53 am »
Another data point.
I recoded another OSD device on a quad I have using this latest firmware and charset, using the config from the other boards. It is not identical PCB, but pretty close.
I ended up resetting the divide ratio to the default.
On this system, I have to plug in the cam/xmtr first, or for some reason the OSD will not run - I get nothing on the display.
But when I do, it DOES display properly, and gets the correct cells and battery voltage! Yah! Pix enclosed.
One oddity - the battery voltage and capacity are fluctuating a lot.

I'm currently experimenting with a potential stability improvement that should help with this situation (OSD not initializing when started without video-in signal).

The MAX7456 chips used in these cheap MicroMinimOSD boards seem to be of a variable quality, some of them do reset/lock up (during flight) when ambient temperature drops below approx. 8-10degC, some of them would not start at all when colder, some do not properly start every time if no video input signal is present...

I've recently had few embarassing moments with my GepRC quad (first time used in colder weather). During flight I've got unexpected blackouts (0.1 .. 1seconds) then video back but without any OSD data. I've traced the issue to MAX7456 chip in the OSD that resets/stalls when getting colder. Searching the net revealed this issue is not not uncommon...

No doubt, I'm going to replace the problematic MicroMinimOSD module on this quad with another, stable one.

I've got some inspirations looking at ShikOfTheRa/scarab-osd MWOSD repository. Hardware reset of MAX7456 (while OSD is running) is not possible with MicroMinimOSD boards, as its reset pin is directly connected to the reset pin of ATMEGA328p and cannot be controlled from the code. However, software reset option seems to perform very well, at least for (freezingly) cold starts and starts without video-in signal.

With v2.53 firmware the replacement OSD module (still not mounted on the quad) sometimes have issues to properly initialize when started on USB power and without video-in signal present (room temperature). It cannot start at all when kept in freezer at -22degC :) However, once started while being warm and then put in the freezer, it runs without resets/locks for hours so I presume it's a good chip!

With the test firmware, the very same OSD module starts reliably EVERY time (without video-in from camera, at room temperature) and, which is more important - starts reliably EVERY time in the freezer (no video-in, again).

I hope it could also restart the MAX7456 if it locks in flight but that has to be tested on my bad OSD module once dismounted from the quad, as I cannot simulate the situation with the new (presumably good) OSD module.


@trust: It'd be interesting to know if this experimental firmware (HEX file attached) will work for you on the UAV you've mentioned. With it, the OSD should start fine even without cam/vtx plugged in, at least I hope so :)


trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #36 on: December 07, 2020, 09:46:37 pm »
Have not tried this code yet. I seem to have wrecked one of the two (sort of) working OPOSD boards I have - not sure exactly what happened - it also took out my GPS/mag. But everything else seems fine. It blinks so the cpu must be working but the overlay does not appear anymore. I swapped in the other one and another GPS/mag and they seem to work fine.
  Have you found another reliable source for these boards? I want to get a bunch more.
BTW - plz message me when you want to get a quicker response. I don't check all the threads Im in all the time, but messages I check. Thanks

Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #37 on: December 08, 2020, 01:08:43 am »
There is currently only a small amount of traffic on the forum.  The easiest way to stay up-to-date is to look at the list of recent posts at the bottom of the main forum page:
https://forum.librepilot.org/index.php

... and simply refreshing that page will pop up a an alert if you have any personal messages.  :)

jdl

  • ***
  • 232
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #38 on: December 08, 2020, 10:42:18 am »
Have not tried this code yet. I seem to have wrecked one of the two (sort of) working OPOSD boards I have - not sure exactly what happened - it also took out my GPS/mag. But everything else seems fine. It blinks so the cpu must be working but the overlay does not appear anymore. I swapped in the other one and another GPS/mag and they seem to work fine.
  Have you found another reliable source for these boards? I want to get a bunch more.
BTW - plz message me when you want to get a quicker response. I don't check all the threads Im in all the time, but messages I check. Thanks

I recall I'd burned a MicroMinimOSD unit once ago when I'd disconnected (by accident) its ground wire while being powered and video-in and out connected. That particular setup had separate ground wires going to camera, osd and vtx (not a good practice!).

Still waiting for my ordered MicroMinimOSD boards... Will test and report if good once they arrive.

jdl

  • ***
  • 232
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #39 on: December 21, 2020, 10:34:41 am »
Updated OSD source on github to version 2.56.

New features:

1. Doubled SPI rate.
2. MAX7456 stalled state detection and soft reset attempt.
3. Fix an issue with black levels autodetect when video-in comes from Runcam2-4K HD Cam feed.



I've encountered a problem with Runcam2-4k HD camera FPV feed. It is common for MicroMinimOSD modules having MAX 7456 or AT7456E chips.



I've checked the Runcam2-4k video output signal, its level (Vp-p) is OK. The problem probably comes from camera internal processing, image brightness seems boosted a lot, incl. shadows. MAX7456 obviously struggles to properly autodetect black levels.

The fix is to switch off black levels autodetection in MAX7456. I've set the OSD white level to 100% and black level to 10%. The result satisfies me, works fine for Runcam2-4k HD Cam and for dedicated FPV cams (e.g. Runcam Eagle2), too.

Here is demo clip WITHOUT fix applied:




And now with #define RUNCAM2_4K_FIX





Anyone can compile the OSD 2.56 firmware from source with desired features included.

Or just post a request here, I'll compile it for you.

trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #40 on: December 21, 2020, 07:55:21 pm »
Interesting. Yes, please provide a hex file here. I use a lot of the Runcam 4K cameras. i recently added one to an older OSD board with your latest code - it seemed fine but then I haven't tested it in low light, only outdoors. I use the batt1 input for battery voltage detection. For some reason on this older system, the indicated voltage moves around a LOT - I can't get a clear indication of what the true battery voltage is. Here's the downlink video:

Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #41 on: December 22, 2020, 04:56:53 am »
Considering that the voltage reading jumps around even when disarmed...

First guess is electrical noise and first guess for that is the FPV transmitter.  For most certainty I would run a bench test with the RF turned off (send video signal straight to a recorder).  Or (less certain) turned way down to lowest setting if it is adjustable.

I notice that quad wobbles around somewhat when descending.  Higher PIDs might help that.  Save your settings so you can get back to them and try AutoTune.  That usually helps straighten out descent wobbles.  :)

jdl

  • ***
  • 232
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #42 on: December 22, 2020, 11:36:43 am »
Interesting. Yes, please provide a hex file here. I use a lot of the Runcam 4K cameras. i recently added one to an older OSD board with your latest code - it seemed fine but then I haven't tested it in low light, only outdoors. I use the batt1 input for battery voltage detection. For some reason on this older system, the indicated voltage moves around a LOT - I can't get a clear indication of what the true battery voltage is. Here's the downlink video:

Here is the HEX file (v2.56) attached. I assume you need the same FW variant (No.4).

Selected features:
- LP16.09 compatible
- Multirotor
- Battery voltage monitoring on Batt1 pad
- NO RSSI monitoring
- Charset Uploader
- PathPlan Waypoints Info (also active in RTB mode)
- MAX7456 stalled state monitoring and reset (experimental)
- Runcam2 4k HD camera compatibility Fix (Black Level Autodetect OFF, White 100%, Black 10%)


Ambient lighting (outdoors or indoors, sunny or cloudy) doesn't matter in my case.

Oddly, your setup does not really need this fix applied! Either we are talking about different Runcam models, or it's only mine with a non-standard SD FPV video output...

I have the issue with black levels for RunCam2 4K Edition:
https://shop.runcam.com/runcam2-4k-edition/




Ordered it from Banggood at the end of August 2020. It maybe came from early batches...



I support TheOtherCliff's assumption about the electrical noise. Excessive noise on power lines might also be a reason for failures to program the charset in the OSD.

Linear voltage regulators can also generate oscillations and noise in certain circumstances. They often require capacitors with ESR within specified (by manufacturer) range.

It would be best to check what happens at the power lines of your UAV with an oscilloscope. Even cheapest models are good for such diagnostic. I can recommend this model (JYETech DSO-150), it's cheap and reliable and does a good job to test the voltage ripples, like ones coming from switching regulators. You can also use it to adjust video signal peak levels, if necessary.

https://www.banggood.com/Original-JYETech-Assembled-DSO-SHELL-DSO150-Digital-Oscilloscope-Module-9V-p-1211151.html?cur_warehouse=CN&rmmds=search




This link is for reference only, I bet it can be found cheaper. I've got mine for $11 some years ago, unassembled. But there are options to buy it already assembled and tested.

trust

  • ****
  • 261
Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #43 on: December 22, 2020, 10:29:05 pm »
Thanks. I bought a quite nice Hantek 2D72 hand scope with signal generator a few months ago - I used it as the voltage source for testing the OPOSD battery inputs. Ordered a bunch of grabber leads to make it easier to hook up and see what's going on - they only arrived recently.

It's the same Runcam 4k model. I got several of the first models just after they announced them earlier this year and have another on the way with a spare battery. Impressive detail.

Re: Alternative LibrePilot MinOPOSD with a matching Config tool and Charset
« Reply #44 on: December 22, 2020, 10:47:20 pm »
@jdl, for $23 shipped from in-country, I had to buy myself one for field use.  :)  I used oscilloscopes a lot in college, but I have never bought one.
https://www.ebay.com/itm/Original-JYETech-DSO-SHELL-DSO150-15001K-DIY-Digital-Oscilloscope-Unassembled/193458231082
It's a kit, but IC's come pre-soldered.

That Hantek 2D72 looks really nice.  I may have to get one for the bench.   ::)