November 15, 2024, 09:56:12 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.


Prop-1 controlled Bulb Sign.

Started by clinefx1, May 30, 2007, 12:19:36 AM

Previous topic - Next topic

clinefx1

May 30, 2007, 12:19:36 AM Last Edit: May 30, 2007, 12:24:12 AM by clinefx1
Here are a few pictures of a bulb sign I recently built. It measures about 2' by 4' and weighs allot.  I used 120v incandescent bulbs and sockets.  On the controller side I used  a Prop-1 and 4 solid state relays I had laying around.  There are 4 different chase patters programmed on the Prop-1 as well as a potentiometer
circuit for speed control.

-Chris

   

JonnyMac

Nice work on all your props, Chris.
Jon McPhalen
EFX-TEK Hollywood Office


clinefx1

This is my code for my bulb sign.


' =========================================================================
'
'   File....... Secret Spot Bulb Sign
'   Purpose....
'   Author..... Chris Cline
'   E-mail..... ClineFX1@aol.com
'   Started....
'   Updated....
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================

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

' This code runs a Prop1 inside a bulb sign.  It's basicly a 4ch chase controler with a pot for speed. 


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

SYMBOL proppot       = 7
SYMBOL button1       = PIN6
SYMBOL button2       = PIN5             'Pot connection pin
SYMBOL letters       = PIN4
SYMBOL CH4           = PIN3
SYMBOL CH3           = PIN2
SYMBOL CH2           = PIN1
SYMBOL CH1           = PIN0

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

SYMBOL  Scale           = 255           'Pot scale factor
                                       
SYMBOL  IsOn            = 1
SYMBOL  IsOff           = 0


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

SYMBOL  idx             = B5
SYMBOL  potVal          = B2            ' variable for Pot value


' -----[ EEPROM Tables ]---------------------------------------------------



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

Reset:
     DIRS = %00011111                              ' P0..P4 are outputs


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

Main:

    POT PropPot, Scale, potVal            ' read the Pot

    IF BUTTON1 = isoff THEN main

    Chase_1:

    POT PropPot, Scale, potVal            ' read the Pot
    CH4 = isoff
    CH1 = ison
    PAUSE potval
    CH1 = isoff
    CH2 = ison
    PAUSE potval
    CH2 = isoff
    CH3 = ison
    PAUSE potval
    CH3 = isoff
    CH4 = ison
    PAUSE potval
    Letters = ison

    IF button2 = isoff THEN Chase_1

    CH1 = isoff
    CH2 = isoff
    CH3 = isoff
    CH4 = isoff
    letters = isoff




  Chase_2:
    IF button1 = isoff THEN  Chase_2
  CHASE_21:
    POT PropPot, Scale, potVal            ' read the Pot
    CH1 = ison
    CH2 = ison
    CH3 = ison
    CH4 = ison
   '------

    POT PropPot, Scale, potVal            ' read the Pot
    CH1 = isoff
    CH2 = ison
    CH3 = ison
    CH4 = ison
    PAUSE potval
    CH1 = ison
    CH2 = isoff
    CH3 = ison
    CH4 = ison
    PAUSE potval
    CH1 = ison
    CH2 = ison
    CH3 = isoff
    CH4 = ison
    PAUSE potval
    CH1 = ison
    CH2 = ison
    CH3 = ison
    CH4 = isoff
    PAUSE potval
    Letters = ison


  IF BUTTON2 = isoff THEN CHASE_21
    POT PropPot, Scale, potVal            ' read the Pot
    CH1 = isoff
    CH2 = isoff
    CH3 = isoff
    CH4 = isoff
    letters = isoff



Chase_3:
  IF button1 = isoff THEN Chase_3

Chase_31:

   POT PropPot, Scale, potVal            ' read the Pot
    CH1 = ison
    CH2 = ison
    CH3 = ison
    CH4 = ison
    letters = isoff
    PAUSE potval
    CH1 = isoff
    CH2 = isoff
    CH3 = isoff
    CH4 = isoff
    letters = ison
    PAUSE potval

  IF BUTTON2 = isoff THEN CHASE_31
    POT PropPot, Scale, potVal            ' read the Pot
    CH1 = isoff
    CH2 = isoff
    CH3 = isoff
    CH4 = isoff
    letters = isoff

Chase_4:
  IF button1 = isoff THEN Chase_4
Chase_41:
    CH1 = ison
    CH2 = ison
    CH3 = ison
    CH4 = ison
    letters = ison

  IF BUTTON2 = isoff THEN CHASE_41
    CH1 = isoff
    CH2 = isoff
    CH3 = isoff
    CH4 = isoff
    letters = isoff



    GOTO MAIN

JonnyMac

October 04, 2007, 10:43:28 PM #4 Last Edit: October 06, 2007, 07:02:56 AM by JonnyMac
As they say around town during awards season... for your consideration. 

I've updated your program to use programming structures that will save you typing and code space.  The original version uses 94% of the Prop-1's EEPROM (program memory); this version uses half that (43%).  When doing short sequencer type programs the LOOKUP keyword is really handy.  Also, I folded reading the pot and doing the delay into a subroutine so that you can call it from anywhere and fine-tune sequence speed while it's running.

