Introduction: Motor Driver Using 555 Timer IC

Picture of Motor Driver Using 555 Timer IC

I am living in a small town, 60 miles away from province capital city. It is impossible for me to get a motor driver to start a robot or RC project. Even if I wanted to build my own motor driver, it is hard to find the chips such as L298 Dual H-Bridge. What about online shop? In many cases, the shipping cost will be more expensive than the chip itself.

Thanks to Steve Hobley who finds a way using this popular tiny 555 Timer Chips to control a DC motor. His projects in Makezine can be read here. 555 Timer IC is easy to find on the market even in a small town where I live. Based on his project, I try to connect it to Arduino to control motors and this is what I used on my Android Controlled Arduino Bluetooth Panzer before I purchase Keyes L298N motor driver from dx.com with free shipping :)

I think it is easier for you to connect all the wires using the diagram above. If so, you can finish your wiring and jump to Arduino sketch section for testing. I will go on with my wiring photos.

Step 1: Ingridients

Picture of Ingridients
  • 2 pieces of 555 Timer Chip.
  • A mini breadboard.
  • A mini switch (optional).
  • A 7,4V or 9V battery.
  • An Arduino Uno R3
  • A small power rating DC Motor.
  • Some breadboard jumper cables.

Note : This project only works for standard 1.5V to 3V Tamiya DC Motor. Any higher power rating DC Motor will not move because 555 Timer IC has limited output power.

Step 2: Fabrication

Picture of Fabrication

If you are not familiar with 555 Timer IC, here is the schematic of its internal components and pinouts.

Put two 555 Timer ICs (pin 1 on bottom left) in the middle of breadboard with a little space in between because we will plug many jumper wires here. I already have my mini switch on top left. At bottom left you see black spot, just ignore it. It was burnt on testing, so I mark it black :P And you see on the right side I have link the top and bottom VCC rails and Ground rails.

Step 3: Wiring the Chips

Picture of Wiring the Chips

I will explain my photos with my wire colors, you can use whatever colors you like :)

Photo 1 : Blue wire connects pin 4 and pin 8. Do this for both chips.

Photo 2 : Green wire connects pin 2 and pin 6. Do this for both chips.

Photo 3 : White wire connect pin 5 of the first chip to pin 5 of the second chip.

Photo 4 : Another White wire connect pin 3 (output) of the first chip to pin 2 (trigger) of the second chip.

Step 4: Even More Wires

Picture of Even More Wires

We are getting more wires, so keep your eyes open :D As long as you follow the pins number, you won't get lost. My photos are only for references.

Photo 1 : Green wire connect pin 3 of first chip to motor terminal. Blue wire connect pin 3 of second chip to another terminal.

Photo 2 : Black wire connect pin 1 to Ground. Do this for both chips.

Photo 3 : Black wire connect pin 8 to VCC. Do this for both chips.

Step 5: Connecting Arduino and Battery

Picture of Connecting Arduino and Battery

Photo 1 : Orange wire goes from First Chip pin 2 to Arduinopin ~3.

Photo 2 : White wire goes from First Chip pin 5 to Arduino pin 2.

Photo 3 : Red wire goes from Breadboard VCC Rail to ArduinoVIN. Black wire goes from Breadboard Ground Rail to ArduinoGND.

Photo 4 : White wire connects Breadboard VCC Rail to Switch terminal (I am out of red wires here).

Photo 5 : White wire connects another Switch terminal to Battery +. Black wire goes from Breadboard Ground Rail to Battery -.

Now we are done. ( ^_^ )

Step 6: Arduino Sketch

/*

* Chienline @2014 -==:: 3 Volts DC Motor Driver with Dual 555 Timer IC ::==- * Control Pin from 555 IC is needed to STOP the motor * Trigger Pin from 555 IC is needed to drive forward or backward * PWM on Trigger Pin is used to set the speed * Note : Forward and Backward is interchangeable via Motor connection. */

int controlPin = 2; // 555 pinout 5 int triggerPin = 3; // 555 pinout 2

// the setup routine runs once when you press reset:

void setup() { pinMode(controlPin, OUTPUT); pinMode(triggerPin, OUTPUT); }

