All About Circuits Forum 555 timer circuit for servos
 Register Blogs FAQ Members List Today's Posts Search Today's Posts Mark Forums Read

 General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

#1
03-17-2010, 05:06 PM
 MoC New Member Join Date: Mar 2010 Posts: 2
555 timer circuit for servos

Hi everyone,

This is my first post here so hello to everybody. I've read a lot on here but decided to post after running into some trouble with a servo timer circuit.

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.

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 this website, that apparently this is a known problem. See this quote from user "jpanhalt"

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.

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
Attached Images
 555ast2.gif (4.9 KB, 21 views)
#2
03-17-2010, 09:19 PM
 Bill_Marsden Super Moderator Join Date: Mar 2008 Location: Dallas, TX (GMT-5 w/ DST) Posts: 19,044 Blog Entries: 5

Couple of comments. R1 needs a series resistor to prevent it from ever going to zero ohms. If this happens the 555 will fry.

How much current are you really drawing from the output. You can put a 0.1Ω resistor between the output pin3 and the servo and measure it on the scope. A guess would be you're not drawing too much current.

There are other ways to do the same thing with a 555 than would probably be a lot more stable. A simple monostable after a stable oscillator comes to mind.

First thing though, make sure it isn't a current issue. I have some simple drivers that would help with that.

Bill's Index

555 Servo Controller

My Cookbook

The 555 Projects
__________________
..
"Good enough is enemy of the best." An old engineering saying, Author unknown.

General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input. Thanks for the verbage Wookie.
#3
03-17-2010, 11:49 PM
 MoC New Member Join Date: Mar 2010 Posts: 2

Hi Bill,

Thanks a lot for the tips!

I've got a 1KΩ resistor in series with the 47kΩ potentiometer to save the 555 from dying. I did (briefly) run the circuit without that in place so maybe I'll try a new chip in the lab tomorrow.

This might be a dumb question but how do you measure current with an oscilloscope? I've only ever measured voltages.

Also:
Quote:
 First thing though, make sure it isn't a current issue. I have some simple drivers that would help with that.
What kind of drivers do you mean?

Lastly, I'd be happy to make a slightly more elaborate circuit with two 555s but I'm just worried that wouldn't solve the problem. It just seems so odd that one servo works great and another acts like it's having a heart attack with the same control signal.

Again, thanks so much for your help,

MoC
#4
03-18-2010, 12:31 PM
 Bill_Marsden Super Moderator Join Date: Mar 2008 Location: Dallas, TX (GMT-5 w/ DST) Posts: 19,044 Blog Entries: 5

If you have 1V across a .1Ω resistor you have 10Amps. This is how most current meters work.

I don't really have enough experience with servo's to be of much help, but it wouldn't take long to try the circuit out and see if it makes a difference. Using one component to do double duty is a good idea, unless it doesn't work.

There are some really good animatronic sites out there, for Halloween mostly. This is where my servo link came from.
__________________
..
"Good enough is enemy of the best." An old engineering saying, Author unknown.

General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input. Thanks for the verbage Wookie.
#5
03-18-2010, 12:33 PM
 retched Senior Member Join Date: Dec 2009 Location: Baltimore, MD Posts: 5,198 Blog Entries: 14

A 'driver' is an IC or circuit that powers the motor. It can take a small signal and amplify it for proper motor control.

It is also a guy/girl that drives you around.
__________________
-rm-

 Tags 555, circuit, servos, timer

 Related Site Pages Section Title Worksheet Microcontroller principles Worksheet Flip-flop circuits Worksheet Timer circuits Worksheet Performance-based assessments for AC circuit competencies Worksheet Oscilloscope trigger controls Worksheet Passive integrator and differentiator circuits Worksheet Basic oscilloscope operation Textbook CMOS 555 LONG DURATION RED LED FLASHER : 555 Timer Circuits Textbook LED sequencer : Digital Integrated Circuits Textbook PWM power controller : Analog Integrated Circuits

 Similar Threads Thread Thread Starter Forum Replies Last Post Dan-O The Projects Forum 4 11-18-2009 11:58 AM Zaraphrax The Projects Forum 3 09-22-2009 01:24 PM popto The Projects Forum 14 05-22-2009 11:39 PM J.Green The Projects Forum 1 07-16-2008 06:00 AM stevy123 The Projects Forum 7 01-25-2008 03:45 PM

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics Forums     General Electronics Chat     The Projects Forum     Homework Help     Electronics Resources Software, Microcomputing, and Communications Forums     Programmer's Corner     Embedded Systems and Microcontrollers     Computing and Networks     Radio and Communications Circuits and Projects     The Completed Projects Collection Abstract Forums     Math     Physics     General Science All About Circuits Commmunity Forums     Off-Topic     The Flea Market     Feedback and Suggestions

All times are GMT. The time now is 10:08 AM.