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 servo, how to reduce speed?

Status
Not open for further replies.
I posted a suitable servo drive circuit in post #4, all he has to do is limit the time period range of the monostable section to suit his servo motor
I don't see how that slowly goes form one pulse-width (position) to a different pulse-width (new position)? :confused:
 
hi Carl,
This is a tidier plot image.
The left side 555 is obviously the 50Hz Frame Astable.
The other 555 is configured as a Monostable, whose On period is set by pot U2.
The LTS plot shows the pulse width increasing as pot U2 is increased, approx 0.5mS thru 1.5mS.
If I understand what the OP is asking, he wants to slow the 50Hz frame down, why he would want to do that doesn't make sense to me.

All he has to do is use a multi-turn pot for U2 and turn it 'slowly'.

Is this what you are querying.

Eric
A001.gif


EDIT:
Added the asc file.
 

Attachments

  • 555Servo3.asc
    3.1 KB · Views: 127
Last edited:
I don't know which of CBB's posts you are referring to but in post #26 he gives the neutral value as 1.5 mS (Or if you prefer 0.0015 seconds or 15000 uS or 15000000 nS)

Les.
Ah...My fault, 1.5ms is the same as 1500uS.
Yes I was referring to post #26.

@CCB,
The youtube link is very nice that will solve my problem, but need to sort out the code error....

I was going to try this circuit:
https://i1220.photobucket.com/albums/dd459/happytriger2000/Forum/electrotechonline/NE556N.jpg
and this one looks very similar to eric's one.

les,
"From the LM555 data sheet the pulse width will be 0.69 mS when the 10 K resistor is selected and it will be 4.71 mS when the 68 K resistor is selected. So you can see both values will try to make the servo go past the limits of its travel. See thse information on this web page."
I'm trying to get the pulse width to 0.5mS so if I apply this formula:
Period (in sec)= 0.693 * C1*(R1+2*R2)
-->0.0005 sec = 0.693 x 0.1uF (33+2(R2))
-->0.00072150072 = 0.1uF (33+2(R2))
-->0.00721500721 = (33+2(R2))
is it correct at this point?
 
