Actuators & Control · Study deck

Visual and Audio Actuators: LED Feedback

A cold-room alarm should not go silent when one output path fails.

Motor Max is your guide for this deck.

visualaudio
Motor Max, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: That multiplexing saves pins, but it creates two practical problems: the firmware must refresh the matrix continuously, and the current peaks through the active row or column must stay inside the matrix and driver ratings.
  • Explain: A camera samples the 5 kHz PWM in time, so $f_{alias}=|f_{PWM}-\operatorname{round}(f_{PWM}/f_s)f_s|$ can fold invisible switching into a visible 8-20 Hz beat.
  • Explain: On the display side, the DIG0 through DIG7 pins select rows or digits, while SEG A through SEG G and SEG DP drive the eight column or segment lines.
iotclass.org

Major section

Start With the Story

A loose display lead must not turn a real high-temperature alarm into silence.

  • The first design question is what a nearby person can still see or hear when one output path fails.
  • GPIO means a general-purpose input/output pin used for a direct control line.
  • I2C is a shared two-wire link for nearby parts, while SPI is a clocked link with separate data paths.

Key terms

Modulation
Modulation means changing a signal over time to carry a control value.
iotclass.org

Major section

Start With the Story (continued)

Modulation means changing a signal over time to carry a control value.

  • PWM means pulse-width modulation: the output switches on and off, and the on-time share sets the apparent brightness or drive level.
  • Disconnect one lead, dim the supply, repeat the alarm, and restart the board while the unsafe input remains present.
  • This runway does not prove that every person will notice an alert or that an output is safe for every load.
iotclass.org

Major section

Phoebe's Field Notes: Two Physical Limits Hiding Behind "256 Levels" And "5 kHz"

The mathematical gist.: An 8-bit LED command has a $1/255=0.392\%$ duty step and an ideal 49.9 dB quantiser SNR.

  • A camera samples the 5 kHz PWM in time, so $f_{alias}=|f_{PWM}-\operatorname{round}(f_{PWM}/f_s)f_s|$ can fold invisible switching into a visible 8-20 Hz beat.
iotclass.org

Major section

LED Matrices and Driver ICs

An 8x8 matrix has 64 emitters, but the package usually exposes row and column pins rather than 64 separate LED pairs.

  • The controller lights a pattern by selecting one row or column at a time fast enough that the eye sees a stable image.
  • The MAX7219/MAX7221 family is a common example.

Why it matters

If the first display appears scrambled, fix the row/column mapping or module orientation before adding animations; otherwise the software may hide a wiring error behind a pretty pattern.

An 8x8 LED dot matrix display module with a grid of small LEDs and header pins along one edge
An 8x8 LED dot matrix display module with a grid of small LEDs and header pins along one edge
iotclass.org

Major section

LED Matrices and Driver ICs (continued)

V+ and GND power the chip, and the ISET resistor sets the peak segment current.

  • That multiplexing saves pins, but it creates two practical problems: the firmware must refresh the matrix continuously, and the current peaks through the active row or column must stay inside the matrix and driver ratings.
  • It sits between the MCU and the matrix: DIN receives serial data, CLK clocks bits in, LOAD or CS latches a command, and DOUT can pass data to another driver.
  • A first proof can write a diagonal or single-row sweep, then record whether the image is rotated, mirrored, or missing rows.
iotclass.org

Major section

LED Matrices and Driver ICs (continued)

On the display side, the DIG0 through DIG7 pins select rows or digits, while SEG A through SEG G and SEG DP drive the eight column or segment lines.

  • The chip interface is small, but it is still a protocol.
  • Each update is a 16-bit instruction: one address byte selects the target register and one data byte supplies the value.
  • CLK advances each bit, DIN carries the bit value, and LOAD or CS latches the complete command.
  • If the display is blank, check shutdown mode first, then confirm that the data, clock, and load pins match the library constructor.
iotclass.org

Major section

LCD Displays

The code's cursor coordinates and truncation behavior must fit that visible geometry; I2C reduces wiring but does not expand the display's character capacity.

  • The visible two-row grid is the application's hard information budget, while the pin header or I2C backpack is only the transport used to fill those cells.
A blue 16-column by 2-row character LCD module with a row of interface pins
A blue 16-column by 2-row character LCD module with a row of interface pins
iotclass.org

Deck summary

Key takeaways

A loose display lead must not turn a real high-temperature alarm into silence.

  • Modulation means changing a signal over time to carry a control value.
  • The mathematical gist.: An 8-bit LED command has a $1/255=0.392\%$ duty step and an ideal 49.9 dB quantiser SNR.
  • An 8x8 matrix has 64 emitters, but the package usually exposes row and column pins rather than 64 separate LED pairs.
  • V+ and GND power the chip, and the ISET resistor sets the peak segment current.
iotclass.org

Retrieval practice

Recall check

Motor Max says: answer from memory, then check your reasoning.

Q1A battery-powered leak detector sits under a sink and must alert someone who may not be looking at it. Which feedback design is most appropriate?

ACombine a flashing LED with a buzzer alert
BUse only an OLED screen showing the leak status
CUse a relay because it can switch high-current loads
DUse only a very dim status LED to save power
Show answer

Answer: A Visual and audio actuators should be selected around how users will notice and interpret the alert in the device's real environment.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Visual and audio actuators should be selected around how users will notice and interpret the alert in the device's real environment.
iotclass.org