Pages: [1]   Go Down
Author Topic: 24V sensor on arduino  (Read 545 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got a push button and some sensor that need 24V to run but arduino can't take 24V so i want to convert them to 5V logic.
I need your help to know what is the best circuit for me.

I got 2 circuits in attachment.

Circuit 1, MOSFET and resistor, i think this circuit can work in both ways but i'm not sure, can the 2N7000 MOSFET can do this job ? Can this circuit draw to much current on the arduino ?

Circuit 2, optocoupler, i think this circuit is the safest but it don't work on both way. Is the 4N35 is enough for me ?

If you have better circuit propose me. I don't want only a voltage divider because you don't have protection on overcurrent.

Thx for your help


* arduino.jpg (56.03 KB, 892x794 - viewed 58 times.)
Logged

Offline Offline
Edison Member
*
Karma: 41
Posts: 1347
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The first circuit is not working, I think the Arduino gets damaged in a microsecond.
The second one with the optocoupler is okay.

What do you mean by "both ways" ?
Is the 24V an open collector that is both input and output for the sensor ? I doubt if that is a 24V signal.
Which sensor is it ?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Circuit 1 was take on the pcduino voltage translation board that transfert 5v to 3,3v logic.

I got a 24v illuminated push button and a 24v industrial led that a when to connect to my arduino. When i talk both ways i mean i can connect my led or my push button on this circuit.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, you can use a plc arduino like ardbox! This plc is done with an Arduino UNO cpu. you can see in www.industrialshields.com
bye
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, you can use a plc arduino like ardbox! This plc is done with an Arduino UNO cpu. you can see in www.industrialshields.com
bye

Is it open-source ?

Logged

Offline Offline
Edison Member
*
Karma: 41
Posts: 1347
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't use circuit 1 to translate 24V to 5V in both directions.
I know it is (part of) a voltage translation, but don't use it for 24V.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

did someone has an idea on how to do it ?
Logged

Offline Offline
Edison Member
*
Karma: 30
Posts: 1021
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you have two circuits.

one is an input.  the opto shows a good DC sensing line.  for AC, use an AC opto.
then use a second opto that is out from the arduino that will light the LED.

Logged

Pages: [1]   Go Up
Jump to: