Introduction: Motion Sensor Activated LED Strip With Timer

About: I'm a mechanical and mechatronics engineer with a PhD in robotics. In my spare time I love playing soccer and tinkering with electronics!

Hi everyone! I'm really happy to be writing another instructable right now. This project came to be when I was contacted by a fellow instructable-er(?!) (David @dducic) several months ago asking for some design help.

So here was the original spec: "I could really use some help with an under-bed lighting I'm making for my elderly parents. In a nutshell, I want to use two PIR sensors and two LED strip lights--one set for each side of the bed--that turn on when the respective PIR sensor is tripped. I'd prefer to have one power source that powers both." And from our follow up conversations: "My needs are pretty simple with the project - in a nutshell: - When either my mom or dad put their feet on the ground from the bed, it would activate a motion sensor from their respective side of the bed, turning on the lights. I envision a system that would have one sensor on each side of the bed and one LED strip underneath each side of the bed that's connected to its respective sensor. - I would like to have the lights stay on for at least 5 minutes so they have time get up, do their thing, and return to the bed with the lights still on. - Regarding the LEDs, I purchased some simple warm white lights (3000K) and don't anticipate the need to have the LEDs change color." From this, I designed and prototyped a circuit that could achieve the above specifications and David has worked on replicating the circuit on his side of the world and doing the final installation at his parents' place! Hope you all enjoy this one! Check out the attached video for my final test circuit with a timer of 12 seconds and David's final installation being activated at his parents' place.

Step 1: Gather Your Materials

Required Tools:

Soldering Iron

Wire strippers

Side cutters

Metal ruler

Hobby knife


Required Parts:

1 * 555 timer

1 * TIP 102 transistor

1 * Capacitor 5600 uF

1 * Capacitor 10 nF

1 * Resistor 10 kohm

1 * Resistor 5.1 kohm

1 * Resistor 47 kohm

1 * PIR Sensor

1 * 3 pin JST connector for sensor to board

2 * 2 pin JST connector for power to board and LED strip to board

2 * 2 pin JST connector for LED strip wiring and power wiring

7 * pre crimped JST wires (choose a length - two wires for power, two for LED strip, 3 for the PIR sensor) - or if you're handy with making your own cables and have the available connectors and crimps, make your own!

1 * Veroboard

1 * 12V single colour LED strip of your choice (e.g.

1 * 12V power supply with MALE barrel jack connector, power rating will vary depending on what LED strip and length you are using (e.g.

Wire for soldering


Heat Shrink

1* barrel jack screw terminal MALE

2 * barrel jack screw terminal FEMALE (only need one if LED strip or power supply come with one too)

Step 2: Test the LED Strip

It's good practice to test that all of your electronics work before putting everything together. So take the led strip and connect it to your power adaptor by using the provided barrel connector (if you got one with the LED strip) and hopefully the LEDs will light up. It goes without saying, but make sure that you connect positive to positive and negative to negative...

Step 3: Test the PIR Sensor

Again, testing your components before you use them in their final application is a good idea. In this step, you'll need to prepare the sensor so you can easily connect to it using the parts I listed in a previous step. The 3 pin connector that the PIR sensor comes with is different to what I normally like to use, so I would suggest replacing this by desoldering the provided wires and resoldering on the 3 pre-crimped JST ones. Then use the 3 pin JST header to locate the JST crimp side of the wires. The total assembly should look like the attached images. Note that here, BLACK is SIGNAL, BROWN is GROUND, RED is +12V.

To test the sensor, simply hook up the power and ground and use a multimeter to probe the signal pin. When triggered it should be pulled to ground. When not triggered, you should see a voltage i.e. not grounded. When you power up these types of sensors, you will need to wait a couple of seconds to allow the sensor to get a baseline reading of the still room. If anything moves after the "calibration" period, then the sensor will be triggered and the output signal pin will be low logic (grounded).

Step 4: Set Up the Circuit on a Breadboard First

Before you go ahead and solder up your prototype board, you should test everything on the breadboard. This is particularly useful so that you can choose your values of R3 and C2 which define the timer "timeout" and thus how long the LED strip will remain on for.

Some background information on how the complete circuit actually works is mostly related to the 555 timer acting as a monostable vibrator. If you are unfamiliar with the 555 timer and would like to learn more, a helpful page can be found here: which explains the different modes the 555 can work in. As I mentioned, for this circuit I have configured it in Monostable mode, which means that when a low pulse (i.e. GND) is applied to the trigger input, the output will be set to high (i.e. 12V) for the period of time specified by R3 and C2 using the equation:

time (seconds) = 1.1*R3*C2

For testing purposes, it's a good idea to select values of R3 and C2 that allow the LED strip to be on for a short period of time so you don't have to wait around forever to find out if your circuit is working correctly. In the attached video, I have configured the timer for roughly 12 seconds. In the attached circuit diagram, the timer is configured for roughly 5 minutes (time = 1.1*47 000* 0.0056 = 289 seconds).

Luckily, the PIR sensor I selected outputs a low signal (i.e. GND) when the sensor has been activated. As a result, the trigger input of the 555 timer is connected directly to the PIR sensor. At the output however, a transistor is required to switch the power on to the LED strip, since the 555 timer can only source a limited amount of current, which wouldn't be enough to drive a long length of LED strip.

Step 5: Solder Up the Circuit on a Veroboard

Take your final circuit design from the previous step and solder up the board. The only thing you really need to remember here is to cut the tracks on the back of the board where the 555 timer sits, otherwise opposite pins will be shorted, which is definitely not what you want!

Plug everything in and give the circuit a test! If all went well, your circuit should be functioning exactly the same as it did in the breadboard configuration. Check out the attached video of my final test circuit. The timer is only on for 12 seconds still which is handy for demonstrating the circuit functionality.

Step 6: Mount the LED Strip and Sensor

The original spec for this project was to have the LED strip and sensor mounted for under-bed lighting, but obviously, this can be placed wherever you think it might be handy to have timed LED lighting!

Check out David's video and a photo of the final installation under the bed at his parent's place; both he and his parents are very happy with the outcome! Final words from David about the project:

“The design for this project is very elegant, and the build is rock-solid. It has already paid dividends. A few nights ago, my Mom—who’s had some balance issues over the past few years—got out of bed and the lights went on, and she told me that if she didn’t have those lights she would have most assuredly fallen down. I hope you find this build as fun as I did, and if you have similar success stories I’d love to hear them!”

Epilog Challenge 9

Participated in the
Epilog Challenge 9