Monday, 20 April 2015

OSD Programming with Arduino

 

connect-arduino-minimosd

One great feature that we should add to FPV would be flight data on the screen display (OSD). By programming the MinimOSD, not only you get more accurate data on the screen, you can also select, edit what kind of data you want to have on the screen. The Crius AIOP board is supposed to work well with the MinimOSD, so I gave it a try.

I realized that you need a FTDI cable to do the programming, but if you happen to have an Arduino Uno like I do, then it’s your lucky day because you can easily turn your Arduino in to a FTDI programmer. I will show you how after the break. You can buy an Arduino from Newark.

arducam-osd

Connecting Arduino with MinimOSD


How does it work?


A bit of technical background, skip if you like.

The Arduino UNO has an FTDI USB-TTL chip on it to communicate between a PC and the ATMEGA chip on the board. Because all of the necessary pins on the FTDI chip are connected to various pins on the edge of the board, we can just connect the MinimOSD up to the right pins and away we go! No need to spend extra money on the FTDI cable!

Let’s connect them


The connection is very simple. But first of all, if you don’t have an Arduino Uno but other Arduino boards, you need to make sure it has a FTDI chip otherwise I am afraid you are out of luck.

Connect your arduino to the computer, remember what COM port it has been assigned. Then unplug the Arduino from your PC.

Remove the ATMEGA chip from the socket. If yours is soldered directly to the board then you may still be able to continue, but you will also program the ATMEGA chip at the same time which you probably don’t want to do. This way we are just passing the data through the board to the output pins. Removing the chip means you won’t accidentally bugger up the ATMEGA chip.

Connect your MinimOSD to the Arduino board as follows:

Ardunio-MinimOSD

Note that BLK on the MinimOSD is not connected to anything. Also note that TX is connected to TX, RX to RX – you don’t need to reverse them!

Connect the Arduino to your PC again. Your PC should recognize the device as usual and assign it the COM port we noted down earlier.

You should now be able to program the MinimOSD. However the way of programming it depends on the firmware, read on to see how.

Different Firmware for MinimOSD


Here comes the confusing part. There are some many different firmware suggested by people, I had no idea which one to use. After a lot of research, it turned out that we should flash the MinimOSD with different firmware, to work with different flight controller firmware. These firmwares are both open source, so it’s free to get them.

For MegaPirateNG, you should be using ArduCam-OSD, or MinimOSD-Extra. This firmware provides a very handy GUI tool, which allows you to flash firmware, and program the MinimOSD. All you need to do is to select the COM Port, browse to the firmware file, and click “upload firmware”.

For Multiwii, you should be using Rush-OSD. With this firmware you need to use the Arduino IDE to open the firmware files as a sketch, and upload them like you do with a normal Arduino.

It works great with this wiring diagram when using MegaPirateNG. But it just WON’T work with Multiwii for some reason. No matter which Serial port I plug the MinimOSD to, the ST LED didn’t light up, I get no image from the OSD. Although it’s working fine when testing with the Rush-OSD Gui and I can see the ST LED blinking. I think the Crius AIO Board is not talking to the MinimOSD, because the MinimOSD only accept certain data format (maybe telemetry data), and I couldn’t see any settings in the Multiwii config.h file either. After a couple of hours of trying and researching, I decided to leave it there. I don’t need it right now anyway.

Crius-aio-wiring-MPNG

I think that’s it, if I made any mistakes in explaining please let me know because I have only looked into this in the last few hours.

Thoughts about these open source OSD projects


I am sure the developers must have put much efforts and time into these projects, they do this not for money but for the convenience of others, and we are all very grateful.

However It’s not very straightforward to work these things out, because they are not well documented, and what is documented is not user friendly, at all. The “instructions are all over the place, you need to read through some 100-page long forum threads. Most of the time you need to guess, and do lots of trial and errors. After hours of trying only find out it’s not working. Very frustrating.

That is the problem with open source stuff, and sometimes it’s wiser to pay a little bit more and save the troubles.

No comments:

Post a Comment