Difference between revisions of "OpenPLC-version1-with-LDmicro/C2/OpenPLC-Traffic-Light-and-Switchboard-Modules/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| border="1" |- || '''VISUAL CUE''' || '''NARRATION''' |- || Slide 1: || Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.''' |- || Slide 2...")
 
 
Line 34: Line 34:
 
* If not, please refer to the relevant tutorials from [https://spoken-tutorial.org/ Home | spoken-tutorial.org]
 
* If not, please refer to the relevant tutorials from [https://spoken-tutorial.org/ Home | spoken-tutorial.org]
  
|| * To follow this tutorial, you should know about '''OpenPLC version 1''' '''Mainboard'''.
+
||  
 +
* To follow this tutorial, you should know about '''OpenPLC version 1''' '''Mainboard'''.
 
* If not, please refer to the relevant tutorials in this series on this website.
 
* If not, please refer to the relevant tutorials in this series on this website.
  
 
|-  
 
|-  
 
||  
 
||  
|| First we will learn about the OpenPLC Traffic light module.
+
|| First we will learn about the '''OpenPLC Traffic light module'''.
 
|-  
 
|-  
 
|| Slide 5: Traffic Light module
 
|| Slide 5: Traffic Light module
  
This module is used to  
+
This '''module''' is used to  
* implement the working of traffic lights
+
* implement the working of '''traffic lights'''
* visualize the status of any process with the built-in LEDs
+
* visualize the status of any process with the '''built-in LEDs'''
 
||  
 
||  
This module is used to
+
This '''module''' is used to
* implement the working of traffic lights and
+
* implement the working of '''traffic lights''' and
* visualize the status of any process with the built-in LEDs.
+
* visualize the status of any process with the '''built-in LEDs'''.
  
 
|-  
 
|-  
 
|| Traffic.jpg
 
|| Traffic.jpg
  
|| This is a picture of the '''Traffic light''' module.
+
|| This is a picture of the '''Traffic light module'''.
  
This module replicates a traffic light.  
+
This '''module''' replicates a '''traffic light'''.  
  
It has one red LED marked as '''STOP''' and one yellow LED marked as '''READY'''.  
+
It has one red '''LED''' marked as '''STOP''' and one yellow '''LED''' marked as '''READY'''.  
  
 
At the bottom, it has 3 green '''LEDs''' marked as '''LEFT, GO '''and''' RIGHT.'''
 
At the bottom, it has 3 green '''LEDs''' marked as '''LEFT, GO '''and''' RIGHT.'''
Line 64: Line 65:
 
|| led-connectors.png
 
|| led-connectors.png
  
|| You can access all these '''LEDs''' using the connectors present below.  
+
|| You can access all these '''LEDs''' using the '''connectors''' present below.  
 
|-  
 
|-  
 
|| traffic-sled.png or (traffic.jpg)
 
|| traffic-sled.png or (traffic.jpg)
  
|| The red '''LED''' can also be accessed through the two connectors on the right of it.
+
|| The red '''LED''' can also be accessed through the two '''connectors''' on the right of it.
  
If you want to use a single LED you can use these connectors.
+
If you want to use a single '''LED''' you can use these '''connectors'''.
 
|-  
 
|-  
 
||  
 
||  
Line 76: Line 77:
 
|-  
 
|-  
 
|| traffic.jpg
 
|| traffic.jpg
|| The anode and cathode of the red LED are given as connectors to the right of it.
+
|| The '''anode''' and '''cathode''' of the red '''LED''' are given as '''connectors''' to the right of it.
  
The anode is marked as +5V and cathode as '''GND''', which is '''Ground'''.
+
The '''anode''' is marked as '''+5V''' and '''cathode''' as '''GND''', which is '''Ground'''.
 
|-
 
|-
 
|-  
 
|-  
 
||  
 
||  
  
|| These connectors can be connected in 3 different ways.
+
|| These '''connectors''' can be connected in 3 different ways.
  
 
We will see one by one.
 
We will see one by one.
Line 89: Line 90:
 
|| traffic.jpg
 
|| traffic.jpg
  
|| We can connect '''+5V pin''' to 5V and '''GND pin''' to any I/O pin of the microcontroller.
+
|| We can connect '''+5V pin''' to '''5V''' and '''GND pin''' to any '''I/O pin''' of the '''microcontroller'''.
 
|-  
 
|-  
 
|| traffic.jpg
 
|| traffic.jpg
|| Connect '''GND pin''' to 0V and '''+5V pin''' to any I/O pin of the microcontroller.
+
|| Connect '''GND pin''' to 0V and '''+5V pin''' to any '''I/O pin''' of the '''microcontroller'''.
 
|-  
 
|-  
 
|| traffic.jpg
 
|| traffic.jpg
|| Otherwise connect both +5V and GND pins to the I/O pins of the '''microcontroller'''.  
+
|| Otherwise connect both '''+5V''' and '''GND pins''' to the '''I/O pins''' of the '''microcontroller'''.  
 
|-  
 
|-  
 
|| Led-connectors.png
 
|| Led-connectors.png
  
 
traffic.jpg image
 
traffic.jpg image
|| We will see how to use '''LEDs''' with the connectors at the bottom of the module.
+
|| We will see how to use '''LEDs''' with the '''connectors''' at the bottom of the '''module'''.
  
Each '''LED’s''' '''cathode''' is taken out through the connectors at the bottom of the module.
+
Each '''LED’s cathode''' is taken out through the '''connectors''' at the bottom of the '''module'''.
  
Note that the rightmost pin marked as '''‘EN’''' is not an '''LED''' connector.  
+
Note that the rightmost '''pin''' marked as '''‘EN’''' is not an '''LED connector'''.  
 
|-
 
|-
 
|-  
 
|-  
Line 110: Line 111:
  
 
traffic.jpg image
 
traffic.jpg image
|| Each connector is marked with the first letter of the respective '''LED''' name.
+
|| Each '''connector''' is marked with the first letter of the respective '''LED''' name.
  
We will see one by one starting from right.# Ri is for green '''LED''' marked as '''RIGHT'''
+
We will see one by one starting from right.
# S is for red '''LED''' marked as '''STOP'''
+
# '''Ri''' is for green '''LED''' marked as '''RIGHT'''
# Re is for yellow '''LED''' marked as '''READY'''
+
# '''S''' is for red '''LED''' marked as '''STOP'''
# G is for green '''LED''' marked as '''GO'''
+
# '''Re''' is for yellow '''LED''' marked as '''READY'''
# L is for green '''LED''' marked as '''LEFT'''.
+
# '''G''' is for green '''LED''' marked as '''GO'''
 +
# '''L''' is for green '''LED''' marked as '''LEFT'''.
  
 
|-  
 
|-  
 
|| traffic-enable.png
 
|| traffic-enable.png
|| '''‘EN’''' is an active low enable pin which enables all the '''LED''' pins.
+
|| '''‘EN’''' is an '''active low enable pin''' which enables all the '''LED pins'''.
  
To the left of the yellow '''LED''', we can find a connector marked '''+5V'''.
+
To the left of the yellow '''LED''', we can find a '''connector''' marked '''+5V'''.
  
This is the power pin of the module.
+
This is the '''power pin''' of the '''module'''.
  
 
That is, none of the '''LED''' glows unless you make these two connections.
 
That is, none of the '''LED''' glows unless you make these two connections.
Line 133: Line 135:
  
 
|| Therefore, for any '''LED''' to glow you should follow the below:
 
|| Therefore, for any '''LED''' to glow you should follow the below:
# +5V pin should be given 5V.
+
# '''+5V pin''' should be given '''5V'''.
# EN and the respective '''LED''' pin should be grounded or given a logic-low signal.
+
# '''EN''' and the respective '''LED pin''' should be '''ground'''ed or given a '''logic-low signal'''.
  
 
|-  
 
|-  
 
||  
 
||  
|| Now we’ll see the working of the module.
+
|| Now we’ll see the working of the '''module'''.
 
|-  
 
|-  
|| Slide 7: How can the Traffic Light module be powered?
+
|| Slide 7: How can the '''Traffic Light module''' be powered?
  
Traffic Light module can be powered using the output power pins of the Mainboard
+
'''Traffic Light module''' can be powered using the output power pins of the Mainboard
|| How can the Traffic Light module be powered?
+
|| How can the '''Traffic Light module''' be powered?
  
It can be powered using the output power pins of the Mainboard.
+
It can be powered using the output '''power pins''' of the '''Mainboard'''.
 
|-  
 
|-  
 
|| SMPS-Mainboard.jpg - add in editing
 
|| SMPS-Mainboard.jpg - add in editing
Line 151: Line 153:
 
|-  
 
|-  
 
|| led-connectors.png
 
|| led-connectors.png
|| First we will see the demo of this module using the connectors available at the bottom.
+
|| First we will see the demo of this '''module''' using the '''connectors''' available at the bottom.
 
|-  
 
|-  
 
|| demo1.png
 
|| demo1.png
  
 
Point to the image as per narration
 
Point to the image as per narration
|| Connect 5V to the power pin i.e. +5V pin to the left of the yellow LED.  
+
|| Connect '''5V''' to the '''power pin''' i.e. '''+5V pin''' to the left of the yellow '''LED'''.  
  
Connect 0V to the '''‘EN’''' pin.
+
Connect '''0V''' to the '''‘EN’ pin'''.
  
Then, connect 0V to any of the '''LEDs'''.
+
Then, connect '''0V''' to any of the '''LEDs'''.
  
I’m connecting it to the pins marked '''‘G’''', '''‘Re’''' and '''‘S’'''.
+
I’m connecting it to the '''pins''' marked '''‘G’''', '''‘Re’''' and '''‘S’'''.
 
|-  
 
|-  
 
|| demo1.png
 
|| demo1.png
 
|| Make the connections as shown in the picture.
 
|| Make the connections as shown in the picture.
  
Remember to turn off the power supply when you change or make new connections.
+
Remember to turn '''off''' the '''power supply''' when you change or make new connections.
 
|-  
 
|-  
||  
+
|| Turn '''on''' the '''power supply'''
|| After making all the connections turn on the power supply of the '''Mainboard'''.
+
|| After making all the connections turn '''on''' the '''power supply''' of the '''Mainboard'''.
  
 
The red, yellow and middle green '''LED''' has started glowing.
 
The red, yellow and middle green '''LED''' has started glowing.
 
|-  
 
|-  
 
||  
 
||  
|| Do not use I/O pins of the '''Mainboard''' to power up the pin marked +5V.
+
|| Do not use '''I/O pins''' of the '''Mainboard''' to power up the '''pin''' marked '''+5V'''.
  
Because it may affect the intensity of the LED.  
+
Because it may affect the intensity of the '''LED'''.  
 
|-  
 
|-  
||  
+
|| Disconnect the '''‘EN’ pin'''
|| Now disconnect the '''‘EN’''' pin.
+
|| Now disconnect the '''‘EN’ pin'''.
  
We can observe that all LEDs go off.
+
We can observe that all '''LEDs''' go '''off'''.
 
|-  
 
|-  
||  
+
|| Turn '''off''' the '''power supply'''
|| Turn off the power supply.
+
|| Turn '''off''' the '''power supply'''.
 
|-  
 
|-  
 
|| traffic-sled.png
 
|| traffic-sled.png
|| Next, we will see the demo on how to use this module when a single LED is needed.
+
|| Next, we will see the demo on how to use this '''module''' when a single '''LED''' is needed.
 
|-  
 
|-  
 
|| demo2.png
 
|| demo2.png
|| Connect 5V to the +5V pin on the right of the red LED.
+
|| Connect '''5V''' to the '''+5V pin''' on the right of the red '''LED'''.
  
Connect 0V to the pin marked '''GND'''.
+
Connect '''0V''' to the '''pin''' marked '''GND'''.
 
|-  
 
|-  
||  
+
|| Turn '''on''' the '''power supply'''
|| Turn on the power supply.
+
|| Turn '''on''' the '''power supply'''.
  
This will make only the red LED to glow.
+
This will make only the red '''LED''' to glow.
  
Thus, there is no need to connect power and enable pins for this connection.
+
Thus, there is no need to connect power and enable '''pins''' for this connection.
 
|-  
 
|-  
||  
+
|| Turn '''off''' the '''power supply'''
|| Turn off the power supply.
+
|| Turn '''off''' the '''power supply'''.
 
|-  
 
|-  
 
||  
 
||  
|| We have seen how Traffic light module can be used in different ways.
+
|| We have seen how '''Traffic light module''' can be used in different ways.
 
|-  
 
|-  
 
||  
 
||  
|| Now we’ll learn about the '''OpenPLC Switchboard''' module.
+
|| Now we’ll learn about the '''OpenPLC Switchboard module'''.
 
|-  
 
|-  
 
|| Slide 5: Switchboard module
 
|| Slide 5: Switchboard module
* The goal of this module is to get familiarized with different types of switches
+
* The goal of this '''module''' is to get familiarized with different types of '''switches'''
 
* In particular their usage in the real time applications in industries
 
* In particular their usage in the real time applications in industries
 
||  
 
||  
  
The goal of this module is to get familiarized with different types of switches.
+
The goal of this '''module''' is to get familiarized with different types of '''switches'''.
  
 
In particular their usage in the real time applications in industries.
 
In particular their usage in the real time applications in industries.
 
|-  
 
|-  
 
|| Slide 6: Main Components
 
|| Slide 6: Main Components
* 4 Normally Open switches
+
* 4 Normally Open '''switches'''
* 4 Normally Closed switches
+
* 4 Normally Closed '''switches'''
* 2 Latched action switches
+
* 2 '''Latched action switches''' and
* LEDs for each switch
+
* '''LEDs''' for each '''switch'''
  
 
|| This module has
 
|| This module has
* 4 Normally Open switches
+
* 4 Normally Open '''switches'''
* 4 Normally Closed switches
+
* 4 Normally Closed '''switches'''
* 2 Latched action switches and
+
* 2 '''Latched action switches''' and
* LEDs for each switch
+
* '''LEDs''' for each '''switch'''
  
 
|-  
 
|-  
 
|| switchboard.jpg
 
|| switchboard.jpg
|| This is the '''Switchboard''' module.
+
|| This is the '''Switchboard module'''.
 
|-  
 
|-  
 
|| Slide 7: Types of Switches:
 
|| Slide 7: Types of Switches:
Line 241: Line 243:
 
* Latched action (L)
 
* Latched action (L)
  
|| In this module, there are three kinds of switches available.
+
|| In this '''module''', there are three kinds of '''switches''' available.
  
 
They are '''Normally Open, Normally Closed '''and''' Latched action switches.'''
 
They are '''Normally Open, Normally Closed '''and''' Latched action switches.'''
Line 247: Line 249:
 
'''Normally Open''' is represented as '''NO''' and '''Normally Closed''' is represented as '''NC'''.
 
'''Normally Open''' is represented as '''NO''' and '''Normally Closed''' is represented as '''NC'''.
  
'''Latched action''' switches are represented as '''L'''.
+
'''Latched action switches''' are represented as '''L'''.
 
|-  
 
|-  
 
|| SB-switches.png
 
|| SB-switches.png
|| We will now look at their arrangement on the module from bottom to top.
+
|| We will now look at their arrangement on the '''module''' from bottom to top.
 
|-  
 
|-  
 
|| SB-switches.png
 
|| SB-switches.png
Line 257: Line 259:
  
 
Then NC and then NO
 
Then NC and then NO
|| At the bottom, we have two '''Latched action''' switches.
+
|| At the bottom, we have two '''Latched action switches'''.
  
Above that we have 4 '''Normally Closed''' and then 4 '''Normally Open '''switches.
+
Above that we have 4 '''Normally Closed''' and then 4 '''Normally Open switches'''.
 
|-  
 
|-  
 
|| SB-leds.png
 
|| SB-leds.png
  
|| Above these switches we have LEDs corresponding to each switch.  
+
|| Above these '''switches''' we have '''LEDs''' corresponding to each '''switch'''.  
  
The LEDs are arranged in the same order as that of switches.
+
The '''LEDs''' are arranged in the same order as that of '''switches'''.
 
|-  
 
|-  
 
||  
 
||  
|| Each LED glow indicates a corresponding switch press.
+
|| Each '''LED''' glow indicates a corresponding '''switch''' press.
 
|-  
 
|-  
 
|| SB-connectors.png
 
|| SB-connectors.png
|| On the top we have female berg connectors for connections.
+
|| On the top we have '''female berg connectors''' for connections.
 
|-  
 
|-  
 
|| SB-connectors-z.png
 
|| SB-connectors-z.png
  
 
Point to each particular pin
 
Point to each particular pin
|| Next, we will see about the pins.
+
|| Next, we will see about the '''pins'''.
  
Starting from the right, the first two pins are GND and 5V respectively.
+
Starting from the right, the first two '''pins''' are '''GND''' and '''5V''' respectively.
  
These are the input power pins of this module.
+
These are the input '''power pins''' of this '''module.'''
  
Then we have 4 pins for 4 '''NO switches '''and''' '''4 pins for 4 '''NC switches.'''  
+
Then we have 4 '''pins''' for 4 '''NO switches '''and 4 pins for 4 '''NC switches.'''  
  
The last 2 pins are for 2 '''latched action switches'''.
+
The last 2 '''pins''' are for 2 '''latched action switches'''.
 
|-  
 
|-  
 
|| Slide 8: Important Note
 
|| Slide 8: Important Note
* NO and latched action switches must be connected to the I/Os of the microcontroller
+
* NO and latched action '''switches''' must be connected to the '''I/Os''' of the '''microcontroller'''
* Only then the LEDs of the corresponding switches will work
+
* Only then the '''LEDs''' of the corresponding '''switches''' will work
* LEDs of NC switches will work, even if they are not connected to I/Os
+
* '''LEDs''' of '''NC switches''' will work, even if they are not connected to '''I/Os'''
  
|| '''NO''' and '''Latched action''' switches must be connected to the I/Os of the microcontroller.
+
|| '''NO''' and '''Latched action switches''' must be connected to the '''I/Os''' of the '''microcontroller'''.
  
Only then the LEDs of the corresponding switches will work.
+
Only then the '''LEDs''' of the corresponding '''switches''' will work.
  
LEDs of '''NC''' switches will work, even if they are not connected to the I/Os of the microcontroller.
+
LEDs of '''NC switches''' will work, even if they are not connected to the '''I/Os''' of the '''microcontroller'''.
 
|-  
 
|-  
 
||  
 
||  
|| Now, we’ll learn how each type of the switch works.
+
|| Now, we’ll learn how each type of the '''switch''' works.
 
|-  
 
|-  
 
|| Slide 9: Normally Open Switch
 
|| Slide 9: Normally Open Switch
* The output pin of a '''NO switch '''will read logic 0 when it is not pressed
+
* The output '''pin''' of a '''NO switch '''will read '''logic 0''' when it is not pressed
* When the switch is pressed, the output pin will read 5V
+
* When the '''switch''' is pressed, the output '''pin''' will read '''5V'''
* This is due to the supply from the microcontroller’s internal pull up register
+
* This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''
  
|| The output pin of a '''NO switch '''will read logic 0 when it is not pressed.
+
|| The output '''pin''' of a '''NO switch '''will read '''logic 0''' when it is not pressed.
  
When the switch is pressed, the output pin will read 5V.
+
When the '''switch''' is pressed, the output '''pin''' will read '''5V'''.
  
This is due to the supply from the microcontroller’s internal pull up register.
+
This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''.
 
|-  
 
|-  
 
|| Slide 10: Normally Closed switch
 
|| Slide 10: Normally Closed switch
* The output pin of a NC switch will read 5V when it is not pressed
+
* The output '''pin''' of a '''NC switch''' will read '''5V''' when it is not pressed
* This is due to the supply from the microcontroller’s internal pull up register
+
* This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''
* Upon switch press, the output pin will read logic 0 or ground
+
* Upon '''switch''' press, the output '''pin''' will read '''logic 0''' or '''ground'''
  
|| The output pin of a '''NC switch''' will read 5V when it is not pressed.
+
|| The output '''pin''' of a '''NC switch''' will read '''5V''' when it is not pressed.
  
This is due to the supply from the microcontroller’s internal pull up register.
+
This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''.
  
Upon switch press, the output pin will read logic 0 or '''Ground'''.
+
Upon '''switch''' press, the output '''pin''' will read '''logic 0''' or '''ground'''.
 
|-  
 
|-  
 
|| Slide 11: Latched action switch
 
|| Slide 11: Latched action switch
* It is basically a '''push-to-make,''' '''push-to-break''' type of switch
+
* It is basically a '''push-to-make, push-to-break''' type of '''switch'''
* That is, the output pin will read 5V, when it is pressed for the first time
+
* That is, the output '''pin''' will read '''5V''', when it is pressed for the first time
* The output pin will read 0V, when it is pressed for the second time
+
* The output '''pin''' will read '''0V''', when it is pressed for the second time
  
|| '''Latched action''' switch is basically a '''push-to-make,''' '''push-to-break''' type of switch.
+
|| '''Latched action switch''' is basically a '''push-to-make, push-to-break''' type of '''switch'''.
  
That is, the output pin will read 5V, when it is pressed for the first time.
+
That is, the output '''pin''' will read '''5V''', when it is pressed for the first time.
  
The output pin will read 0V, when it is pressed for the second time.
+
The output '''pin''' will read '''0V''', when it is pressed for the second time.
  
Working of the LED of a''' latched action switch '''corresponds to that of a''' NO switch.'''
+
Working of the '''LED''' of a''' latched action switch '''corresponds to that of a''' NO switch.'''
 
|-  
 
|-  
 
|| Slide 12: How can the Switchboard module be powered?
 
|| Slide 12: How can the Switchboard module be powered?
  
Switchboard module can be powered using the output power pins of the Mainboard
+
'''Switchboard module''' can be powered using the output '''power pins''' of the '''Mainboard'''
|| How can the Switchboard module be powered?
+
|| How can the '''Switchboard module''' be powered?
  
It can be powered using the output power pins of the '''Mainboard'''.
+
It can be powered using the output '''power pins''' of the '''Mainboard'''.
 
|-  
 
|-  
 
||  
 
||  
|| We have learnt about the different types of switches in the '''Switchboard''' module.
+
|| We have learnt about the different types of '''switches''' in the '''Switchboard module'''.
 
|-  
 
|-  
 
||  
 
||  
|| Using these modules we will learn about '''LDmicro''' instructions on '''OpenPLC''' in future tutorials.
+
|| Using these '''modules''' we will learn about '''LDmicro''' instructions on '''OpenPLC''' in future tutorials.
 
|-  
 
|-  
 
||  
 
||  
Line 354: Line 356:
 
|-  
 
|-  
 
|| Slide 8: Summary
 
|| Slide 8: Summary
* '''OpenPLC Traffic light''' module
+
* '''OpenPLC Traffic light module'''
* '''OpenPLC Switchboard''' module
+
* '''OpenPLC Switchboard module'''
  
|| In this tutorial, we learnt about* '''OpenPLC Traffic light''' module
+
|| In this tutorial, we learnt about
* '''OpenPLC Switchboard''' module
+
* '''OpenPLC Traffic light module'''
 +
* '''OpenPLC Switchboard module'''
 
|-  
 
|-  
 
|| Slide 9: About
 
|| Slide 9: About

Latest revision as of 12:53, 15 February 2021

VISUAL CUE NARRATION
Slide 1: Welcome to the spoken tutorial on OpenPLC Traffic Light & Switchboard modules.
Slide 2: Learning Objectives
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
In this tutorial, we will learn about
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
Slide 3: System Requirements
  • Ubuntu Linux 18.04 operating system
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
  • OpenPLC version 1 Mainboard
  • 24V, 2A SMPS
To record this tutorial I am using:
  • Ubuntu Linux 18.04 operating system
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
  • OpenPLC version 1 Mainboard
  • 24V, 2A SMPS
Slide 4: Pre-requisites
  • To follow this tutorial, you should know about OpenPLC version 1 Mainboard.
  • If not, please refer to the relevant tutorials in this series on this website.
First we will learn about the OpenPLC Traffic light module.
Slide 5: Traffic Light module

This module is used to

  • implement the working of traffic lights
  • visualize the status of any process with the built-in LEDs

This module is used to

  • implement the working of traffic lights and
  • visualize the status of any process with the built-in LEDs.
Traffic.jpg This is a picture of the Traffic light module.

This module replicates a traffic light.

It has one red LED marked as STOP and one yellow LED marked as READY.

At the bottom, it has 3 green LEDs marked as LEFT, GO and RIGHT.

led-connectors.png You can access all these LEDs using the connectors present below.
traffic-sled.png or (traffic.jpg) The red LED can also be accessed through the two connectors on the right of it.

If you want to use a single LED you can use these connectors.

Let us see how to do simple experiments using a single LED.
traffic.jpg The anode and cathode of the red LED are given as connectors to the right of it.

The anode is marked as +5V and cathode as GND, which is Ground.

These connectors can be connected in 3 different ways.

We will see one by one.

traffic.jpg We can connect +5V pin to 5V and GND pin to any I/O pin of the microcontroller.
traffic.jpg Connect GND pin to 0V and +5V pin to any I/O pin of the microcontroller.
traffic.jpg Otherwise connect both +5V and GND pins to the I/O pins of the microcontroller.
Led-connectors.png

traffic.jpg image

We will see how to use LEDs with the connectors at the bottom of the module.

Each LED’s cathode is taken out through the connectors at the bottom of the module.

Note that the rightmost pin marked as ‘EN’ is not an LED connector.

Led-connectors.png

traffic.jpg image

Each connector is marked with the first letter of the respective LED name.

We will see one by one starting from right.

  1. Ri is for green LED marked as RIGHT
  2. S is for red LED marked as STOP
  3. Re is for yellow LED marked as READY
  4. G is for green LED marked as GO
  5. L is for green LED marked as LEFT.
traffic-enable.png ‘EN’ is an active low enable pin which enables all the LED pins.

To the left of the yellow LED, we can find a connector marked +5V.

This is the power pin of the module.

That is, none of the LED glows unless you make these two connections.

Slide 6: LED to glow
  • +5V pin should be given 5V.
  • EN and the respective LED pin should be grounded or given a logic-low signal.
Therefore, for any LED to glow you should follow the below:
  1. +5V pin should be given 5V.
  2. EN and the respective LED pin should be grounded or given a logic-low signal.
Now we’ll see the working of the module.
Slide 7: How can the Traffic Light module be powered?

Traffic Light module can be powered using the output power pins of the Mainboard

How can the Traffic Light module be powered?

It can be powered using the output power pins of the Mainboard.

SMPS-Mainboard.jpg - add in editing Connect the SMPS to the Mainboard as shown here.
led-connectors.png First we will see the demo of this module using the connectors available at the bottom.
demo1.png

Point to the image as per narration

Connect 5V to the power pin i.e. +5V pin to the left of the yellow LED.

Connect 0V to the ‘EN’ pin.

Then, connect 0V to any of the LEDs.

I’m connecting it to the pins marked ‘G’, ‘Re’ and ‘S’.

demo1.png Make the connections as shown in the picture.

Remember to turn off the power supply when you change or make new connections.

Turn on the power supply After making all the connections turn on the power supply of the Mainboard.

The red, yellow and middle green LED has started glowing.

Do not use I/O pins of the Mainboard to power up the pin marked +5V.

Because it may affect the intensity of the LED.

Disconnect the ‘EN’ pin Now disconnect the ‘EN’ pin.

We can observe that all LEDs go off.

Turn off the power supply Turn off the power supply.
traffic-sled.png Next, we will see the demo on how to use this module when a single LED is needed.
demo2.png Connect 5V to the +5V pin on the right of the red LED.

Connect 0V to the pin marked GND.

Turn on the power supply Turn on the power supply.

This will make only the red LED to glow.

Thus, there is no need to connect power and enable pins for this connection.

Turn off the power supply Turn off the power supply.
We have seen how Traffic light module can be used in different ways.
Now we’ll learn about the OpenPLC Switchboard module.
Slide 5: Switchboard module
  • The goal of this module is to get familiarized with different types of switches
  • In particular their usage in the real time applications in industries

The goal of this module is to get familiarized with different types of switches.

In particular their usage in the real time applications in industries.

Slide 6: Main Components
  • 4 Normally Open switches
  • 4 Normally Closed switches
  • 2 Latched action switches and
  • LEDs for each switch
This module has
  • 4 Normally Open switches
  • 4 Normally Closed switches
  • 2 Latched action switches and
  • LEDs for each switch
switchboard.jpg This is the Switchboard module.
Slide 7: Types of Switches:
  • Normally open (NO)
  • Normally closed (NC)
  • Latched action (L)
In this module, there are three kinds of switches available.

They are Normally Open, Normally Closed and Latched action switches.

Normally Open is represented as NO and Normally Closed is represented as NC.

Latched action switches are represented as L.

SB-switches.png We will now look at their arrangement on the module from bottom to top.
SB-switches.png

Highlight Latch switches

Then NC and then NO

At the bottom, we have two Latched action switches.

Above that we have 4 Normally Closed and then 4 Normally Open switches.

SB-leds.png Above these switches we have LEDs corresponding to each switch.

The LEDs are arranged in the same order as that of switches.

Each LED glow indicates a corresponding switch press.
SB-connectors.png On the top we have female berg connectors for connections.
SB-connectors-z.png

Point to each particular pin

Next, we will see about the pins.

Starting from the right, the first two pins are GND and 5V respectively.

These are the input power pins of this module.

Then we have 4 pins for 4 NO switches and 4 pins for 4 NC switches.

The last 2 pins are for 2 latched action switches.

Slide 8: Important Note
  • NO and latched action switches must be connected to the I/Os of the microcontroller
  • Only then the LEDs of the corresponding switches will work
  • LEDs of NC switches will work, even if they are not connected to I/Os
NO and Latched action switches must be connected to the I/Os of the microcontroller.

Only then the LEDs of the corresponding switches will work.

LEDs of NC switches will work, even if they are not connected to the I/Os of the microcontroller.

Now, we’ll learn how each type of the switch works.
Slide 9: Normally Open Switch
  • The output pin of a NO switch will read logic 0 when it is not pressed
  • When the switch is pressed, the output pin will read 5V
  • This is due to the supply from the microcontroller’s internal pull up register
The output pin of a NO switch will read logic 0 when it is not pressed.

When the switch is pressed, the output pin will read 5V.

This is due to the supply from the microcontroller’s internal pull up register.

Slide 10: Normally Closed switch
  • The output pin of a NC switch will read 5V when it is not pressed
  • This is due to the supply from the microcontroller’s internal pull up register
  • Upon switch press, the output pin will read logic 0 or ground
The output pin of a NC switch will read 5V when it is not pressed.

This is due to the supply from the microcontroller’s internal pull up register.

Upon switch press, the output pin will read logic 0 or ground.

Slide 11: Latched action switch
  • It is basically a push-to-make, push-to-break type of switch
  • That is, the output pin will read 5V, when it is pressed for the first time
  • The output pin will read 0V, when it is pressed for the second time
Latched action switch is basically a push-to-make, push-to-break type of switch.

That is, the output pin will read 5V, when it is pressed for the first time.

The output pin will read 0V, when it is pressed for the second time.

Working of the LED of a latched action switch corresponds to that of a NO switch.

Slide 12: How can the Switchboard module be powered?

Switchboard module can be powered using the output power pins of the Mainboard

How can the Switchboard module be powered?

It can be powered using the output power pins of the Mainboard.

We have learnt about the different types of switches in the Switchboard module.
Using these modules we will learn about LDmicro instructions on OpenPLC in future tutorials.
This brings us to the end of this tutorial.

Let us summarize.

Slide 8: Summary
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
In this tutorial, we learnt about
  • OpenPLC Traffic light module
  • OpenPLC Switchboard module
Slide 9: About

Spoken Tutorial project

The video at the following link summarises the Spoken Tutorial project.

Please download and watch it

Slide 10:

Spoken Tutorial workshops

The Spoken Tutorial Project team:
  • conducts workshops using spoken tutorials and
  • gives certificates on passing online tests.

For more details, please write to us.

Slide 11:

Forum for specific questions:

Please post your timed queries in this forum.
Slide 12:

Forum for specific questions:

Do you have any general / technical questions on OpenPLC?

Please visit the FOSSEE forum and post your question.

Slide 13:

Acknowledgement

Spoken Tutorial Project is funded by MHRD, Government of India.
Slide 14:

Thank you slide

This tutorial has been contributed by FOSSEE and Spoken Tutorial Project, IIT Bombay.

And this is Harsha Priyanka from the FOSSEE team, signing off.

Thanks for watching.

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat