Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

555 timer circuit for servos

Status
Not open for further replies.

Moc

New Member
Hi everyone,

This is my first post here so hello to everybody.

I am working on a university project which conists of building a robot that can climb stairs without using wheels or caterpillar tracks. I've come up with a design but I am stuck at the electronics part.

Effectively I am looking to build (what i thought would be) a very simple control circuit for the servo motors. Here's the circuit diagram I am using.

**broken link removed**

I've currently got C1 as 0.47uF, R2 as 56K and R1 is a 1K resistor with a 47K pot in series. The diode is a 1N4148. This gives me a great circuit with a constant "low" time of (ln(2)*56000*(470E-9) =18ms) and "high" time that can vary by adjusting the pot at R1. Vs is 5V.

I connected up an old (spare) futaba servo to this circuit and got the servo to move as I moved the potentiometer; just as I had wanted. Great! Or so I thought....

When I then tried to connect the higher torque digital servo (a Towardpro MG996R) that I will use in the robot it won't work. The servo kinda jitters around and barely responds to signal changes. I have access to an oscilloscope and can observe the waveform as I connect the servo. At first I have a clear distinct digital pulse (width ~1.5ms with rest time ~18.5ms). When I connect the control wire of the MG996R (with the oscilloscope probe at the junction of pin 3 (out of 555) and control wire from servo) the signal goes crazy! It appears that the overall high voltage level drops but the signal no longer contains any sort of regular pulse. Instead the signal looks messy with random (lower) high voltage pulses all over the place. The servo begins to shake and jitter randomly.

I am running the servo of a completely different power supply to the circuit.

I have read, on another forum, that apparently this is a known problem. See this quote.

The problem with 555-based controllers is jitter with some high-end servos, namely the digital servos. I have not had that problem with a 16F628 PIC controller.

link to thread:
Building a simple servo control - All About Circuits Forum

I have went back to test the circuit with the older futaba servo again and it still works great. I just can't get it to work with the MG996R.

One theory I've had was that possibly the control wire from the servo was attempting to draw (too much) current from the output (pin 3) of the 555. The 555 is apparently rated as being able to supply a max of 200ma from its output though the more current you draw from its output the lower the voltage of the "high" pulse. I therefore attempted to run the control circuit at 15V while maintaining 5V across the servo from a different power supply. This may have made things slightly better (hard to tell really) but things are still jittery and not good enough.

Any ideas on how I could control this servo (the Towardpro MG996R) using this 555 timer circuit? I'm begining to get very nervous. I have to present this robot to the rest of my year next wednesday and at the moment I have nothing to show. User jpanhalt suggested using PICs instead but I don't think I have enough time for this. More importantly, I had a budget for this project which I blew on buying 12 MG996R servos, 20 555 chips, resistor, pots, capacitors, boards etc. Once I get this one circuit working I will need to make 11 more as the final design will consist of 12 interlocked modules each with a seperate servo and controller circuit. I don't think I have enough money/time to start from scratch using PICs.

One more thing: I had a spare 8 channel serial port servo driver board lying around. Both the old futaba servo and the new MG996R run very smoothly when controlling them from this board (via a computer program). I checked the output of this board (using the oscilloscope) and it's virtually identical to the output of my timmer circuit. Yet somehow my timmer circuit won't run the MG996R. Odd ey?

Any suggestions on things I could try to make it work? Or perhaps a link to a location where I can find out more about the control wire and how much current a servo is likely to draw via the control wire? Or perhaps you know how important it really is to have a constant 50Hz refresh rate on the pulses. In the current circuit (using only one 555) the overall frequency of the signal varies slightly as the pulse width is varied. The older futaba servo doesn't seem to mind though. I've really hit a brick wall here. I don't understand what's happening

Thank you very much for reading and thank you even more for posting a reply,

MoC
 
Last edited:
Make sure there is a capacitor from +Vs to 0V. 100nF is good, but almost anything will improve the operation. I would put 100nF in parallel with 100uF.
 
Hi mneary

Thanks very much for that tip, I will try it when I'm back in the lab tomorrow.

Just curious though, why do you think that might help?

MoC
 
Without "bypass capacitors" almost any analog circuit attached to a motor will be unpredictable.
 
The controller jitter discussed with high end servos is not your problem. Jitter is one thing; what you describe is something else altogether. Your power supply might not be sufficient to drive the motor, back EMF might be making it's way to the power rails, causing false triggers, etc. You need to scope all pins, power rails, inputs, reset, etc and see if you can find an anomaly. I'll just bet you can make this work, and you just need to find out what's going on. To start, you can add the bypass caps as previously discussed. Good luck!
 
Last edited:
Hi Moc,

I've read a bit about the Topward pro M996r servo.

It is a pretty strong servo with a maximum torque of 10kg drawing up to 2.5A!

You should not connect a load 10X times higher than the chip can sink or source. (maximum current 250mA). Drive an N-channel MosFet transistor at pin3 and connect the servo to the transistor.

With a VCC of +5V you are already below the minimum supply voltage suggested by the datasheet. (+6V).

May be those facts cause the jitter.

Boncuk
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top