I have FRSky which seems to output 0-3v for their RSSI, whereas APM 2.5 code seems to use 0-5v
I'm not a programmer, but I can see it would need a small code tweak to rescale the 0-5v range to 0-3 by multiplying it by 0.6. Correct?
Optionally, it would be nice to have a parameter in APM/Mission Planner to set that scale.
How do I do this so I can get FrSky RSSI working?
Interesting. I assume folks use some sort of low pass filter? Anyone already figured out good R & C values to generate an analog value between 0 and 3.3V for whatever the pulse freq is out of the frsky. If not I could hook up my frsky to a scope and start poking around.
I have also tried turning the PWM signal into analogue using 2 resistors and a cap, but at 3volts, it only reads as 64%. (or full 100% RSSI)
How can I have the output scaled from a 0-3v, or what the APM is receiving from the receiver.
I made contact directly with FRSky and they had the following information.
So all that would be required to support the FrSky receivers would be an option in Mission Planner config to accept 0-3.3v or 0-5v (or some Zero to other-voltage-value)
The RSSI on TFR8SB is PWM as default, which you can convert to analog voltage RSSI 0~3.3V
You can convert the analogue rssi out put as below drawing.
You can either boost the signal using an amp, or modify the code to scale 3.3V as 100%
you need to change line #964 in arducopter.pde from
rssi_analog_source = hal.analogin->channel(g.rssi_pin, 0.25);
rssi_analog_source = hal.analogin->channel(g.rssi_pin, (g.input_voltage/3.3)* 0.25);
Then change you are making is 5V/3.3V * 66% = 100% (I know you said 64% but 66% works ;-) )
input_voltage is the measured Vcc on the AMTEL 2560 chip
Many thanks, i will give it a shot.
I had located that line in the code actually and wanted to change it:
This is what it looks like in Arduplane 2.7
rssi_analog_source = hal.analogin->channel(ANALOG_INPUT_NONE, 0.25);
can you confirm what the change is on the arduplane file please??
That's rubbish. It means its not assigned a pin in ArduPlane. I'll look at it tomorrow... and work out what you can do. (should be simple)
Thanks Bill. I'm pretty sure your original line of code will work, but it surprises me that no one using arduplane has ever needed to use RxRSSI.
I just need to figure out how to compile this.
Did you try this and have any success?
So I built the above converter and now seem to get an analogue 0~3v. I've set the RSSI_PIN to 8, but only see 0 in the Mission Planner...
A0 worked a treat! although I only get a reading of between ~ 1 with tx off and ~57 when tx on, but I guess this is the difference between 5v and 3.3v.