556 servo delay

Discussion in 'General Electronics Chat' started by 27ace27, Oct 18, 2013.

  1. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    Hello All,

    I'm trying to design a circuit that moves a servo to its limit after a certain delay. The project it is for has a price limit of $10 and a deadline coming up, so I designed a simple, tiny circuit using the 556 and have already sent the boards to fab. The schematic is attached.

    What I need help with is determining the values needed to get the servo to move to its limit after x seconds. From what I've seen on the internet, the 555 can't provide much time between pulses because of its 50% minimum duty cycle, but it is never explained how servos handle this. I've seen an ideal period of 20ms, but what is the minimum 'off time?'
     
    • 556.png
      556.png
      File size:
      16 KB
      Views:
      45
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,526
    2,369
    Not enough information again, I assume by servo's you mean steppers in a servo application?
    Other wise you need some kind of feedback loop.
    Unless you intend using a step/direction servo drive that contains a PID loop?
    $10.00 is heck of a budget!!
    Max.
     
  3. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    Sorry, I'm talking about RC servos that need a PWM signal. Agreed that $10 is crazy low, and that's not even including the rest of the rocket! Luckily, OSHPark does crazy cheap boards (I got them down below .5 sq in so .80 each) and I have a few servos in the scrap box.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,794
    1,103
    These values should give you a delay of 0.5-5 sec (set with Trim1), after which pulses of width ~0.3-3.3ms (set with Trim2) every ~20ms are produced.
    Unfortunately your circuit makes no provision for generating servo pulses before the time delay expires, so the initial position of the servo will be unknown.
     
    Last edited: Oct 18, 2013
    27ace27 likes this.
  5. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    Thanks for the help, Alec. From what I understand about the operation of the 556, the servo signal is tied to ground until the delay expires which should translate to the servo just staying where it started, which is not a problem.

    I noticed that you added two extra resistors and a transistor -- how necessary are these? The boards have already been sent to the fab and I really can't have them do another run this late. The circuit doesn't have to be perfect, just something quick and dirty that works.
     
  6. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    OK, I plugged those part values into a calculator, and the high and low times are reversed. This is where the transistor comes in, I take it. In this case, I guess it is absolutely necessary and will have to be bodged in. What transistor would you recommend?
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,794
    1,103
    Yes. After the delay expires the 556 output is high for most of the pulse period and goes low for the 1ms-2ms that defines the servo position. I can't think of a way to reverse those states other than to use the additional transistor. I'm assuming the servo expects positive-going 1ms-2ms pulses?
    BTW while the delay is running the transistor output is high.
    Any general-purpose NPN will do for the transistor, e.g. a 2N3904 or BC547.

    Edit: I've now thought of a way to reverse the states without using the transistor. However, it involves an additional diode and a mod of the charge/discharge paths for C3, so would still need a bodge on your pcb. Here's a revised circuit
     
    Last edited: Oct 19, 2013
    27ace27 likes this.
  8. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    Alright, thanks for all of your help Alec, I'll give the transistors a shot. Luckily (or unluckily), the boards won't even be finished until three days after the competition so they can be safely abandoned. I also remembered that I had about a dozen 555 timers and related components left over from previous projects that never materialized, so I re-worked the circuits above into one that provides PWM signals both before and after the delay time out. The schematic is attached, but I'm not sure I got it quite right so a quick proofread would be much appreciated.
     
    • r2.png
      r2.png
      File size:
      27.7 KB
      Views:
      22
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,794
    1,103
    A quick skim of your circuit shows a couple of problems:
    1) T1 will fry because it has no base resistor.
    2) IC2 and IC3 have no timing caps.

    If all you want is to change the servo pulse width from a first value to a second value when the delay expires then I reckon one of the 555s could be removed and the circuit simplified.
     
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    My experience with hobby servos is that when power is applied, there will be a brief surge in one direction or other, and I've never figured out how consistent this is, in direction or how far it travels. It's infuriating that this happens, because that sudden motion can damage a delicate mechanical system. I suppose the manufacturers allow it because if your model plane's rudder did a quick twitch when you start the servos, you'd never care. In fact you might like to see a verification that the system is alive.

    Anyway, don't think that because your servo is powered but not receiving pulses, it won't move.
     
  11. 27ace27

    Thread Starter New Member

    Oct 18, 2013
    6
    0
    Nice eyes, Alec. Correct me if I'm wrong, but could one simplify the circuit by using a transistor to switch between timing capacitors as in the attached schematic?

    John, the servo I am using does indeed twitch when power is supplied, but the mechanism in which it will be used is not so sensitive that the twitch will cause problems.

    Apologies for the rookie questions, I'm an Aero, not an EE.
     
    • r3.png
      r3.png
      File size:
      15.3 KB
      Views:
      24
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,794
    1,103
    Switching the cap has the disadvantage that the pulse period, as well as the width, will change. Here's an even simpler option, making use of the CV pin of the second 555:
     
Loading...