Dennis Frie

- a couple of projects and pictures


(2011) (FPV) Simple OSD on Atmega328P

I have been flying FPV for quite a while, with just a camera and a video-tx (and off course a receiver and a screen). I haven't really had any need for extra gear, but as I started to go futher and higher, some information about position and battery status seemed more and more important.

There are quite a few commercial OSD's (on screen display) solutions available, but I figured it would be fun to build and code it myself. The project is just a hobby-project, but quite a few people have used the hardware and software, and a commercial available product, made for open-source software, is now available with the software preloaded;
SimpleOSD Open at flytron
I'm not involved in any sale etc. but it's great to see it being used by other people than just myself :)

The developing etc. have mainly been documented at RCgroups, and features, layout etc. have been changed/implemented by request/ideas from users.
RCgroups DIY OSD thread

It can be seen in action here:
Vimeo - DIY OSD test

The main purpose of this project was to make a DIY OSD that can be made with;
- Opensource software
- Simple and cheap hardware
- Only little technical knowledge required

The OSD uses an Atmega 328p microcontroller to process everything. That includes showing text, reading GPS, current-sensor, batteri-voltage etc. There is not a lot of processing-power left, but using a single microcontroller is cheap and simple (at least the hardware is).

At the moment this is supported;
- Easy hardware design with Arduino
- Easy setup section added to code
- Speed from GPS
- Altitude from GPS
- Flight timer from GPS
- Position from GPS
- Heading from GPS
- Current from current sensor
- mAh used
- Auto set home position
- Calculate Line of sight
- dimming of text background
- Arrow pointing home
- Speed in km/h
- Flight summary (max altitude, max speed, max LOS, total distance traveled and average speed)
- Support NTSC and PAL
- Support SimpleOSD open 16 mhz version with arduino bootloader
- menu added to set alarms and a few other things.

This is the schematic I use at the moment;

Can not show picture

The hardware:
The hardware is based on an atmega 328p micro-controller and only a few standard components. New line and frames are detected with the analog comparator in the atmega micro-controller. As the sync pulse in the video-signal can have a little DC-offset, a few components is needed. To control this offset, the video-signal is AC-coupled. The sync-pulse will then be a negative voltage. To change this, some DC-offset is added with a positive biased clamping circuit;
http://en.wikipedia.org/wiki/Clamper_%28electronics%29

It's now possible to get a positive video-signal where the sync-pulse is very close to ground. The voltage reference should match the biased video-signalís synch pulse. In theory you can bias the video-signal so the sync-pulse goes a bit below ground. This makes it possible to use ground as reference voltage. I have tried and it seems to work fine, but I wouldnít recommend it.
To show the pixels you can use SPI or USART to shift out pixels/bytes very fast. The USART in SPI mode works perfect as it is double buffered. The problem is, that you probably want to use the USART for communication with a GPS module. I donít think the USART pixel generation is of any interest, but I have the code if anyone wants to see it. The SPI is only single buffered (8 bit) so you will have about 2 clock cycles (1 ekstra pixel) that will be the same as the last one, but this can be handled.


The brightness is simply adjusted with a resistor. To avoid the pin from draining, a simple diode should be used as well.

First breadboard test

Can not show picture

First test print

Can not show picture

Implemented on a Arduino Pro

Can not show picture Can not show picture

And just to show you that it actually works (here with software version 0.14):

Can not show picture

Andre folks build.