Quick Navigation All projects Hardware Links Top projects Alan numitron clock Clapclap 2313/1386 SNES Pi Webserver USB Volume/USB toys Smokey amp Laser cutter WordClock ardReveil v3 SNES Arcade cabinet Game boy projects cameleon Home Presence Detector GitHub AlanFromJapan Contact me Who's Alan? Akizukidenshi Elec-lab Rand Nerd Tut EEVblog SpritesMods AvrFreaks Gameboy Dev FLOZz' blog Switch-science Sparkfun Suzusho Datasheet Lib Reddit Elec Ermicro Carnet du maker (fr) |
Home Presence DetectorLast update: Tue Nov 28 13:28:49 2023
Upon detection of a movement nearby, turn on the light ... yes, my living room is dark and messy.
Not complicated project at all, however special care must be payed since we'll be playing with the big boys and the AC wall power. If careless, at least magical smoke, at worse a fire or frying your myocard. 20101130: well, the 2 babies I made months ago (10 months ago for the 1st version) are still perfectly working with not a single issue. Mine is still in the entrance of my appartment turning on light when I walk in, and the other one at my gf appartment turning on the light when she goes to the bathroom. Quite happy to see there are some projects I can build and have it run for months. 20111101: for the record, the version 1 made in January 2010 (soon 2 years ago) is still running just fine in my entrance. I'm quite proud yes. 2 years of electronics later, I notice that yeah, the diode before the SSR could be spared, but it would have been safer to add a resistor or better, to have a transistor drive the SSR (extensively used in Clapclap 2313). Anyway, still working so colclusion the baby has internal resistance and does not require much more than 20mA otherwise the uC would have fried long ago... lucky me! Components
Total : around 3,000 jpy. Work time : 10 days. Time to build a new one : about 1 day with the casing I would say. CodeFree of use, version of 10 feb 2010. Working fine. Only concern is a small noise, like a whistle, that is generated by the low-cost wallwart. Hopefully I can't hear it from the living room, but if you stand close to the box you can't miss it. Hard to find nice and inexpensive wallwart.HPD.c PIR Sensor - Passive Infra Red sensorVery easy to use and surprising efficient. One can find it at Sparkfun or Akizukidenshi, and for once at nearly the same price 10 $ / 800 JPY (bought mine at Akizukidenshi).On detection of a movement, the ALARM pin goes low (after a 1-2 sec of initial configuration). Since the pin goes DOWN, one must pull it UP to make sure to have appropriate reading. And by the way, beware of your pull up: make it 5v and not 9v to not fry the uC. Another thing to remember is that even if it says "works from 5v to 12v", it seems that the device works better in the 9-12 v range (according peoples comment here and there). So the circuit will have a 9v rail (wallwart direct) and a 5v (LM7805 managed). According documentation don't forget a 10 uF condensator right near the sensor, seems it likes to make waves. Wiring colors (according my cable delivered with the baby so read your own doc if you're unsure):
NOTABENE : put the pull up to the 9v or the 5v depends on your needs ! In my case it will be 5v. SSR - Solid State RelayTrigger is 3-8v and drives 240v/2A. Since I'm in Japan, power here is 110v, but let's not assume I can ride until 4A ... I don't mean to burn my appartment to the ground. I'm wandering if I should protect the relay pins (uC side) and use a optocoupler or connect it directly... Answer might cost me a uC so maybe use the "better safe than sorry" approach is better.SchemaPicturesMore pictures at the bottom of the page...
Documents and related links
Pictures (continued)
|
||||||||||
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated) electrogeek.tokyo ~ Formerly known as Kalshagar.wikispaces.com and electrogeek.cc (AlanFromJapan [2009 - 2024]) |