Go Down

Topic: 24v Input with critical mA limits (Read 658 times) previous topic - next topic


Feb 03, 2013, 07:16 am Last Edit: Feb 03, 2013, 08:11 am by Xplode Reason: 1
I am building a circuit that is basically testing for continuity across a very low ohm circuit.  I'm using a multiplex chip to sample multiple lines for a split second and then rotate to the next one, it will update a remote arduino that will then display the status via LEDs lighting or not.  I can not draw more than 10mA from the circuit without consequences.  I'd be happiest with 5mA.

the 24VDC source will be batteries, and I will run a 7812 (or equivelant) to power the mega as well as a couple other small devices in the enclosure.  Total resistance in the device circuit (not counting anything added for this continuity test) will be in the 2-12ohm range.

The "continuity circuit" is operating on 20-26v (batteries under varying condition), but the arduino (5v MEGA) needs a 3-5V input.    My first thought was to use a 5V regulator chip to punch it down to 5v exactly, but I don't think I can get one that will safely stay within my 10mA limit total draw can I?   Next I considered an optoisolator, but i'm not sure if that works either - the ones I looked at (4n25 i think?) looked like the draw was higher, but I'm not 100% sure I understand exactly how they work.

I'd also strongly like to minimize the chances of a failing chip causing the draw to go over the 10mA mark, so things that reduce the risk of shorting to gnd make me happiest.

Sorry about the really bad mspaint jpeg, but thought it might help illustrate what i'm trying to do.
Thanks in advance for the help!


I also just came up with problem number 2...  the TI CD4051 multi chip i am mucking about with doesn't appear to like 24V signals...  At least not what I can understand from the datasheets...
Anyone know of another good option?  I don't mind running the chip's Vdd from the seperate 12v source, but it has to be able to switch signals up to 27volts, so lets say 30 to be safe.


If you are feeding the input directly to the Arduino digital input, then all you need is a 220K resistor in series with it. The pin protection diode in the Arduino will clamp the voltage to around 5.6V and the 220K resistor will limit the input current to 0.1mA, which is well below your 10mA specification and also below the 2mA safe input current for the pin protection diodes.

If you are planning to switch between multiple inputs using the CD4051, then it's not clear from the datasheet whether the CD4051 has protection diodes on the analog inputs, or what the safe current into those protection diodes is. One option is to use a 220K series resistor plus a Schottky small signal diode between each input and Vcc. However, as you are feeding a digital input, there is no need to use an analog multiplexer, you can use a digital multiplexer such as 74HC151 instead. The 74HC151 definitely does have clamp diodes on all inputs, and the safe clamping current is 20mA. So you just use a 220K series resistor on each input.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


You could also use a voltage divider, so perhaps that 220k resistor on the high side and 56k on the low to divide the input
voltage by approximately 5.  Thus 24V goes to just under 5V, fine as a logic HIGH.
[ I won't respond to messages, use the forum please ]


dc42 - Thank you!  I will look into that chip you suggested.  I have been messing about with a mega board I have, trying resistor networks, and such, but I was looking for something clean.  I wasn't sure what the pin protection diode's ratings were for, or if I could get away with a current that small.   I'm learning quite a lot, and I'd like to learn more about how the clamping diode functions.  Any links/sites you can recommend that will explain the function and schematic layout of such a feature?

MarkT - I have been trying dividers, but was scared of burning out my mega's chip with too much current, and then I also had concerns since the signal back from the device will be over a fair range (20-27 volts) so I didn't want to be outside the safe input voltage ranges in the arduino at any time.

Thanks guys!  Any other suggestions, feel free to keep them coming!

Go Up