In this illustration we will going to wire the microphone module, relay and the Arduino board. These project is compatible on most common microcontroller, the main objective of this project to make a sound activated switch or a clap switch. The light will turn on if sensor sense a sound then triggering the relay which is connected to the microcontroller.


Required Component

  • Arduino Boards (UNO, MEGA, NANO, PRO, LEO, DUE)
  • ESP8266 with Arduino IDE (Optional)
  • Microphone Sensor
  • Relay Module
  • Soldering Board
  • Jumper Wires / DuPont Wires
  • External Device

Wiring Guide


The Sketch Code / Single Clap

The Sketch Code / Dual Clap


Make your own sound activated switch on Arduino


One thought on “Make your own sound activated switch on Arduino

  • at

    Hi, thank you for this!

    I am wondering how to adapt this to be like a momentary switch. For example, when the sound stops, the relay is turned off. Thank you!


Leave a Reply

Your email address will not be published. Required fields are marked *