May 03, 2024, 05:07:48 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Product Preview :: EZ-3 3-Stage Timer Add-On

Started by JonnyMac, November 17, 2008, 02:35:44 PM

Previous topic - Next topic

JonnyMac

November 17, 2008, 02:35:44 PM Last Edit: November 17, 2008, 02:38:36 PM by JonnyMac
We've seen our friends struggle, sometimes spending hours, to build a "simple" 3-stage timer, usually from handful of 555 timer ICs, assorted RC components, etc.  Honestly, we just shake our heads.  That said, until now it wasn't terribly easy (for complete newbies) to turn the Prop-1 into a 3-stage timer -- well, that's all about to change.

At the suggestion of a good friend we're creating a little Prop-1 add-on called the EZ-3; it will let you turn your Prop-1 into a 3-stage timer.  Our plan is to sell it in a kit (with a pre-programmed Prop-1 and transformer) or as an accessory for you experts.  The up-side about using the Prop-1 as the control element is that we can modify the programs for all kinds of applications.

Here's what the little dude looks like:



As you can probably tell it plugs right onto the Prop-1 like the Trainer does.  P7 is left open for serial control to accessories, P6 is the trigger input (note that we added a dry-contact terminal block and a manual start button), P5 is the trigger delay pot, P4 is the on-time pot, and P3 is the off-time pot.  A yellow LED (near the delay pot) is connected to P2/OUT2 and can be turned on for the trigger delay period; a green LED (on time) is connected to P1/OUT1 which is the intended control output.  Finally, a red LED (off time) is connected to P0/OUT0.

For those of you who might be interested in this dude please let us know what you'd like in a "standard" program.  Of course, any of you participating in these forums can get a custom program just for asking.

John B is finalizing the circuit board today so we can get parts on order this week.  Our goal is to get this out right after Thanksgiving so you can do some simple Christmas props with it.

And yes, it will work with the Prop-2 and Prop-SX as well.  The round pads with arc traces near the pots are actually solder-bridge jumpers; by shorting these jumpers you can configure the pot circuits to work with the Prop-2/SX RCTIME fuction.

For you super nerds like us, here's the schematic:
-- http://www.efx-tek.com/files/ez-3_schematic.pdf
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

November 17, 2008, 02:43:30 PM #1 Last Edit: November 17, 2008, 02:50:39 PM by gadget-evilusions
Looks awesome.

Since I see this mostly being used with single solenoid valve pneumatic props, I would think a standard program to allow a 0 to 10 second timer delay, 0 to 10 second on time, and 0 to 1 minute off delay would work good.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

Here you go:

' =========================================================================
'
'   File...... 3-Stage_Timer.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK
'              Copyright (c) 2008 EFX-TEK
'              Some Rights Reserved
'              -- see http://creativecommons.org/licenses/by/3.0/
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated... 17 NOV 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


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


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

SYMBOL  Sio             = 7                     ' SETUP = UP; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN; no ULN
SYMBOL  TrDelay         = 5                     ' no ULN
SYMBOL  OnTime          = 4                     ' no ULN
SYMBOL  OffTime         = 3                     ' no ULN
SYMBOL  YelLed          = PIN2                  ' use P2/OUT2
SYMBOL  GrnLed          = PIN1                  ' use P1/OUT1
SYMBOL  RedLed          = PIN0                  ' use P0/OUT0


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

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

SYMBOL  Yes             = 1
SYMBOL  No              = 0

SYMBOL  Baud            = OT2400                ' B/R jumper removed


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

SYMBOL  timer           = B2
SYMBOL  delay           = W5


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

Reset:
  PINS = %00000000                              ' clear all
  DIRS = %00000111                              ' set LED/control outputs


' -----[ 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

Delay_Stage:
  POT TrDelay, 100, delay                       ' raw delay 0 to 255
  delay = delay * 39                            ' convert to 0 to ~10 secs
  YelLed = IsOn
  PAUSE delay
  YelLed = IsOff

On_Stage:
  POT OnTime, 100, delay
  delay = delay * 39                            ' convert to 0 to ~10 secs
  GrnLed = IsOn
  PAUSE delay
  GrnLed = IsOff

Off_Stage:
  POT OffTime, 100, delay
  delay = delay * 235                           ' convert to 0 to ~60 secs
  RedLed = IsOn
  PAUSE delay
  RedLed = IsOff

  GOTO Main


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


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


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

youngti

Looks like from the program example you can customize the Off time, On time.  Are there maximum values for these?

JonnyMac

You can do with the board what you want -- it's all in the programming.  What we've done, essentially, is stick three Prop-Pots, three LEDs, a terminal block and a manual button onto one board.  We've labeled the board for the standard program that will go out in the ready-to-run kit (Prop-1, power-supply, EZ-3) but you can override those functions as you see fit.
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

Quote from: youngti on November 17, 2008, 03:35:12 PM
Looks like from the program example you can customize the Off time, On time.  Are there maximum values for these?

