Output Devices
Output signals are the electrical signals generated by a microcontroller to drive external devices or indicate information. In digital electronics, a microcontroller’s output pin can be in one of two binary states: HIGH (logic 1) or LOW (logic 0). A HIGH output typically corresponds to a specific voltage level (e.g. 5 V or 3.3 V), while LOW corresponds to 0 V (ground). These HIGH/LOW states can represent binary data, and by switching an output pin on and off in a timed sequence, a microcontroller can send out a stream of bits (1s and 0s). For example, a microcontroller might output the bit sequence 10110010 by rapidly toggling a pin HIGH and LOW according to that binary pattern. Such bit sequences are the basis of digital communication with peripherals (for instance, sending data over a serial bus or toggling control signals).

Figure 1: Laser cutter key components.
Beyond simple on/off signaling, microcontrollers often need to produce analog-like outputs. Since most microcontroller output pins are binary (either HIGH or LOW), one common technique to simulate analog voltages or waveforms is Pulse-Width Modulation (PWM). PWM involves outputting a rapid train of pulses and varying the duty cycle (the fraction of time the signal is HIGH in each cycle). By adjusting the duty cycle, the average voltage over time can mimic an analog level. For instance, a 50% duty cycle PWM (pin HIGH half the time, LOW half the time) yields an average output of about half the supply voltage. If this PWM signal is applied to a device like an LED or filtered by a simple electronic filter, it behaves similarly to a true analog voltage. In fact, the principle behind PWM-to-analog conversion is that the current or voltage seen by the load is proportional to the percentage of time the signal is on. This is widely used for controlling LED brightness or motor speed with fine granularity.
Using PWM, a microcontroller can also generate waveforms such as audio tones or even arbitrary signals. By rapidly changing the duty cycle according to a waveform pattern (for example, following the shape of a sine wave), the output can approximate that waveform. A classic example is producing a sinusoidal audio signal (like a musical note) from a microcontroller that lacks a true analog output. The microcontroller can output a high-frequency PWM whose duty cycle varies sinusoidally at the desired audio frequency. After passing through a speaker (which naturally filters high-frequency components) or an external low-pass filter, the result is a reasonable sine wave sound. This works because any periodic waveform can be decomposed into a sum of sinusoidal components (Fourier theory). A PWM signal contains a high-frequency carrier and harmonics; by smoothing out the high-frequency parts, the fundamental frequency remains. In other words, through techniques like PWM (or using a DAC if available), digital outputs can synthesize analog signals such as voltages, sounds, or other waveforms.

Figure 2: Laser cutter key components.
Devices
Output devices (often called actuators when they cause physical action) are components that take the output signals from a microcontroller and convert them into some form of action or feedback in the physical world. This action could be mechanical motion, light, sound, or any other physical effect. Below is an overview of various common output devices and how microcontrollers interface with them:
Output Device | Signal Type & Frequency | Microcontroller Interface | Signal Interpretation Logic | Functionality in System |
---|---|---|---|---|
Servo Motor | PWM signal: 1–2 ms HIGH pulse in 20 ms frame (50 Hz) | Digital output pin with PWM (hardware/software) | Pulse width is measured internally; corresponds to specific angle (e.g., 1 ms = 0°, 1.5 ms = 90°, 2 ms = 180°) | Provides precise angular position control, ideal for animatronic joints or robotic limbs |
Stepper Motor | Digital step pulses + direction bit; pulse frequency = speed | Digital pins to STEP and DIR inputs of stepper driver | Each rising edge on STEP triggers one motor step; DIR pin sets direction of rotation | Used for precise incremental rotation (e.g., in 3D printers, CNCs, or pan/tilt systems) |
DC Motor | PWM signal for speed; digital HIGH/LOW or H-bridge for direction | PWM pin to driver enable, digital pins for direction control | Duty cycle sets average voltage (speed); H-bridge polarity determines rotation direction | Drives wheels, fans, or moving parts where continuous rotation is needed |
Speaker/Buzzer | Square wave or modulated PWM (~20 Hz to 20 kHz), optionally audio DAC | Digital output for tone; optional amplifier for volume | Oscillating signal causes diaphragm to vibrate at set frequency, producing sound | Emits tones, alarms, or audio playback; used in user feedback and sound design |
Single LED | Digital HIGH/LOW (on/off), or PWM for brightness | Digital output with series resistor, or PWM capable pin | ON when pin is HIGH, OFF when LOW; brightness varies with PWM duty cycle | Simple light indicators, signal feedback, or status notifications |
RGB LED (NeoPixel) | Serial data stream at ~800 kHz (24-bit per LED) | One digital pin for chained data stream (uses strict timing) | First LED latches 24-bit color data (8 bits each R/G/B), passes remaining down chain | Full-color individually addressable lighting for visual effects and UI animations |
LCD (Character) | 4-bit or 8-bit parallel data + control (RS, EN), or I2C/SPI via adapter | Digital output lines or I2C interface | Receives ASCII commands/data, displays characters or executes control instructions (e.g., clear, move cursor) | Displays static or scrolling text; simple visual data display for embedded systems |
TFT Display | SPI (MOSI, SCK, CS, DC); data + command bytes + pixel buffer | Hardware SPI interface (high-speed); ~1-20 MHz | Receives drawing commands and pixel data; updates internal framebuffer to show graphics | Displays high-resolution color images, UI components, or dynamic animations |
OLED Display | I2C or SPI digital communication; pixel address and data stream | Two-wire I2C (SDA/SCL) or SPI lines | Interprets bytes as memory updates for pixel map; displays text or bitmaps directly | Sharp, high-contrast visual output in small form-factor; ideal for compact displays |
Solenoid | Digital HIGH/LOW (on/off activation signal) | Digital output through NPN transistor or MOSFET | HIGH energizes coil, producing magnetic field that actuates mechanical plunger | Performs binary physical action (push/pull) for locks, mechanisms, triggers |
Relay | Digital HIGH energizes coil; relay toggles switch contact | Digital output with driver transistor or module | Energizing coil closes normally-open contact, enabling power routing | Enables microcontroller to control high-voltage/high-current devices safely |
Linear Actuator | DC voltage or PWM + direction signals (varies by design) | Motor driver interface (e.g., H-bridge) or servo-style PWM | Voltage level or pulse duration determines extension; some models have limit switches | Performs push/pull motion for robotics, haptics, automation |
Heater / Valve | Digital ON/OFF or analog PWM for regulation | Output via transistor or MOSFET with thermal control loop | Signal activates heating coil or opens valve; PWM regulates power input proportionally | Thermal actuation or fluid control in embedded environmental systems |
For more information, go to our group assignment.
This week, I will take a closer look at two specific output components: the GC9A01 TFT display and the PCA9685 servo driver module since they will be used in my final project (specifically, the animatronic head); and understanding their operation is crucial for successful integration. I will examine the type of signals they use, how the microcontroller interfaces with them, how they interpret those signals, and their basic functional logic in the system.
GC9A01 TFT Display (Round TFT Module)

