This is part of a series of blog posts in which I show you how I develop a DIY FPV diversity controller. The first step to create the DIY FPV Diversity Controller is to program the basic switching logic. So the micro controller must read the input values and decide based on which one is higher which output should be activated. In this first step I create a simple circuit on a breadboard that allows me to test the logic that I programmed into my Arduino. Read more below…
The basics of the DIY FPV Diversity Controller are very simple. The receivers will provide information about their signal strength. That’s called RSSI (=Received Signal Strength Indicator). I’ll feed these information into the Arduino where my program can then decide which of them is the highest. Based on that decision the corresponding output will be enabled. So in order to get some feedback I just hook up two LEDs to the output pins so that I can see which of the outputs my program choose and if that decision matches the values that I feed into the input pins of the Arduino.
Fist let me briefly explain what RSSI is and how I will use it. Basically RSSI is voltage. So the FPV receiver will output a certain voltage that correlates to the strength of the received signal. Usually this means the lower the RSSI voltage the lower the signal strength (I know there are receivers that do it the other way around, but we’ll deal with that later in the software).
So let’s take a look at the circuit diagram for the first test:
As you can see there is not much to it. Both RSSI values are feed into the Arduino (I choose A0 and A1 as input pins). The program will constantly monitor these values and switch either Arduino pin D8 or pin D9 to HIGH. This will result in the LED that’s connected to that output pin to light up. So if RSSI_IN_1 has the higher value LED1 should light up, if RSS_IN_2 has the higher value LED2 should light up.
Now let’s see how this looks on the breadboard:
Looks a bit complicated? No, there are just some components that I did not mention in the upper circuit layout. Basically the whole left part of the breadboard is just for testing purpose. These are two potentiometers that will serve as RSSI inputs during the breadboard testing phase, so that I do not have to deal with real FPV receivers. Those potentiometers allow me to change the RSSI value that’s feed into the Arduino very easily. And therefore I can easily test if the switching works correctly.
So what’s all that stuff and how is it wired up? As I already said, the two black components on the left are potentiometers that represent the RSSI values of the receivers for testing. Via the two white jumper wires the RSSI values are feed into the Arduino’s analog input pins on the bottom right of the Arduino board. Then there are the blue and green jumper wires coming from the Arduino’s digital output pins on the top right of the board. Those are connected one to each of the two LEDs on the breadboard.
And that’s it! That finished the test circuit that you see in the drawing at the top of this post. When I change any of the two potentiometers my program running on the Arduino will check which of both delivers the higher value. Then the program will switch the LED on that is assigned to the corresponding input with the higher value.
I hope this was informative for you. And very shortly I’ll post about step 2. In the next step I’ll add a 4066 electronic switch to the circuit. Then the Arduino will not only light the LEDs but also drive the switch. I’ll keep you posted…
Visit http://bitbucket.org/rgruber/fpv-diversity for all resources of this project.
You can find the source code, diagrams and photos there.
You might also want to take a look at this page were I have an overview of this project.