Pages: [1]   Go Down
Author Topic: 12-30V DC input to UNO  (Read 2503 times)
0 Members and 1 Guest are viewing this topic.
Mississauga, Ontario, Canada
Offline Offline
Newbie
*
Karma: 1
Posts: 8
iCANhazBLACKhat?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For my project i need to accept 12-30v input signals into the 5v digital pins of the arduino. Just digital signals, nothing analog or anything complex. I am however looking for the cheapest method to do this as it will be for more than a few inputs and used on atleast 10 boards.

What would be the best way to do this?
Logged

Left Coast, USA
Offline Offline
Sr. Member
****
Karma: 7
Posts: 499
Sometimes I just can't help myself.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With these levels, I might assume that the speeds aren't particularly fast.  (See Footnote.)

One simple method:

Each input requires a 4.7 Volt 1/2 Watt Zener diode (1N5230 or equivalent) and a 2.7K Ohm 1/2 Watt resistor.

Input signal goes to one end of the 2.7K Ohm resistor.  The other end of the resistor goes to the Arduino input pin.  The cathode of the Zener diode also goes to the Arduino input pin and the anode of the Zener diode goes to ground.

With zero Volts input or open-circuit input, the Arduino input pin is at logic zero.

With 12-30 Volts input, the Zener diode limits the Arduino input pin voltage to something less than 5 volts.  The current through the resistor and the Zener diode is something between 3 and 10 mA.  The maximum power dissipated by the resistor is about 0.27 Watts, and the maximum power dissipated by the diode is about 0.05 Watts.

Piece part price of the Zeners in quantity 100 will be probably be less than $0.10 USD
Piece part price of the Resistors in quantity 100 will probably be less than $0.05 USD


Regards,

Dave

Footnote:
Before buying tens or hundreds of parts and fabricating tens or hundreds of interface circuits, I would recommend that you build and test one or two prototype circuits to make sure performance is adequate for your application.  If you have a lot of 30 Volt inputs that stay continuously high for a long time, overall heat dissipation could be an "issue."
« Last Edit: January 23, 2011, 06:53:16 pm by davekw7x » Logged

Mississauga, Ontario, Canada
Offline Offline
Newbie
*
Karma: 1
Posts: 8
iCANhazBLACKhat?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No the speeds are not fast. So how could i solve the heat problem? There will be atleast a couple inputs that are always active. Use a 1 watt resistor or higher quality components?
Logged

Atlanta
Offline Offline
Sr. Member
****
Karma: 1
Posts: 255
Arduino still rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats a very good approach.  It assumes you have a "tame" signal and a good signal ground between Arduino and whatever your monitoring.

Quote
So how could i solve the heat problem?
You can increase the resistance.  Depending on what the source is, every time you double the resistance the heat from zener goes almost in half, heat from resistor goes almost in quarter.  How far you can increase resistance depends on several things we are not privy to.
Logged

Pages: [1]   Go Up
Jump to: