Introduction: Music With Arduino and Relay

About: electronics and science lover

in this tutorial, I am going to show you how to create music with relay and Arduino interesting beginner-friendly project

Step 1: How It Works

if you are familiar with relays .you may notice the triggering sound of the relay. that sound is our key .we trigger relays in a particular sequence to generate music awesome let's start building. before that please watch the making video for detailed instructions

Step 2: Components Needed

Arduino UNO

you can use any Arduino I am using Arduino UNO


any speaker

relay module



Step 3: Circuit Diagram

Step 4: Connections

connect the speaker to pin 8 of Arduino

connect relays input to pin 13

Step 5: Code and Library


I used pitches.h library to generate music

pitches.h library

Step 6: Happy Making

if you have any doubt please comment it below

Arduino Contest 2020

Participated in the
Arduino Contest 2020