I have been using this for some time now and recently posted pics in the "show us your ground station" thread. Interest was shown in the project so what better way to share the code/schematics then in a thread of its own.
I was most intrigued by people asking weather the switching worked well as I use CP antennas which apparently have none linear RSSI values. I believe the act of smoothing the incoming data and limiting the speed of switching helps get accurate switching. This is backed up by graphing the values throughout an average flight.
file below.
This is an Arduino based video switcher that relies on RSSI.
It uses the following main pieces of hardware.
-atmega 328p
-4051 Analog Multiplexers
It was built around a number of specifications that I needed but other may find useful as well.
5 video/audio/RSSI inputs that get switched between.
3 video outputs (via video amps) for DVR, goggles and an external screen.
2 audio outputs, one compatible with the ezosd telemetry link, the other for the DVR.
And some of the code features.
-2 modes, auto and manual (indicated by leds). Kinda self explanatory. when
switching from auto to manual the last good receiver is used as the first
channel selected then you just scroll through the channels.
-led for each receiver, solid indicates the receiver is in use, any receiver with
a "bad" RSSI blinks
-buzzer, if the receiver in use has bad RSSI it beeps in time with flashes.
-each RSSI is averaged over 50 cycles and inputs are switched only after a
minimum of 500ms has passed since the last switch so switching isn't
erratic.
-startup routine- each channel is cycled for 1 sec to allow conformation of
operation followed by startup beep sequence. If the switch for auto/manual
mode is in manual on power up the unit wont start until it is set to auto,
to avoid taking off with manual mode selected and not gaining the use of all
receivers.
All RSSI values and other related information is sent out over the serial line for logging in the field.
I also have a switch so I can chose to view ether the live feed or the DVR
overlaid feed through the goggles, to confirm the DVR is recording/view
playback.
And a switch linked to the arduinos reset pin for programming and field
reset.
As a bonus the code/hardware has never crashed or locked up, even during initial coding.
All the coding is my own.
The video amps are based on this circuit
http://users.otenet.gr/~%20athsam/vi...l_emphasis.htm
But has been modified with help from a fellow FPVer.
I used PCB artist for all the layouts which is available here
http://dw.com.com/redir?edId=3&siteI...tist%26dlm%3D0
code and scehmatics are avalible from this link
https://dl.dropbox.com/u/11371953/DIY%20Diversity.rar
This was the prototype board.
And this is the one that is now installed in my GS
Said ground station.
from bottom left in clockwise direction.
433mhz lost model tracker
box for storing bits and peices
fatsharks
EZUHF
wires
antennas
reciver box
DVR and switcher in box
switches and leds
more antennas.
Average deployment.
Receiver box with antennas.
exel file of RSSI values over an average flight.
https://dl.dropbox.com/u/11371953/4w...i%20graph.xlsx
And proof it works, switching is all bar unnoticibale.
This is very much a DIY project, although things work great for me I did a it of tweaking here and there during the build that may not be reflected in the documentation. The code should be sound but test your hardware thoroughly first.