Electronic – Arduino’s analog input pulling down voltage when off

analogarduino

I'm got a PCB manufactured, where a Arduino (Mega2560) is (via a 5V Buck converter) supplied by a 4S LiFePo4 battery which is secured by a custom BMS system. The system is measuring the voltage of the battery via a 1:3 voltage divider, which is also providing the information to the arduino.
What happens now is, that when the BMS is switching the system off, the voltage from the divider is dropping to approx. one third causing the BMS to misbehave. Once the BMS is active again, the Arduino starts and the voltage is back to normal.
My guess is, that since tha arduino is powered off when the BMS is not on, the voltage from the voltage divider gets kind of "sunken" on the analog input, trying to power the arduino from it or so.

One solution would clearly be, to solder in a second voltage divider, so that the BMS hardware measurement is independent from the one for the Arduino.

My questions are:

  1. Why exactly is this happening within the Arduino? How can the sinking of the voltage be explained? To my knowledge the input impedance of the Atmega Processor is 100MOhm, so how is it able to pull down the voltage so much?

  2. Is there another way to avoid this, without a separate voltage divider?

Abstract Circuit

Best Answer

Atmega inputs only have high impedance when configured as such, and when the chip is powered on. When the chip is powered off (or underpowered), various things can happen. I'm with Nedd that the most probable cause is the protection diode, but it's not impossible that the pin gets reconfigured as output on power loss - if you're familiar with programming, you should know what "undefined behavior" is.

Making a separate voltage divider is by far the cheapest and easiest solution. That way, whatever effects may arise from the controller being powered down, they won't affect the rest of the system.

Related Topic