Go Down

Topic: 12-30V DC input to UNO (Read 5916 times) previous topic - next topic


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?


Jan 24, 2011, 12:40 am Last Edit: Jan 24, 2011, 12:53 am by davekw7x Reason: 1
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



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


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?


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

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.

Go Up