Relay/MOSFET Sequencer Project

Discussion in 'The Projects Forum' started by klangst, Jul 25, 2014.

  1. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    I am pretty novice at the moment when it comes to circuit design. I can follow a layout and can solder pretty well, but I have a lot to learn when it comes to circuit design. With that being said, I want to start a fun project that I will take in sections/steps to understand and learn as I go. The end goal will be to design a circuit to perform relay or MOSFET (have not decided yet) sequencing with some added features. This is intended to be a long term (over the next 3 or 4 months) project. Below I will describe the requirements of the sequencer and a couple of links to items I found on this forum. Then over the next 3 to 4 months I would like to work toward that end goal as I do little projects along the way to learn how this all works. Your expertise will help immensely to get to the end goal.

    My intentions will be to use this as a sequencer for igniting fireworks, but I am sure it could be used for other things as well. In the end I will share the finished circuit design with the fireworks community in the hopes of it being a low cost sequencer that people can build if they so desire.

    With all that being said, let's get to the details:

    1. The circuit will need to be able to be powered from 12V to 24V.
    2. The circuit will need a key switch for arm and safe modes.
    3. There will need to be 24 total outputs and will all fire in sequence.
    4. The outputs will be grouped in sets (either 4 groups of 6 or 6 groups of 4)
    5. Each group of outputs will have a 6 position selector switch to select the timing of each group (0.5s, 1s, 2s, 3s, 4s, 5s).
    6. The sequence will need to be initiated when an input of 12V to 24V is received.
    7. After the 24th output is energized, 1 additional output would energize that could be used to start the sequence on another module (daisy chaining).
    8. Output will need to be able to produce up to 3A at 18V.
    9. A test mode will be required with an LED at each cue that sends a maximum of 30mA through the igniters to check continuity.
    10. Need to have circuit protection.
    11. Finally (at least that I can think of right now), it will need to be able to delay for 5 seconds when it is armed to prevent inadvertent start of the sequence.
    Here are some of the resources that I have found so far on this site that are some helpful discussions:
    Fireworks Sequencer
    http://forum.allaboutcircuits.com/showthread.php?t=53616


    Sequencer for Fireworks
    http://forum.allaboutcircuits.com/showthread.php?t=42085


    A couple of attachments from those threads:
    http://forum.allaboutcircuits.com/attachment.php?attachmentid=5816&d=1228883204
    http://forum.allaboutcircuits.com/attachment.php?attachmentid=22900&d=1285261840


    If anyone is up for riding along on this project, I would most appreciate your input. I would like to start slow and come up with parts of the circuit at a time that I can breadboard and understand how they function. As we go, the circuit can grow in complexity to meet the specs that are needed.


    Thank you,


    Kyle
     
    Last edited: Jul 28, 2014
  2. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Update 7-29-2014
    Requirements

    1. The circuit will need to be able to be powered from 12V to 24V.
    2. The circuit will need a key switch for arm and safe modes.
    3. There will need to be 24 total outputs and will all fire in sequence.
    4. The outputs will be grouped in sets (either 4 groups of 6 or 6 groups of 4)
    5. Each group of outputs will have a 6 position selector switch to select the timing of each group (0.5s, 1s, 2s, 3s, 4s, 5s).
    6. The sequence will need to be initiated when an input of 12V to 24V is received.
    7. After the 24th output is energized, 1 additional output would energize that could be used to start the sequence on another module (daisy chaining).
    8. UPDATED - Output will need to be able to produce up to 10A at 24V.
    9. A test mode will be required with an LED at each cue that sends a maximum of 30mA through the igniters to check continuity.
    10. Need to have circuit protection.
    11. NEW - Select between step sequencing (requires input signal to step to next output) and auto sequencing (sequences all output).
    12. Finally (at least that I can think of right now), it will need to be able to delay for 5 seconds when it is armed to prevent inadvertent start of the sequence.

    Here is a simplistic view of inputs/outputs:

    Using a PIC such as PIC18F2220, which has 25 I/Os, I could see inputs and outputs looking like this:

    Inputs:
    Arm - followed by a 5 sec pause before allowing any action to be taken from input 2.
    Start - input signal received to start the sequence.
    Test - would cause output 11 to switch on (through MOSFET) low current to all 24 cues to check continuity.
    Stop - emergency stop input that would stop the sequence.
    Timing 1 - switch input for selectable timing for cues 1-4.
    Timing 2 - switch input for selectable timing for cues 5-8.
    Timing 3 - switch input for selectable timing for cues 9-12.
    Timing 4 - switch input for selectable timing for cues 13-16.
    Timing 5 - switch input for selectable timing for cues 17-20.
    Timing 6 - switch input for selectable timing for cues 21-24.
    For the outputs, I am envisioning MOSFETs/Relays with 6 functioning in a "latch" mode and 5 functioning in a "momentary" mode.

    Outputs:
    Ground Group A ("latch" mode) - ground to cues 1-4.
    Ground Group B ("latch" mode) - ground to cues 5-8.
    Ground Group C ("latch" mode) - ground to cues 9-12.
    Ground Group D ("latch" mode) - ground to cues 13-16.
    Ground Group E ("latch" mode) - ground to cues 17-20.
    Ground Group F ("latch" mode) - ground to cues 21-24.
    Power to cues ("momentary" mode) - 1, 5, 9, 13, 17, 21.
    Power to cues ("momentary" mode) - 2, 6, 10, 14, 18, 22.
    Power to cues ("momentary" mode) - 3, 7, 11, 15, 19, 23.
    Power to cues ("momentary" mode) - 4, 8, 12, 16, 20, 24.
    Power to cues ("momentary" mode) - all cues for continuity testing.
    Output to signal start on another module (daisy chaining).
    This is very high level, but the way I envision this working for the outputs is hold Ground Group A (GGA) high and sequence outputs 7-10 based on Timing 1 input. Then set GGA low and hold GGB high and sequence outputs 7-10 based on Timing 2 input. This would continue through all Ground Groups A-F.

    For continuity testing, all Ground Groups would be held high and a low current would be sent via output 11.

    Here is a simplistic view of some of the timing sequencing:

    My thought process was that each group/bank A-F, will have a 6 position selector switch for delay selection for that group/bank (0.5s, 1s, 2s, 3s, 4s, 5s). Each position of the selector switch will have a different resistance to provide a different voltage representing each delay. The center position of the switch will be connected to a ADC input on the PIC. The ADC would read the voltage and perform a conversion to determine the delay that was selected. This delay would be used for that bank.

    For example:
    Let's say for group/bank A (output 1 - cues 1-4) the selector switch (input 5 - Timing 1) is set to 1s and for group/bank B (output 2 - cues 5-8) the selector switch (input 6 - Timing 2) is set to 4s. Here is the sequence of events:
    - Perform the ADC for input 5 and determine the delay
    - Set Output 1 HIGH and Output 7 HIGH
    - Pause for 1s
    - Set Output 8 HIGH and Output 7 LOW
    - Pause for 1s
    - Set Output 9 HIGH and Output 8 LOW
    - Pause for 1s
    - Set Output 10 HIGH and Output 9 LOW
    - Set Output 10 LOW and Output 1 LOW
    - Perform the ADC for input 6 and determine the delay
    - Pause for 4s
    - Set Output 2 HIGH and Output 7 HIGH
    - Pause for 4s
    - Set Output 8 HIGH and Output 7 LOW
    - Pause for 4s
    - Set Output 9 HIGH and Output 8 LOW
    - Pause for 4s
    - Set Output 10 HIGH and Output 9 LOW
    - Set Output 10 LOW and Output 2 LOW

    And this would continue for each of the 6 groups/banks. What do you think, does it in theory sound plausible? I know this is extremely simplified, but I needed to lay this out to try and visualize it.
     
    Last edited: Jul 29, 2014
  3. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Save for future additions.
     
  4. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Save for future use.
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,764
    1,099
    Considering the complexity of the system a discrete-component solution, although possible, is probably not the way to go. An MCU-based solution would be preferable IMO. What programming skills/facilities do you have?
     
  6. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    I actually have a lot of programming experience. I would need to learn the language for the MCU. I have never used an MCU before. I am intrigued to learn more.
     
  7. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    You will probably need to find a way to combine some of the controls. With all the outputs and all the selector switch inputs you are looking at around 50 I/O lines.
     
  8. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    A few questions,

    1. What is the power source ?
    2. Is the power requirement of 12 to 24 volts necessary ? Would a max input voltage of 12 Volts be OK ?
    3. You list an output power of 3 Amps at 18 Volts, Do you really need that much ?
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,496
    2,364
    Seems to cry out for a standard PLC, they come in 24v powered versions as well as supplying the I/O.
    Program in ladder or simple Boolean Logic.
    All the I/O conditioning is taken care of and can be had with S.S. or relay output.
    Program changes in the field, if necessary.
    Max.
     
  10. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Power source will be NIMH batteries. Probably 2 in series to supply at least 18V. I need to output enough current to be able to fire 3 igniters at one time. That is the reason for the amp requirement.
     
  11. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Max,

    That gives me something else to think about. I have worked with PLCs years ago.
     
  12. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Thinking through this more, I really want to come up with a discrete solution or at the very most using a PIC. I have some thoughts based on some other circuits I have seen that I will throw out there soon and get input from you all. I don't understand all the theory yet, so your input will be most helpful.
     
  13. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    OK I see your point, I sometimes do consulting for people who want something designed, those are the types of questions I ask them because many times clients over estimate their needs.

    The reason I asked about the input power is because a PIC requires 5 Volts, and it is a lot easier to go from 12 Volts to 5 Volts than it is to go from 24 Volts to 5 Volts. Using 2 batteries in series you could tap 9 Volts from the center to derive 5 Volts to run the PIC.
     
    Last edited: Jul 27, 2014
  14. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    +1 for PLC

    Use two extra outputs, in series with ignitor common.

    One current limited and looped back to a single input to check ignitor continuity during a "check" sequence.

    The other supplying full current in "armed" mode.
     
  15. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    What type of PLC could I use? The PLCs that I am familiar with are for industrial use and are expensive. With this project one of my objectives is to come up with a low cost solution.
     
  16. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,496
    2,364
    Personally I predominantly use Mitsubishi FX series and pick up the odd deal on ebay.
    There is a very good book on programming the Mitsubishi line by John Ridley that is worth it if going that route.
    According to the Automation Direct site, they carry a low cost line of PLC's.
    Max.
     
  17. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Max, should be more help, there. I mainly use AB micrologic bricks for small projects. Generally no more than 6 in and 10 out.

    They are so common, that I find what I need, in the $200 range.
    Failures are near unheard of, except relay outputs after a few million cycles, and I replace relays.

    Developing a discrete solution seems mind boggling unless you need a hundred of these.

    How many outputs do you require?

    Most have expandable IO, and you should be able to come up with a design for a small system, that could daisy chain additional slave units together.

    I've used this company. (not the PLCs)
    http://www.factorymation.com/Products/Programmable_Controllers/

    $70 models and $60 expansion units.
     
  18. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,764
    1,099
    I'm a great believer in doing things on the cheap; but in this case safety is paramount if you're dealing with big fireworks. Using industrial off-the-shelf units would undoubtedly be much more expensive than a home-brew system but would also be much more likely to be reliable.
     
  19. klangst

    Thread Starter Member

    Jul 5, 2013
    56
    0
    Here are some of my thoughts from a PIC standpoint. This is very high level, so your input is greatly appreciated.

    Using a PIC such as PIC18F2220, which has 25 I/Os, I could see inputs and outputs looking like this:

    Inputs:

    1. Arm - followed by a 5 sec pause before allowing any action to be taken from input 2.
    2. Start - input signal received to start the sequence.
    3. Test - would cause output 11 to switch on (through MOSFET) low current to all 24 cues to check continuity.
    4. Stop - emergency stop input that would stop the sequence.
    5. Timing 1 - switch input for selectable timing for cues 1-4.
    6. Timing 2 - switch input for selectable timing for cues 5-8.
    7. Timing 3 - switch input for selectable timing for cues 9-12.
    8. Timing 4 - switch input for selectable timing for cues 13-16.
    9. Timing 5 - switch input for selectable timing for cues 17-20.
    10. Timing 6 - switch input for selectable timing for cues 21-24.
    For the outputs, I am envisioning MOSFETs/Relays with 6 functioning in a "latch" mode and 5 functioning in a "momentary" mode.

    Outputs:

    1. Ground Group A ("latch" mode) - ground to cues 1-4.
    2. Ground Group B ("latch" mode) - ground to cues 5-8.
    3. Ground Group C ("latch" mode) - ground to cues 9-12.
    4. Ground Group D ("latch" mode) - ground to cues 13-16.
    5. Ground Group E ("latch" mode) - ground to cues 17-20.
    6. Ground Group F ("latch" mode) - ground to cues 21-24.
    7. Power to cues ("momentary" mode) - 1, 5, 9, 13, 17, 21.
    8. Power to cues ("momentary" mode) - 2, 6, 10, 14, 18, 22.
    9. Power to cues ("momentary" mode) - 3, 7, 11, 15, 19, 23.
    10. Power to cues ("momentary" mode) - 4, 8, 12, 16, 20, 24.
    11. Power to cues ("momentary" mode) - all cues for continuity testing.
    12. Output to signal start on another module (daisy chaining).
    This is very high level, but the way I envision this working for the outputs is hold Ground Group A (GGA) high and sequence outputs 7-10 based on Timing 1 input. Then set GGA low and hold GGB high and sequence outputs 7-10 based on Timing 2 input. This would continue through all Ground Groups A-F.

    For continuity testing, all Ground Groups would be held high and a low current would be sent via output 11.

    The latch/momentary method is how a number of firing systems on the market work. Grounds through the latched outputs and power through the momentary outputs. This way you can have a larger number of cues using fewer components.

    I would very much appreciate your thoughts on this high level view and if it could potentially work. If the circuitry can be designed, I am very confident I can handle the programming of the PIC.
     
    Last edited: Jul 27, 2014
  20. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    How do the timing inputs (5-10) work ?
     
Loading...