' =========================================================================
'
'   File....... Secret_Spot_Sign.BS1
'   Purpose....
'   Author..... Chris Cline (updates by Jon Williams, EFX-TEK)
'   E-mail..... ClineFX1@aol.com
'   Started....
'   Updated....
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================

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

' This code runs a Prop-1 inside a bulb sign.  It's basically a 4-channel
' chase controller with a pot for speed.


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

SYMBOL  PropPot         = 7
SYMBOL  Start           = PIN6                  ' start current sequence
SYMBOL  Advance         = PIN5                  ' advance to next sequence
SYMBOL  Letters         = PIN4
SYMBOL  Ch4             = PIN3
SYMBOL  Ch3             = PIN2
SYMBOL  Ch2             = PIN1
SYMBOL  Ch1             = PIN0


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

SYMBOL  Scale           = 105                   ' scale for Prop-Pot

SYMBOL  IsOn            = 1
SYMBOL  IsOff           = 0


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

SYMBOL  idx             = B2
SYMBOL  potVal          = W5                    ' variable for Pot value


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

Reset:
  PINS = %00000000                              ' all outputs off
  DIRS = %00011111                              ' P0..P4 are outputs


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

Main:
  IF Start = IsOff THEN Main                    ' wait for start


Chase_1:
  FOR idx = 0 TO 3
    LOOKUP idx, (%10001, %10010, %10100, %11000), PINS
    GOSUB Speed_Delay
  NEXT
  IF Advance = IsOff THEN Chase_1


Chase_2_Wait:
  PINS = %00000000
  IF Start = IsOff THEN Chase_2_Wait

Chase_2:
  FOR idx = 0 TO 3
    LOOKUP idx, (%11110, %11101, %11011, %10111), PINS
    GOSUB Speed_Delay
  NEXT
  IF Advance = IsOff THEN Chase_2


Chase_3_Wait:
  PINS = %00000000
  IF Start = IsOff THEN Chase_3_Wait

Chase_3:
  FOR idx = 0 TO 1
    LOOKUP idx, (%01111, %10000), PINS
    GOSUB Speed_Delay
  NEXT
  IF Advance = IsOff THEN Chase_3


Chase_4_Wait:
  IF Start = IsOff THEN Chase_4

Chase_4:
  PINS = %00011111
  IF Advance = IsOff THEN Chase_4

  GOTO Main



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

Speed_Delay:
  POT PropPot, Scale, potVal                    ' raw = ~ to 255
  potVal = potVal * 4                           ' x4 = ~0 to ~1000 ms
  PAUSE potVal
  RETURN
Jon McPhalen
EFX-TEK Hollywood Office

jukingeo

Quote from: clinefx1 on May 30, 2007, 12:19:36 AM
Here are a few pictures of a bulb sign I recently built. It measures about 2' by 4' and weighs allot.  I used 120v incandescent bulbs and sockets.  On the controller side I used  a Prop-1 and 4 solid state relays I had laying around.  There are 4 different chase patters programmed on the Prop-1 as well as a potentiometer
circuit for speed control.

-Chris

Hello Chris,

I have been mostly hanging out in the BS-2 thread and it does seem you have a similar interest to me.  I too like to play with light chasers and programs.   I know I do want to do more advanced work down the road with the BS-2, but I am just learning right now.  However, I have always had a facination for light displays and chasers.  Particularly the kind you see on amusement park rides.

For the most part I have been messing around with Turbo bars and other pre-manufactured stuff.  But I would like to build light panel based on screened art design.   I have noticed you did that here.

I have noticed that you really got the spacing between your lights down pat.  Are you using some kind of jig?  What are you using to make the holes?  Did you do the screen work yourself?

Anyway, if you would like to, mosey on over to the BS-2 Thread.  Jon made me up a really good base program for me over there (it is a lot simpler, easier to follow and change around than this one.  But as Jon will tell you there is more than one way to skin the perverbial cat in Basic Stamp programming parlance).  I in turn manipulated the program and added some more features too it.  One I came up with is a way to automatically chase through all the patterns :).  You may find that interesting.

However, you may need his assistance in converting that program to the BS-1.

Geo


QPQ

Chris -

Thanks for answering my email and posting the code. I really appreciate it.

Also thanks Jon for the "condensed" version.

Looks like I'm on my way to a good project.

Ron


J Pettis

Chris,
 
    Great Work.  If you have the means I would love to see some video of your project.

jarrett

clinefx1

First off-

Thanks all for being interested. 

Second -

Thanks Jon for cleaning up my code.

Here are a few more details about my project.

I started by searching every picture i could find online for ideas.

For the letters in the center I printed out "secret spot" on a sheet of printer paper.  I then took it to Kinkos and had them do a dirty enlargement.  I then cut the letters out with a razor and traced my new stencil on a section of sheet metal.  I used a plasma cutter to remove the material and cleaned it up with an air file.  It's basically a shadow box.


Add some paint and a few leds and you get something cool to hang on the wall.

Some day I'll get some video up.


-Chris