Difference between revisions of "OpenPLC-version1-with-LDmicro/C2/OpenPLC-Traffic-Light-module/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 module''' |- || Slide 2: Learning Obje...")
 
 
Line 7: Line 7:
 
|-
 
|-
 
|| Slide 1:  
 
|| Slide 1:  
|| Welcome to the spoken tutorial on '''OpenPLC Traffic Light module'''
+
|| Welcome to the spoken tutorial on '''OpenPLC Traffic Light module'''.
 
|-  
 
|-  
|| Slide 2: Learning Objectives* OpenPLC''' '''Traffic light module
+
|| Slide 2: Learning Objectives* OpenPLC''' Traffic light module'''
  
|| In this tutorial, we will learn about
+
|| In this tutorial, we will learn about '''OpenPLC Traffic light module'''
* '''OpenPLC Traffic light''' module
+
 
|-  
 
|-  
 
|| Slide 3: System Requirements
 
|| Slide 3: System Requirements
Line 22: Line 21:
 
|| To record this tutorial I am using:
 
|| To record this tutorial I am using:
 
* '''Ubuntu Linux 18.04''' operating system
 
* '''Ubuntu Linux 18.04''' operating system
* '''OpenPLC''' '''Traffic light''' module
+
* '''OpenPLC Traffic light module'''
 
* '''OpenPLC version 1 Mainboard'''
 
* '''OpenPLC version 1 Mainboard'''
 
* '''24V, 2A SMPS'''
 
* '''24V, 2A SMPS'''
 
|-  
 
|-  
 
|| Slide 4: Pre-requisites
 
|| Slide 4: Pre-requisites
|| * 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.
  
Line 34: Line 34:
 
|| 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 54: Line 54:
 
|| 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 60: Line 60:
 
|-  
 
|-  
 
|| 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'''.
 
|-
 
|-
 
|-  
 
|-  
Line 73: Line 73:
 
|| 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 connectors at the bottom of the module.
+
Each '''LED’s cathode''' is taken out through 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 96: Line 100:
 
|| 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 for red '''LED''' marked as '''STOP'''
+
# '''Ri''' is for green '''LED''' marked as '''RIGHT'''
# Re for yellow '''LED''' marked as '''READY'''
+
# '''S''' for red '''LED''' marked as '''STOP'''
# G is for green '''LED''' marked as '''GO'''
+
# '''Re''' 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.
 
|-  
 
|-  
|| Slide 6: LED to glow (patch-ledtoglow.webm)* +5V pin should be given 5V.
+
|| Slide 6: LED to glow (patch-ledtoglow.webm)
* EN and the respective '''LED''' pin should be grounded or given a logic-low signal.
+
* +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:# +5V pin should be given 5V.
+
|| Therefore, for any '''LED''' to glow you should follow the below:
# EN and the respective '''LED''' pin should be grounded or given a logic-low signal.
+
# '''+5V pin''' should be given '''5V'''.
 +
# '''EN''' and the respective '''LED pin''' should be '''grounded''' 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
|| Connect the SMPS to the Mainboard as shown here.
+
|| Connect the '''SMPS''' to the '''Mainboard''' as shown here.
 
|-  
 
|-  
 
|| 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
Line 148: Line 155:
 
|| 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''' of the '''Mainboard'''.
|| 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 the all LEDs go off.
+
We can observe that the 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.
 
|-  
 
|-  
 
||  
 
||  
Line 194: Line 201:
 
Let us summarize.
 
Let us summarize.
 
|-  
 
|-  
|| Slide 8: Summary* '''OpenPLC Traffic light''' module
+
|| Slide 8: Summary
 +
* '''OpenPLC Traffic light module'''
  
|| In this tutorial, we learnt about
+
|| In this tutorial, we learnt about '''OpenPLC Traffic light module'''
* '''OpenPLC Traffic light''' module
+
  
 
|-  
 
|-  

Latest revision as of 20:40, 13 January 2021


VISUAL CUE NARRATION
Slide 1: Welcome to the spoken tutorial on OpenPLC Traffic Light module.
Slide 2: Learning Objectives* OpenPLC Traffic light module In this tutorial, we will learn about OpenPLC Traffic light module
Slide 3: System Requirements
  • Ubuntu Linux 18.04 operating system
  • OpenPLC Traffic light 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 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.
Slide 5: Traffic Light module 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 of these LEDs using the connectors present below.
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 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 for red LED marked as STOP
  3. Re 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 (patch-ledtoglow.webm)
  • +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 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.

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 the 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.
This brings us to the end of this tutorial.

Let us summarize.

Slide 8: Summary
  • OpenPLC Traffic light module
In this tutorial, we learnt about OpenPLC Traffic light 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