You only need to add the values of the resistors for the part of the cycle were the capacitor is charging. The pulse width (Which controlles the servo POSITION) is only goverened by the resistor vetween the discharge pin (pin 7 and the capacitor. The pulse width is 0.693 x C x R
So R = 0.0005/(0.693 x 0.0000001) = 7215 ohms.
I don't understand why you want 0.5 mS The pulse should ve 1 mS minimum and 2.0 mS maximum.

Les.
 
hi 2000,
This the 556 circuit in LTSpice.
The pot is set to 50%
E
 

Attachments

  • A004.gif
    A004.gif
    37.5 KB · Views: 166
All he has to do is use a multi-turn pot for U2 and turn it 'slowly'.
Okay.
But my understanding, is that the signal is remotely generated by a micro and he doesn't want to have to turn a pot.

The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next.
 
Ok this is what I had done 30 minutes ago:
http://s1220.photobucket.com/user/h...675F2B63-3E7C-4592-97F2-2F1187CAF58C.mp4.html
Using 3 buttons for center(21.5K),left (10K),and right(34K).This servo is a Sanwa SRM-102, when I swap to HS-645MG it did not work the same way as the sanwa, I'm satisfy so far but this still cannot fulfill the need for all angle views, let say 45 angle or 60 degree angle etc ..as mentioned in post #23, will do a 10 degree per click of a relay, any suggestions?
 
The resistors you've chosen will always result in the same pulse width (give or take for component variables). Thus, the particular servo (different makes can and will give differing degrees of turn) will always turn to the (more or less) same rotation point.
but this still cannot fulfill the need for all angle views, let say 45 angle or 60 degree angle etc ..as mentioned in post #23, will do a 10 degree per click of a relay, any suggestions?
Try shortening the time interval (to as short as possible) that the relay is "ON" with each "click", thereby dividing up the selected rotation command (the selection of the 555's PW timing resistors and, thus, an output from the 555) into smaller chunks.

How smooth does this rotation exercise need to be (like smooth panning or just a re-positioning with the camera off)?
 
Last edited:
If I understand what the OP is asking, he wants to slow the 50Hz frame down, why he would want to do that doesn't make sense to me.

All he has to do is use a multi-turn pot for U2 and turn it 'slowly'.

Is this what you are querying.

Eric
View attachment 104083

EDIT:
Added the asc file.
Hi Eric,
The only reason to slow it down is because the time delay taken for relay to switch on/contact after clicking ON or OFF tab of the screen (PC side) is not instantaneous, because of this I never get to my desire angle b/c by the time I press OFF tab the servo has already reach to the end of the rotation. I think is probably because arduino is running low memory and not running smoothly, when I compile the code there is a message at the bottom of the compiler saying low memory b/c the code is slight long but still works just a little slow on wifi.

Than you all for helping
 
Last edited:
Okay.
But my understanding, is that the signal is remotely generated by a micro and he doesn't want to have to turn a pot.
The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next.

hi,
h2000's post #50 explains the problem, it appears to be a latency problem between a PC key press and the operation of a remote relay.

happytriger2000
The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next

This statement suggests that you are commanding the head to move either forward/reverse at the maximum rate by closing a relay contact and then 'hopefully' pressing the relay Off command button when it reaches an observed position.??
Then when the head is at the desired position both fwd/rev relays will be switched Off
I am assuming that the pan/tilt head and the mass it is moving have a neutral balance when not powered.? so the head will hold it's position when not being driven.??

I would say that trying to control the pan/tilt position using that relay method will never give the required accuracy.

You have effectively an 'open' loop control electronic system, where the timing depends upon your key press response.

Eric
Carl's circuit sounds feasible, providing you can write program code.
The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next.
 
Last edited:
I still need the push buttons for clockwise and Anti-clockwise because the push buttons will be replaced with relays controlled over internet
Are you set on using relays? It would be easier/cheaper/lower power consumption to use transistors instead of buttons/relays.
 
Last edited:
If you want slow movement of the pan and tilt, use the 555 circuit I designed above and add a time delay consisting of a transistor and capacitor/resistor across the particular resistor. When you activate one of the relays, the camera will pan from left to right the number of degrees determined by the minimum value of the resistor. When the relay is released, the camera will return to the original position. You cannot stop it at any point. The same with tilt. This is the best you can do with just 2 signals.
 
hi,
h2000's post #50 explains the problem, it appears to be a latency problem between a PC key press and the operation of a remote relay.

happytriger2000
The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next

This statement suggests that you are commanding the head to move either forward/reverse at the maximum rate by closing a relay contact and then 'hopefully' pressing the relay Off command button when it reaches an observed position.??
Then when the head is at the desired position both fwd/rev relays will be switched Off
I am assuming that the pan/tilt head and the mass it is moving have a neutral balance when not powered.? so the head will hold it's position when not being driven.??

I would say that trying to control the pan/tilt position using that relay method will never give the required accuracy.

You have effectively an 'open' loop control electronic system, where the timing depends upon your key press response.

Eric
Carl's circuit sounds feasible, providing you can write program code.
The circuit I posted, just requires a single digital level change to go slowly from one pulse-width to the next.
Ericgibbs,
You explained it very well, perfect!
The gear torque should not have problem handling the cameras weight, is a high torque servo.
I'm more worried about changing Arduino codes.

alec,
"Are you set on using relays? It would be easier/cheaper/lower power consumption to use transistors instead of buttons/relays."
The idea at first was using relays to control things is quite straight forward this way, not complicated.
If using transistors how would the schematic look like and will I have to change Arduino codes?
I have BC547, BC337, BC327 that's all I have at the mo.

Colin,
If you want slow movement of the pan and tilt, use the 555 circuit I designed above and add a time delay consisting of a transistor and capacitor/resistor across the particular resistor. When you activate one of the relays, the camera will pan from left to right the number of degrees determined by the minimum value of the resistor. When the relay is released, the camera will return to the original position. You cannot stop it at any point. The same with tilt. This is the best you can do with just 2 signals.
My idea was to either pan or tilt the camera one at a time when ON tab is clicked(PC) the servo starts moving till I click OFF so it would stop at that angle and do the same for tilt, but currently it doesn't work like this but if I slow the pan and tilt speed maybe it might work, but again this is not a efficient way of doing it b/c as mentioned by Eric: latency problem between a PC key press and the operation of a remote relay, not very spontaneous.
 
If using transistors how would the schematic look like
Which schematic do you want to use as the starting point for this mod?
How had you planned to connect/control the relays (schematic please)?
 
Last edited:
I suggest that you use the pulses from the relays to clock a counter up and down. Then use the value stored in the counter to control the pulse width. I think an 8 bit counter should be enough as that would give 256 steps from one end of the travel to the other.

Les.
 
I don't see how that slowly goes form one pulse-width (position) to a different pulse-width (new position)? :confused:
He's slightly changing the pulse width (with the pot) between each button switch press.

AT2K, If you use the original 555 configuration (fixed resistors for max rotation positioning), can you quickly, momentarily press and release one of the two switches (CW or CCW) to get just a partial rotation? The servo should only move a portion of the 90° and stay put (no spring return and inherit torque). Lowering the servo drive voltage might help adjust speed.

I'm thinking of a "toggling" (10° - 15° movement/press) effect.
 
Last edited:
AT2K said:
quickly, momentarily press and release [/U]one of the two switches (CW or CCW) to get just a partial rotation? The servo should only move a portion of the 90° and stay put (no spring return and inherit torque). Lowering the servo drive voltage might help adjust speed.

I think post#54 already answered: "latency problem between a PC key press and the operation of a remote relay, not very spontaneous."
Quickly, momentarily press and release, It would take at least 5 second from PC to Arduino to actually switch off the relay, by then the servo had already reached to the end position...I'm not sure if it is the code or the hardware problem...

The most promising approach is Pulse per Number of degree, like the video shown here:
**broken link removed**
This way no matter how much delays between the PC and the Arduino the servo will turn X number of degree and stays at that position till I click again for the next number of degree, this apply the same number of degree for the other direction.

The button will be replaced with a relay for CW or CCW in this shield:
http://www.arduino.org/products/shields/arduino-4-relays-shield
That means 1 relay for PAN and 1 relay for Tilt depending on the resistance value (Direction), but changing the value of resistance of the Pot is not quite simple for me, this will need a slight mod. in code...anyone willing to modify the code? If so I will provide the current code.
The pot I'm using is 10K, when it is at 10K the servo turns CW and vice versa.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top