I'm having a puzzling problem. I have an Uno board with an LCD shield. There are 3 sensors connected to analog input pins. It is reading all three sensors just fine. By accident, I powered off the arduino before the sensors, and I noticed that the LCD was still dimly lit. I removed the USB cable and the power cable, but the LCD remains lit. I unplugged the 3 sensors, and one of them is the source of the power. I tried moving it to different pins, but got the same result. This is a Honeywell flow sensor outputting 0-5V.
Does anyone have any thoughts on why this is happening?
I tried moving it to different pins, but got the same result. This is a Honeywell flow sensor outputting 0-5V.
Does anyone have any thoughts on why this is happening?
Yes, by having the arduino board powered off, but with a active 'hot' signal wired to any of it's input pins the board will attempt to power itself up via that signal from the honeywell flow sensor via the internal positive clamping diode the AVR has on all of it's I/O pins. It's called by some, "finding a back door current path" and in some cases can cause damage.
Normally it's better if you can make everything power on and off from one source, if that is not possible I would just wire a series 4.7K ohm resistor between the analog input pin and the honeywell output signal. That will limit the amount of current that can pass into the arduino input pin via it's positive clamping diode.
Thanks everyone for the explanation. It definitely felt like the sort of thing that was probably bad. It would be nice if I could supply this sensor from the Arduino, but it requires a 12V in (to deliver 0-5V out) so it would require more extra hardware than I feel like adding to the circuit.
I'll definitely stick a resistor in there; sounds like that should do the trick. Then I suppose I need to calibrate the sensor output to account for the voltage drop?
I'll definitely stick a resistor in there; sounds like that should do the trick. Then I suppose I need to calibrate the sensor output to account for the voltage drop?
Probably not, recall the input resistance of a analog pin is in the megohms so there will be very little steady state current flowing, just a short surge to charge the sample and hold cap used in the ADC circuitry and as the source impedance of your sensor seems to be low enough to try and power your whole setup, I don't think you will see a difference. But one should always check and test calibration anyway, right?
If the sensor has a low impedance output upto 10k shouldn't be a problem - that's in spec. If the sensor was already 10k output impedance
then you might expect a loss in accuracy of a fraction of an LSB when switching between different analog inputs - the RC low-pass filter
formed by the sampling capacitor and the source impedance starts to degrade accuracy above 10k - not an issue if only using one analog
input, not a large problem till impedances climb up to 50k, 100k etc.
The DC input impedance can be considered infinite for most purposes BTW.
[edit: thinking about it you should calibrate carefully in case the protection diode has been damaged - it might be affect the
input impedance of that pin (cooking the diode might make it more like a resistor(!)).