Thursday, December 18, 2008

PIR motion sensing.

When we design lighting circuit, we would like to light up the LEDs only when there is somebody around. The PIR sensor is a motion sensor based on passive infrared sensor which senses infrared emitted by human body. I got the PIR Module "KC7783R" from local store, which includes the PIR sesnor and also the KC7783 motion detection IC.

The PIR module is very easy to use, it contains only 3 pins (1-Signal, 2-Vcc, 3-Gnd), where it detects somebody moving, the signal line goes high for a period of time (3 secs for example).

Here is my test circuit to drive one auto-flashing RGB Led with PIR module:

Live action:

My another demo of using PIR module, combining the use of AVRtiny13 as a timer. When it detects motion, it will light up the light bulb for 10 seconds, afterward it will go into deep sleep to save power and wait for the next interrupt send by PIR module.

Video demo:


Omar Carpio said...

yeah man this seems to be good...but where is the code to make this work???thanks

Bitartist said...

Hey, for the 1st demo video, it is only a test circuit, so no software is necessary! For the 2nd demo, I only treat the PIR sensor as external interrupt, here is the source code:"

rizvi said...

hey could you tell me what kind of transistor that is, or which one, i'm using this sensor for my electronics project but it doesn't seem to be working in my circuit, so i'm testing to see if it actually works on this kind of a circuit.

Bitartist said...

The transistor is BC337.

My circuit attached above is a working, you can reference it.

Monik said...

Hi, I used your test circuit but it didn't work )= Also I wanna asked of how many ohms are your resistences ???

Thnks !!!

Monik said...

Hi, I used your test circuit but it didn't work )= . I wanna know of how many ohms are your resistances???

Thnks !!!

Bitartist said...

I really forget the Ohms, but I remember it should be < 100 Ohms.

Gillis Construction LLC said...

How would i make the led light up longer then three seconds would i use a capacitor, what value, and the resistor value befere the transistor??? thanks