2
\$\begingroup\$

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

\$\endgroup\$
4
  • 2
    \$\begingroup\$ you might be interested in watching eevblog video 831 "power a micro with no power pin" \$\endgroup\$
    – PlasmaHH
    Apr 25, 2016 at 9:02
  • 2
    \$\begingroup\$ The I/O pin (used for the analog in) likely has a protection diode to the chip's VCC pin, so with the power to the Arduino disconnected the VCC pin (connected through the protection diode) could be sinking the current. If this must be avoided can you connect the voltage divider after the relay switch? Or you might add another relay at the top of the divider that the Arduino (when powered) actively closes to enable the BMS circuit. \$\endgroup\$
    – Nedd
    Apr 25, 2016 at 9:13
  • \$\begingroup\$ @Nedd The intention of the BMS is to prevent the Arduino from powering up when the battery voltage is too low. So this is unfortunatley not an option. But anyway thanks for the explanation. \$\endgroup\$
    – mxcd
    Apr 25, 2016 at 9:18
  • \$\begingroup\$ If a small relay were added only on the A5 section of the line it could be powered by the 5v buck converter output or an Arduino I/O pin. Alternately, make the BMS relay a 2 pole type and also switch the gnd line of the Arduino circuit, this would prevent the A5 line from passing current to gnd. \$\endgroup\$
    – Nedd
    Apr 25, 2016 at 9:30

1 Answer 1

3
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.