Getting external Current Sensor to work with Speedybee F405

I am trying to setup an external current sensor to work with Speedybee F405 Wing.

The SpeedyBee documentation says that there is RSSI analog input, pin 14, and Airspeed analog input, pin 15.

I connected the sensor output to both of these inputs, the sensor provides about 200 mV at full throttle without prop, but there is no indiciation of change, the current remain at 0.

What I did was to set BAT_CUR_PIN to either 14 or 15,
Reboot completely the AP
Then in Optional Bat Monitor, tried to see any change in current, but I get zero. Voltage is correctly indicated.

I see this in the documentation.
ADC
Current

And from the Hwdef
define default battery setup
define HAL_BATT_MONITOR_DEFAULT 4
define HAL_BATT_VOLT_PIN 10
define HAL_BATT_CURR_PIN 11
define HAL_BATT_VOLT_SCALE 11.05 # matched to PDB board
define HAL_BATT_CURR_SCALE 50 # matched to PDB board

Actually, a couple of month ago I tried to use analog RSSI from DL RX and never was able to (there was never a change in displayed value), had to switch to RSSI integrated in channel. At that time, I also tried using INAV, and RSSI indeed was working.

This time, I do not see any way around, so I really tried to get any change using the other two pins, 14, 15. But had zero change.

Could it be that the documentation is wrong? That the number of two pins (RSSI and Airspeed) are different?

I changed BATT_CURR_PIN to 14 and 15, applied sensor output to what is a RSSI pad and Analog Airspeed Input, but had zero current.

The documentation implies there is an ADC connector or set of pins with 4 functions (Vbat,Current, RSSI and Airspeed) and the Current input is pin 11 with a full scale input of 3.3Vdc which is typical of Current inputs. But, not having anything Speedybee I don’t know what’s right. Ardupilot expects it on pin 11.

If the docs are wrong it would be the 2nd time this week for Speedybee. Camera switching was documented wrong on another board.

I strongly suspect that the numbers 14 and 15 are incorrect. Would one have to check continuity from the RSSI pad to the processor, and that should be the pin 14, or it is more compllicated than that?

Both the Speedybee F405 Wing manual, under the Ardupilot Pin Mapping section, and the Ardupilot Product page, and Hwdef file, specify a Current input on pin 11. Where is it? Looking at the graphic of the boards I don’t see it. How many inputs on the ADC connector?

The manual specifies 4 ADC inputs, which are on pins 10, 11, 14, 15.

Standard setup is 10 voltage, 11 current, 14 RSSI, 15 Air speed

What I try to do is to use either pin 14 or 15 for connecting a current sensor (but basically applying any voltage up to 3 V to these pins. I was not able to obtain any indication that the applied voltage produces any change in reading.

Why, when there is supposed to be a current input? Airspeed input is supposed to have voltage divider so it’s 6.6V.

regular current input which is on board is pin 11. However, since I have about 60 cm. from where the ESC is and where the AP is, I use an external PITLAB current sensor which produces 0…3 V output and I try to connect it to any of the other two remaing analog inputs. I redefine the BAT_CUR_PIN, but that does not work.

Also, some time ago I tried to set up analog RSSI signal using pin 14, and I was not able to get any reading.

My suspicion is that the names of the pins 14 and 15 are wrong.

Also, from what I remember, the analog RSSI worked with INAV, which means that hardware wise the connections are OK, but possibly the pin names are not correct.

Oh, you are already using the current input and pin 11. I don’t think I can help, hopefully someone with one of those will come along.

For airspeed input I would just halve tghe scaling in ardupilot setup…

SpeedyBee F405 wing uses LQF64 STM32F405.

In hardware definition:

analog pins

PC0 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PC1 BATT_CURRENT_SENS ADC1 SCALE(1)
PC4 RSSI_ADC_PIN ADC1 SCALE(1)

PC5 PRESSURE_SENS ADC1 SCALE(1)
define HAL_DEFAULT_AIRSPEED_PIN 15

define default battery setup

define HAL_BATT_MONITOR_DEFAULT 4
define HAL_BATT_VOLT_PIN 10
define HAL_BATT_CURR_PIN 11
define HAL_BATT_VOLT_SCALE 11.05 # matched to PDB board
define HAL_BATT_CURR_SCALE 50 # matched to PDB board

analog rssi pin

define BOARD_RSSI_ANA_PIN 14

This is the pinout:

What I am not getting is the following:

PC0 is pin 8, but according to hdef is pin 10, Voltage, working fine
PC1 is pin 9, but according to hdef is pin 11, Current, working fine
PC2 is pin 10, not used?
PC3 is pin 11, not used?

PC4 is pin 24, according hdef is pin 14, RSSI, not working
PC5 is pin 25, according hdef is pin 15, Airspeed, not working

if I got the processor dot orientation correctly, the RSSI pad is connected to pin 24, black arrow.


Yes, the Needybee. Forum filler.

Sorry, did not understand?

Sarcasm. Speedybee is a large contributor to the forum with questions and problems. I don’t really get it when you can buy a H743 based FC with support for everything and all input protocols for $60. It must be YouTube videos that spur this on.

Well, may be I should switch SpeedeBee, I do not know. For the last 3 hours I am trying to get any other 2 remaining ADC channels working to read current.


Do you know whether the pin number in hardware definition header refers to physical pin?

Current sense looks to be PC1 on the processor which is defined as pin 11.
Hal_batt_curr_pin 11

That is clear, but is it a physical pin?

Anyway, I have been now playing with RSSI, and tried almost all possible numbers, like assinging RSSI_ANA_PIN to 8,9,10,11, 22,23,24,25… and looking at the RXRSSI.

Only 10 and 11 give me a reading, all other combinations, despite applying some voltage to RSSI pad show zero.

Well, I think I am loosing my time with this bs.

I would agree with that.