555 Timer and Servo

peterdeco

Joined Oct 8, 2019
484
It did work. We produced a product using (I think it was Futaba) a servo that had full end to end rotation without any jitter. I'll hunt for the PC board layout if I can find it. It was 13 years ago.
 

djsfantasi

Joined Apr 11, 2010
9,163
It did work. We produced a product using (I think it was Futaba) a servo that had full end to end rotation without any jitter. I'll hunt for the PC board layout if I can find it. It was 13 years ago.
I am sure that it did work. I’m not suggesting that your effort didn’t work.

For a Futuba servo...
Of the particular model you selected...

Your mileage may vary with any other servo!
 

peterdeco

Joined Oct 8, 2019
484
I understand what you mean but servos are supposed to operate with a standardized pulse train. And if a particular servo is finicky, I believe an adjustment in the value of timing caps or resistors can compensate. I found the component layout and made a mirror image of the bottom side of the PCB if anyone is interested in making their own board.
 

Attachments

djsfantasi

Joined Apr 11, 2010
9,163
I understand what you mean but servos are supposed to operate with a standardized pulse train. And if a particular servo is finicky, I believe an adjustment in the value of timing caps or resistors can compensate. I found the component layout and made a mirror image of the bottom side of the PCB if anyone is interested in making their own board.
I agree that servos are supposed to operate with a standardized pulse train. But, it’s an important “but”, there is no way to produce that train with a single 555. No way
 

jpanhalt

Joined Jan 18, 2008
11,087
The original circuit has been around awhile. The version in my files has a note that the framing pulse (50 Hz) must be AC coupled:

1603995438126.png

The other difference between that circuit and the original in post #1 is that "trigger" (pin 2, right) is not pulled to Vcc in the latter. Both may work; hence, my comment above.

This is a single 555 servo controller (from Paisley's site). NB: The two diodes. He also gives experimental results on frequency stability (
http://www.circuitous.ca/LM555.html )


1603995948471.png

And as mentioned above, you can do the same thing with a single Schmitt inverter:
1603996588234.png
There are lots of other ways to do it. I believe that with older servos, they all work. I still use a single 555 version.* It is quite old and has worked well enough with even modern, non-digital servos to get travels adjusted to a first approximation. However, in my experience, JR digital servos jitter severely and are not reliably set with it.

*KMI Model KMA921 "ServoMate". It's a commercial unit with just one 555 and a single diode.
 

Thread Starter

doubledutch1962

Joined Oct 27, 2020
37
Great comments! I've been experimenting and got it to work but not 100% sure how. On the mono-stable, the output on pin 3 is high for the entire period that the input on pin 2 is low and vice versa whatever the values of the capacitor and restistor on the mono-stale 555 are. I don't understand that.

So in my specific setup all on the mono-stable 555:

  1. Input on pin 2 is high for 12.45ms during which, pin 3 is low
  2. Input on pin 2 drops to 0v and output on pin 3 goes high - it stays like that for 8.45ms
  3. Add these two up and you get to about 20ms being the 50Hz period.

I used resistors (20k) and capacitor (47 nF) and I expected that the 8.45ms should actually have been about 1.03ms.

I fixed that on the astable 555 by adding a diode over the R2 (the one between pin 6 and 7) resistor so the capacitor discharges much faster. That did the trick.

Can anyone explain why I needed that diode and why the Mono-Stable 555 didn't just drop down to 0v after 1.03ms?
 

jpanhalt

Joined Jan 18, 2008
11,087
Maybe that's why the previously referenced circuits used a pullup and AC coupling?

I am still not clear whether this is something you're trying to build or homework. If not homework, show you results. 555's driving servos is not rocket science,
 

Thread Starter

doubledutch1962

Joined Oct 27, 2020
37
It's just something I'm trying to build. I wasn't happy with the original circuit as the frequency did not correrspond to the servo's I have and I'm just try to change that. It's not rocket science but I still need to learn a lot and the people in this forum are tremendously helpful. Passed my school days (I'm late 50's) so no risk of people trying get me passed my exams :)
By pullup, I guess you mean Rt between Pin 2 and VCC? I'll try next. Thank you.
 

djsfantasi

Joined Apr 11, 2010
9,163
I used resistors (20k) and capacitor (47 nF) and I expected that the 8.45ms should actually have been about 1.03ms.
But the point that I think you’re missing is that neither the 12.45ms nor the 8.45ms is relevant. What is relevant is that their total is near 20ms. Or 50Hz. And this should be on the astable (first 555) rather than the monostable (second 555). The astable runs at 50Hz and it’s trailing edge (when the output falls to 0) is what triggers (starts) the monostable. The duty cycle of the monostable is variable and is what controls the RC servo.

If you were to draw out the timeline of the astable 555 for a few cycles, note that the time between when it’s output drops to zero is also 50Hz, just what you need for an RC servo. Note that the exact pulse widths are irrelevant. What is important is that the pulse widths from the astable (first 555) total 20ms.

Its the second 555, the monostable, that sets the pulse width to control the RC servo.

So the first 555 (astable) sets the frequency. The second (monostable) sets the pulse.

