PLC 24V output to 5V

Hi, I would like to step down the 24V output of the programmable logic controller (PLC) to 5V using relay. I used this circuit (picture below) however, I measured the voltage in the arduino pin with respect to the ground of the arduino but there is no reading at all. Kindly help me. Thanks!

Ps. Sorry for the bad quality :slight_smile: :slight_smile: :slight_smile:

That circuit picture shows an optocoupler, not a relay. Which are you trying to use?

I meant optocoupler. Sorry for the confusion

Hi, Can you number the pins and link us to the data/spec of the optocoupler please?

Did you measure 5V at the top of the opto?

Thanks.. Tom... :)

I would check that the voltages are the right way round (check the pins are per Tom's comment.

Also I would suggest increasing the Optocoupler input resistor to 1000, since at 560 you get 40+mA, which is a LOT. I typically aim for about 10-15mA, though appreciate that there will be differences between devices.

an opto-coupler is just an LED in a chip. if you can light an LED with your circuit, then you can run your opto. you do need to regulate current with a resistor. you might be able to add an LED to your circuit to see what is going on.

I thought we covered this in replies to your post of June 6.

Have you tried the suggestions?

What happened?

What's new?

Allan

TomGeorge: Hi, Can you number the pins and link us to the data/spec of the optocoupler please?

Did you measure 5V at the top of the opto?

Thanks.. Tom... :)

Hi Tom. Here's the data sheet :) https://www.vishay.com/docs/81865/4n32.pdf

I've measured 24 volts across the LED Pin1 (with series 560 ohms resistor) with ground Pin2 as the reference.

Thanks

Gab

cjcharles: I would check that the voltages are the right way round (check the pins are per Tom's comment.

Also I would suggest increasing the Optocoupler input resistor to 1000, since at 560 you get 40+mA, which is a LOT. I typically aim for about 10-15mA, though appreciate that there will be differences between devices.

I will try that. Thanks charl!

Gab

allanhurst: I thought we covered this in replies to your post of June 6.

Have you tried the suggestions?

What happened?

What's new?

Allan

I tried what you guys said on that thread. This thread is the continuation :)

(deleted)

appleshop:
Hi Tom. Here's the data sheet :slight_smile:
https://www.vishay.com/docs/81865/4n32.pdf

I've measured 24 volts across the LED Pin1 (with series 560 ohms resistor) with ground Pin2 as the reference.

Thanks

Gab

You have 24V across pins 1 and 2? ? ? ? ?
You should see the LED drop of 1.25V with pin1 positive and pin2 negative.

Sounds like you have cooked the input side of the opto.

What pins of the output side are you using?
optodarlington.jpg

Have you measured the resistance of your "560R" resistor.

Can you post a picture of your layout please?

Tom.. :slight_smile:

optodarlington.jpg

If you're using 560 ohms with a 24 volts supply that will give > 40mA and could easily cook your opto LED. And if so it would go open-circuit, and you'd measure 24v.

A typical current is 5mA, which would need about 5k. Try a 4k7 and a new opto.

Allan

ps did my simple resistive divider idea not work?

and do you still want an analog connection? If it has to be isolated this is much harder.