Jump to content
Mr.RC-Cam

MinimOSD Software Fix: Improve Camera Compatibility

Recommended Posts

I installed a MinimOSD (with rush-osd-development MWii OSD firmware) on a Quadcopter with a Baseflight (Naze32 compatible) Flight Controller. The build is summarized here: http://www.rc-cam.com/forum/index.php?/topic/4000-fpv-q250-racer-build-log/. I discovered that the MinimOSD would not work with several of the FPV cameras I tried. The OSD would work fine without the camera (realtime OSD data was correctly presented on black background). But when it was connected to the camera the OSD data would not appear (or would appear but not update reliably). That is to say, the video camera's image was fine, but the OSD was non-functional.

After some research it became clear that this is a popular complaint among minimOSD users. The most common theory is that high resolution cameras are to blame and that using a lower resolution camera solves it. Although this advice seems to cure the problem in a lot of installations, the reasoning is incorrect. The actual problem is that some Chinese made cameras have incorrect video sync levels. I found that the sync amplitude on affected cameras was marginal and the OSD chip could not detect the presence of vertical sync (but fortunately it could still detect horizontal sync).

The fix is to have the OSD's software check & detect when the problem has occurred and emulate the missing vertical sync. In the implementation presented here the minimOSD works the same as before when cameras with valid sync levels are used. But if the sync level is incorrect then the revised firmware determines this condition and uses a timer to refresh the OSD data. This is done at a 15Hz refresh rate which is similar to the stock system.

Some other customizations & fixes were made too. The change log is summarized as follows:

V2.3.1, Nov-09-2014:

FIXED Missing Ham Callsign (when in NTSC video mode) at Intro splash screen.
CHANGE "AMPS DRAINED" text to "MAH DRAINED" in flight summary screen (page 9/9).
ADDED Horizon flight mode indicator. It appears at the Angle symbol's screen location.
ADDED Lightning bolt symbol now appears next to battery voltage when fully charged.
ADDED Ham Callsign at start of HUD.
ADDED Ham Callsign now appears in HUD whenever the model is Armed.
ADDED Ham Callsign at end of flight summary screen (page 9/9).
ADDED Sync Emulation Message at Intro screen. See note below.
ADDED Sync Emulation Mode prevents loss of OSD video if camera's sync level is out of spec.
- Sync emulation is automatic and it provides a 15Hz screen refresh.
- The Intro screen will display "Sync Emulation On" when the feature has been activated.

V2.3.2, Nov-14-2014:

FIXED SerialOpen() now supports 9600 baud rate (for special applications).

V2.3.3, Jan-10-2014:

CHANGE Reduced OSD white level from 120% (too high) to 100%.


My unofficial minimOSD patch is named V2.3.3. Here is the full file set (last updated on Jan-10-2015):

KV_Team_OSD_V233.zip

The OSD bitmaps will need to be updated too: Here are the two bitmaps from the original distribution with the revisions in them (last updated on Nov-09-2014):

osd_fmap_v231.zip

Edited by Mr.RC-Cam
New V2.3.3

Share this post


Link to post
Share on other sites

If your installation has a camera with the sync level problem then the mimimOSD's intro splash screen will show a message that sync emulation is activated. Otherwise this message will NOT be seen. See item 1 in the photo below.

Your ham call sign (if enabled) will appear in the intro splash screen at the location shown at item 2.

post-2-0-23626400-1415582333_thumb.jpg

Share this post


Link to post
Share on other sites

This patched firmware requires a revised OSD bitmap. The first post has a link to two modified bitmaps. If you are using your own customized OSD bitmap then you can amend it to include the new H symbol at address 0x10 (16). This symbol is used to show when the Horizon flight mode is active.

post-2-0-53050000-1415582603_thumb.jpg

Share this post


Link to post
Share on other sites

If the patched software solves your camera problem then please post your success in this discussion. It would be great to know that it has helped others. Be sure to mention the camera model too. Thanks!

Share this post


Link to post
Share on other sites

Keep in mind that there are other minimOSD software projects to choose from. For example, here's an alternate choice that has a lot of features. I checked it's code and it has already solved the vertical sync issue:

https://code.google.com/p/multiwii-osd/

For now I will continue using the rush-osd-development code with the sync patch. The screen layout works well for my needs.

