How To Make DIY Relay Clicking Music using Arduino & 4 Channel Relay by WTC Zone
A project to create a rhythmic sound using the clicking noises from relays is very creative! Here’s a full guide for creating a simple beat using your Arduino Uno R3 and two 4-channel relay modules. The relays will click in a sequence based on programmed rhythms, creating a fun and satisfying sound.
The Arduino will control each relay in sequence, creating a rhythm with the clicking sounds. By adjusting the delays between each relay activation, we can simulate different beats or rhythms.
Parts Required
- Arduino Uno R3
- Two 4-Channel Relay Modules
- Connecting Wires
- Power Source (USB cable for Arduino)
Circuit Connections
Relay Module 1:
- Connect IN1 to IN4 to digital pins D1, D2, D3, and D4 on the Arduino.
- VCC and GND of the relay module connect to 5V and GND on the Arduino.
Relay Module 2:
- Connect IN1 to IN4 to digital pins D5, D6, D7, and D8 on the Arduino.
- VCC and GND of the relay module connect to 5V and GND on the Arduino.
How It Works
The Arduino Uno will send HIGH and LOW signals to each relay in a specific sequence, causing each relay to click in turn. Different delays between each relay activation create a varied rhythm. We’ll program some example rhythms you can modify as desired.
Code for Generating Rhythmic Clicks
Here’s the Arduino code to create rhythmic sounds using the relays. This code defines different rhythms that can be adjusted to make various beats.
Video Link: - Click Here For Video
How To Make DIY Relay Clicking Music using Arduino & 4 Channel Relay by WTC Zone simple Circuit: -
Arduino IDE Program
Code for DIY Relay Clicking Music using Arduino & 4 Channel Relay
-----------------------------------------------------------------------------------------------------------------------------
Explanation of the Code
- Relay Arrays:
relayPins1
andrelayPins2
hold the pin numbers for each relay. Adjusting these arrays will allow you to control the relays connected to D1-D4 and D5-D8. - Rhythm Patterns:
rhythmPattern1
andrhythmPattern2
set different delay times for each relay, creating different patterns when each relay clicks. Changing the values in these arrays will alter the rhythm. - Looping Through Relays: In
loop()
, each relay is activated (HIGH) and held for the specified delay before being turned off (LOW). - Rhythm Switching: After completing one rhythm on the first relay module, the code pauses, then switches to the second relay module to create a different beat.
Project Description
- Initialize: The Arduino sets up relay pins and ensures all relays are initially off.
- Rhythm Creation: Each relay is activated in sequence with a unique delay, creating a rhythm with the clicking sound.
- Rhythm Variation: Different rhythm patterns can be generated by changing the
rhythmPattern1
andrhythmPattern2
arrays. - Continuous Loop: The rhythm repeats in a loop, allowing you to listen continuously.
Customizing the Beat
- Adjust Patterns: Modify
rhythmPattern1
andrhythmPattern2
to create custom rhythms. Shorter delays create faster clicks, while longer delays make slower beats. - Experiment with Relays: You can add more complex rhythms by using more relays in different sequences or randomizing clicks for a unique effect.
This project should create a fun, rhythmic beat using the satisfying sound of relay clicks! Let me know if you’d like more variations in the patterns or other customizations for the beat sequence.
Share, Support, and Subscribe!!! 1. PRO KAM EXPLAINED 2. Knowledge KAM 3. PRO KAM Follow us on 1. Facebook 2. Instagram 3. Pinterest 4. Blogspot 5 Twitter If you have any other ideas to make me design, you can describe them in the comment section and if I can, I will make a designing video on it. So I am waiting #prokam #wtc #Arduino #ideas #projects #diy #how #to #ArduinoProjects #UltrasonicSensor #HeightMeasurement #TechDIY #WeTechCreators
0 Comments