Skip to main content

DIY Motion Activated Tremolo Pedal!

Hello Everyone!

Guitar pedals and music effects are very interesting to experiment with, so I decided to come up with something new and original. Using minimum possible components I made a circuit that simply breaks and rejoins the connection between the guitar and the amp. But thats not the catch,
This pedal can be controlled without coming in contact with the pedal. 
Weird, right?
The setup uses an ultrasonic sensor (Popularly, used for obstacle avoidance in robots) to calculate the distance from the pedal, and activate the effect accordingly. Also the closer you move towards the pedal, the more shallower the effect gets. 
Well, if I've got your attention and your head is bubbling with ideas,  here is , how I made it!-

Step 1- Watch the video-

Step 2- Get the parts-

1. An Arduino ( Uno or Nano) ( a clone would also do the trick)
2. A single channel relay (an electro-mechanical switch)
3. (1/4 inch mono sockets) x2
4. Ultrasonic sensor module (HC SR04)
5. A toggle switch
6. A DC socket ( to use external power supplies between 6-12V)
7. Some wires (of-course)
8. An Enclosure( Preferably, not metal, to reduce noise)

Step 3- Wire it up!

I've tried my best to make the diagram as clear as possible, however if you face any problems, just leave a comment.

Step 4- Upload the code to the Arduino
If this is the first time you're using an arduino, do some googling and get acquainted with basic arduino programs.
Simply copy-paste this program onto your Arduino IDE, Here's the code-

const int trigpin =8; //this section is to tell the arduino what connects where
const int echopin=7;
int relay=10;
int distance;
long duration;

void setup() {
  // put your setup code here, to run once:
pinMode(trigpin,OUTPUT); //initializing OUTPUTS AND INPUTS


void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(6,HIGH); //we'll use pin 6 as a 5V powersupply for the ultrasonic sensor
  digitalWrite(4,LOW); // to use pin 4 as ground
  digitalWrite(12,LOW);// to use pin 12 as ground

  if(calculatedistance()<60 && calculatedistance()>=30){ //to activate the switch when an obstruction is 30cm-60cm away from the sensor
  digitalWrite(10,HIGH);// to break the connection between the guitar and the amp
   digitalWrite(11,HIGH);// for the indication LED
  delay(120);// a small pause
  digitalWrite(10,LOW);//to rejoin the connection
  digitalWrite(11,LOW);// for the LED...
  delay(120);// and another pause

  else if(calculatedistance()<30 && calculatedistance()>=20){

  else if(calculatedistance()<20 && calculatedistance()>=5){
else{ digitalWrite(10,LOW);
int calculatedistance(){// to calculate the distance using the sensor
  digitalWrite(trigpin, LOW);
  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigpin, HIGH);
  digitalWrite(trigpin, LOW);
  duration = pulseIn(echopin, HIGH); // Reads the echoPin, returns the sound wave travel time in microseconds
   distance= duration*0.034/2;
  return distance;

And that's it, it should work if you've done everything correctly.
Now that you've got it to work the way I designed it, you can use this as a base for a bigger and better project :). Let your creativity overWrite my code.
You would have realised that the relay is a bit noisy.
For sure, using a relay for this purpose is not the best idea, but is definitely the easiest way to go about it. If you're interested in improving on this you could read about( or if you already know), using a transistor as a switch for this purpose. 

Stay Creative


  1. distance= duration*0.034/2;
    I'm a beginner.. why these numbers?


Post a Comment

Popular posts from this blog

5 Effective Online Tools that will Spice up your Arduino Projects!

Arduino has made electronics projects easier than ever. The question now is- Can we make the process of building projects faster and more enjoyable? Let's have a look at some of the interesting softwares/online tools developed for the Maker Community to make tinkering more effective and documenting projects easier!

1. TinkerCad

TinkerCAD's recently created circuit simulator allows you to arrange your Arduino/Attiny circuits in an easy 'drag and drop' environment and test them virtually without having to make them. This can be really helpful, for testing projects that use components which you are yet to buy. And after all, who doesn't like tinkering?

Try out Tinkercad-Circuits here!

But that's not what Tinkercad is famous for. It offers an amazingly easy to use 3D design tool for Makers, once again in a simple 'Drag and Drop' interface! You can directly download the CAD file, once you're done designing. If you've ever thought of making your own uniqu…

TV Remote Controlled Servo Motor-Using Arduino!

We use our TV remotes to control the functions of the TV's, but when the TV is not in use, they're absolutely useless. Today, we are going to learn how to add more functionality to ordinary IR based remotes, in this one we shall see how to control servo motors. There are so many (SO MANY) different applications of this project that one can think of. Using the following tutorial, you can make one yourself!

1. Watch the video tutorial-

2. Things you will need-

Note that you may use a different IR receiver other than TSOP1738, if it isn't available. Usually you can find this on websites like amazon and ebay.
3. The circuit diagram!

4. The IR Remote Library
5. The Arduino Code- Just copy paste this code into your Arduino IDE

// Written by Siddharth Kothari, Enjoy your journey Exploring Arduino!#include <IRremote.h>#include <IRremoteInt.h>#include <Servo.h>intRECV_PIN=11;//IR receiver pinintgndIR=10;/…

NetBeans Java project- TIC TAC TOE (AI) - logic explained

This article covers the basic concept of how you can implement basic AI in you game, i.e allow the computer to compete with you, giving it equal chances of winning. It's worth a thought what makes the computer invincible in a human vs computer chess game?

A common notion is that programmers code for every single possibility in the game considering all permutations and combinations etc. However this is far from reality. We can instead make the computer go by the 'Human thought process ' for every move. Lets consider a simpler approach to the popular TIC-TAC-TOE game.

Try out TIC TAC TOE here. (500 Kb executable .jar file)

Coming to the TIC-TAC-TOE GAME. This project is a great exercise for beginners to get a hang of basic logic used in games and other applications.
The logic behind the computer's moves is simpler than you think. To begin with, lets see the logical flow of code before getting into the 'code'.
Here's how the code works-

After every move yo…