• Tactile Button Switch Exercise | ACE-Lab
    ACE-Lab Exercise

    Tactile Button Switch Exercise

    Learn how to build and test a simple tactile button switch circuit with an Arduino Uno and Simulink, using PWM-based LED control and a practical breadboard setup.

    Arduino Uno Simulink Support Package Digital / PWM Exercise

    Section 1

    Learning Outcomes

    After completing this section, you will be able to:

    1. Understand the use of the Simulink Arduino support package for algorithm design for a simple circuit, for example an LED containing a tactile button switch.
    2. Understand the functions of the Arduino Uno and the digital pins for use with a simple circuit, such as using PWM to control an LED in combination with a tactile push-button switch.

    Why this exercise matters

    This task reinforces core embedded-control concepts: physical interfacing, signal flow, model-based design, and the practical relationship between hardware configuration and Simulink deployment.

    Section 2

    Hardware Set-Up

    The exercise involves connecting an LED to a switch that can control the LED state through physical force applied to the tactile button switch.

    Note that while the ACE-Box can be used for all the exercises, it is not required and only the individual components are needed.

    Required hardware

    • Arduino Uno board (supported by Simulink)
    • USB cable Type A to B
    • Breadboard
    • LED
    • 220 Ohm resistor
    • 2 × male-to-male breadboard wires
    • Tactile button switch

    Assembly steps

    1. Insert the tactile button switch across the centre gap of the breadboard.
    2. Connect Arduino Pin 9 to one leg of the tactile switch using a jumper wire.
    3. Place a 220 Ohm resistor from the opposite leg of the switch into a separate row.
    4. Connect the LED anode to the free end of the resistor and the cathode to Arduino GND.
    Replace this block with the hardware setup figure or breadboard diagram for the tactile button switch exercise.

    Download the PDF version of the exercise

    Use the original ACE-Lab document as a downloadable reference for students.

    Download Now