Skip to content

10. Output Devices

Global Class

This week focuses on how microcontrollers interact with the physical world by driving external devices. Outputs convert digital signals into physical actions such as light, motion, sound, or heat.


Types of Output Devices

Common output categories include:

  • LEDs and displays
  • speakers and audio systems
  • motors and actuators

Power and Energy Considerations

Unlike input devices, outputs often require significant power.

Key concepts:

  • voltage
  • current
  • power consumption

Incorrect design can lead to:

  • overheating
  • component damage
  • unstable system behavior

Global


Electrical Safety

Working with output devices introduces higher power levels.

Important thresholds:

  • ~1 mA → generally safe
  • ~10 mA → muscle contraction
  • ~100 mA → dangerous (fibrillation risk)

Additional risks:

  • stored energy in capacitors
  • inductive voltage spikes (flyback)

Safe practices:

  • clear wiring
  • controlled testing environment
  • avoid working alone
  • verify circuits before powering

Power Supply Strategies

Different approaches to powering systems:

  • bench power supplies (controlled testing)
  • USB power delivery (flexible and accessible)
  • battery systems (LiPo)
  • DC-DC converters

Modern USB-C systems allow dynamic voltage and current negotiation.


Power Measurement

Understanding consumption is essential:

  • measure voltage and current
  • calculate power usage
  • ensure components operate within limits

Tools:

  • multimeter
  • inline current measurement

Output Control

Microcontrollers typically cannot drive high-power devices directly.

Instead, they use:

  • transistors
  • drivers
  • relays or solid-state relays (SSR)

This creates a safe interface between low-voltage control and high-power systems.


Local Class

Output Devices Introduction

This session focused on how microcontrollers drive physical systems through output devices. The main idea is that outputs translate digital signals into real-world effects such as light, motion, and heat.

Dani demonstrated LED control using programmable lighting, showing how digital signals can generate dynamic visual behavior.


Light — Addressable LEDs

We explored NeoPixel (addressable LED) systems.

Key concepts:

  • each LED has an individual address
  • controlled through a single data line
  • requires specific timing and libraries (Adafruit / Arduino IDE)

This introduces the idea of complex outputs controlled through simple interfaces.

LED sequence demo


Motors and Motion

Different motor types were introduced, focusing on their behavior and control:

  • DC motors → simple, continuous rotation
  • stepper motors → precise position control, lower torque
  • BLDC motors → efficient, high-performance systems
  • servo motors → controlled angular position using PWM signal (typically limited range)

Global

Key parameters:

  • torque
  • speed
  • control method

A visual explanation of motor structure helped understand internal operation.

Motor internal structure


Switching High Power

To control real-world devices, microcontrollers require switching components:

  • MOSFET → fast electronic switch (transistor-based)
  • relay / SSR → electrically isolated switching

Microcontrollers do not drive power directly — they control switching devices.


Control Logic — PID

A hardware demonstration of a PID controller showed how systems can regulate behavior dynamically.

Concepts introduced:

  • proportional → reacts to current error
  • integral → accumulates past error
  • derivative → predicts future behavior

This allows systems to stabilize outputs such as:

  • motor position
  • temperature
  • speed

PID controller demo


Relevance to ASFALT

This session directly defines the ASFALT actuation system:

  • SSR / MOSFET → control heating element
  • LEDs → system feedback and status
  • PID → future temperature regulation

Together, these elements define how ASFALT:

  • delivers heat
  • controls energy
  • responds to sensor input

Weekly Assignment

Output Devices — ASFALT-Oriented Prototype

This week focuses on controlling an output device that represents the ASFALT heating system, without using high-voltage components.

Instead of directly driving a 220V heater, a low-voltage proxy system was developed to simulate heat control behavior.


Individual Assignment

Goal

Develop a minimal output system that mimics the behavior of a heating element using safe, low-power components.


Output Strategy

The heating system was abstracted into a controllable energy output:

microcontroller → switching → energy delivery

To simulate this, a PWM-controlled load was used.


Hardware Setup

The system consists of:

  • microcontroller board (from previous weeks)
  • N-channel MOSFET (switching element)
  • resistive load (LED / power resistor)
  • external low-voltage power supply

Connections:

  • GPIO → MOSFET gate
  • MOSFET drain → load
  • load → VCC
  • MOSFET source → GND

This creates a safe switching circuit equivalent to a heater control stage.


Control Method

The output is controlled using PWM (Pulse Width Modulation).

This allows:

  • variable power delivery
  • simulation of heat intensity levels

Control mapping:

  • 0% duty cycle → OFF
  • 100% duty cycle → full power
  • intermediate values → partial power

Code Logic

The program:

  • initializes PWM output
  • sets duty cycle based on input value
  • updates output continuously

Basic flow:

  • define output pin
  • configure PWM
  • write duty cycle

Observations

  • smooth control of output intensity
  • stable switching behavior through MOSFET
  • clear relationship between PWM value and output power

Problems and Fixes

  • incorrect MOSFET wiring
    → verified gate, drain, source configuration

  • weak output response
    → ensured proper power supply and load selection


Result

The system successfully:

  • controls a resistive load using PWM
  • simulates variable heat output
  • demonstrates safe switching architecture

Reflection

This prototype abstracts the heater into a controllable energy system.

Key insight:

heat control is fundamentally power modulation


Relevance to ASFALT

This experiment directly represents the ASFALT heating control system:

  • MOSFET → equivalent to SSR (low vs high voltage)
  • PWM → power modulation strategy
  • load → simplified heater model

This establishes the final control chain:

sensor → microcontroller → switching → heat output

The next step is replacing the low-voltage stage with:

  • SSR
  • real heating element

without changing the control logic.

Use of AI Tools

Prompts

Files