Share this post


Link to post
Share on other sites

The patched code in post #1 was updated. The latest changes are noted in the change log.

  • Like 1

Share this post


Link to post
Share on other sites

Do you happen to have this Patch that will work for an APM FC?

The characters don't show up properly once I plug into my APM.

Or if you have the Patch source code that I can add to MinimOSD Extra that would work also.

Mind you I am very very basic in my arduino programming. Any help would be awesome.

Share this post


Link to post
Share on other sites

Do you happen to have this Patch that will work for an APM FC? The characters don't show up properly once I plug into my APM.

The fonts used by APM are different, so with my patched code you would need to update them. This requires the osd_fmap_v231.zip file in post #1 and is uploaded into the OSD using the PC application called KV_Team_OSD_GUI. This app is also needed to setup the OSD. Download the package from here:

https://code.google.com/p/rush-osd-development/

The app is located in the KV_Team_GUI subdirectory. But do not use the Arduino code in that file set since it does not have my patch.

Unfortunately I don't have any experience with the APM FC so I can't say if the "competitor" version I patched will work with it. What I mean is that there are different Minim OSD versions with different communication interfaces. The one I patched is used with FC's that follow the "MultiWii" standards. I don't know if APM is the same.

1. But before you do anything, please post a screen shot that demonstrates what you see with the patched code. This will allow me to confirm that you need to update the fonts.

2. Also, please confirm that with your original OSD firmware the OSD overlay characters are missing when the camera is installed, but appear (on a black background) when the camera is unplugged.

Share this post


Link to post
Share on other sites

1.working on getting you screen shots.

2. Yes I have confirmed that the OSD characters are missing when the camera is install and they appear on the black background when the camera is unplugged.

I also see the Sync Emulation ON flash when I boot up the OSD with the camera plugged in running your patch.

Share this post


Link to post
Share on other sites

post-29811-0-68280000-1421112516_thumb.j

