Binary Input to Servo Input (555 Timer)
by ShehanW_5 in Circuits > Electronics
139 Views, 1 Favorites, 0 Comments
Binary Input to Servo Input (555 Timer)
I have always wanted to make my own alternative to the Technic Servo Motor. Obviously, I could have very easily used an Arduino and any old servo motor along with a 3D printed case and I would have been off to the races. However, I took this opportunity to experiment with ICs and tried to design my own circuit to convert a on, neutral, off signal into a PWM signal which can be used to control a servo motor. I would like to make a little disclaimer here that I am in no means an experience electrical engineer, and honestly when I started this project, I had no idea what I was doing. Hence, if you want a reliable circuit, this is not for you. Also, you should probably just an Arduino Nano instead of all of this hastle, but I guess you can learn something from it.
Supplies
From my research into various ICs I settled upon the 555 Timer and the 74HC4051 IC.
- I couldn't really find any alternatives to the 555 timer
- The 74HC4051 is a multiplexer IC. This means that it take several binary inputs (i.e. on or off) and then outputs to a certain pin. You can choose any basic multiplexer which you can procure easily and cheaply, but do some research to ensure it functions similarly to the 74HC4051. You'll probably also need to wire up the IC differently.
You will also need various resistors, capacitors, jumper wires, and a breadboard.
I will outline later the exact values of resistors and capacitors you will need.
How Does Everything Work?
The first IC (74HC4051 - green section) essentially chooses pin Y0, Y1, Y2 or Y3 based on the inputs to S1 and S2. The different output pins are then connected to different resistances which go into the 555 timer (purple section)
I will just quickly state here that over the course of this project, I have realised the importance of properly understanding all components before starting to design and create the circuit. I initially made the mistake of going off schematics online instead of properly understanding how everything works. This made it very difficult to troubleshoot. Therefore, while I will try my best to explain how the 555 timer works, if you still don't really understand it, I would do some further research. Some useful links: 555 Theory (pcbheaven.com), Servo Motor Control Using 555 Timer IC (engineersgarage.com).
Alright. So I will try to explain how the 555 timer works in the mode we are using with the help of the above images. So during the charging process, voltage comes in from the green section, through the chosen resistors. The current bypasses R4 due to the diode and charges C2. When discharging, the current flows through R4 and the chosen resistor.
To generate a PWM signal, the 555 timer needs to generate a square wave with a high time and low time. The times are based on the time it takes for the capacitor C1 to charge, which is influence by the resistances of the resistors. Hence, specific resistor and capacitor values must be chosen to control the servo motor.
For a generic servo motor, the high time must be 0.001s at 0 degrees and 0.002s and 180 degrees. With a period of 0.02s.
Making the Circuit
I am still waiting on components I need to build this circuit. I have calculated the values I need, but I want to properly test the circuit before explaining and providing those values here. Hence, if this project interests you, watch out for an update where I will provide a more definitive process to build the circuit.