title: PWM Duty Cycle Explorer
description: Type: MicroSim sim-id: pwm-duty-cycle-explorer
Library: p5.js
Status: Specified Create a p5.js MicroSim with a 700 × 400 canvas split into two sections: Top section (60% height): PWM waveform display. - Draw a squ...
image: /sims/pwm-duty-cycle-explorer/pwm-duty-cycle-explorer.png
og:image: /sims/pwm-duty-cycle-explorer/pwm-duty-cycle-explorer.png
twitter:image: /sims/pwm-duty-cycle-explorer/pwm-duty-cycle-explorer.png
social:
cards: false
status: implemented
library: p5.js
bloom_level: TBD
PWM Duty Cycle Explorer
Run the PWM Duty Cycle Explorer MicroSim Fullscreen
About this MicroSim
Type: MicroSim sim-id: pwm-duty-cycle-explorer
Library: p5.js
Status: Specified Create a p5.js MicroSim with a 700 × 400 canvas split into two sections: Top section (60% height): PWM waveform display. - Draw a squ...
Bloom's Taxonomy level: TBD
You can embed this MicroSim in your own course page with the following iframe:
1 | |
Lesson Plan
Learning objective: Type: MicroSim sim-id: pwm-duty-cycle-explorer
Library: p5.js
Status: Specified Create a p5.js MicroSim with a 700 × 400 canvas split into two sections: Top section (60% height): PWM waveform display. - Draw a squ...
Suggested use (5-15 minutes):
- Predict first. Before touching the controls, ask students to predict what they expect to see.
- Explore. Have students interact with every control and observe how the display responds.
- Explain. Ask students to describe, in their own words, the relationship the MicroSim demonstrates.
Discussion questions:
- What changed on screen when you interacted with the MicroSim, and why?
- How does this idea show up when you program the real robot?
References
- Chapter 7: PWM, Motor Speed Control, and Actuators
- Pulse-width modulation (Wikipedia)
- MicroPython machine.PWM
Specification
The full specification below is extracted from Chapter 7: PWM, Motor Speed Control, and Actuators.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |