I am trying to create a circuit that will control a servo. I need the servo arm to move from 0 to 90 degrees when the power is turned on, and then from 90 back to 0 degrees when the power is turned off. I'm trying to accomplish this without using a micro controller.

I have been tinkering with a 555 timer and some circuits that use different resistor values to adjust the range of motion but with these circuits that I've found, the servo is always moving and won't hold a position.

I'm thinking for the arm to move from 90 back to the starting position I will have to use a capacitor that will store energy in order to move the arm as soon as the power is off.

Do you think this is possible to do without a micro controller? Any other suggestions?

Edit: Here is what I'm working with right now. Servo Test Circuit I have wired up the first circuit shown. I've been able to adjust the R1 and R2 values to 5.6k and 1.8k, respectively, in order to get the Servo to move the 90 degrees that I need.

Before that, I had wired up both of the circuits on this page, but like I mentioned in a reply, buttons and a potentiometer are out of the question because of the enclosure.

  • 5
    \$\begingroup\$ Yes, it is possible without a microcontroller. But it's so much easier with one. Even a tiny little PIC10F200 could handle this with ease. And instead of thinking about how to store the energy for the return stroke, have the button initiate the operation and then have the circuit turn the power off once it is completed. \$\endgroup\$ – Dave Tweed Jan 31 '17 at 22:07
  • \$\begingroup\$ A 555 timer works fine for controlling a servo provided that the power supply voltage is stable. If your servo is jittering then try regulating the 555's supply or use a separate battery, and make sure the servo power supply can handle the peak current draw (could be several amps). What power supply voltage are you using, and what model is the servo? How much current does it draw when moving the arm? (need this info to determine capacitor specs etc.) \$\endgroup\$ – Bruce Abbott Feb 1 '17 at 1:29
  • \$\begingroup\$ @BruceAbbott Thanks for the response. I have 24VDC to a 7805 voltage regulator, so 5V to the 555. The servo is a "S05NF STD", unfortunately there is not a lot of info on the datasheet. S05NF STD There is roughly 350 mA drawn when the arm is moving. I wouldn't say the servo is jittering, it moves smoothly from limit to limit. My issue is, I can't get the arm to stop at a specific spot. As long as the power is on, the arm is moving. \$\endgroup\$ – cwatkins62 Feb 1 '17 at 14:10
  • \$\begingroup\$ @DaveTweed Thanks Dave. I know it would be much easier with a micro controller but for this application I am trying my best to not use one. Also, it is worth mentioning that this will all be in an enclosure (with a hole for the servo arm) and there is no button that will be initiating movement. The only outside influence is the power being fed into this circuit and then later turned off. \$\endgroup\$ – cwatkins62 Feb 1 '17 at 14:16
  • 1
    \$\begingroup\$ Why exactly are you ruling out a micro? It's ironic, because from your description of the servo's behavior, it sounds like it's likely to be a "digital" servo -- i.e., one that contains a micro internally. In any case, it should be obvious that we cannot comment on the circuit(s) that you've tried if you don't show them to us. Unless you edit a lot more detail into your question, it will have to be closed as "unclear what you're asking". \$\endgroup\$ – Dave Tweed Feb 1 '17 at 15:19

Do you think this is possible to do without a micro controller?

Yes, it should be possible. A 555 timer IC is commonly used to operate servos. It produces stable pulses provided that its power supply is stable and clean. Your servo draws ~350mA when moving so it probably draws 1A+ peak. A 7805 regulator may not regulate that well so you should use a separate regulator for the servo (same as you would with an MCU).

Your servo is specified to move 60º in 0.2s so it probably needs about 0.3~0.4s to go 90º. You will need enough capacitance to hold the voltage above 5V for at least 0.4s at 350mA. The 7805 needs ~2V headroom to avoid 'dropping out', so the capacitor can discharge from 24V to 7V. To detect when power is turned off the capacitor must be isolated with a diode which drops another 0.6V, leaving ~16V that the capacitor can discharge by. C = I*t/V, so you need at least 0.35A*0.4s/16V = 8,750uF.

If you used a switching regulator ('DC/DC converter' or 'UBEC') to power the servo then less capacitance would be required because a switching regulator 'transforms' the power to higher current at lower voltage, rather than just wasting the excess. From 16V to 5V is a ratio of 3.2, so the initial capacitor discharge current would be ~120mA, rising to 350mA as the voltage dropped towards 5V.

The circuit might look something like this:-


simulate this circuit – Schematic created using CircuitLab

Relay RL1 detects when power is switched on/off to change the servo pulse timing. D1 isolates C1 from the power input so that it can drop the relay instantly when power is switched off (otherwise it would be held operated by the charge on C1). R1 and C2 form a 'snubber' which absorbs back-emf energy from the relay without slowing down its release. U3 supplies separate regulated power to the servo so it won't disturb the pulse timing (replace this with a switching regulator to reduce the amount of capacitance required in C1).

One potential problem with this circuit is that when C1 eventually discharges below 7V the 555's supply voltage will drop and its timing will drift, possibly causing the servo arm to move slightly before it completely runs out of power. One way around this might be to have two reservoir capacitors and blocking diodes, one to power the servo and a smaller one for the 555. If the servo runs out of power before the 555 then it doesn't matter if the timing drifts.

Alternatively you could use a comparator to reset the 555 when the capacitor voltage gets close to 7V, and perhaps another comparator in place of the relay to monitor the power supply voltage and switch the timing resistance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.