Regarding 555 timer pwm control

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
Good news and bad news. I checked everything (again) and made the leads as short as possible. The circuit almost works well with the continuous analog servo. It can now change direction (it chatters occasionally when turning clockwise) but I still have more control in one direction than the other. The digital servo with position feedback does the same as it did before, but it operates very smoothly when it turns. I have attached a image of the current breadboard layout.
 

Attachments

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
I'd also make sure to run separate (off board) power connections to the servo. Typical breadboards and hookup wire cannot handle much current. You may have "ground" shifting all around at the servo, causing the PWM signal to be compromised.
Thanks for the suggestion. Will try to do that next.
 

Alec_t

Joined Sep 17, 2013
15,118
In row 20 of your breadboard it looks like you have two wires sharing one hole at each end of the caps. That is not good practice and can result in poor contact and consequent erratic behaviour.
 

Colin55

Joined Aug 27, 2015
519
Thanks!
How would one configure such a 555 timer circuit? I attached one of the circuits I tried, but it didn't work that well. The servo jitters back and forth but still responds when turning the potentiometer (the total range of rotation seems to be about 40 degrees).
The signal line on the servo does not have any pull-up resistor and so the diode on the output of the 555 will only make the line HIGH. There is no point in adding the 1k resistor as the signal line is high impedance.
 

Colin55

Joined Aug 27, 2015
519
upload_2017-8-27_10-0-22.png
This circuit does not work. It is just another example of an untried, untested, uninitiated circuit put on the web from some junk CAD program, without any understanding of how the circuit is supposed to work.
 

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
The signal line on the servo does not have any pull-up resistor and so the diode on the output of the 555 will only make the line HIGH. There is no point in adding the 1k resistor as the signal line is high impedance.
Ok. The circuit didn't work well anyways so I'm not going using it. If the circuit Alec_T posted is no good, what would I have to change to make it work? Or is it a lost cause trying to make a 555 circuit do what I need it to do?
 

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
I'd also make sure to run separate (off board) power connections to the servo. Typical breadboards and hookup wire cannot handle much current. You may have "ground" shifting all around at the servo, causing the PWM signal to be compromised.
It didn't make much (if any) difference. Unfortunately I do not have access to an oscilloscope examine it further. Although i'm pretty sure the PWM signal is all over the place regardless.
 

Colin55

Joined Aug 27, 2015
519
The main problem with your circuit is this:
The 555 does not like any voltages below 6v. At 5v the positions of the servo are completely different to 6v or 7v.
The circuit only starts to work at 6v and at 7v the servo "overruns" but it can be made to move 270 degrees by adjusting the values of the components.
You will notice my circuit uses 6v, and that is when the 555 just starts to work.
 

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
Just use my cct

That circuit works really well on my analog servo, and shows alot of promise on the digital one. The digital servo responds to the potentiometer being turned, but if I don't turn it all the way it struggles keeping the position (either it jitters a lot back and fourth or turns back completely).

Edit: Changing resistors (27k, 30k, 33k) for the digital servo didn't make any difference, Changing the timing cap value from 22nf to 33nf didn't do much, but I tried a smaller cap (11nf) just to see what would happen. It works rather well now, and I have about 160 degrees of rotation, with no deadzones on the pot. Also it doesn't randomly change direction. The only problem I have now is that it jitters quite a bit when it's supposed to hold it's position.
 
Last edited:

Thread Starter

Jesper0123

Joined Aug 24, 2017
16
Hi again

I solved my problem by separating the 555's power supply and the servo's power supply, while keeping the grounds connected. This got rid of the shaking but I still had problems with getting the specified amount of rotation from the servos. This was fixed by calculating the values needed of r1, r2, r3 and c1 (with respect to the parts I had available) for a 555 in astable configuration. I also switched r2 to a trimpot so I could "calibrate" the circuit for my servos. Turns out the pulse length my servos use is between 0.36ms to 2.4 ms.

Thanks for the help everyone!
 

ebeowulf17

Joined Aug 12, 2014
3,307
Congratulations on getting this working!
I solved my problem by separating the 555's power supply and the servo's power supply, while keeping the grounds connected. This got rid of the shaking
Regarding power supply separation, I can't remember if this was brought up already, but did you have decoupling caps on the power supply input to the 555? I wouldn't expect you to need two different power supplies for this project unless you needed significantly different voltages.
 

wayneh

Joined Sep 9, 2010
18,104
I solved my problem by separating the 555's power supply and the servo's power supply, while keeping the grounds connected. This got rid of the shaking ...
Nice, and exactly as predicted.

I'd also make sure to run separate (off board) power connections to the servo. Typical breadboards and hookup wire cannot handle much current. You may have "ground" shifting all around at the servo, causing the PWM signal to be compromised.
 
Top