efficient circuit to read industrial sensor that uses 24v logic for mcu

Thread Starter

champ1

Joined Jun 4, 2018
119
Hello.

I would like to make a circuit to scale down voltage from 24v to 5v dc , I need to read the High/low status of a industrial sensor that uses 24v logic,

I need to feed the output of sensor to microcontroller input pin, two resistor divider circuit can be use with an input pin

upload_2019-2-24_23-27-37.png


I heard about opt-coupler can be used,

what are the other way to read the High/low status of a industrial sensor that uses 24v logic ?

thanks for help.
 

shteii01

Joined Feb 19, 2010
4,644
What you have is as efficient as you can get.

The only other option is to use 24VDC controller, that way you can get rid of the voltage divider that you have. The only 24VDC controllers I am familiar with are the 24VDC PLC, this way you wire 24VDC sensor directly to 24VDC PLC. And this is where the problem rises. PLC are not cheap. Two resistor voltage divider is VERY cheap. So. You are balancing efficiency vs. cost.
 

spinnaker

Joined Oct 29, 2009
7,835
What you have is as efficient as you can get.

The only other option is to use 24VDC controller, that way you can get rid of the voltage divider that you have. The only 24VDC controllers I am familiar with are the 24VDC PLC, this way you wire 24VDC sensor directly to 24VDC PLC. And this is where the problem rises. PLC are not cheap. Two resistor voltage divider is VERY cheap. So. You are balancing efficiency vs. cost.

Oh, that R1/R2 block IS a voltage divider? You are more aware than me. ;)
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
Use a coupler if you are looking for galvanic isolation, otherwise the divider
perfectly suitable. Use values in divider nominal in the 1 - 10 K range, ones
that are too high will subject the node to noise pickup and offset due to leakage.

Ones too low will burn unnecessary power.

Regards, Dana.
 

Thread Starter

champ1

Joined Jun 4, 2018
119
Use a coupler if you are looking for galvanic isolation, otherwise the divider
perfectly suitable. Use values in divider nominal in the 1 - 10 K range, ones
that are too high will subject the node to noise pickup and offset due to leakage.

Ones too low will burn unnecessary power.

Regards, Dana.

let's take the example

I have a pressure sensor which is a digital switch. It works on 24V power and if it exceeds a certain limit, It will stop motor.

upload_2019-2-25_16-49-30.png


I know this will work fine My question is related to optocoupler ic

should i need to use optocoupler ic in place of divider and relay to switch and drive 24 v DC signal?

I wish to drive an output say 24V device from my 5V controller output.In another case my reed switch signal ( 24V) needs to fed to the controller having 5V input.
 

danadak

Joined Mar 10, 2018
4,057
Just use a MOSFET and a clamp diode to drive your relay. MOSFET
must be a logic level MOSFET, meaning it turns on hard when gate is driven
to the high V the UP outputs when at logic 1.



The 10K is used to insure MOSFET is off when UP output is tristated, typically
when UP powers up. Diode is to clamp turn off transient from relay inductance.

You can get optocouplers for this as well, benefit is galvanic isolation from
relay power supply if it does not share a common ground with UP.

Note IRF610 is a poor choice for this application as it has a required high
V gate drive to fully turn on. Just go to digikey or Vishay website and use
searchable parameter tool to pick on that turns on adequately at the logic
1 level the UP can put out for its power supply V rating.


Regards, Dana.
 
Last edited:

pmd34

Joined Feb 22, 2014
503
Just for the original question, I would use a resistor + zener diode, rather than a 2 resistor potential divider. You dont have to faff around finding strange values of resistors, but also you are not affected by any voltage fluctuations, should they occur.
 
Top