i've been trying to find out a way to connect Arduino with an industrial PLC, connecting the Arduino digital outputs to the PLC digital inputs, in order to design an interface shield. The problem is that the Arduino outputs +5V but the PLC can only "read" inputs of +24V.
I've been experimenting with a NPN-PNP transistor scheme but i can't get it to work... Basically what i need is some kind of a +5V -> +24V converter, does anyone know of a circuit or component that allows me to do this?
PLC's can have sourcing, sinking or relay inputs. You need to determine what kind of inputs
the PLC has before you can interface to it. A sinking input requires a sourcing driver and vice versa.
A 5v relay driven from the Aurduino would work in all cases.
aosmith:
Why aren't you using serial and mewtocol?
I am currently using an S7-300 PLC from Siemens and the only serial communication i know it's capable of is Profibus, but that would be a real nightmare to turn the Arduino into a Profibus Slave.
Dou you know any other possibility of serial communication for this type of PLC?
I'd look into mewtocol... Most of them support it whether it's officially documented/supported or not. Check this doc, I'd give it a try just to see if it works:
I have a working profibus arduino shield. The shield must be plugged on the arduino mega board. If you want more information about this shield, please let me know.