Plc to arduino

Hi, i would like to control an arduino using a plc. Is it posible to control it using a 24v relay down to 5v voltage to control the input pins of the arduino?

Your problem statement is lacking a lot of detail. What exactly do you want to do?

A simple potential divider of 2 resistors will reduce the 24vdc to 5vdc to safely drive an arduino input...

What else do you need to know?

Allan

If I use correct voltage divider bias will it posses any harm on the plc and arduino? Im planning to usem8 channels (4 analog and 4 digital)

The enclosed should work.

Note it reduces the voltage by 5:1, so an analog output of 24vdc becomes 4.8v at the arduino input - this avoids overloading an analog input.

Use 1% resistors.

If the plc output is PWM , add a 10uF capacitor across the arduino input to smooth.

Allan

plcard.pdf (14.8 KB)

Thanks!!

I forgot - if the PLC output is by means of relays their contacts may bounce, so adding a 100nF across their arduino inputs should avoid trouble.

Allan

I asked my professor regarding the plc to arduino connection. He said i may use octocoupler with capacitor to prevnt the bouncing since our plc is relay type to avoid trouble. Is it possible?

Definitely for the digital stuff, but not ( well.not at all easily) for the analog connections.

Try my first idea first -it's a lot cheaper and easier.

Allan