Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Monitor switch 20ft away?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Monitor switch 20ft away?

by grantg55 on Sun Aug 29, 2010 12:14 am

Hello, my name is Grant and before my sophomore year of high school started I embarked on a project (the largest i've ever done :) )

This is the full project (non essential info), skip this paragraph if you just want to know the simple question-
My dog can open doors. I dont know how he learned, but he's good at it! Whenever the garage door is left open, he will open the door leading into the garage and escape! He comes back, but here in Phoenix there are coyotes which attacked a dog we used to have (luckily they didn't kill him). My family decided to always make sure to close the garage so my dog doesn't escape, but always once a week it's somehow open and my dog goes for a stroll around the neighborhood...So, i'm putting a sensor in my garage to monitor if the door's open or not and to close it if needed. This sensor is an XBee, monitoring one switch for the garage door and a transistor to trigger it. The XBee also controls a transistor to turn on two lasers and two photresistors to monitor those lasers. That way when the garage is open, the lasers will monitor possible dog escapes. (If both beams are broken, it's a human. If only the lower beam is broken, it's a dog). That way, the garage door can be up and not auto shut should I be working on the pool because it will still monitor a dog escape. The other XBee is connected to my desktop comp, and I have a Java program I made to monitor and shut the garage is needed. I hope to later send updates to my phone so I can use my phone as an opener when I'm sneaking out :P.


The switch to monitor the garage door is 20ft away from the monitoring XBee. Will I have any issues monitoring it at that distance from natural wire resistance and/or noise? I'm new to this so any help is appreciated!
grantg55
 
Posts: 9
Joined: Tue Aug 03, 2010 1:27 pm

Re: Monitor switch 20ft away?

by adafruit_support_bill on Sun Aug 29, 2010 6:07 am

I assume you are using some kind of contact switch or magnetic reed switch. Resistance should not be a problem. Unless it is an unusually noisy environment, twisted-pair wiring should be sufficient.

adafruit_support_bill
 
Posts: 78163
Joined: Sat Feb 07, 2009 10:11 am

Re: Monitor switch 20ft away?

by Philly on Sun Aug 29, 2010 6:20 am

Seems like a good project you have there, lets hope the dog doesnt teach itself to jump over the lower detector ;)
Philly
 
Posts: 57
Joined: Sun Jun 20, 2010 7:53 am

Re: Monitor switch 20ft away?

by grantg55 on Mon Aug 30, 2010 1:52 am

Also, the tv-b-gone is the first experience i've had with implementing transistors, and i noticed the collector has a resistor. Why is that? How do i calculate the resistor values i would need?

My poor googling has left me with what a transistor is or what a resistor is, not combining the two so and links where i can read about this would be great!
grantg55
 
Posts: 9
Joined: Tue Aug 03, 2010 1:27 pm

Re: Monitor switch 20ft away?

by Philly on Mon Aug 30, 2010 5:10 am

In general, the base has a resistor too. It prevents the transistor drawing too much current(much like an LED). Best way to learn in buy a couple and have a go at turning LEDs on and off :)
Philly
 
Posts: 57
Joined: Sun Jun 20, 2010 7:53 am

Please be positive and constructive with your questions and comments.