Relay Output Stepper

Discussion in 'The Projects Forum' started by klangst, Mar 16, 2016.

  1. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    There may already be a project on this forum that would work for this, but I may not be searching correctly to find it. This is what I am looking to do. I have an input voltage that pulses on for 2 seconds and then off for 2 seconds. I want to be able to direct the pulses to 12 different output relays in sequence. During the first on pulse, I want to direct the "full" voltage to output relay 1. For the second on pulse, I want to direct the "full" voltage to output relay 2 and so forth until it reaches output relay 12 and then on the next on pulse it would start back at 1. Is there a non-microcontroller way to handle this? Here are some specs:

    Input voltage = 12 to 20 Volts
    On (pulse) time = 2 seconds
    Output relays = need to handle voltage and up to 3 amps

    Any and all guidance is very much appreciated.
     
  2. TheButtonThief

    Active Member

    Feb 26, 2011
    219
    38
    What do you mean by "input voltage"? What does the input belong to? Are you trying to use an input to detect a voltage between 12V and 20V with a 2 second window?

    Inputs detect a voltage, outputs produce a voltage.

    Some scope would help; what exactly does your project do? What is it's purpose?

    From what I can make of this, I suspect you would benefit from a shift register.
     
  3. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,771
    930
    A shift register AND a Schmitt trigger device that detects a falling edge to clock the shift register.
     
  4. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    TheButtonTheif, thank you for your reply. This project will receive an output from another circuit. The output is typically around 18V, but could range from as low as 12V and up to 20V (that's why I put that range on it). This project would take the output from the other circuit and direct it to 12 different outputs, stepping in order from 1 to 12. I am hoping that the output from the other circuit could 1) be sensed causing the (shift register or some other component) to step to the next relay, and 2) could be directed to the relays as a "pass through". I could use an "external" lower voltage power source for the components and the relay latches if that makes things easier.
     
  5. TheButtonThief

    Active Member

    Feb 26, 2011
    219
    38
    Do a google search for "CD4015". You'll find plenty of example circuits that will help/inspire you. Obviously the CD4015 is only 8 bit and you have 12 relays but shift registers like this one can be used in multiples. For example, use 2 together and you get a 16 bit register, more than enough for your 12 relays. If you're sensing a signal with a hefty voltage, it'd be a good idea to use a potential divider before feeding it into a logic circuit (they like nothing more than 5V) or if the voltage can very then maybe an opto-isolator or small/solid state relay.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    The thing about a shift register is that you have to have a circuit to load a single 1 at the start of the cycle, and then recycle it when it comes around. Another way is to use two 4017's in series. Yes, 80% of the 2nd chip is "unused". So? Still easier than the steering logic around a multi-chip shift register.

    1. Is the input voltage AC or DC?

    2. Relays are not as fast as chips, and do not release as quickly as they pull in. Does there need to be a mandatory dead zone between the turning of of one output and the turning on of the next one? This could be milliseconds if needed.

    3. Or, is it ok for two outputs to be on simultaneously for a few milliseconds?

    4. What power source is available to run the control circuit?

    5. Depending on how ratty the input power signal is, cleaning it up so that the circuit advances reliably might add a small time delay. Is there a critical time requirement between when the input changes state and when when an output relay clicks in?

    6. Do the relays have to provide total galvanic isolation (double-pole relays), or are the input and all outputs common-grounded?

    Depending on your answers, I'm leaning toward some cleanup parts (filter capacitor, transient suppression diodes, etc.) to process the input so it can clock the circuit reliably, followed by two 4017 decade counters in series. These will step through a 1-12 (actually 0-11) sequence and recycle. Their outputs drive two ULN2003 transistor arrays. These are designed to drive a bank of small relays, lights, etc. Then the relays. The two driver chips have 14 sections, and the outputs need only 12. I'd probably use 1 or 2 sections to clean up the input signal.

    7. Are relays really necessary? IF the switched signal is DC, AND IF everything is common-grounded, THEN the switching could be done with P-channel power MOSFETs or PNP transistors. Just a thought...

    ak
     
  7. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    AnalogKid, thank you for the thorough response. See my answers to your questions below:

    1. The input voltage is DC (could be 2 9V batteries in series or a 14.8V lipo battery powering the input circuit).
    2 and 3. It is OK if more than 1 output is energized for a number of milliseconds.
    4. The control circuit would have to be powered by battery.
    5. If we are talking in milliseconds, then no if the exchange could happen in less than 500 milliseconds.
    6. They could be common grounded if "backfeed" could be prevented on the grounds of the outputs not energized. Hopefully that makes sense. Basically I do not want the non-energized outputs to have power passed to them when they are not supposed to be active.
    7. Relays are not necessary, just my first thought. If the mosfets can handle up to the 3A, then that would work.

    Let me know your thoughts.
     
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    1. 3 A out of two 9 V batteries..?

    4. I get that the incoming signal is a power source pulsing on and off. Do you want the control circuit to derive power directly from the pulsing input (totally possible), or will it get true DC from the same source but not pulsing?

    6. No solid state device has the galvanic isolation of a DPDT relay. But the off state current leakage of a power MOSFET or bipolar power transistor is microamps or less. It would help to know the true nature of the loads, but the call is yours. When a power MOSFET is off it looks like a reverse-connected diode.

    7. 100 A MOSFETs are common, so 3 A is no problem.

    8. What are the absolute maximum and minimum voltages available to power the control circuit?

    ak
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    I also recommend two CD4017's (or two CD4022's) to do the sequencing.
     
  10. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Here is more background to help with this project. I do special effects (confetti cannons, smoke effects, indoor/outdoor pyro effects, etc.). The incoming pulse is from the control system and can produce up to 3 amps (depending on load) from 2 9V or 1 14.8V battery. I want to be able to use the pulse from the control system to cycle through 12 different outputs. That way I can use one output from the control system to activate 12 different effects by sending the pulse from the control system 12 times.

    4. If the control circuit could be powered from the pulse, that is a big plus. I did not know if that would be possible.

    6. Could redundant mosfets be used on both the high and low side of the output? (shooting from the hip here, this may not really even be an issue, especially if we are talking about less than 100 milliamps)

    8. The power source for the control circuit (if not the pulse) can be whatever we can come up with here, but it would need to be battery powered for portability (stages, weddings, etc.)
     
    Last edited: Mar 16, 2016
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    4. Are the pulses continuous, or are only 12 of them coming to the controller? If continuous, or at least 13, the first one can fire up the circuit and the 2nd one makes the first output.

    6. Yes, but - since you bring up switching elements in the ground legs - - - Going to all ground side switching is better from a controller complexity standpoint. For the same price, N-channel FETs move more current with less voltage drop. The power pulse would go out to everything all the time, but only one thing at a time would have a return path. Electrically this is exactly the same as putting the switching in the power side and having a continuous return connection, but it can make people who don't understand the physics of series circuits a bit nervous. Of course for this to work there can be no other sneak return path such as contact with the ground - not an electrical ground, *the* ground.

    8. If you go with ground-side switching, the controller could run for year on one 9V battery.

    Decisions, decisions. Life is choice. Choice is risk.

    ak
     
  12. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,987
    3,733
    Here are some slight changes to another project. It would be nice to use with relays that have 5V coils and a small logic level P-channel mosfet for each of the 12 outputs from the 74ls154.

    Obviously, the p-channel mosfet would be driven instead of the LED.
    image.jpg
     
  13. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    4. There can be as many pulses as I need to send to it.

    6. This would be sitting on the "ground", but would be inside a case and could be "isolated" that way.

    8. I like the 9V battery idea.
     
  14. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    GopherT, thank you for posting the schematic. I need to digest that for a bit and refresh myself on some of the components. I have done a lot of soldering, but circuit design is not my strong suit.
     
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    Forgot two...

    9. After the 12 pulses, does the source stop making them? Or do they keep coming but the controller ignores them - one 12-output sweep, then shutdown. Or does the controller keep cycling until the input pulses stop?

    10. Depending on the answer to 9, how does the when/how/why does the controller stop cycling and wait to start again from the first position? What tells it to reset and wait?

    ak
     
  16. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    The controller sends the pulses based on how I program it to. So whatever would work best for the control circuit, I can program it to do. It always outputs for 2 seconds, but I can control how many of the pulses and the time in between them.

    I just thought of another item we need to be aware of. The controller will periodically send out a test current of 25ma to provide live continuity (that the effects are connected) feedback to the controller. I need to ensure this does not cause the control circuit to step to the next output.
     
    Last edited: Mar 16, 2016
  17. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    Interesting controller. Manufacturer/model/photos?
     
  18. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
  19. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    i would prefer to go mosfets vs relays if at all possible.
     
  20. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,039
    287
    If you use LATCHING relays, and they have an extra pair of contacts, you can build a shift register/ring counter, with no external logic. I don't know WHY you'd want to avoid external logic, but you can. :)
     
Loading...