Nano getting power through an Analogue pin

Something very odd is happening and I was wondering if anyone could shed some light on why this is happening.

Consider the circuit below:

A 3.7V lithium ion battery goes through a TP4056 battery manager which in turn goes to a XL6009 step up converter. The latter provides a 5V supply to the Nano, the KY-032 (joystick potentiometers), the NRF2401 (using a 5v yo 3.3V adapter breakout board) and 128x64 OLED display.

In this configuration, the Nano is working and I can tell because the OLED properly displays the readings from the potentiometers. It also shows the battery level through a direct connection from A6 to the positive of the battery (bypassing battery manager and step up). However, the setup does not transmit.

Now here is the strange part. If I disconnect the Arduino Nano from the 5V supply, everything starts working, including the NRF transmitter. The Nano appears to be powered through the analogue connection A6, and this appears to be corroborated by the fact that if I remove that, the Nano stops being powered.

I am tempted to leave everything as is since it appears to work. But it seems to me that in doing so, I would be losing the benefits of using the TP4056, that apart from handling the charging, also protects against over discharge.

Can anyone explain what is going on? And is there a solution? I also tried supplying 9V to the Nano through the Vin pin and 5V directly to the NRF module (with AMS1117 adapter). The 5V pin would then act as an output to feed the potentiometers and the OLED display. But, despite the Nano clearly working (as seen from the OLED behaviour) the system does not communicate with the receiver.

The over voltage protection diodes allow current to flow into the controller. Put a resistor (1-10k) before every input pin that can feed the controller.

1 Like

This is phantom powering and a very bad thing - you will probably fry the pin if not the chip. Never do this.

In CMOS all inputs are protected from static discharge by diodes, and these diodes are not designed for high current, they are tiny. If you inadvertently have a voltage source on one of the inputs while the circuit is unpowered it will phantom-power the chip, risking damage to the diode, or even trigger CMOS latch up (which can fry the entire chip).

Here you simply can add a 10k resistor in series with the analog pin to limit current to safe levels.

You also seem to have wired a lithium battery directly without any fuse or current limiting - not a sensible idea as these cells are capable of setting wiring on fire if there's a short-circuit.

@ospreygozo, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project.

Thanks. I cannot put 10K resistor with the pot inputs since that would totally offset the potential divider reading. I can do without the battery voltage sensor however, but it seems that the setup only works when it is wired this way. I don't want it to be that way and I have added the TP4056 to protect both the battery and the rest of the circuit. I will, however, follow your advise about powering the device directly from the battery (which was never my plan anyway) and get rid of the battery voltage sensor part. I'll have to also disassemble everything and start the circuit over in case there is something I am missing. Thanks again for the advice.

How that? Please show that part of your circuit. The resistor should go from the voltage divider to the analog input.

No it doesn't. Analog pins take pico amps only, 10k will not cause detectable offset in the reading.

Also, from the battery life aspect, your circuit has scope for optimisation.
The cell is nominally 3.7 volt (but can reach 4.2v). You boost that to 5v and regulate it down to 3.3v for the nrf24L01. The Nano is also not ideal for battery applications.

Just to make sure I understand, is this what you mean?


I was under the (clearly wrong) impression that the 10K resistor the right would somehow act in parallel with one of the parts of the potential divider. Now that it has been explained to me that the analogue input has a very high impedance, it makes more sense. Thanks for pointing me in the right direction.
Back to the original subject, the phantom powering appears to be coming from one of the connections to the NRF24L01. Nevertheless, I will heed your advise and add resistors before the analogue inputs.

Digital pins also can be subject to phantom powering. You should protect all connections.

Why are you disconnecting the Nano from the 5 volt supply? One obvious point, if you want to disconnect the MCU and all the peripherals, is at pin 3 on the boost converter or at OUT on the TP4056.

I may not have explained properly, so let me clarify this. Disconnecting the 5V supply to the Nano is not part of the design and it is not meant to be that way. I mentioned it because I removed it as part of the trouble shooting and noticed this behavior. Note that while the 5V supply is disconnected from the Nano, the circuit actually worked, despite common sense suggesting it shouldn't. Conversely, powering the Nano through the 5V supply makes it stop transmitting (although the OLED and stick readings appear to keep working properly).
What is making this trouble shooting harder is that now I am no longer sure if the problem is on the received end or the transmitter end.

That I do not understand but to me the phantom powering when you disconnect something does not necessarily indicate a primary problem which has to be solved.

You'd probably have seen the same if you disconnected the ground from the Nano in that another path to ground would have been found via one of the peripherals.

If you are troubleshooting that installation, probably the first thing to do is to disconnect the wire at pin 3 of the boost converter and use a USB cable to power the Nano.

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