Go Down

Topic: Will 3.6v pull up input pin? (Read 1 time) previous topic - next topic

I need to digitally detect a line that may be from 11 to 14.4 volts. If I use a voltage divider of 1000 and 500 ohms that gives me a voltage from 3.66 to 4.8 volts... Is this a reliable range or do I need to figure out something else? I was thinking maybe have the arduino pin pull up to 5v and have a PNP pull the pin down with the 11 to 14.4 volts. Is that a better idea? Can I use a base resistor to have it sink just a few mA?



3.66-4.8V is fine. Anything above 3V or so will be recognized as high.

The Rugged Audio Shield: Line In, Mic In, Headphone Out, microSD socket, potentiometer, play/record WAV files

I was also thinking that a transistor could better protect the arduino from unpredicted voltage, where a voltage divider would not. Is the transistor thing not a good idea?


Well, if you need to protect against unexpected voltage transients then it's a different story. What kind of "unpredicted voltages" are we talking about?

The QuadRAM shield: add 512 kilobytes of external RAM to your Arduino Mega/Mega2560

It's for a motorcycle. I don't really know what could happen, but I thought a transistor would be a bit more robust than the arduino pin and an easy way to protect it.


Then yes, protection is a good idea. You can either do your transistor idea or just put a 5.1V zener diode across the input pin of the Arduino. Together with a 10k/5k voltage divider (better than 1000/500)  both voltage and current will be limited for transient spikes.

The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

Ok thank you Ill use the diode. Can I ask how the zener protects it? I thought zeners were for having a backwards current over a certain voltage.


Exactly...the backwards current through the zener flows when the voltage is 5.1V or higher, but the zener voltage stays (relatively) constant at 5.1V, no matter how much current flows (until SO much current flows that it fails).

So when your input voltage goes from 14.4V to 20V, 30V, 40V, etc. the zener will stay at 5.1V and just conduct more and more current flowing (because the input voltage is getting higher). It's better that this current goes through the zener than into the Arduino pin!

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Ok so Zener's cathode to the pin and it's anode to ground so that if the voltage is over 5.1 it will drain to the ground?



The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131