November 22, 2024, 10:16:34 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


20 Channel Sequencer for Rats ??

Started by Eric, October 21, 2010, 01:18:16 AM

Previous topic - Next topic

Eric

Hello.... I need to make a 20 channel sequencer for some lights. Its a stunt for a darkride. The effect is a bunch of rats eyes will light up one channel at a time ( 5 rats per channel) until all 20 channels are on at the same time ( 100 rats will be lit by the time the car is at the end hallway )

The effect is triggered by an opto sensor
The sequencer needs to have a pot input so the timing can be adjusted on location without access to a computer
The effect will be between 0 and 15 seconds
The sequencer will reset 5 seconds after the last channel is on

What is the best way to do this ? 
Prop 1 and expansion unit ?
or should it be 2 Prop 2's ?
or Prop 2 and expansion unit ?

bsnut

October 21, 2010, 03:38:11 AM #1 Last Edit: October 21, 2010, 06:42:18 AM by bsnut
A prop1 can do this. With the help of the RC4, but the RC4 is limited to 16 channels(4 boards with 4 relays on each) on one serial I/O line( prop1 I/O pin) and you will need to make another serial I/O line for the other RC4, which gives you 4 extra channels, which comes to a total of 20 relays/channels.

You may want to use the EZ-3 for the timing side, which provides you 3 pots for adjusting your pre-delay, post-delay and the on-time delay and you will also have a external trigger on the EZ-3 for triggering your prop from a photoeye. The only problem that the EZ3 has is, it mates up to all the TTL pins on the prop1 making the TTL pins not usable. But, you can get around this with servo extension cables and three-pin headers (male-male). Now the pins are usable for something else.

If your program is too large for the EEPROM you may need the Prop2 to handle this. You will not know until you write the program and you check to see how much space is used on the EEPROM.
William Stefan
The Basic Stamp Nut

JackMan

 
QuoteI need to make a 20 channel sequencer for some lights.

What kind of lights?  If they're LED's you could probably do this with a Prop-1 and a DC-16 Output Expansion Board. If you want Pot control for each of the 20 channels it could get a little complex.

JonnyMac

This could be tough.... we've had a crazy [good] season and we're presently out of Prop-2s and the DC-16 (which is being replaced by the HC-8).  We're almost out of stock on Prop-1s as well, so you may want to order quickly.  Based on your requirements you'd need need four Prop-1s (which is less than two Prop-2s, anyway).
Jon McPhalen
EFX-TEK Hollywood Office

Eric

I still have
15 prop 1 , 10 prop 2 , 2 of those serial 16 output expansion units .......  so no problems there .... the load is less that 250mA per output so its 2803 friendly

Eric

It only needs one pot .... it adjusts how fast the outputs it takes to get from 1 to 20

JonnyMac

Just so I'm clear... after a trigger detection, the controller stages the outputs on in order with a delay in between controlled by the pot?  What kind of timing are you looking for from the pot.  I would be inclined to use a Prop-1 and a DC-16.
Jon McPhalen
EFX-TEK Hollywood Office

Eric

it would be like:
00000000000000000000 = start sequence all off ,

A trigger input then sequences the next 20 steps (the pot input controls how fast these 20 steps happen, )

00000000000000000001
00000000000000000011
00000000000000000111
00000000000000001111
00000000000000011111
00000000000000111111
00000000000001111111
00000000000011111111
00000000000111111111
00000000001111111111
00000000011111111111
00000000111111111111
00000001111111111111
00000011111111111111
00000111111111111111
00001111111111111111
00011111111111111111
00111111111111111111
01111111111111111111
11111111111111111111

then hold that last pattern for 5 seconds

then reset back to:

00000000000000000000

wait for the next trigger input

Eric

oh .... Pot time is from 0 to 15 seconds ... it will be adjusted to match the speed of the ride vehicle on site ....

JonnyMac

Here's something to start with:

' =========================================================================
'
'   File...... Rats_20x.bs1
'   Purpose...
'   Author....
'   E-mail....
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'
' Setup
'
' P7
' -- Clip pin 1 of ULN2803 (for serial comms to DC-16)
' -- Move P7 SETUP jumper to UP position
'
' P6
' -- Clip pin 2 of ULN2803
' -- move P6 SETUP jumper to DN position
' -- connect dry-contact, N.O. between P6.W and P6.R
'
' P5
' -- Clip pin 3 of UN2803 (for connection to Prop-Pot)
' -- connect Prop-Pot to P5 header (use Prop-1 side)


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = UP; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN; no ULN
SYMBOL  PropPot         = 5                     ' no ULN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  Baud            = OT2400


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer           = B2
SYMBOL  idx             = B3

SYMBOL  delay           = W5


' -----[ Initialization ]--------------------------------------------------

Power_Up:
  PAUSE 100                                     ' let DC-16 power up

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00001111                              ' make P0-P3 outputs

  SEROUT Sio, Baud, ("!AP16", %00, "X")



' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 100 THEN Check_Trigger             ' wait for 0.1 sec input

  ' local outputs (1 - 4)

  FOR idx = 0 TO 3
    HIGH idx                                    ' make pin high
    GOSUB Get_Delay                             ' read pot
    PAUSE 37                                    ' match DC-16 comm delay
    PAUSE delay                                 ' run pot delay
  NEXT

  ' remote outputs (on DC-16)

  FOR idx = 1 TO 16
    SEROUT Sio, Baud, ("!DC16", %00, "P",  idx, 1)
    GOSUB Get_Delay
    PAUSE delay
  NEXT

  PAUSE 5000
  GOTO Reset                                    ' all off


' -----[ Subroutines ]-----------------------------------------------------

Get_Delay:
  POT PropPot, 100, delay                       ' read pot, 0 to 255
  delay = delay * 60                            ' bumpt to 0 to ~15s
  RETURN

' -------------------------------------------------------------------------


' -----[ User Data ]-------------------------------------------------------
Jon McPhalen
EFX-TEK Hollywood Office