// the loop routine runs over and over again forever: void loop() { // move FORWARD; digitalWrite(controlPin, HIGH); digitalWrite(triggerPin, HIGH); //full speed delay(3000); // PWM testing to control motor speed // analogWrite(triggerPin, 128+70); //minimum speed (128+70) // delay(3000);

// STOP; digitalWrite(controlPin, LOW); digitalWrite(triggerPin, HIGH); delay(3000);

// move BACKWARD; digitalWrite(controlPin, HIGH); digitalWrite(triggerPin, LOW); //full speed delay(3000);

// PWM testing to control motor speed

// analogWrite(triggerPin, 128-70); //minimum speed (128-70) // delay(3000);

// STOP; digitalWrite(controlPin, LOW); digitalWrite(triggerPin, HIGH); delay(3000); }

Step 7: Testing

Picture of Testing

Put some tape on the rotor. I have clear tape only, so I cut a piece of paper forming "U" shape as in photo number 2. Put it as high as the rotor so that we know where it flaps. The direction is interchangeable in the code or on the motor terminals connection (those are pin 3 on the first chip and the second chip).

Step 8: Let's Go Further

Picture of Let's Go Further

Now let's make two of it to build Dual Motor Driver. I simplify it by using tiny wires from network cable. Connect it to my previous Bluetooth Panzer. Tadaaaa...

That is a video showing the panzer moves forward and backward.

Step 9: Furthest : Bluetooth, Controlled by Android Phone

Picture of Furthest : Bluetooth, Controlled by Android Phone

See my previous bluetooth panzer without camera. It is controlled by Android Phone. Four 555 Timer ICs drive its dual dc motors. Do not expect speed :D

Connect to the diagram above and upload this sketch:

/*
Chienline @ 2014 Controlling an Arduino car/tank using an Android phone over Bluetooth connection. Android Software : Arduino Bluetooth RC Car by Andi.Co [in PlayStore]. Some codes are changed from the Official codes to get it works with my DIY Motor Driver. */

char dataIn = 'S'; //Character/Data coming from the phone. S=Stop; int LCPin = 2; // 555 pinout 5 Left Motor int LTPin = 3; // 555 pinout 2 Left Motor int RCPin = 4; // 555 pinout 5 Right Motor int RTPin = 5; // 555 pinout 2 Right Motor

int pinfrontLights = 6; //Pin that activates the Front lights. int pinbackLights = 7; //Pin that activates the Back lights. char determinant; //Used in the check function, stores the character received from the phone. char det; //Used in the loop function, stores the character received from the phone. int velocity = 0; //Stores the speed based on the character sent by the phone.

