Installing an infrared sensor into fairy lights

Using the HC-SR501 infrared sensor to automatically turn lights on and off

#Electronics#Projects

Infrared sensors are quite cheap. I bought a HC-SR501 and installed it into some normal 3V-fairy lights so they turn on and off automatically.

Components

I used
  • A HC-SR501 sensor.
  • A battery to power it. The sensor can be powered with 5V-20V.
  • A Relay. When the sensor detects something, it activates a pin and supplies power to it. But the current is way too low to power the lights. Therefore, I needed a relay that is connected to that pin. It acts as a switch: When it is activated, it closes another circuit, in which the lights are connected to a suitable power source (3V)

Setup

The construction I thought of works well.

Then, I just had to put it in a box with a cutout for the sensor and it was ready to use.

Comments

Feel free to leave your opinion or questions in the comment section below.