Pages: [1]   Go Down
Author Topic: Will 3.6v pull up input pin?  (Read 865 times)
0 Members and 1 Guest are viewing this topic.
California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Thanks
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Right!

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

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent. Thank you.
Logged

Pages: [1]   Go Up
Jump to: