PLC with ARDUINO

Hi all

I want to build a PLC with ARDUINO .
My question is how do I implement inputs and outputs .

What kind of components I use for input and for output .

Thanks
Elico

how do I implement inputs and outputs .

Just like any other arduino application digitalRead() for inputs and dightalWrite() for outputs.

What kind of components I use for input and for output .

It depends on what inputs and outputs you have. A PLC can use relays so you will need a transistor to drive a relay coil from an arduino output. Contact closure inputs are easy, connect them between input and ground and enable the internal pull up resistors.

The components required for Inputs and Outputs will depend on what kind of devices you are connecting. AC or DC? 12V, 24V, 120V, 240V. If you want to do any analog you will probably have to change from 0-5V on the Arduino to somehow have 0-5V, 0-10V, -5 - +5V, -10 - +10V, 2 - 20mA.

It all depends on what you want to connect to.

One option is to look at Opto-22 devices.

Here are a couple of opensource ladder logic projects that may be useful: http://ldcompiler.sourceforge.net/ http://sites.google.com/site/classicladder/

The closest I've seen on the hardware part was this:

http://ruggedcircuits.com/html/ruggeduino.html

On the software, there was a guy that built one based on an AVR... but just as a proof of concept, so it wasn't very powerful.

Something like this?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267907942