0

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?

Trygve Laugstøl
  • 1,410
  • 2
  • 19
  • 28
  • Check out Arduino. https://en.wikipedia.org/wiki/Arduino – jippie Oct 21 '12 at 08:26
  • 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 :-). – Russell McMahon Oct 21 '12 at 08:31

1 Answers1

2

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.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915