Tuesday 3 May 2016

PIR Motion sensor circuit for kitchen lighting

A quick and simple little circuit but hopefully will help others out who want to achieve this. This is a little circuit I've knocked together for a friend.
The idea, he has LED downlight strips that are powered from a 5-12v DC supply. To add a clever touch to it, he'd like it when somebody walks into the kitchen the downlighters will come on and stay on whilst there is still movement (and after a delay) switch themselves off again.
* PIR sensor, from ebay which is around £3
* RELAY, from ebay again around £3-5
* BC547B NPN transistor (NOT gate), ebay around £1
* 10k resistor
* 1k resistor
* wires, casing and connectors

The circuit is very simple and will work like this. The PIR is supplied with power from the power supply constantly. When it senses movement it triggers it's middle pin and drives it LOW. (No movement and it drives it to 5v). So we connect the NPN base through the 10k resistor to the PIR signal output. Connect the collector via a 1k resistor to the +ve rail, and the emitter to ground.

The basic circuit diagram looks like this:
(The PIR is indicated by the switch to the left, and the output is connected to the relay)

And the actual components I've used look like this:

This is the small PIR with it's output going to the 10k resistor.
Above is the small relay board (It's a dual relay board, but I'm just using one). These boards are designed for Arduino and others as they are low-voltage signalling, so don't need a high current to switch the relay (They're opto-isolated). So you supply the board with +ve, ground and then the signal wire. When the signal is driven high it'll switch the relay on, and low switches it back off. The red LED indicates when the relay is energised.
At the top of the photo are the relay contacts, so centre takes the +ve feed, and the right (of the three terminals) takes the connection out to the LED downlights (normally open).

The image above shows the BC547B transistor with the 1k resistor to +ve and the connection to the relay board.
That's about all there is to it. I've contained it in a small plastic food container, and added fly leads with a DC jack socket and plug so you can simply plug it inline to the LED downlighters.

1 comment:

  1. I found those PIR modules a few months back when I was looking for something for a Raspberry Pi workshop. They are great and I've put them in other project since.


Note: only a member of this blog may post a comment.