i have an external sensor in my system that outputs analog voltage 0-5V and im using the RSSI on ardu copter (pixhawk) to read that voltage and transmit it down to telemetry.
the issue im getting is that the analog readings on the SBUS (103) pin are not stable.
when my sensor outputs 2.0V for example, and RSSI is set to 0 to 5V, instead of showing steady 40% im getting fluctations from 20 to 70% or so. i double checked and voltage is stable.
any idea how to proceed from here and what could be causing it?
here is my RSSI and pin setup:
RSSI_ANA_PIN = 103 (SBUS)
RSSI_PIN_HIGH = 5 (v)
RSSI_PIN_LOW = 0 (v)
RSSI_TYPE = 1 (Analog Pin)
BRD_PWM_COUNT = 6 (means Aux outputs are GPIO free to use)
when i try AUX1 pin (50) instead of SBUS pin (103) - i get constant 0 RSSI, not sure why too.
thanks for looking.
Are you using a ground pin?
yes im using ground and signal (pins 1 and 3 in servo plug)
Can you set your analog out to a range 0 - 3.3v? Might be overdriving the ADC.
i tried it as different voltages, some are under 2v, and it occurs at the whole range.
FYI the reason you get 0 on Aux one is you have it set as an output.
What firmware version are you on?
what do you mean set it as output? i think im on 3.6.* something.
how do i set AUX1 as an input?
Brd_pwm_count to zero. If you’re using a ChibiOS based firmware you need to be on at least 3.6.6 or higher. Best to upgrade to latest stable (3.6.12)
OK thats interesting, i may have misunderstood the meaning of BRD_PWM_COUNT, i thought this effects motor outputs so for a Hexacopter needs to be set to 6. are you saying this parameter effects only AUX outputs?
i have set BRD_PWM_COUNT to 0 and RSSI pin to 50 (Aux1) all the way to 55 (Aux6) and still when i put 5V in the signal pin of Aux1-Aux6 (should be 100% RSSI) i get 0% constant.
Yes, brd_pwm_count only effects AUX.
There are some nuances with this that really depend on firmware version: if using a ChibiOS firmware (*.apj file), you need to be on at least 3.6.6, preferably latest stable. If using a nuttx firmware, I think this feature was only available on aux 5 and/or 6. You loose a lot of other features using a Nuttx firmware though, so I suggest making sure you’re on latest stable then posting a parameter file
This works no problem with current stable (3.6.12, Chibios of course) with a Pixhawk with the parameters set as you had them in your 1st post using the Sbus I/O pin. I have a Pixhawk on the bench and just tested it with a 1.5V input. I think 3.3V is max but you can scale it with the min/max values.
whats the best way to read current fw before i upgrade?
so far my results are:
sbus pin - fluctuating readings.
aux1-aux6 - constant 0
reluctantly i had to use the ADC pin - this works as it should, but i would really like to use sbus or aux as these are much easier to connect to.
It’s in the log files, so if you use the log analysis in Missionplanner it should tell you