This is what the MinimOSD Extra Panel looks like when my camera is unplugged. (doesn't show at all when it is plugged in).

post-29811-0-16477500-1421112611_thumb.j

This is with your KV OSD patch and the Small MCM file loaded. Works with my camera but doesn't Line up properly.

Share this post


Link to post
Share on other sites

I don't think the new font file has been uploaded. There are incomplete characters in the patched version's screenshot, which indicates the fonts being used are wrong.

Please post a screenshot of the splash screen when the patched code (and matching font file) is loaded. This is the screen with the big MultiWii logo. It is seen for a few seconds right after power is applied. If you don't see a legit looking Multiwii logo on the screen, then the font file is for sure not the right one or is corrupted.

Also, it appears to me that the NTSC/PAL settings are different in your two screen shot comparisons. The video mode of the OSD must be set to match the camera type. Confirm that your camera is NTSC or PAL and then configure the OSD to match it. On my patched code the PC GUI app is used configure the video mode (and several other OSD features), but I do not know how the APM does it.

BTW, if the camera's video mode does not match the OSD video mode then that alone may explain why you did not have success with the original OSD firmware. Check again.

Share this post


Link to post
Share on other sites

I reviewed your APM FC code and now understand why it does not work with the Chinese cameras that have low amplitude syncs. Try this:

Edit file ArduCam_Max7456.h as follows:

1. Find this code on line 48:

#define MAX7456_ENABLE_display_vert 0x0c //mask with NTSC/PAL

2. Replace the entire line with this:

#define MAX7456_ENABLE_display_vert 0x08 //mask with NTSC/PAL (Turn on OSD now).

Upload the patched APM sketch files and restore the original fonts. No promises, but this simple patch may solve the missing character problem.

Share this post


Link to post
Share on other sites

Well the crazy thing is now. I can't get your patch to work now like I had it. I see the splash screen with the multiWii logo and it says Sync Emulation ON but no overlay on video. (have to unplug the video to see the splash screen.

Share this post


Link to post
Share on other sites

Well the crazy thing is now. I can't get your patch to work now like I had it. I see the splash screen with the multiWii logo and it says Sync Emulation ON but no overlay on video. (have to unplug the video to see the splash screen.

That is a symptom that the OSD might not be set to the same video type (NTSC or PAL) as the camera. The OSD's configuration may have changed due to the reflashing. Connect the OSD to the GUI app and check the settings again.

And of course try the APM patch/edit I posted above.

Share this post


Link to post
Share on other sites

i Am glad someone is trying to solve this problem, i was thinking to swap my camera until is found your post.

unfortunately it does not work with my mavlinkosd 2.0 module.

I flashed the code and used the mcm font file, but it will not work.

If I choose ntsc my osd will not show any text, if I choose pal the text is a bit blurry and is flickering.

when I look closer to the text on an big screen I noticed the the text looks like it is missing lines (interlaced?).

Also I don't see the sync emulation note on my screen.

is there anything else I can try ?

post-29879-0-11491700-1424250600_thumb.j

Share this post


Link to post
Share on other sites

From your symptoms it sounds like your camera's horizontal syncs are in trouble. Unfortunately my patch only works with cameras that have incorrect vertical syncs (but still have proper horz sync).

  • Like 1

Share this post


Link to post
Share on other sites

From your symptoms it sounds like your camera's horizontal syncs are in trouble. Unfortunately my patch only works with cameras that have incorrect vertical syncs (but still have proper horz sync).

Do you think there is anything I can do to make it work? Maybe there are some hsync parameters in the code I can change.

Share this post


Link to post
Share on other sites

I don't see any registers that will help this. But if you see something then give it a try.

From my experience the Maxim OSD chip will not tolerate the out-of-spec syncs that some cameras provide. It's usually a sync amplitude problem. The cameras I've measured had low sync levels and this condition is offset by exaggerated video white levels. It's a bad combination.

If the off-shore camera makers would stop copying each other's bad designs this issue would go away. But they just keep "borrowing" the circuitry they put into production. So this design defect is perpetuated and has affected a lot of popular CCD cameras from China / Hong Kong.

  • Like 1

Share this post


Link to post
Share on other sites

I don't see any registers that will help this. But if you see something then give it a try.

From my experience the Maxim OSD chip will not tolerate the out-of-spec syncs that some cameras provide. It's usually a sync amplitude problem. The cameras I've measured had low sync levels and this condition is offset by exaggerated video white levels. It's a bad combination.

If the off-shore camera makers would stop copying each other's bad designs this issue would go away. But they just keep "borrowing" the circuitry they put into production. So this design defect is perpetuated and has affected a lot of popular CCD cameras from China / Hong Kong.

Thank you for reply, i will look through the code, if i find something to solve it i will post it here

Share this post


Link to post
Share on other sites

That would be great if you post a solution.

BTW, the screenshot you posted previously does not look like it comes from my patched version. To confirm the patched code is installed, disconnect the camera and boot up the OSD. The startup screen should show "KV_OSD_TEAM_2.3.3."

Share this post


Link to post
Share on other sites

WOW! I was skeptical but running out of options besides finding a different camera. I have a cheap chinese CCTV camera (380lines PAL) from Ebay and this worked the first try. I just had to make an account to give big thanks and contribute (even if only a little) by saying that this fix DOES work.

THANKS SO MUCH!!!!!

Share this post


Link to post
Share on other sites

That is fantastic to hear. Thank you for reporting that the firmware worked with your camera.

Share this post


Link to post
Share on other sites

I have tried your patch but I still get a flicker as if it is missing every other frame and it doesn't show that Sync Emulation is enabled. My set up works OK if I use the family camcorder as a video source. Do you know if I can shift the entire video signal with a capacitor/resistor to get the sync pulse level 'better' ?

Thank you for any help,

Rob

Share this post


Link to post
Share on other sites

Unfortunately I don't have any surefire ideas on to fix your image flicker. If you find a solution please report back how you solved it.

Regarding your sync shifting idea, keep in mind that the MAX OSD chip performs sync level clamping and level shifting internally. So I don't think anything you do externally to shift it will help.

If I had to guess, the most likely solution would be to amplify the syncs (but not the active video). But that is a complex thing to do. But as an experiment you could try amplifying the entire video signal by increasing the video input resistor on the MAX7456 chip from 75 ohms to around 100 ohms. It's a long shot, but a quick thing to try.

EDIT: Don't forget to check the NTSC/PAL setting on the OSD. The firmware ignores the MinimOSD's jumper and instead the video mode is set with the PC Application.

Edited by Mr.RC-Cam
PAL/NTSC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×