Embedded Systems & Firmware
Which method is commonly used by microcontrollers to adjust LED brightness or motor speed?
- AMaking the power wires thicker or thinner
- BTemporarily halting program execution
- CPWM, switching on and off rapidly and varying the fraction of on time
Show answer and explanation
Answer: C. PWM, switching on and off rapidly and varying the fraction of on time
Driving an LED or motor on and off rapidly with PWM makes the LED appear as bright as its on-time fraction, and the motor, through inertia, turns at a speed set by the average power. The transistor operates fully on or fully off, so it dissipates less heat than at intermediate voltages, giving efficient control. The frequency is chosen so that LED flicker and motor noise are not noticeable.
- A. Wire thickness is not used for control.
- B. Halting the program does not adjust anything.
- C. Correct. It finely controls the average power.