I think that some of your adjustments (the diode for example) are really not necessary.
 

jpanhalt

Joined Jan 18, 2008
11,087
It's just something I'm trying to build. I wasn't happy with the original circuit as the frequency did not correrspond to the servo's I have and I'm just try to change that. It's not rocket science but I still need to learn a lot and the people in this forum are tremendously helpful. Passed my school days (I'm late 50's) so no risk of people trying get me passed my exams :)
By pullup, I guess you mean Rt between Pin 2 and VCC? I'll try next. Thank you.
From what you have posted, it is obvious you didn't understand the difference between the left 555 and the right. Try to keep that difference straight. Set the left to 50 Hz and the right to whatever pulse width you want. Hopefully you understand my posts about AC coupling. I am sure that works. Maybe the other design works too, but have you actually tried it? Your posts seem to indicate you haven't even tried that.
 

Thread Starter

doubledutch1962

Joined Oct 27, 2020
37
@djsfantasi : the 12:45 and 8.45ms happen on the pin 3 of the monostable 555 irrespective of the resistor/capacitor values around that IC - so I believe they are (very) relevant?

@jpanhalt: I went through various stages of confusion :) I started by trying to change the frequency of the astable 555 and just had real difficulty figuring out what the correct R/C values should be. Then found a site which was supposed to give those values when you specify a frequency/duty cycle but... they were wrong as they suggested things like capacitors of 4.7 (not K) Ohms and I now believe these values are well below the specificiations. Having struggled with that - I stumbled accross this post they talk about 50Hz and 25Hz, but I could not figure out how they actually get to that frequency given that all their calculations seem to be based around the Pulse Width. That's where my questions around circular references came from. When I figured out that that was never going to work with a single 555, and having found a better way of calculating the values for the astable 555, with the help of the people on this post, I got much closer, much faster. As I said, I will try the pull-up later and let you know how that works.

For clarification: it's just a hobby. I'm a software person and have been so for 25 years but was always interested in electronics. I never found the right opportunity to start with that. Then found udemy, did two courses during Covid, bought a lot of stuff, and I'm starting to slowly move away from just replicating circuits that others build to changing stuff in these circuits for a particular purpose. I've done that a few times now and they worked (I even got a sensor PCB build which I'm still very proud off!) but on this one: I got stuck and I'm so glad I found this forum. Given my software background: I need to know "why" for everything I change and that sometimes drives me down the wrong rabbit hole.

I appreciate your patience and help (a lot!) and will post the circuit here when I got it to work.
 

jpanhalt

Joined Jan 18, 2008
11,087
Here's a link to the best (IMHO) datasheet for a 555. Unfortunately, it is no longer on Philips site, so I uploaded it to my post here. The "why" is explained well. If you look at the section on parts selection, particularly resistors, you will see there are limits. The formulas are pretty good None of the formulas are completely accurate. Some experimentation and selection of parts will be necessary.

I am wary of sites that do the pencil and paper work for me. Some are OK, but some may have been written by 4th graders as a joke.

https://forum.allaboutcircuits.com/...-controlled-by-555-timer.170811/#post-1524770
 

djsfantasi

Joined Apr 11, 2010
9,163
@djsfantasi : the 12:45 and 8.45ms happen on the pin 3 of the monostable 555 irrespective of the resistor/capacitor values around that IC - so I believe they are (very) relevant?
DD, If the output on pin 3 doesn’t change when the RC values change, you either have a bad 555 or there is an egregious wiring error.

if the output on pin 3 of the astable (first or left 555) was:
  • 14.7ms and 5.3ms or
  • 18.1ms and 1.8ms or
  • 16.2ms and 3.8ms...
...the two 555 circuit would operate just as well. You’d need three separate RC combinations for each case. The duty cycle for each case would be different.

But the circuit would perform perfectly in all three cases*. That is why I said the particular implementation of the astable is irrelevant. As long as the total cycle time is 20ms.

* and as long as the monostable is configured properly.​
 

boggiano

Joined Nov 9, 2019
3
Hello @doubleducth1962,
I am attending the same exact course and I have the some doubts like yours.
(BTH, we share the same backgound and almost the same age! :) )


I lost a couple of days on the breadboad having the same troubles, so I tried to simule the circuits on Tinkercad:
Double 555 | Tinkercad

Everything is working smooth, so I think that the problem could be the tolerance of the components or some mechanical issues that the simulator can't reproduce.
About the pullup resistance (pin 3 -> pin2 ) makes sense since the monostable should be triggered from a LOW signal but the simulator seems working in the opposite way!
Also, seems that the pulse lenght of the monostable doesn't respect the times on the datasheet:

1 ms
1.5 ms90°
2 ms180°

but still the are talking about a simulator with approximations.

I would like to be in contact with you, but I don't know how to do it inside the forum.
 

Ian0

Joined Aug 7, 2020
9,835
I worked with Futaba servos a while ago. The position is proportional to the pulse width, but they are not at all fussy about the repetition frequency. I think I used 25Hz, but they were controlled by a PIC16C54 which was running flat out and took different times to complete the loop which determined the repetition frequency.
 
Top