Voltage measurement with 12V and 5V from BEC

I'm using an Arduino Nano to control two servos operating torpedo tube doors and torpedo tube turning on an RC submarine. The Nano interprets the signal coming from the 40mHz transmitter, monitors the main (12V) battery and alarms through a red LED.

I've tested on breadboard and on soldered prototype, and the sketch seems to work but the voltage reported on monitor and using multimeter is strange. So I suspect an error in my circuit. I'm very much a beginner with a couple of similar projects (controlling LED through 40mHz) completed. Apologies for the quality of circuit drawing and code!!

The observed issue:
A 13.6V batterypack is connected to a ESC/BEC producing 5V (verified) for receiver. The 5V is used for the Nano, the 13.6V is intended to be measured over a 'resistance bridge' and all grounds are common.

  • The monitor (5V power from PC) reports 55V
  • When Arduino installed in the boat: Measured with multimeter:
    when arduino A0 connected to 13.6V and disconnected from 5V then "resistor bridge" creates 1,36V between GND and A0 (as expected)
    when arduino is connected to 5V then "resistor bridge" creates 5,57V between GND and A0 (??)
    when 13.6V is disconnected but 5V is on, then Ao vs GND reads zero, but the external LED, which should be blinking slowly, seems to stay on and flicker.

So I suspect I have made an error in GND somewhere. Is the circuit OK?

switch position of R1/R2.

Can you draw the resistors of the voltage divider in line with each other ?
The first resistor (to the higher voltage) is always called R1.
The second resistor (between A0 and GND) is always called R2.

Assuming you mislabeled R1 and R2 in your schematic, then if R1=10K and R2=100K, then
13.6 x (10/110) = 1.24V NOT 1.36V
How are you measuring these voltages?

not mislabeled but misbuild, he has 5,57V on A0. 1023 units, and

voltage = average * 11.0 * 5.0 / 1023;

makes from it 55V to show

Thanks a lot! I will start with reversing R1 and R2 (you are all right, I built them wrong). Then I will remeasure - with a multimeter between pin A0 and ground.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.