Well, since delay is on W5 I think the max value is just over 60,000, which would mean in it's current state the max would be right around 60 seconds. But you could always set up a loop if you need more than 60 seconds.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

It's alive... it's alive... it's alive!!!

Here's a photo of the first prototype -- I was up visiting John B. the other day and snapped this quick photo:



We're thinking of offering it three ways:

A) Just the EZ-3 for those that already have a Prop-1 and programming accessories

B) As a kit with a Prop-1 and power supply; the ULN will be modified and the Prop-1 pre-programmed

C) [Pro kit] Same as B, but with a PIR, long sensor cable, programming cable and BS-1 Serial adapter

Thoughts?
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Personally, I only need Option A, but I think Option C is a really cool idea!
Shawn
Scaring someone with a prop you built -- priceless!

BigRez

I too would only need option A at this time. but can see that later in the year when I'll need another prop-1, having it as an option B would be nice.

gadget-evilusions

Looks great.

All the kit options would serve a purpose. I will only be taking option A. But that's just me.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

youngti

I can see a need for all three options.  Who can't use more power supplies and buying in a kit is usually cheaper than purchasing separately.

Thanks for the pic's.

HauntedWolf

I too see promise for all 3 options...personally, I would likely only use A or B since I already have the other cables.  GREAT idea...we built from from-scratch 3 stage timers at last year's gathering...the plug and play (mostly) of this is very appealing!

Nice work!  Do you have a target price for each of the options yet?
Robert

Haunted Wolf Hollow - http://www.hauntedwolfhollow.com

JonnyMac

Not yet -- in the mad rush for TW we're confronted with other challenges at the moment; everything will be available post TW.
Jon McPhalen
EFX-TEK Hollywood Office

TheHauntStore

So I had a question on the timing.
seen below and maybe this is just a programming thing.

I wanted to have the option to have each of the three POT's have the 60 Secs value.
What I noticed is that it adds time to the 0 Seconds "ON" of each
Example:
The "POT TrDelay - delay = delay * 39" in the "off" position its on for a quick moment.
When I change it to "POT TrDelay - delay = delay * 235" in the "off" position its on for a good 2 or so seconds.

Is there a work around for giving each POT a 60Secs Max with the 0Secs being Zero or a fraction of it?
Also if we wanted the 60Secs to be longer how would a loop be tied in to a POT's Value when turning it up and down?
Lastly is there a Routine Kill Switch (like pressing the trigger button during the routine running stops the program) other that turning the Prop-1 on & off?

Thanks much,
JAy

Hope this makes some reason as I like the simplicity of this code:
Quote from: JonnyMac on November 17, 2008, 03:01:44 PM

Delay_Stage:
  POT TrDelay, 100, delay                       ' raw delay 0 to 255
  delay = delay * 39                            ' convert to 0 to ~10 secs
  YelLed = IsOn
  PAUSE delay
  YelLed = IsOff

On_Stage:
  POT OnTime, 100, delay
  delay = delay * 39                            ' convert to 0 to ~10 secs
  GrnLed = IsOn
  PAUSE delay
  GrnLed = IsOff

Off_Stage:
  POT OffTime, 100, delay
  delay = delay * 235                           ' convert to 0 to ~60 secs
  RedLed = IsOn
  PAUSE delay
  RedLed = IsOff

The Haunt Store(TM)
"Free Screams With Every Order, Upon Request"

JonnyMac

April 16, 2009, 10:54:33 AM #14 Last Edit: April 16, 2009, 10:56:24 AM by JonnyMac
You may have noticed that I posted an "standard" program in another thread that allows for an actual 0 run time, but... it requires code that's a bit more involved and an understanding of what's going on inside the Prop-1.  Here are some gritty details:

1. The 220-ohm resistor on each pin will cause POT to give you a reading between 5 and 255 (when properly scaled)
2. To get to 0 on the low end you need to subtract 5 (or whatever your low end value is), but...
3. On a given reading -- due to component variances -- you may cause a roll-under (e.g., you read 4 and then subtract 5 from it; result is -1).

Here's how to read the pot and get true 0

On_Time:
  POT AdjOnTime, 100, timer
  timer = timer - 5
  IF negFlag = No THEN Run_OT
    timer = 0


There is another specific here: we must use W0 for timer so we can detect the roll-under in BIT15 (renamed negFlag here).  If we detect a roll-under we can correct to zero.

The next step is scale 0 to 250 to 0 to 60000 which is easy:


Run_OT:
  timer = timer * 240
  OnTime = IsOn
  PAUSE timer
  OnTime = IsOff


If you wanted to be really safe you might do something like this:

Run_OT:
  timer = timer * 240
  IF timer < 500 THEN OT_Done
    OnTime = IsOn
    PAUSE timer

OT_Done:
  OnTime = IsOff


In this case the program is filtering the delay such that anything less that half a second is considered invalid and the output doesn't run.

Hope this helps.  This is what I love about embedded programming: with a little bit of code you can often solve what seem like tricky problems.
Jon McPhalen
EFX-TEK Hollywood Office