1 of 9

Arduino to “Click” Programmable Logic Controller Transitioning

2 of 9

So you are ready to make the jump to PLC’s from the Arduino. Congratulations!(maybe) Let’s be sure that you are doing it for the right reason. Both are great tools, but like any tool they are made for a specific job.

Arduino:

  • 9-12V power input. Has a 100ma voltage regulator on the board
  • Inputs are very high impedance voltage controlled devices that require no user applied return path. Ideally no current flows into them.
  • Analog pins read 0-5VDC with 1024 steps of resolution
  • Great for hobbyists or proving a mass production design before making a custom circuit board.
  • Programmed in “C”

PLC(Model C0-00DD2-D):

  • Requires an external 24VDC power input. Current capacity depends on the power supply model.
  • Digital inputs DO have current flowing into them to illuminate a 24VDC LED. This provides optical isolation which protects the microprocessor. Current can flow in either direction.
  • Analog capability requires an external module
  • Programmed in “Ladder logic”
  • Great for electrically noisy industrial environments.
  • Often used for low volume automation that does not financially justify a custom circuit design.
  • Allows for easy replacement with industry standard parts.

3 of 9

Here is a “Click” Model C0-00DD2-D ready to run. It has a C0-00AC 24VDC power supply mounted on the left hand side and the USB programming cable attached.

4 of 9

24VDC power connections for the CPU module

Connection latches to add more I/O, analog capability, 115VAC switching, 4-20ma monitoring…...gobs of stuff.

5 of 9

115VAC Ground

115VAC “Hot”

115VAC “Neutral”

DC Ground

+24VDC

C1 is the 24VDC common return for pin X1, X2, X3, and X4

C2 is the common return for X5, X6, X7, and X8.

Current direction does not matter. C1 and C2 could also be connected to +24VDC as a common.

This arrangement sends a constant “HIGH” input to X2 as a test.

Power supply module

CPU module

6 of 9

Hopefully slide 4 makes this diagram a little clearer. When we look at the output pins, Y1-6, be sure to power them through V1, V2, and C0. We didn’t have to do this with an Arduino. When we consider the outputs, they are also optically isolated.

7 of 9

Programming:

If you are transitioning from the Arduino this “C” program should look very familiar. When using an Arduino the CPU executes a one time setup then enters a main loop where it performs each command sequentially as quickly as it can. Once the CPU reaches the end of the “LOOP” routine it starts again and repeats forever.

8 of 9

Programming:

The PLC uses a very different language called “Ladder Logic” to perform similar functions.

This is the same program as the Arduino’s “Blink” except it is written for the “Click” and blinks output pin Y6.

9 of 9

Programming:

Let’s look at simpler program for starters.

Let’s image we have the program above to execute