November 24, 2024, 05:57:57 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


prop-2 programming question

Started by dbauer1080, October 14, 2008, 06:58:33 AM

Previous topic - Next topic

dbauer1080

Jon,

Wanted to see if this scenario is possible. I will give you more specifics soon if it is. I have a Chop Shop scene with a talking skull using a Scary Terry board and a VMusic activating the talking. In the scene is also a moving body bag. The scene goes like this:

-PIR activates Prop-2 that would start Vmusic2 file. This starts the skull talking for 15-20 seconds.
-Then prop-2 activates wiper motor in body bag through RC-4 relay
- Also the prop-2 then activates a sound chip in the body bag that starts playing  once an AC current goes through a wall wart it is attached to(sounds weird but it works. This would also be through the RC-4 too.
- In addition, a strobe light shining on the bag is activated through another relay on the RC-4.
-After the bag stops(maybe 15 seconds, prop-2 activates a second file on the VMusic to start the skull talking again for about 15 seconds.
-All the while, lights are faded in and out with an attached FC-4.

Sounds complicated, so I'm not sure if the prop-2 can handle it alone. Again, if it is possible, I would get you more exact specifics.

Thanks.

Dave

JonnyMac

I think the Prop-2 could handle that with no problem at all -- you just need to tell me about timing and how the FC-4 interacts with the rest of the scene.
Jon McPhalen
EFX-TEK Hollywood Office

dbauer1080

Thanks Jon. I will get you specifics.

dbauer1080

Jon,

The specifics for this Chop Shop routine are as follows:

A Prop-2 will activate a Vmusic2 file, which activates a talking skull through a Scary Terry board. It will also then activate a wiper motor and sound chip for a moving body bag(the sound chip is started by just running current to a wall wart). After the body bag stops shaking, the talking skull then starts again as part of the original MP3 file(this timing is built into the soundtrack). During all of this the FC-4 will fade in and out lights used in different parts of the scene. Here are the timings in minute/second format:

1) 0:00  PIR activates Prop-2 at time 0:00 to start VMusic 2 file entitled chop1.mp3. This file plays the entire scene and lasts 1:46.
2) 0:03  Fade in red light to shine on talking skull. Fade in over 3 seconds.
3) 0:23  Fade out red as blue light is faded in, each over 2 seconds. Blue will shine on some assorted body parts.
4) 0:40  Blue fade out and green fade in each over 2 seconds. Green shines on heads.
5) 1:01  Prop-2 activates wiper motor via RC-4 K1; also activates sound chip in body bag through same K1 with wall wart. Strobe light shining on body bag is
              activated via K-2 on RC-4. Blue light is faded out over 1 second.
6) 1:11  Wiper motor, strobe and sound chip all turned off via RC-4.  Red light faded in again over 2 seconds as skull starts talking again(talking already built into
              soundtrack).
7) 1:46  End of scene. Red light turned off. Delay of 2 minutes for any reactivation.

Any suggestions for connections of FC-4 and RC-4(ie. which order etc) would be helpful. My timings were derived from my SMPTE code on my audio editor; I may be able to make some adjustments for timing if needed. Please let me know if you need any more clarification. Thank you so much for your help.

JonnyMac

October 21, 2008, 02:25:44 PM #4 Last Edit: October 24, 2008, 12:58:43 PM by JonnyMac
This should get you started.  I'm pretty sure you'll have to tweak the PAUSE statements to get things is perfect sync -- it's not hard, just takes some time.

One connections.  The Sio line (P15) goes to the RC-4 and then to the FC-4 (the RC-4 must be connected to the Prop-2 to get power).  On both boards install the B/R (baud) jumper and remove the A1 (ID1) and A0 (ID0) jumpers.

Good luck.

' =========================================================================
'
'   File...... DBauer_VMusic.BS2
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'              Copyright (c) 2008 EFX-TEK
'              Some Rights Reserved
'              see: http://creativecommons.org/licenses/by/3.0/us/
'   Started...
'   Updated... 24 OCT 2008
'
'   {$STAMP BS2}
'   {$PBASIC 2.5}
'   {$PORT COM1}
'
' =========================================================================


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


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


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

Sio             PIN     15                      ' no ULN / no SETUP
Trigger         PIN     14                      ' no ULN / SETUP = DN
TX              PIN     13                      ' no ULN / SETUP = UP
RX              PIN     12                      ' no ULN / SETUP = UP


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

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

Yes             CON     1
No              CON     0

T2400           CON     396
T9600           CON     84
T19K2           CON     32
T38K4           CON     6

Inverted        CON     $4000
Open            CON     $8000
VmBaud          CON     Open + T9600            ' for VMusic
EfxBaud         CON     Open + T38K4            ' B/R jumper installed


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

timer           VAR     Byte

relays          VAR     Byte
Wiper          VAR     relays.BIT0             ' on K1
Strobe         VAR     relays.BIT1             ' on K2


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

