Author Topic: proximity sensor switch  (Read 2273 times)

0 Members and 1 Guest are viewing this topic.

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
proximity sensor switch
« on: July 12, 2014, 11:40:33 pm »
I'm trying to create a switch that turns on or off when a person is near.   I've been checking out proximity sensors at Adafruit. I don't know where to start when it comes to circuits. 
please help me.

Offline David Lesser

  • Administrator
  • Newbie
  • *****
  • Posts: 14
    • View Profile
Re: proximity sensor switch
« Reply #1 on: July 14, 2014, 11:58:12 am »
There are a bunch of fairly plug-and-play IR proximity sensors for security systems and such.  What parts were you looking at?

Offline leroycorbid

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: proximity sensor switch
« Reply #2 on: July 16, 2014, 02:12:14 pm »
As David said there are many cheap passive motion detectors. Can i ask what your desired endpoint is? What do you want to happen when the switch is activated. i.e. activate a buzzer, log the event, activate a camera, send an email? I have some extra motion detectors lying around if you want to play.

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #3 on: July 19, 2014, 04:12:38 pm »
Thanks for your responses leroycorbid and David.  I would have responded sooner, i thought I would get an email from the forum when someone responded. (maybe i can?)

I would like a switch to be activated when the proximity sensor detects an object about 10 to 20 inches away.  When this object is no longer in that space I would like the switch to be deactivated.  The plan with the switch is a standard 120 volt outlet so anything (that can be plugged in to a standard wall outlet) can be switched.

Ideally I would like the distance to be adjustable between say 8 and 24 inches so it can be tuned a bit.  (and it should be near instant)

I have been looking at this one http://www.adafruit.com/products/164
but don't know where to start when it comes to using that analog voltage to switch a 120 volt outlet.

any help is appreciated
Thank you



« Last Edit: July 19, 2014, 04:18:40 pm by Tommy »

Offline leroycorbid

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: proximity sensor switch
« Reply #4 on: July 19, 2014, 05:59:11 pm »
All-Righty then, I would recommend one of two paths to consider. First would be a sonic distance sensor (http://www.dx.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696?tc=USD&gclid=Cj0KEQjwrqieBRCln82Rgufz7I0BEiQAPNjAI1EI47tnsQ32RqxUmsPTUbWyJeHtXnAu6bnCHWO3YPQaAsCE8P8HAQ#.U8sSYfldXw8)
its basicly the same thing you are looking at except it would be somewhat easier to work with. this would be good if you are detecting an object approaching your target. When the object is x-distance away it will react as you wish. the drawback to both of these items is their narrow beam width. Another way to go is to use some sort of IR beam break detection. So when an object crosses a certain boundary it will signal. here is a good optionhttp://www.electronickits.com/kit/complete/elec/ck1620.htm nice thing with this option is there is no need for a microcontroller to prosess the data. Just wire it to a 120v relay. I also looked at an ultrasonic range detector with a better beam width that would work well too. It all depends on the application.

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #5 on: July 19, 2014, 06:48:01 pm »
The HC-SR04 looks great.  I would like a wider angle, maybe I could use more than one...

Whats the best way to work with this, an arduino?

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #6 on: July 19, 2014, 06:57:56 pm »
What was the ultrasonic range detector with better beam width?

(Too bad the beam sensor won't work for what i want)

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #7 on: July 20, 2014, 09:20:20 pm »
I ordered 3 of the HC-SR04 and started experimenting with an arduino diecimila i've had sitting around for years.  Very fun:D

The shipping looks like it might take a while and i would love to play with any extra sensors you have.

Offline leroycorbid

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: proximity sensor switch
« Reply #8 on: July 22, 2014, 09:45:12 pm »
Here is a link to the arduino library that controls those sensors http://playground.arduino.cc/code/ping and a tutorial here http://www.arduino.cc/en/Tutorial/Ping. Let me know if you need help with the code. I have some standard motion detectors here and your welcome to one if you want, maybe we can meet and spitball some ideas.

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #9 on: August 08, 2014, 03:36:12 pm »
Thank you.  The sensors are working good.  My soldering kit should arrive today.
What would be the best way to control a 120 volt switch?  Mostly for lights.
Would this be useful? http://www.seeedstudio.com/depot/Relay-shield-V20-p-1376.html

Offline Tommy

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: proximity sensor switch
« Reply #10 on: August 08, 2014, 06:21:29 pm »
The sensors are ok.  Not great.  They frequently don't detect people in front of them.  The small beam width is also not ideal.

Do you have any experience with IR proximity sensors?