Figure 3: Laser cutter key components.
The GC9A01 is a display driver IC used in small circular or square TFT LCD modules, most commonly in 1.28-inch round displays with a resolution of 240×240 pixels. It supports 16-bit (RGB565) and 18-bit (RGB666) color formats, making it suitable for full-color graphics.
Communication and Signal Interface
This module uses a 4-wire SPI interface for communication with the microcontroller, plus control and power lines:
- MOSI (Master Out Slave In): Transfers pixel data and configuration commands.
- SCK (Serial Clock): Synchronizes data transmission.
- CS (Chip Select): Enables communication when pulled LOW.
- DC (Data/Command): Selects between command mode (LOW) and data mode (HIGH).
- RESET (RST): Hardware reset pin to ensure proper startup.
- Vcc / GND: Power supply (typically 3.3 V).
- LED/BLK: Optional backlight pin, often driven by PWM for brightness control.
The microcontroller (e.g., ESP32) typically uses hardware SPI at clock speeds up to 40 MHz to efficiently transfer data. A full-screen update at 16-bit color requires ~115 kB (240×240×2 bytes), making high SPI throughput essential for dynamic content.
Signal Processing and Functionality
The GC9A01 contains an internal GRAM (Graphics RAM) of approximately 130 kB, which stores the current pixel data. The microcontroller does not need to refresh the screen continuously; it updates only the portions that change.
A typical drawing sequence involves:
- 1. Sending a Column Address Set command with start/end indices.
- 2. Sending a Row Address Set command similarly.
- 3. Sending a Memory Write command followed by the pixel data stream.
These commands and data are interpreted by the GC9A01's internal logic, which maps them into its framebuffer and updates the LCD matrix accordingly.
PCA9685 Servo Driver Module (16-Channel PWM)

Figure 4: Laser cutter key components.
The PCA9685 is a 16-channel PWM generator with 12-bit resolution (4096 steps). It features a built-in oscillator and operates independently once configured, reducing the processing load on the microcontroller.
Communication and Microcontroller Interface
It communicates via the I²C protocol, using only two lines:
- SDA (Serial Data)
- SCL (Serial Clock)
Each device on the bus is addressed (default address: 0x40), and multiple PCA9685 modules can coexist on the same bus by configuring their address pins. This makes the system highly scalable and efficient in terms of pin usage.
Signal Generation Logic
The PCA9685 generates PWM signals by using an internal 12-bit counter that continuously counts from 0 to 4095. Each PWM cycle is divided into 4096 discrete time steps, allowing for precise duty cycle control on each of its 16 output channels.
For every channel, the PWM waveform is defined using two key 12-bit registers:
- ON register: Defines the counter value at which the output goes HIGH.
- OFF register: Defines when it transitions back to LOW.
This allows full control over both the duty cycle and phase shift, although in most servo applications, the ON value is set to 0, and only the OFF value is adjusted to define the pulse width.
Programming both devices
My initial plan was to connect and simulate both devices and some servos in Wokwi. However, Wokwi (and as far as I know, any software) does not have a built-in model for the GC9A01 TFT display or the PCA9685 PWM driver. This means I cannot directly simulate those specific components with full fidelity. There are community-contributed “custom chips” for some parts (for example, a PCA9685 simulation has been attempted by the community), but they may require additional setup and might not exactly match real-world behavior.
Given these limitations, I will start by testing code for each output device individually and already physically. For the TFT Display my goal is to make a simple fire animation with 3 images and this on 2 displays. Then for the PCA9685 I will only make a sequence with 10 servos attached to the module. I plan to use two libraries, Adafruit_PWMServoDriver for PCA9685 and TFT_eSPI for the GC9A01; I will use these to facilitate the use of both devices. Once they work independently, I will unify both codes.
LEARNINGS
Through both my academic coursework and independent projects, I have gained substantial experience in interpreting signals from a variety of transducers. In fact, when working with the MPU, I have retrieved measurement data without relying on the Adafruit library, instead accessing the sensor’s internal registers directly. However, a significant portion of the circuits I developed were constructed on a breadboard. Although this method is functional, it is not considered good engineering practice. This became evident when I attempted to connect the components to my custom-designed board. I had assumed that I had provided an adequate number of power supply connections, but this was not the case. As a result, I now understand the importance of carefully planning and evaluating my circuit designs to prevent such oversights in the future.