Monday 2 December 2013

PIR and Light Sensor to LED


Using two variables to control an event, in this case turning an LED on.

Automatic light

The Plan

Using a photo resistor and a proximity sensor i want to recreate the automatic light!

Photo resistor

When placed in darkness resistance is high and vice versa.
Used in a voltage divider circuit. We analog read the pin giving a reading between 0 and 5 volts which is then assigned a digital value between 0 and 1024. A great video on voltage dividers.



a voltage divider circuit

PIR

Stands for Passive infrared sensor (HC-SR501) 

Left pot. Adjusts sensitivity,  clockwise more sensitivity and vice versa

Right pot. Controls amount of time (delay) between movement and re-trigger i.e. when set to mid point the time between is 5 seconds. This is only useful if not using a micro controller,  however when using a micro controller the delay can be programmed. A more in depth explanation on how they work here


PIR sensor

The circuit


Conclusions

A relay could be wired up and this circuit could be used to control a light with more power.


No comments:

Post a Comment