Reading Smart Cards from a PLC (with a Little Arduino Help)

If you’ve spent any time on a factory or plant floor, it is a good bet you’ve run into PLCs (Programmable Logic Controllers). These are rugged computers that do simple control and monitoring functions, usually using ladder logic to set their programs. [plc4u] wanted to connect a smart card reader to an Allen Bradley PLC, so he turned to an Arduino to act as a go-between.

The Arduino talks to a USB card reader using a USB host shield. Then it communicates with the PLC using an RS232 link and the DF1 protocol that most Allen Bradley PLCs understand. You may not need a smart card, but once you know how to communicate between an Arduino and the PLC, you could do many different projects that leverage other I/O devices and code available on the Arduino and connects to existing PLC installations. Just remember that you’ll probably need to ruggedize the Arduino a bit to survive and be safe to the same level as a PLC (which might include a NEMA enclosure or even an explosion-proof box).

We’ve covered more than one open source PLC project before. If you want to learn more about the ladder logic PLCs use, there’s a good video on the subject. The video below, however, shows the smart card reader in action.

PLC Photo: By Cmarcante (Own work) [CC BY-SA 3.0], via Wikimedia Commons


Filed under: Arduino Hacks

[original story: Hack a Day]