You are on page 1of 14

Implementation

1. Physical Shape:
a. It made in a form of a trainer
b. It is a box made up of Aluminum and Acrylic sheets
c. It has the dimension of LXWXH cm.
d. Aluminum sheets are joined with the Acrylic sheets
through Nuts and bolts while Acrylic sheets are joined
together with the help of glue

2. Weight
The whole box along with the power supply and wire
weighs ___ grams.

3. Compatibility
It is compatible with all computers/ Laptops running
Windows XP, Windows 7,8 and 10. It is also compatible
with both 32 bit and 64 bit computers.

4. Microprocessor:
Arduino Mega 2560 is used in the Mini PLC. The Mega
2560 is an open source Microcontroller board based on
the ATmega2560. It has 54 digital input/output pins (of
which 15 can be used as PWM outputs), 16 analog inputs,
4 UARTs (hardware serial ports), a 16 MHz crystal
oscillator, a USB connection, a power jack, an ICSP
header, and a reset button.

5. Inputs Channels:
It has five (05) input channels out of which four (04) are
digital and one (01) in analogue.
Inputs Channels are connected to the following pins of
Arduino Mega:
Input No. PIN No. of Arduino
Input 1 PIN 7
Input 2 PIN 6
Input 3 PIN 4
Input 4 PIN 3
Input 5 PIN A0 (Analogue)

6. Output Channels:
There are five output Channels which are connected to
Microcontroller through Relays.
Output Ports has the following configuration:

Input No. PIN No. of Arduino


Output 1 PIN 22
Output 2 PIN 24
Output 3 PIN 26
Output 4 PIN 28
Output 5 PIN 30

7. Input Toggle Switches:


In addition to the input channels, five (05) toggle switches
are provided. Turning a toggle ON will send 5 Volts directly
to the particular pin of the microcontroller to which it has
been connected.
These toggle switches are provided for quick validation of
Ladder Logic Diagram by giving inputs to the
microcontroller. These toggles switches can provide for
any Ladder Logic in addition to the 24 Volts input
Channels.
Pin configuration of Toggle Switches is provided as under:

Toggle Switch No. PIN No. of Arduino


Switch 1 PIN 41
Switch 2 PIN 39
Switch 3 PIN 37
Switch 4 PIN 35
Switch 5 PIN 33

8. Output LEDs:
In addition of to output Channels, five (05) LEDs are
provided. These LEDs can be used which the toggle
switches for quick validation and testing of a Ladder Logic
before connecting actual hardware to the PLC.
Pin configuration of the output LEDs is provided below:

Output LED No. PIN No. of Arduino


LED 1 PIN 44
LED 2 PIN 46
LED 3 PIN 48
LED 4 PIN 50
LED 5 PIN 52

9. Input output ports of Arduino:


Twenty (20) Ports of Arduino are used in mini PLC as
shown in the following figure.
10. Graphical User Interface:
Open Source software tool called SoapBox is used.
SoapBox is a free and open source PC-based automation
platform. It includes a ladder logic editor. The ladder
editor includes standard instructions like contacts, coils,
timers, counters, rising edge and falling edge, and
set/reset instructions.

SoapBox Snap communicates with the Arduino through


USB port. The software can be changedin real time. The
Software compiles the Ladder Logic Diagram into
equivalent Arduino code which is transmitted via USB Port
to Arduino.As shown in figure above, the instruction can
be picked as inserted into Ladder Logic rung by simple
drag and drop.
11. Electronics:
It consists of the Following main Units.
a. Power Supply
Power Supply used for laptops is used in the Mini PLC. It
provides 24 Volts and Maxium 2.5 Amperes.
b. Power Conditioning Circuit:
It converts 24Volts into 5Volts which is used by Arduino
Mega.
c. Input part:
The input circuit is designed to operate on 24 Volts.
This high voltage part is separated from low voltage
Microcontroller with the help of optocoupler. Diodes are
also used with relays inorder to protect the circuit from
back emf.

d. Output Part:
The output circuit is also designed to operate on 24 Volts.
The output is taken from the relays. In between the relays
and microcontroller are optocoupler.

PCB design of the circuit is shown below:


Experimentation

Different experiments were performed on the circuit for


checking of the functionality of the Mini PLC.

1. Experiment No.1 : OR Gate:

The following Ladder diagram was made in Soapbox:

two normally closed contact were used in Parallel. The contacts


were assigned the toggle switches Pin no. for output coil one the
output LED was assigned.
Output LEDs
Inputs of OR
Gate

LED (output is off) when both the inputs (toggle switches) are off.
When a single toggle switch is turned on, the LED is also turned
ON.
the GUI also indicated the switch as turned ON, as shown below
If the the other switch in parallel is turned ON, the LED still lights
up as shown below:
The

Gui also indicated the second switch being turned ON.


The OR worked as it should.

2. Experiment No.2 : Output Channels:


The following Ladder Logic diagram was implemented, in
which the toggle switches were connected to the output
channels
The experiment was a success. Turning ON/OFF the
corresponding toggle switch turned ON/OFF corresponding
output relays.

3. Experiment No.3 : Output Switches and LEDs


In this experiment toggle switches were connected to output
LEDs, as shown below:
Turning ON/OFF toggle switches turned ON/OFF the LED in
the ladder logic diagram
4. Experiment No.4 : Input Channels
In this experiment the input Channels were connected to the
output relays as shown below:

When 24 Volts input was provided to the input the


corresponding output turned ON.

5. Experiment No.5 : Analogue Input


In this experiment Analogue input port was tested. The
following Ladder Logic was implemented as shown in figure
below:
It can be seen from above figure that when toggle Switch at
Pin 41 was off, there is no value in the Result box.

When input value is applied the value is shown as shown


below:

The Analogue value at Pin Ao is converted to digital value of


666. The analogue input is increased and decreased at the
input and the digital value is changed accordingly, as shown
in figure below:

In this figure the digital is value can be seen as 551.

You might also like