Reset:
  PAUSE 50
  SEROUT Sio, EfxBaud, ["!!!!!RC4", %00, "X", "!FC4", %00, "X"]
  relays = %0000

  PAUSE 2250                                    ' let VMUSIC power up
  SEROUT TX, VmBaud, [CR]                       ' ping (if no power-up)
  GOSUB VM_Wait_Prompt
  GOSUB VM_Stop                                 ' stop if playing
  GOSUB VM_Wait_Prompt


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

Main:
  timer = 0
  DO WHILE (timer < 100)                        ' wait for trigger
    PAUSE 5
    timer = timer + 5 * Trigger
  LOOP

T0_00:
  SEROUT TX, VmBaud, ["VPF chop1.mp3", CR]
  GOSUB VM_Wait_Start
  PAUSE 3000

T0_03:
  ' fade in red (1)
  SEROUT Sio, EfxBaud, ["!FC4", %00, "F", 1, 0, 255, 12]
  PAUSE 20000

T0_23:
  ' fade red to blue (1 to 2)
  SEROUT Sio, EfxBaud, ["!FC4", %00, "C", 0, 1, 2, 8]
  PAUSE 17000

T0_40:
  ' fade blue to green (2 to 3)
  SEROUT Sio, EfxBaud, ["!FC4", %00, "C", 0, 2, 3, 8]
  PAUSE 21000

T1_01:
  Wiper = IsOn
  Strobe = IsOn
  SEROUT Sio, EfxBaud, ["!RC4", %00, "S", relays]
  ' fade out blue (3)
  SEROUT Sio, EfxBaud, ["!FC4", %00, "F", 3, 255, 0, 4]
  PAUSE 24000

T1_25:

  relays = %0000
  SEROUT Sio, EfxBaud, ["!RC4", %00, "S", relays]
  ' fade in red (1)
  SEROUT Sio, EfxBaud, ["!FC4", %00, "F", 1, 0, 255, 8]
  PAUSE 21000

T1_46:
  SEROUT Sio, EfxBaud, ["!FC4", %00, "X"]            ' lights out
  PAUSE 60000
  PAUSE 60000

  GOTO Main


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

VM_Wait_Prompt:
  SERIN RX, VmBaud, [WAIT(">")]
  RETURN

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

VM_Stop:
  SEROUT TX, VmBaud, ["VST", CR]
  RETURN

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

VM_Wait_Start:
  SERIN RX, VmBaud, [WAIT("T $")]
  RETURN


' -----[ User Data ]-------------------------------------------------------

Jon McPhalen
EFX-TEK Hollywood Office

dbauer1080

Jon,

I really appreciate your help. I'll try this out and let you know if there are issues. Really excited to try out the FC-4.

dbauer1080

Jon,

I have tried the program, and it is absolutely amazing. Seeing the power of the Prop-2 in full bloom when everything works as planned is unbelievable.
I think I shorted my wiper motor length though. Is there a simple tweek you can do to make it last maybe 15 seconds longer. Doesn't have to be exact, but any longer would be great. Even if it went to the end, if that's easier, fine. If you can't I certainly understand, given your time constraints.

Thank you so much for helping me create this great scene.

JonnyMac

Since I wrote to your timeline, why don't you give me a new one and I'll update from there. 
Jon McPhalen
EFX-TEK Hollywood Office

dbauer1080

Jon,

Thanks again. I've altered the timeline.



1) 0:00  PIR activates Prop-2 at time 0:00 to start VMusic 2 file entitled chop1.mp3. This file plays the entire scene and lasts 1:46.
2) 0:03  Fade in red light to shine on talking skull. Fade in over 3 seconds.
3) 0:23  Fade out red as blue light is faded in, each over 2 seconds. Blue will shine on some assorted body parts.
4) 0:40  Blue fade out and green fade in each over 2 seconds. Green shines on heads.
5) 1:01  Prop-2 activates wiper motor via RC-4 K1; also activates sound chip in body bag through same K1 with wall wart. Strobe light shining on body bag is
              activated via K-2 on RC-4. Blue light is faded out over 1 second.
6) 1:25  Wiper motor, strobe and sound chip all turned off via RC-4.  Red light faded in again over 2 seconds as skull starts talking again(talking already built into
              soundtrack).
7) 1:46  End of scene. Red light turned off. Delay of 2 minutes for any reactivation.

Thanks.


JonnyMac

See changes (marked in red) above.
Jon McPhalen
EFX-TEK Hollywood Office

dbauer1080

Jon,

Just wanted to let you know everything worked perfectly. The fading of lights with the FC-4 is definitely an impressive addition, and your program allowed a great scene to come to life. Thanks again.

JonnyMac

Glad to hear it. 

I, too, really like the RC-4.  Last week I programmed the "Oz Toxic Waste Dump" room for my friends at Rotten Apple 907 using a Prop-2 and and FC-4.  The FC-4 causes the overhead lights to flicker as if the system has bad power.  On trigger input the lights go all the way up, then fade out before the rest of the fun begins.  It was nice to seem my programming work actually operate in a haunt!
Jon McPhalen
EFX-TEK Hollywood Office