Difference between revisions of "OpenPLC-version1-with-LDmicro/C3/PWM-Instruction/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| border="1" |- | align=center| '''Visual Cue''' | align=center| '''Narration''' |- || Slide 1: || Welcome to the spoken tutorial on '''PWM Instruction''' |- || Slide 2:...")
 
 
Line 16: Line 16:
 
||  
 
||  
  
In this tutorial we’ll learn about working of  
+
In this tutorial we’ll learn about working of '''Pulse Width Modulation''' instruction.
* Pulse Width Modulation instruction
+
 
|-  
 
|-  
 
|| Slide 3: System Requirements
 
|| Slide 3: System Requirements
* Ubuntu 18.04''' '''OS
+
* Ubuntu 18.04 OS
 
* LDmicro
 
* LDmicro
 
* OpenPLC V1 Mainboard
 
* OpenPLC V1 Mainboard
Line 41: Line 40:
 
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
 
|| To follow this tutorial, you should know about
* Heater module and
+
* '''Heater module''' and
 
* Working of '''Move''' instruction.
 
* Working of '''Move''' instruction.
  
Line 54: Line 53:
 
|-  
 
|-  
 
|| Slide 6a: PWM instruction
 
|| Slide 6a: PWM instruction
* Can set the duty cycle of the PWM peripheral built into certain microcontrollers
+
* Can set the '''duty cycle''' of the PWM peripheral built into certain microcontrollers
 
* Duty cycle must be a number between 0 and 100
 
* Duty cycle must be a number between 0 and 100
  
|| This sets the duty cycle of the PWM peripheral built into certain microcontrollers.
+
|| This sets the '''duty cycle''' of the '''PWM peripheral''' built into certain '''microcontrollers'''.
  
Duty cycle must be a number between 0 and 100.
+
 
 +
'''Duty cycle''' must be a number between 0 and 100.
 
|-  
 
|-  
 
|| Slide 6b: PWM instruction
 
|| Slide 6b: PWM instruction
Line 65: Line 65:
 
* It depends on microcontroller's clock frequency
 
* It depends on microcontroller's clock frequency
  
|| We can specify the '''PWM''' frequency in '''Hertz'''.
+
|| We can specify the '''PWM frequency''' in '''Hertz'''.
  
The frequency specified might not be exactly achievable.
+
The '''frequency''' specified might not be exactly achievable.
  
