November 22, 2024, 09:13:31 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.


Hangman Hookup with Prop-1

Started by kendallizm, February 18, 2008, 08:15:19 AM

Previous topic - Next topic

kendallizm

February 18, 2008, 08:15:19 AM Last Edit: February 18, 2008, 08:32:48 AM by JonnyMac
Hi All, I just stated Haunting my yard last year, what fun it was. You will have to excuse my questions if they seem elementary in nature, but this is the start of the learning curve with the automation part of my Haunt, so here goes: I presently have a Hangmen operated by a windshield wiper motor (120volt to 12volt wall transformer), I would like to have it triggered with a PIR (?) sensor as the trick or treater walks by, then it will kick for about a minute or two (a future version would also have sound) and turn off with a delay to not activate immediately. So tell me if this is how the set up would go. (1) PIR sensor to prop-1 board (2) Prop-1 to a relay setup (3) relay to a wire tied into a plug receptical for transformer, (4) transformer plugged in to supply power and activate wiper motor. Is this the correct way to utilize the prop-1? I plan on purchasing electrical components from Graingers and HomeDepot. Thanks for any input that anyone can give me.

JonnyMac

February 18, 2008, 08:32:36 AM #1 Last Edit: February 18, 2008, 09:53:49 AM by JonnyMac
Your setup sounds fine.  You could also use an RC-4 with solid-state relay to provide power to the wiper transformer.

Here's a simple Prop-1 program for the relay version (relay is connected to OUTx/V+).  The PIR is connected to P6; make sure you move the SETUP jumper to the DN position (see our docs on using the Parallax PIR sensor).

' =========================================================================
'
'   File...... Motorized_Hangman.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated... 18 FEB 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


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


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


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

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN
SYMBOL  Pir             = PIN6                  ' SETUP = DN

SYMBOL  Motor           = PIN0


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

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


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

SYMBOL  timer           = B2
SYMBOL  lottery         = W6


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

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00000001                              ' make P0 an output

  PAUSE 30000                                   ' let PIR warm up
  timer = 0                                     ' reset timer


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

Main:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Pir                       ' update timer
  IF timer < 200 THEN Main                      ' wait for 0.2 sec input

  Motor = IsOn
  PAUSE 60000                                   ' one minute
  PAUSE 30000                                   ' plus 30 secods

  GOTO Reset                                    ' reset everything


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


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


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


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



Just a note... Nobody comes to the forums to search for the phrase "Newbie Question" so please use more appropriate subject headers when you make new posts.  Also, you'll get no additional sympathy from me or anyone else for being new, so there's not point in calling yourself out!  ;D  I've edited your Subject line this time.
Jon McPhalen
EFX-TEK Hollywood Office

kendallizm

I'm not sure whether to say thank you or never post here again.

kendallizm

didn't mean to offend anyone sorry.

gadget-evilusions

Continue to post. Jon just tries to keep the forums clean, lean, and very searchable for everyone. We are all very helpful and like to help the inexperienced.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

The problem with text is friendliness sometimes doesn't come through -- even with the silly smileys.  ;D  I'm sorry that my intended friendliness did not come through my response.

By all means, do post here if you need help because we're happy to have you as a customer.  As Brian points out, I try to keep these forums usable, and we are all in this together to have fun.
Jon McPhalen
EFX-TEK Hollywood Office