Go Down

Topic: anlog input pin powering Arduino Nano? (Read 226 times) previous topic - next topic

SupArdu

Hi,
I am performing tests with the circuit diagram shown in the attachment.
D4 is used as a PWM output.
A7 is used to measure the voltage at the drain of the MOSFET.
The MOSFET is used as a high side switch charging the accu via R2.

When the USB connection is removed but the external 5V supply still is connected the LEDs on the Nano are lighting up.
When the connection to A7 is removed the LEDs are off.
The accu seems to power the Nano via R2.

The Atmel description of Atmega328 does not give me enough details to understand how the analog input can power the controller.
Usually in my tests, at first I am switching off the external 5V and then disconnect USB. But there are many tests, and sometimes I forget to switch off external 5V.

Up to now the controller survived and still is working.
But can it be dangerous for the controller chip when it is powered via A7?


In a future circuit not only the charging circuit but also the Nano shall be powered via external 5V using the pin "+5V" on the Nano. From the schematic of the Nano this should be no problem.
Is this really ok?

SupArdu
-------------------
have success
SupArdu

DrAzzy

#1
May 04, 2018, 06:27 pm Last Edit: May 04, 2018, 06:28 pm by DrAzzy
The Atmel description of Atmega328 does not give me enough details to understand how the analog input can power the controller.

Yes it does - chapter 18 - I/O ports describes the protection diodes between the pins and Vcc/gnd, and shows them schematically in figure 18-1. Furthermore, Table 32-1 Absolute Maximum Ratings specifies that the voltage on any pin must not exceed Vcc by more than half a volt - when the unit is not powered, Vcc is 0, but you're putting 5v onto an I/O pin. Like most digital IC's, each pin has an internal diode between it and Vcc and Gnd, to prevent the voltage from exceeding Vcc or being lower than ground - in your case, you were backpowering it through that protection diode - a diode meant to handle only very low current.

Up to now the controller survived and still is working.
But can it be dangerous for the controller chip when it is powered via A7?
Yes, it is the easiest way to blow a pin.

In a future circuit not only the charging circuit but also the Nano shall be powered via external 5V using the pin "+5V" on the Nano. From the schematic of the Nano this should be no problem.
Is this really ok?

Yes if it's a nano or pro mini (thanks to the diode and simple power circuit). Boards without the diode, that use some other power supply circuit, like the Uno/Leo/Mega, will often damage the 16u2 serial adapter if you plug them into USB while external 5v supply is connected (the clones use other serial adapters that are less susceptible to this, but they can still be damaged).

ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up