It depends on how it divides into the microcontroller's clock frequency.
+
It depends on how it divides into the '''microcontroller''''s '''clock frequency'''.
 
|-  
 
|-  
 
|| Show image of heater module
 
|| Show image of heater module
|| Here, we will create a logic to control the speed of a fan using '''PWM'''.  
+
|| Here, we will create a '''logic''' to control the speed of a fan using '''PWM'''.  
  
We will use the fan in the Heater module.
+
We will use the fan in the '''Heater module'''.
 
|-  
 
|-  
 
|| Open the LDmicro from the launcher bar
 
|| Open the LDmicro from the launcher bar
Line 82: Line 82:
 
|| Insert a '''Contact'''.
 
|| Insert a '''Contact'''.
  
Place the cursor to the right of the Contact and insert a '''Move''' instruction.
+
Place the cursor to the right of the '''Contact''' and insert a '''Move''' instruction.
 
|-  
 
|-  
 
|| Double-click on Xnew >> Type switch1 in the name box >> Click the OK button
 
|| Double-click on Xnew >> Type switch1 in the name box >> Click the OK button
Line 88: Line 88:
 
|-  
 
|-  
 
|| Double-click on the MOV >> Set Destination to dc >> Set Source to 20 >> Click the OK button
 
|| Double-click on the MOV >> Set Destination to dc >> Set Source to 20 >> Click the OK button
|| In the move instruction set the variable dc to 20.
+
|| In the '''move''' instruction, set the '''variable dc''' to 20.
  
Click on the OK button.
+
Click on the '''OK''' button.
 
|-  
 
|-  
 
|| Click Edit -> Insert rung below >> Click Edit -> Insert rung below
 
|| Click Edit -> Insert rung below >> Click Edit -> Insert rung below
|| Now, insert a rung below the current rung.
+
|| Now, insert a '''rung''' below the current '''rung'''.
 
|-  
 
|-  
 
|| For both the rungs
 
|| For both the rungs
  
 
Click Instructions -> Insert Contact >> Place the cursor to the right of the contact >> Click Instructions -> Insert MOV  
 
Click Instructions -> Insert Contact >> Place the cursor to the right of the contact >> Click Instructions -> Insert MOV  
|| In the new rung insert a '''Contact''' and a '''Move''' instruction as shown.
+
|| In the new '''rung''' insert a '''Contact''' and a '''Move''' instruction as shown.
 
|-  
 
|-  
 
|| Double-click on Xnew >> Type switch2 in the name box >> Click the OK button
 
|| Double-click on Xnew >> Type switch2 in the name box >> Click the OK button
Line 105: Line 105:
 
|| Rename the '''Contact''' as '''‘switch2’'''.
 
|| Rename the '''Contact''' as '''‘switch2’'''.
  
In the '''Move''' instruction set the variable dc to 60.
+
 
 +
 
 +
In the '''Move''' instruction, set the '''variable dc''' to 60.
 
|-  
 
|-  
 
|| Click Edit -> Insert rung below >> Place the cursor in the new rung  
 
|| Click Edit -> Insert rung below >> Place the cursor in the new rung  
|| Insert one more rung below.
+
|| Insert one more '''rung''' below.
  
 
|-  
 
|-  
Line 123: Line 125:
  
 
Type dc  
 
Type dc  
|| First one is the duty cycle variable.
+
|| First one is the '''duty cycle variable'''.
  
Set it to variable ‘'''dc’'''.
+
Set it to '''variable ‘dc’'''.
 
|-  
 
|-  
 
|| Highlight Frequency
 
|| Highlight Frequency
|| Second is Frequency in '''Hertz'''.
+
|| Second is '''Frequency''' in '''Hertz'''.
  
By default, it is set to 1kHz i.e. 1000Hz.  
+
By default, it is set to '''1kHz''' i.e. '''1000Hz'''.  
  
 
Do not change it.
 
Do not change it.
Line 138: Line 140:
 
|-  
 
|-  
 
|| Highlight dc type in the I/O list
 
|| Highlight dc type in the I/O list
|| In the I/O list we can see the variable '''‘dc’''' is of type '''PWM out.'''
+
|| In the '''I/O list''' we can see the '''variable ‘dc’''' is of '''type PWM out.'''
 
|-  
 
|-  
 
||  
 
||  
|| We will now check the working of this logic
+
|| We will now check the working of this '''logic'''.
 
|-  
 
|-  
 
|| Click Simulate -> Simulation mode >>
 
|| Click Simulate -> Simulation mode >>
  
 
Click Simulate -> Real-time simulation
 
Click Simulate -> Real-time simulation
|| Let us turn on the simulation mode.
+
|| Let us turn '''on''' the '''simulation mode'''.
  
 
For that, click '''Simulate''' and then on '''Simulation mode.'''
 
For that, click '''Simulate''' and then on '''Simulation mode.'''
  
Next, start real-time simulation as shown.
+
Next, start '''real-time simulation''' as shown.
 
|-  
 
|-  
 
|| Highlight state column in the IO list
 
|| Highlight state column in the IO list
Line 159: Line 161:
 
|-  
 
|-  
 
|| Highlight the value of dc
 
|| Highlight the value of dc
|| The variable '''dc''' is set to 20.
+
|| The '''variable dc''' is set to 20.
 
|-  
 
|-  
 
||  
 
||  
Line 165: Line 167:
 
Highlight the value of dc
 
Highlight the value of dc
  
|| The '''dc''' variable value is set as the duty cycle of the PWM peripheral.
+
|| The '''dc variable''' value is set as the '''duty cycle''' of the '''PWM peripheral'''.
  
This happens when the input condition of PWM instruction is true.
+
This happens when the '''input condition''' of '''PWM''' instruction is true.
  
In our case, it is true as the PWM instruction is connected to the positive rail.
+
In our case, it is true as the '''PWM''' instruction is connected to the '''positive rail'''.
 
|-  
 
|-  
 
|| Double click on Xswitch1  
 
|| Double click on Xswitch1  
Line 179: Line 181:
  
 
Double click on Xswitch2
 
Double click on Xswitch2
|| Similarly, when '''Xswitch2''' state is 1 the duty cycle will be set to 60.
+
|| Similarly, when '''Xswitch2''' state is 1 the '''duty cycle''' will be set to 60.
 
|-  
 
|-  
 
||  
 
||  
|| Make sure that at a time only one of the Contacts has its state 1.
+
|| Make sure that at a time only one of the '''Contacts''' has its state 1.
 
|-  
 
|-  
 
|| Click Simulate -> Halt simulation >> Click Simulate -> Simulation Mode
 
|| Click Simulate -> Halt simulation >> Click Simulate -> Simulation Mode
|| Now, turn off the simulation mode.
+
|| Now, turn '''off''' the '''simulation mode'''.
  
 
For that, click '''Simulate''' and then on '''Halt Simulation.'''
 
For that, click '''Simulate''' and then on '''Halt Simulation.'''
Line 192: Line 194:
 
|-  
 
|-  
 
||  
 
||  
|| Now let us compile the logic.
+
|| Now let us '''compile''' the '''logic'''.
 
|-  
 
|-  
 
|| Click on Settings >> Click on Microcontroller >> Select AVR ATmega16 40-PDIP  
 
|| Click on Settings >> Click on Microcontroller >> Select AVR ATmega16 40-PDIP  
  
 
Click on Settings >> Click on MCU parameters >> Change Crystal frequency to 16
 
Click on Settings >> Click on MCU parameters >> Change Crystal frequency to 16
|| Click on '''Settings''' and select the microcontroller '''AVR ATmega16 40-PDIP.'''  
+
|| Click on '''Settings''' and select the '''microcontroller AVR ATmega16 40-PDIP.'''  
  
Adjust its parameters as shown here.
+
 
 +
Adjust its '''parameters''' as shown here.
 
|-  
 
|-  
 
|| Highlight ‘dc’ in the I/O list
 
|| Highlight ‘dc’ in the I/O list
|| We can see that variable '''dc''' is already assigned pin number 21, which is '''PD7'''.
+
|| We can see that '''variable dc''' is already assigned '''pin''' number 21, which is '''PD7'''.
  
This is the PWM pin for '''ATMega16''' microcontroller.
+
This is the '''PWM pin''' for '''ATMega16 microcontroller'''.
 
|-  
 
|-  
 
|| Double-click on Xswitch1 in I/O list >> Select PC7 >> Click OK button
 
|| Double-click on Xswitch1 in I/O list >> Select PC7 >> Click OK button
Line 215: Line 218:
  
 
Click OK button
 
Click OK button
|| Compile the logic as''' pwm.hex'''
+
|| Compile the '''logic''' as''' pwm.hex'''
 
|-  
 
|-  
 
|| Click on File >> Click on Save >> Rename it as ‘pwm.ld’ >> Go to Desktop/LDmicro folder >> Click on Save
 
|| Click on File >> Click on Save >> Rename it as ‘pwm.ld’ >> Go to Desktop/LDmicro folder >> Click on Save
|| Save the ladder diagram as '''pwm.ld'''
+
|| Save the '''ladder diagram''' as '''pwm.ld'''
 
|-  
 
|-  
 
||  
 
||  
|| We will now see the working of this logic on hardware.
+
|| We will now see the working of this '''logic''' on hardware.
 
|-  
 
|-  
 
|| Connect Mainboard to PC using USBasp
 
|| Connect Mainboard to PC using USBasp
Line 229: Line 232:
 
|| Connect the '''Mainboard''' to your laptop using '''USBasp'''.
 
|| Connect the '''Mainboard''' to your laptop using '''USBasp'''.
  
Turn on the power supply.
+
Turn '''on''' the '''power supply'''.
 
|-  
 
|-  
 
|| Open terminal >> Type cd Desktop/LDmicro >> Press ENTER >> type ‘'''avrdude -c usbasp -p m16 -U flash:w:pwm.hex’ '''>> Press ENTER
 
|| Open terminal >> Type cd Desktop/LDmicro >> Press ENTER >> type ‘'''avrdude -c usbasp -p m16 -U flash:w:pwm.hex’ '''>> Press ENTER
|| Open the Terminal by pressing '''CTRL+ALT+T''' keys simultaneously.
+
|| Open the '''Terminal''' by pressing '''CTRL+ALT+T''' keys simultaneously.
  
Go to the folder where you have saved the hex file.
+
Go to the folder where you have saved the '''hex file'''.
  
Type the command as shown to upload the hex file to the '''Mainboard'''.
+
Type the '''command''' as shown to upload the '''hex file''' to the '''Mainboard'''.
 
|-  
 
|-  
 
|| Remove the '''USBasp''' connection from the laptop.
 
|| Remove the '''USBasp''' connection from the laptop.
|| Turn off the power supply.
+
|| Turn '''off''' the '''power supply'''.
  
 
Remove the '''USBasp''' connection from the laptop.
 
Remove the '''USBasp''' connection from the laptop.
Line 249: Line 252:
 
|-  
 
|-  
 
|| pwm.png
 
|| pwm.png
|| Power the''' Heater module''' through relimate connectors from the '''Mainboard'''.
 
  
Connect '''PD7''' to the fan pin of the '''MCU''' pins of the '''Heater module.'''
+
Make the connections as shown in the picture.
 +
 
 +
|| Power the''' Heater module''' through '''relimate connectors''' from the '''Mainboard'''.
 +
 
 +
Connect '''PD7''' to the fan '''pin''' of the '''MCU pins''' of the '''Heater module.'''
 
|-  
 
|-  
|| pwm.png
+
|| pwm.png
|| Connect '''GND''' and 5V of the '''Switchboard''' to '''GND''' and 5V of the '''Mainboard''' respectively.
+
 
 +
Make the connections as shown in the picture.
 +
 
 +
|| Connect '''GND''' and '''5V''' of the '''Switchboard''' to '''GND''' and '''5V''' of the '''Mainboard''' respectively.
  
 
Then connect '''NO1''' to '''PC0''' and '''NO2''' to '''PC1 '''of the '''Mainboard'''.
 
Then connect '''NO1''' to '''PC0''' and '''NO2''' to '''PC1 '''of the '''Mainboard'''.
Line 260: Line 269:
 
Make the connections as shown in the picture.
 
Make the connections as shown in the picture.
 
|-  
 
|-  
||  
+
|| Turn '''on''' the '''power supply'''.
|| After making all the connections properly, turn on the power supply.
+
|| After making all the connections properly, turn '''on''' the '''power supply'''.
 
|-  
 
|-  
 
||  
 
||  
|| Initially the fan will be off as the duty cycle is 0.
 
  
The '''FANon''' LED on the Heater module would be glowing dim.
+
Press the switch '''NO1'''.
 +
 
 +
 
 +
|| Initially the fan will be '''off''' as the '''duty cycle''' is 0.
 +
 
 +
The '''FANon LED''' on the '''Heater module''' would be glowing dim.
  
 
Press the switch '''NO1'''.
 
Press the switch '''NO1'''.
  
We can observe the fan is turned ON.
+
We can observe the fan is turned '''ON'''.
  
The duty cycle is 20 here.
+
The '''duty cycle''' is 20 here.
 
|-  
 
|-  
||  
+
|| Press the switch '''NO2'''
 
|| Now press the switch '''NO2'''.
 
|| Now press the switch '''NO2'''.
  
 
We can observe the speed of the fan is increasing comparatively.
 
We can observe the speed of the fan is increasing comparatively.
  
This is because of the increase in the duty cycle to 60.
+
This is because of the increase in the '''duty cycle''' to 60.
 
|-  
 
|-  
 
||  
 
||  
 
|| Thus we have controlled the speed of the fan using '''PWM'''.
 
|| Thus we have controlled the speed of the fan using '''PWM'''.
 
|-  
 
|-  
||  
+
|| Turn '''off''' the '''power supply'''.
|| Turn off the power supply.
+
|| Turn '''off''' the '''power supply'''.
 
|-  
 
|-  
 
||  
 
||  
Line 295: Line 308:
 
* PWM instruction
 
* PWM instruction
  
|| In this tutorial we learnt about working of * PWM instruction
+
|| In this tutorial we learnt about working of '''PWM''' instruction
  
 
|-  
 
|-  
Line 304: Line 317:
 
|| As an assignment,
 
|| As an assignment,
  
Control the brightness of the red LED of Traffic Light module.
+
Control the brightness of the red '''LED''' of '''Traffic Light module'''.
  
Hints: Replace fan of Heater module with red LED of Traffic light module.
+
Hints:  
Connect PD7 pin to +5V pin of the red LED of the Traffic Light module.
+
#Replace fan of '''Heater module''' with red '''LED''' of '''Traffic light module'''.
 +
#Connect '''PD7 pin''' to '''+5V pin''' of the red '''LED''' of the '''Traffic Light module'''.
 
|-  
 
|-  
 
|| Slide 10:
 
|| Slide 10:
Line 328: Line 342:
  
 
Forum for specific questions:
 
Forum for specific questions:
|| * Please post your timed queries in this forum.
+
|| Please post your timed queries in this forum.
  
 
|-  
 
|-  

Latest revision as of 15:37, 14 January 2021

Visual Cue Narration
Slide 1: Welcome to the spoken tutorial on PWM Instruction
Slide 2:

Learning Objectives

  • PWM (Pulse Width Modulation) instruction

In this tutorial we’ll learn about working of Pulse Width Modulation instruction.

Slide 3: System Requirements
  • Ubuntu 18.04 OS
  • LDmicro
  • OpenPLC V1 Mainboard
  • 24V, 2A SMPS
  • USBasp programmer
  • Heater module
To record this tutorial I am using:
  • Ubuntu Linux 18.04 operating system
  • LDmicro
  • OpenPLC version 1 Mainboard
  • 24V, 2A SMPS
  • USBasp programmer
  • Heater module
Slide 4: Pre-requisites
  • Heater module
  • Working of Move instruction.

If not, please refer to the relevant tutorials from Home | spoken-tutorial.org

To follow this tutorial, you should know about
  • Heater module and
  • Working of Move instruction.

If not, please refer to the relevant tutorials in this series on this website.

Slide 5: Prerequisites - Hardware setup

hardware-prerequisite.jpg

Connect SMPS and USBasp to the Mainboard as shown in the picture.

Keep these connections throughout this tutorial.

Slide 6a: PWM instruction
  • Can set the duty cycle of the PWM peripheral built into certain microcontrollers
  • Duty cycle must be a number between 0 and 100
This sets the duty cycle of the PWM peripheral built into certain microcontrollers.


Duty cycle must be a number between 0 and 100.

Slide 6b: PWM instruction
  • PWM frequency specified might not be exactly achievable.
  • It depends on microcontroller's clock frequency
We can specify the PWM frequency in Hertz.

The frequency specified might not be exactly achievable.

It depends on how it divides into the microcontroller's clock frequency.

Show image of heater module Here, we will create a logic to control the speed of a fan using PWM.

We will use the fan in the Heater module.

Open the LDmicro from the launcher bar Let us open LDmicro.
Click Instructions -> Insert Contact >> Place the cursor to the right of the contact >> Click Instructions -> Insert MOV Insert a Contact.

Place the cursor to the right of the Contact and insert a Move instruction.

Double-click on Xnew >> Type switch1 in the name box >> Click the OK button Rename the Contact as ‘switch1’.
Double-click on the MOV >> Set Destination to dc >> Set Source to 20 >> Click the OK button In the move instruction, set the variable dc to 20.

Click on the OK button.

Click Edit -> Insert rung below >> Click Edit -> Insert rung below Now, insert a rung below the current rung.
For both the rungs

Click Instructions -> Insert Contact >> Place the cursor to the right of the contact >> Click Instructions -> Insert MOV

In the new rung insert a Contact and a Move instruction as shown.
Double-click on Xnew >> Type switch2 in the name box >> Click the OK button

Double-click on the MOV >> Set Destination to dc >> Set Source to 60 >> Click the OK button

Rename the Contact as ‘switch2’.


In the Move instruction, set the variable dc to 60.

Click Edit -> Insert rung below >> Place the cursor in the new rung Insert one more rung below.
Insert Instructions -> Analog Operations -> Insert Set PWM output Now, insert a PWM instruction from ‘Analog Operations’ as shown here.
Double-click on PWM Double-click on it.
Highlight two columns We can find two columns.
Highlight Duty cycle variable

Type dc

First one is the duty cycle variable.

Set it to variable ‘dc’.

Highlight Frequency Second is Frequency in Hertz.

By default, it is set to 1kHz i.e. 1000Hz.

Do not change it.

Click the OK button Click the OK button.
Highlight dc type in the I/O list In the I/O list we can see the variable ‘dc’ is of type PWM out.
We will now check the working of this logic.
Click Simulate -> Simulation mode >>

Click Simulate -> Real-time simulation

Let us turn on the simulation mode.

For that, click Simulate and then on Simulation mode.

Next, start real-time simulation as shown.

Highlight state column in the IO list We can observe initially the states of all the instructions are 0.
Double click on Xswitch1 Change the state of Xswitch1 to 1 by double-clicking on it.
Highlight the value of dc The variable dc is set to 20.

Highlight the value of dc

The dc variable value is set as the duty cycle of the PWM peripheral.

This happens when the input condition of PWM instruction is true.

In our case, it is true as the PWM instruction is connected to the positive rail.

Double click on Xswitch1 Change the state of Xswitch1 back to 0.
Double click on Xswitch2

Highlight the value of dc

Double click on Xswitch2

Similarly, when Xswitch2 state is 1 the duty cycle will be set to 60.
Make sure that at a time only one of the Contacts has its state 1.
Click Simulate -> Halt simulation >> Click Simulate -> Simulation Mode Now, turn off the simulation mode.

For that, click Simulate and then on Halt Simulation.

Then click Simulate and Simulation Mode.

Now let us compile the logic.
Click on Settings >> Click on Microcontroller >> Select AVR ATmega16 40-PDIP

Click on Settings >> Click on MCU parameters >> Change Crystal frequency to 16

Click on Settings and select the microcontroller AVR ATmega16 40-PDIP.


Adjust its parameters as shown here.

Highlight ‘dc’ in the I/O list We can see that variable dc is already assigned pin number 21, which is PD7.

This is the PWM pin for ATMega16 microcontroller.

Double-click on Xswitch1 in I/O list >> Select PC7 >> Click OK button

Double-click on Xswitch2 in I/O list >> Select PC6 >> Click OK button

Now assign PC0 to Xswitch1 and PC1 to Xswitch2 as shown.
Click on Compile >> Click on Compile >> rename it as ‘pwm.hex’ >> Go to Desktop/LDmicro folder >> Click on Save.

Click OK button

Compile the logic as pwm.hex
Click on File >> Click on Save >> Rename it as ‘pwm.ld’ >> Go to Desktop/LDmicro folder >> Click on Save Save the ladder diagram as pwm.ld
We will now see the working of this logic on hardware.
Connect Mainboard to PC using USBasp

laptop-usbasp.jpg

Connect the Mainboard to your laptop using USBasp.

Turn on the power supply.

Open terminal >> Type cd Desktop/LDmicro >> Press ENTER >> type ‘avrdude -c usbasp -p m16 -U flash:w:pwm.hex’ >> Press ENTER Open the Terminal by pressing CTRL+ALT+T keys simultaneously.

Go to the folder where you have saved the hex file.

Type the command as shown to upload the hex file to the Mainboard.

Remove the USBasp connection from the laptop. Turn off the power supply.

Remove the USBasp connection from the laptop.

This will prevent any hardware damage.

pwm.png Let us see the connection details now.
pwm.png

Make the connections as shown in the picture.

Power the Heater module through relimate connectors from the Mainboard.

Connect PD7 to the fan pin of the MCU pins of the Heater module.

pwm.png

Make the connections as shown in the picture.

Connect GND and 5V of the Switchboard to GND and 5V of the Mainboard respectively.

Then connect NO1 to PC0 and NO2 to PC1 of the Mainboard.

Make the connections as shown in the picture.

Turn on the power supply. After making all the connections properly, turn on the power supply.

Press the switch NO1.


Initially the fan will be off as the duty cycle is 0.

The FANon LED on the Heater module would be glowing dim.

Press the switch NO1.

We can observe the fan is turned ON.

The duty cycle is 20 here.

Press the switch NO2 Now press the switch NO2.

We can observe the speed of the fan is increasing comparatively.

This is because of the increase in the duty cycle to 60.

Thus we have controlled the speed of the fan using PWM.
Turn off the power supply. Turn off the power supply.
This brings us to the end of this tutorial.

Let us summarize.

Slide 8: Summary
  • PWM instruction
In this tutorial we learnt about working of PWM instruction
Slide 9:

Assignment:

As an assignment,

Control the brightness of the red LED of Traffic Light module.

Hints:

  1. Replace fan of Heater module with red LED of Traffic light module.
  2. Connect PD7 pin to +5V pin of the red LED of the Traffic Light module.
Slide 10:

About Spoken Tutorial project

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

Please download and watch it.

Slide 11:

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 FOSSEE team, signing off.

Thanks for watching.

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat