November 23, 2024, 07:55:17 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.


Photocell to control Prop-1

Started by Ryanm0085, September 27, 2010, 10:50:54 AM

Previous topic - Next topic

Ryanm0085

I was trying to come up with some different methods to trigger the prop-1 sequence using break-beam sensors and push buttons.  However, our Haunted Walk Guides carry flashlights and i thought it would be very convenient for them to be able to shine the light on a photocell to activate the prop.  Right now, my trigger is a pushbutton connected to the W and R pins on PIN7 on my prop 1.  I was doing some research about the photocells and saw that most require a pulldown resistor. I was thinking about just connecting the photocell between the W and R pins and seeing what happened, but i don't want to fry anything.  All i need is a simple on and off.  It really just has to detect the light when the flashlight hits it.  Has anyone tried this or have any ideas on how to do this?  I will be hitting Radio Shack on the ride home to buy some cells and resistors and then home to see what I can come up with.

JonnyMac

Here's a circuit you might try:



Be sure to remove any SETUP jumper and ULN influence from the pin you want to use.  It works like this: when dark, a photocell has a resistance of 50K+ so the voltage sitting on the pin -- when dark -- should be something around 0.8v or less which looks like a "0" to the Prop-1.  When light shines on the photocell its resistance drops which causes the input voltage to go up; when it hits 1.5v then the Prop-1 sees it as a "1."

You can use the standard active-high input debouncing code.  I would put the photocell in the end of a tube that is painted flat-black (inside and out) to prevent stray reflections from creating false triggers.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

Perfect...this is exactly what i am looking for.  i will try it tonight and let you know how it works.   Thanks...

Ryanm0085

Hey Jonny thanks a bunch...it works perfect.  Now our tour guides can activate the props without being too obvious.  I added a switch to keep the photo cell from triggering during the day while we work and a push button for day use.