Go Down

Topic: Multiplexing inputs of 24V, how do i reduce the voltage (Read 7182 times) previous topic - next topic

Yarash

May 22, 2013, 08:10 pm Last Edit: Jun 18, 2013, 11:00 am by Yarash Reason: 1
Hi,

I am a complete newbie with arduino/electronics.

I am about to purchase an arduino and some
Electronic pieces.

My goal is to create a device that can take specific occupancy
Sensors into 40 inputs, i have investigated a bit into multiplexing
And understand it fairly good.

My only problem is that these specific occupancy sensors
Provide 24 Volts when a movement is detected.

Maybe i am not using the right terms, but i assume
My best solution was to find a multiplexer that can take into
The inputs 24 Volts, and then use a DC-DC stepdown between
The multiplexer COM and the arduinos analog input.

Unfortunately, i am unable to find such a multiplexer.

Is this the right approach? Is there such multiplexer?

Thanks!

majenko

Simplest way is to reduce the 24V to around 5V with a voltage divider before going into the multiplexer.

5*5 = 25, so if you divide the 24V by 5 you'll get just under 5v.  This is well within the spec for a logic high on most devices, so would do fine for a TTL or CMOS multiplexer.

A 10K on the "top" leg (R1) of the divider, and a 2.2K on the "bottom" leg (R2) would give you (R2 / (R1 + R2)) * Vin = (2.2/(2.2+10)) * 24 =  4.33V.  Do that on each of the 24V signals into the multiplexer of your choice and you're good to go.

You could even do it with P2S shift registers and get access to all the sensors at once without having to mess with multiplexer channels.

Yarash


Simplest way is to reduce the 24V to around 5V with a voltage divider before going into the multiplexer.

5*5 = 25, so if you divide the 24V by 5 you'll get just under 5v.  This is well within the spec for a logic high on most devices, so would do fine for a TTL or CMOS multiplexer.

A 10K on the "top" leg (R1) of the divider, and a 2.2K on the "bottom" leg (R2) would give you (R2 / (R1 + R2)) * Vin = (2.2/(2.2+10)) * 24 =  4.33V.  Do that on each of the 24V signals into the multiplexer of your choice and you're good to go.

You could even do it with P2S shift registers and get access to all the sensors at once without having to mess with multiplexer channels.



I understand the voltage divider, but doing this
For 40 inputs is what i am trying to avoid.
Also, this way the inputs must be dedicated to 24V only.

Do you know about a multiplexer that can take 24V?

I tried 24V on a 4051 multiplexer and a multimeter, it worked
Fine, i assume this will kill the chip very fast?


I will have to check out what you mean with the
"Shift Register", i am not familiar with the usage of it
Yet.

Thanks.

majenko

Well, since it has an upper limit of 15V, yes, it will kill it fast.  I'm surprised it lasted that long.

I am not aware of any multiplexer that can cope with that kind of voltage level.

40 inputs isn't really that much really.  And keeping the resistances high will mean the current is low, so you can use very small components, such as 1206 arrays of 4 resistors.  2 resistors per input means 80 resistors - at 4 per array that's 20 arrays - two rows of 10.

But I hear ya about the dedicated to 24V thing.  If you want it more flexible you would have to use something like a 5V zenner plus a resistor to clip the voltages at 5V, which will give a much higher range of voltages you can use.  But that gets even more bulky and expensive.

Then of course there's the option of opto-isolating the inputs.  But 40 opto-isolators is going to get even bigger and more expensive again.

Having said all that I just used my superior google-fu and came up with the Maxim DG408 which can cope with up to 30V.  You'll have to power it with a supply that is at least 24V, and you'll still have to drop the voltage on its output to 5V for the Arduino to cope with, but it'll mean less resistors.  Also, the zenner idea becomes more of a possibility to give a wider range of voltages.

Yarash

I must ask what did you search for in order to find it? :)

My general motto is, Less is more ;]

I think this could be a great solution for me.


Thanks you very much.

majenko

I searched for "24v multiplexer", which lead to a link to a datasheet, which lead to the part number, which lead to the maxim website.

Yarash

Actually, i have one more question.

Can pins A0-A2 (decode pins) have the voltage
that is sent out by the arduino digital pins (5V)
While the multiplexer is powered by 24V?

I can see in the datasheet under the "Truth Table"

It has the following line

"LOGIC "0" VAL ? 0.8V, LOGIC "1" VAH ? 2.4V"

Thanks.

majenko

I'd say yes.

That looks very much like the TTL standard.  Anything over 2.4V will be a logic 1.  Anything below 0.8V will be a logic 0.  74HCT logic chips follow this standard too, and are useful as level shifters.

Yarash

Well, i have ordered and received the Maxim multiplexer.

For some reason i am unable to get it working.

I have done the exact thing using a 4051 Multiplexer and had no issues.

With the attached pin arrangement, i always get 0 Volts.

i tried also powering the multiplexer on it's own with a 12V Power Supply without the arduino.

it was done as follows and tested with a multimeter.

i connected A0-A3 (IC pins) to the +12V (Truth table of NO 16)
I connected V-, GND, EN to -12V
and then connected NO 16 to +12V
i still got 0V out of COM and GND


Am i doing something wrong?

Thanks.

Yarash

Forgot to mention that in the test done with the multimeter i connected the V+ to the 12V+ :)



majenko

EN has to be HIGH for it to function, not LOW.  Connect it to V+ and see what happens.

Grumpy_Mike

Quote
i connected A0-A3 (IC pins) to the +12V

The data sheet shows these at 3V in order to switch, and the words talk of TTL compatable logic inputs on these.

majenko


Quote
i connected A0-A3 (IC pins) to the +12V

The data sheet shows these at 3V in order to switch, and the words talk of TTL compatable logic inputs on these.

"LOGIC "0" VAL ? 0.8V, LOGIC "1" = VAH ? 2.4V"

Also, from absolute maximums:

"Digital Inputs, NO, COM (Note 1)...........(V- - 2V) to (V+ + 2V) or 30mA (whichever occurs first)"

So powered from +12V, the A* inputs can be between 2.4V and 14V to indicate a 1.

Yarash

#13
Jun 18, 2013, 01:31 am Last Edit: Jun 18, 2013, 02:35 am by Yarash Reason: 1

EN has to be HIGH for it to function, not LOW.  Connect it to V+ and see what happens.


I attempted this

If i give EN 12V+
Then any of the NO pins gives me 12V regardless of
The A0-A3 configuration


Any more help? :)

Thanks.

Yarash



EN has to be HIGH for it to function, not LOW.  Connect it to V+ and see what happens.


I attempted this

If i give EN 12V+
Then any of the NO pins gives me 12V regardless of
The A0-A3 configuration


Any more help? :)

Thanks.



Thanks guys.


Problem solved!! :}

I am not an expert but using the 4051 multiplexer i connected the A0-A2 pins directly to digital pins.

What made it work with this multiplexer was adding a resistor between the A0 - A3 pins to the GND.

Funny diagram attached :P

Go Up