0
\$\begingroup\$

I am a software developer and just started my journey in electronics side. I had this particular idea which I want to do for my project.

Problem statement: In my college every room has fans and light which is powered with normal switches. People when leaving the class don't switch off the fans and lights when leaving the classroom

Solution: I wanted to develop a software which will recognize when the classroom is empty and will switch off the lights as soon as no one is there.

It will have three components:

  1. Sensor: This will detect that there are no people in the room and send a signal to the system

  2. Software system: Which is responsible for taking in INPUT from the sensor do the processing and send either signal ON/OFF command in some form to the electrical main

  3. Main Circuit: This circuit should understand the software command and convert it to signal of some form which makes circuit switch off and switch on

MY PROBLEM:

I am not able to figure out two things.

  1. What circuit should I use which can understand a software command and convert to signal?

  2. How can this circuit switch off the power?

\$\endgroup\$
  • \$\begingroup\$ Check out Arduino. en.wikipedia.org/wiki/Arduino \$\endgroup\$ – jippie Oct 21 '12 at 8:26
  • \$\begingroup\$ Program and sensors and outputs can be divided as three subsystems. If your computer can read inputs (on/off) and send outputs (on / off) then it can accept sensor input and control lights etc. Then you "just" have to write a program :-). \$\endgroup\$ – Russell McMahon Oct 21 '12 at 8:31
2
\$\begingroup\$

For sensors, I'd look at passive infrared (PIR) detectors first. Those are triggered by warm objects like human bodies moving around. You probably need a few per classroom to cover different angles and differnt movement planes. A false positive is better than a false negative.

These things produce a analog or digital signal. These signals can be measured easily enough by a microcontroller. The microcontroller collects all the signals, in the case of analog decides whether each one is indicating motion, computes a aggregate yes/no motion value, performs some time lengthening on motion detected, and then produces a single digital output for the lights to be on or off. To turn the lights on and off from a digital output, I'd use a plain old relay. The relay can be driven from the digital output via a transistor. The output of the relay then acts just like the wall switch to turn the lights on or off.

I mentioned only briefly that the micro should time-extend the motion signal to make the lights on/off signal. This is important to keep the lights from turning off frequently when everyone is still for brief periods of time. I'd probably keep the lights on for 3-5 minutes after the last motion was detected.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.