Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.02 KB

File metadata and controls

35 lines (23 loc) · 1.02 KB

Exercise C: smart fan

Objective

Map serial commands to PWM levels and LED indicators while maintaining a fail-safe off command.

Read Hardware safety before wiring a motor.

Driver interface

Signal Uno pin
Low / medium / high LEDs 3 / 5 / 6
Driver PWM or enable 10
Driver direction input 11

The exact motor, supply, driver outputs, and flyback protection depend on the driver datasheet. Pins 10 and 11 connect only to logic inputs.

Commands

A = off, B = on at PWM 120, C = low at 170, D = medium at 200, and 1 = high at 255. Unknown input also stops the motor.

Verify

Test first with the motor supply disconnected and measure the PWM/logic response. Then secure the motor, connect its rated supply, and start with A. Record driver temperature and supply behavior; stop immediately if either is abnormal.

Challenge

Replace the fixed levels with a table containing command, PWM, LED mask, and label, while preserving the off-on-unknown behavior.