void setup() { Serial.begin(9600); //Initialize serial communication with Bluetooth module at 9600 baud rate. pinMode(LCPin, OUTPUT); pinMode(LTPin, OUTPUT); pinMode(RCPin, OUTPUT); pinMode(RTPin, OUTPUT);

pinMode(pinfrontLights , OUTPUT); pinMode(pinbackLights , OUTPUT);

//Stop both motors on power up. stopMotors(); }

void loop() { det = check(); while (det == 'F') //if incoming data is a F, move forward { moveForward(); det = check(); } while (det == 'B') //if incoming data is a B, move back { moveBackward(); det = check(); }

while (det == 'L') //if incoming data is a L, move wheels left { moveLeftForward(); det = check(); } while (det == 'R') //if incoming data is a R, move wheels right { moveRightForward(); det = check(); } while (det == 'I') //if incoming data is a I, turn right forward { moveRightForward(); det = check(); } while (det == 'J') //if incoming data is a J, turn right back { moveRightBackward(); det = check(); } while (det == 'G') //if incoming data is a G, turn left forward { moveLeftForward(); det = check(); } while (det == 'H') //if incoming data is a H, turn left back { moveLeftBackward(); det = check(); } while (det == 'S') //if incoming data is a S, stop { stopMotors(); det = check(); }

//Front Lights and Back Lights on/off are cool, but for starting I haven't connect them to my circuit. //But i leave the detection in the code for further use. while (det == 'U') //if incoming data is a U, turn ON front lights { digitalWrite(pinfrontLights, HIGH); det = check(); } while (det == 'u') //if incoming data is a u, turn OFF front lights { digitalWrite(pinfrontLights, LOW); det = check(); } while (det == 'W') //if incoming data is a W, turn ON back lights { digitalWrite(pinbackLights, HIGH); det = check(); } while (det == 'w') //if incoming data is a w, turn OFF back lights { digitalWrite(pinbackLights, LOW); det = check(); } }

int check() { if (Serial.available() > 0) //Check for data on the serial lines. { dataIn = Serial.read(); //Get the character sent by the phone and store it in 'dataIn'. // Serial.println(dataIn); //this line is for debugging using Arduino serial monitor. if (dataIn == 'F') { determinant = 'F'; } else if (dataIn == 'B') { determinant = 'B'; } else if (dataIn == 'L') { determinant = 'L'; } else if (dataIn == 'R') { determinant = 'R'; } else if (dataIn == 'I') { determinant = 'I'; } else if (dataIn == 'J') { determinant = 'J'; } else if (dataIn == 'G') { determinant = 'G'; } else if (dataIn == 'H') { determinant = 'H'; } else if (dataIn == 'S') { determinant = 'S'; } //----------------------------- //Standard DC Motors are not fast enough to play with velocity. //You can set the velocity using 555 Trigger Pin with analogWrite(); //I bet you don't want to make your tank slower than its higest speed using standard DC Motors. /*----------------------------- else if (dataIn == '0') //velocity = 0 - 9, q = top speed. { velocity = 20; // value = 0 - 255; "velocity" does not need to be returned. } -------------------------------*/ else if (dataIn == 'U') { determinant = 'U'; } else if (dataIn == 'u') { determinant = 'u'; } else if (dataIn == 'W') { determinant = 'W'; } else if (dataIn == 'w') { determinant = 'w'; } } return determinant; }

//These direction functions are designed for 555 Motor Driver //You need to change them to suit your other motor drivers.

void moveForward(){ digitalWrite(LCPin, HIGH); digitalWrite(LTPin, HIGH); //L-Forward digitalWrite(RCPin, HIGH); digitalWrite(RTPin, HIGH); //R-Forward }

void moveBackward(){ digitalWrite(LCPin, HIGH); digitalWrite(LTPin, LOW); //L-Backward digitalWrite(RCPin, HIGH); digitalWrite(RTPin, LOW); //R-Backward }

void stopMotors(){ digitalWrite(LCPin, LOW); digitalWrite(LTPin, HIGH); //L-Stop digitalWrite(RCPin, LOW); digitalWrite(RTPin, HIGH); //R-Stop }

void moveLeftForward(){ digitalWrite(LCPin, HIGH); digitalWrite(LTPin, LOW); //left wheel backward digitalWrite(RCPin, HIGH); digitalWrite(RTPin, HIGH); //right wheel forward }

void moveRightForward(){ digitalWrite(RCPin, HIGH); digitalWrite(RTPin, LOW); //right wheel backward digitalWrite(LCPin, HIGH); digitalWrite(LTPin, HIGH); //left wheel forward }

void moveLeftBackward(){ digitalWrite(LCPin, HIGH); digitalWrite(LTPin, HIGH); //left wheel forward digitalWrite(RCPin, HIGH); digitalWrite(RTPin, LOW); //right wheel backward }

void moveRightBackward(){ digitalWrite(LCPin, HIGH); digitalWrite(LTPin, LOW); //left wheel backward digitalWrite(RCPin, HIGH); digitalWrite(RTPin, HIGH); //right wheel forward }

Comments

Jastis J (author)2016-02-10

is there a eletrical schmetic for this robert???

chienline (author)Jastis J2016-03-02

Take a look at step #9 for complete schematic. Or you can follow my step by step wiring starting from Step #3.

chienline (author)Jastis J2016-03-02

Take a look at step #9 for complete schematic. Or you can follow my step by step wiring starting from Step #3.

Scramblbot126 (author)2016-01-28

Thanks this is awsome and helped my robot alot!

chienline (author)Scramblbot1262016-01-30

You are most welcome, My Friend :)

TheGreatResistor (author)2015-10-27

thanks man i know the pain of shipping it will be very expensive and if its low cost shipping it will take more than 60 days i have like 6 555's thanks a ton

Yes, shipping is either expensive or long. That's why I built this while waiting for the free long shipping from DX.com :D

TheGreatResistor (author)2015-10-27

can it drive both forwards and backwards or only one at a time?

It can drive RC. Only that it is slow. Check my working RC video here https://youtu.be/v_nFD3VoHUs
Panzer turning left means left motor goes backward and right motor goes forward if that's what you ar asking about moving both motors simultaneously.

ypradhan (author)2015-10-11

does the Bluetooth thing need any programme? can you just mail me this program which you have used? @ yashhearthackerpradhan@gmail.com

chienline (author)ypradhan2015-10-12

bluetooth module need no program. Only if you need to change the name shown up on pairing, you can change it with AT commands. There are some instructables about Bluetooth module AT Commands out there. You can use the search button :)

adam.verner.790 (author)2015-05-11

nice insturctable. only think i wonder is: how many power can it handle ?

Thank you. It can powers two standard tamiya dc motors and drives my panzer about 10 meters per minute. Watch this : http://youtu.be/v_nFD3VoHUs?rel=0

2bigbros (author)2015-04-07

I have a quick question. In the arduino sketch there's some code for controlling the speed of the motors. Is the 555 timer able to control the speed of the motor and if so how well?

chienline (author)2bigbros2015-04-07

Yes it can. If I am not mistaken 70 be the lowest speed in my test. Below that point it won't move (too week to move the tank treads). It differs only a little on the speed, as I mention that it is turtle slow even on its full speed, I think we do not want a snail speed tank do we? :D

francis.famo (author)2015-03-21

hello sir i have a question, why does the motor stops? is it in the program?? or in the clock pulse? because i want to change my LD293D ic. it is not functioning well and I am making laptop controlled car using arduino and wifi module. but my driver IC is my only problem. can i use this 555 timer to make my project successful? thank you for the answer

chienline (author)francis.famo2015-03-21

Yes, it is initially stop. It moves when we press a button and it stop when we release the button. I haven't try wifi connection to control the motor because I haven't got a wifi module yet. But it must work the same. When we press the controller button, it send a character to Arduino via bluetooth/wifi. Then Arduino turn on or off the pins connected to 555 timer to move the motor forward or backward.

All you have to do is copy the movement functions and call those functions according to the characters sent from the controller. Maybe you can send me the code to chienline.oscarius@gmail.com. I will see if I can help.

hybridphreak (author)2015-03-15

Thanks for sharing your project, alternative motor drivers are extremely useful when unable to get hold of one quickly. I find those 555s are so versatile and never cease to be amazed by their uses.

chienline (author)hybridphreak2015-03-15

Yeah, I am glad that it helps. I think there are many of you facing the same problem like me. I even tried to make one based on ASCAS iBle but I couldn't find the L298N IC in town.

SeanW88 (author)2015-03-14

Just a thought...but could you use relays to power bigger motors?

chienline (author)SeanW882015-03-14

Maybe you can try this, configure 470 ohm resistor and BC 547 transistor on every output (pon 3) of 555 chips. Or could someone more expert in electronics confirm this? I have little knowledge of it and the calculation things. I just learn by samples on the net :)

chienline (author)SeanW882015-03-14

I think we can use NPN transistor on each 555 Timer output (pin 3) to boost the power, but we might need some calculation and resistors either and that will be more complicated than buying one L298N dual motor driver :D

chienline (author)2015-03-14

This project is an option for those who want to build Android Controlled Arduino Bluetooth Panzer but you can't find any motor driver on the market around you. You just need to change the movement functions on your sketch with those in this project. Good luck and have FUN ( ^_^ )

About This Instructable

15,264views

210favorites

License:

Bio: Just an ordinary person who loves #thinking and #tinkering
More by chienline:DSLR Cowboy HolsterWoven Tag Hiding PlaceDouble Spaces Inhaler
Add instructable to: