Go Down

Topic: Analog input draws current when arduino is turned off (Read 678 times) previous topic - next topic

salami738

i use a Arduino Pro Micro from SparkFun (similar to Arduino Leonardo, cpu: Atmega 32u4). It has a analog input: A0, which i use to keep track of the battery voltage in my battery powered project (via analogRead).

I found out, that the red led on the board light up, even if there is no supply voltage on the usual inputs (microusb or vcc). If i use a multimeter to measure the current between the battery and A0, i see that the analog input is drawing about 30mA if the arduino is not powered.

Is this the normal behaviour? Can i fix this via hardware?

pert

Also posted at:
https://arduino.stackexchange.com/q/46300
If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.

DrAzzy

You are applying an external voltage to the board while it is not powered, so it is being back-powered through the protection diodes. This is a good way to damage the board. Do not apply any voltage higher than vcc or lower than ground to any pin (see absolute maximum ratings in datasheet)
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

MarkT

Is this the normal behaviour? Can i fix this via hardware?

The part of the absolute maximum ratings you should be aware of is that no pin should ever
be less than -0.5V w.r.t. ground or greater than Vcc+0.5V.

So if the chip is unpowered no pin should be greater than 0.5V w.r.t. ground since Vcc=0 for
unpowered chip.

[ in practice if you limit the current to a very small value, you'll be OK as the protection
diode will carry that current and not reach 0.5V forward voltage ]

If you are sensing a voltage, use a voltage divider with an output impedance of 10k or so.
(higher might reduce accuracy, 10k should protect from phantom powering like this.  Its best
though to remove all voltage sources if the power is removed.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

uxomm

Always decouple electronic circuitry.

salami738

Also posted at:
https://arduino.stackexchange.com/q/46300
If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.
Hi, thanks for pointing this out. Will post links in future posts!

Go Up