Shop OBEX P1 Docs P2 Docs Learn Events
triggering multiple devices in sequence — Parallax Forums

triggering multiple devices in sequence

bellyflopbellyflop Posts: 7
edited 2005-04-29 19:55 in BASIC Stamp
i'm searching for a way to trigger up to 100·1.5V devices·in·sequence.

can someone suggest an economical way to achieve this without cascading basic stamps? and direct me to a diagram?

thanks

Comments

  • KenMKenM Posts: 657
    edited 2005-04-23 22:50
    What do you mean by trigger the devices?

    Do you want to ground them?

    What is the maximum time you can allow between number one being triggered and number 100 being triggered?

    Are these LEDs?

    k
  • bellyflopbellyflop Posts: 7
    edited 2005-04-23 23:52
    by trigger i mean switch

    they are·strobe flash·units

    and i'm looking for aprox .25 sec delay
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-04-24 01:10
    bellyflop -

    How much current will you have to provide to switch the strobe units? If it's 125 mA or less, I probably have an answer for you.

    If you can't answer the question about current requirements, a link to the particular strobe unit would be most helpful.

    Regards,

    Bruce Bates
  • bellyflopbellyflop Posts: 7
    edited 2005-04-24 15:14
    the units are the circuitry of used disposable cameras - so are essentially a little capacitor/ flash unit which i am reswitching. they currently all run from individual AA batteries [noparse][[/noparse]or AAA depending on the model].

    my response was in correct before- the ideal delay between the individual devices switching is something like .15 sec : 15 sec overall for the unit. but obviously it'd be nice to adjust the timing once assembled.


    thanks
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-24 22:50
    So are there only to be one active at any instance? ie fire 1st, shut down, fire 2nd, shut down.

    Do these need a charge time prior to triggering? Like the one's where you switch on the flash and you see a little LED be red then turn green and sometimes there a whining noise?

    What is the charging time? (rough estimate is fine)

    What is the current triggering mechanism? Is it a button? Have you seen if there is any means for aceesing that signal by soldering a wire into the circuit?

    What is the furthest physical distance between any two units?

    Post Edited (Paul Baker) : 4/24/2005 10:55:33 PM GMT
  • bellyflopbellyflop Posts: 7
    edited 2005-04-24 23:50
    yes correct, one at a time will be active

    yes there is a capacitor which loads for for probably 2 seconds before the flash is ready to fire

    yes i have inserted wires into the mechanism, which couls be connected to relays/ stamps.

    furthest physical distance is 4"
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-25 05:53
    If the sequence of flashing is always the same, use 13 74HCT164's (serial shift register) that way you only need two pins, one for the data and one for the clock pulse, you would cascade them by connecting Q7 of the previous stage to the input of the next stage. The sequence is seeded with a 1 on the data pin and further data for the sequence would be zero. Each time you would want to fire the next stage you would clock pulse the '164. The output pin can handle a 35mA load, if you need more than that youll have to add a transitor to the output of each stage.

    If you need random access to your strobes let me know and Ill explain that solution, it basically requires 3:8 decoders but it requires a litle extra glue logic.

    Since your flashes are so close to each other, I would run them off the same supply, because you will need a common ground between all your flashes and the stamp.
  • bellyflopbellyflop Posts: 7
    edited 2005-04-26 01:30
    thanks paul

    excuse my uncertainty, but this is all pretty new to me.....

    so i'd attach the first serial shift register to a basic stamp [noparse][[/noparse]using two pins], and then cascade off the Q7 pin as you mentioned. all grounds would return to the basic stamp.

    from each serial pin register pin i assume that i need to insert a relay in order to switch the flash circuits?

    then the basic stamp code will direct the sequence [noparse][[/noparse]linear] plus timing. can you direct me to specific commands / or a tutorial that'll send me in the right direction?

    thanks
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-26 14:05
    I will be somewhat busy today/tonight. I will attempt to set aside enough time to draw out a schematic for you and explain its operation. I will nutshell it for you at this point. Taking the case of 16 trigger points (it expands easily to 100)

                                         ____
                        __|_|_|_|_|_|_|_|_   | __|_|_|_|_|_|_|_|_
    Stamp I/O pin 1 ----|DI               |  --|DI               |
                        |                 |    |                 |
              pin 2 ----|> CK             |  --|> CK             |
                      |  ------------------  | -------------------
                      +----------------------+
    

    for the first iteration make pin 1 high, toggle pin 2 high then low again the output is: 10000000 00000000
    second iteration make 1 low, cycle pin 2 again, output is: 01000000 00000000
    repeat the previous step and the 1 in the output will continue to slide down the column, you would do this until the entire sequence has been done.

    You can use any stamp I/O pins, I only used 1 and 2 for illustration puposes.
  • bellyflopbellyflop Posts: 7
    edited 2005-04-29 17:57
    thanks Paul

    if you do get a chance to expand it further, would be much appreciated.

    I assume DI: is data input, CK: clock pulse

    How does the shift register know to forward the information for the second sequence thru the 7 pin? is the space between the numbers the syntax to achieve this?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-29 18:20
    I could expand it for you, but all it consists of is replication of the right shift register further down the chain. I added one more stage in the drawing below to show how the second and third (and every other stage beyond that) are connected the same way.

    You are correct with the meaning of DI and CK.

    The vertical lines ontop of the shift registers are the 8 bits of output with the left most one being the first shift position, the last shift position (I believe its called Q7 in the spec sheet) is connected to the input of the next shift register, that way the last shift position of the previous shift register is carried through to the next stage, ive highlighted the line im talking about below in red.

    [size=2][code]
                          Q Q Q Q Q Q Q Q        Q Q Q Q Q Q Q Q        Q Q Q Q Q Q Q Q
                          0 1 2 3 4 5 6 7[color=red]____    [color=black]0[/color] [color=black]1 2 3 4 5 6 7[/color]____    [color=black]0 1 2 3 4 5 6 7[/color]
    [/color]                    __|_|_|_|_|_|_|_[color=red]|[/color]_   [color=red]|[/color] __|_|_|_|_|_|_|_[color=#ff0000]|[/color]_   [color=red]|[/color] __|_|_|_|_|_|_|_|_
    Stamp I/O pin 1 ----|DI               |  [color=red]--[/color]|DI               |  [color=red]--[/color]|DI               |
                        |    74HCT164     |    |    74HCT164     |    |    74HCT164     |
              pin 2 ----|> CK             |  --|> CK             |  --|> CK             |
                      |  ------------------  | -------------------  | -------------------
                      +----------------------+----------------------+
    


    [/code][/size]
    Since the shift register places whatever is @ DI onto Q0 when CK is cycled, you are effectively creating a very long shift register (the above "super" shift register is 24 bits long), by chaining 13 together you get one really long shift register which has 104 bits (the last 4 are left disconnected and you basically ignore the fact they are there).
  • bellyflopbellyflop Posts: 7
    edited 2005-04-29 19:38
    thats clear thanks

    so, to the basic stamp code, which commands do i need to utilize to get this thing going?

    also, each shift register pin will then get a charge [noparse][[/noparse]in sequence] , which i assume i need to attach a relay to switch the circuit.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-29 19:55
    for your application, since you are seeking to serialize the flash sequencing, a pseudo code version of the code would be:

    (CK and Dout are defined to the respective pins)

    CK = 0
    Dout = 1
    CK = 1············ 'first flash is now triggered (data is shifted on rising edge of CK)
    Dout = 0········· 'since only one flash is active at any time the rest of the data shifted is 0
    FOR I = 0 TO 98
    · CK = 0
    · PAUSE Delay·· 'this is the delay time between flashes
    · CK = 1·········· 'next flash is triggered
    NEXT

    You would need something to drive the trigger like a relay, but I would suggest using a transistor since they are easier to drive (relays would likely need a transitor to drive them anyways). If you want to keep all the units electrically isolated then use a relay and ignore the part about connecting the grounds below (but connecting them together with some wire will be much cheaper than purchasing 100 relays)

    The supply to each of the flash units would be powered up to·allow the capacitor enough time to charge, then triggered·by the pulse·from the shift register when the 1 is shifted to it's location. If you are going to have individual power supplies for each unit, you should tie all of the ground terminals together with each other and the stamp's ground.

    Post Edited (Paul Baker) : 4/29/2005 7:59:16 PM GMT
Sign In or Register to comment.