Control of LED strip via PIR sensor

How to control a led stripe via a PIR sensor

Seems an easy task, but there where some pitfalls.
For this project we needed the following parts:

Wemos D1 Mini NodeMcu
MOSFET IRF520 driver module
Aluminum Heat Sink for TO-220 MOSFET
DC-DC Buck Converter Step Down Module
HCSR501 human infrared sensor module
DHT11 Digital Temperature and Humidity Sensor
10cm 2.54mm 1pin Female to Female jumper wire Dupont cable

Put the things together

First we flash the Wemos D1 Mini NodeMcu. Then we connect the mosfet driver module via 3 dupont cables to the NodeMcu (SIG-D5, GND-G and VCC-5V).

The lua code files

init.lua

program.lua

config.lua

log.lua

light.lua

th.lua

motion.lua

web.lua

webserver.lua

webpage.lua

webpage.html

config.html

Leave a Reply

Your email address will not be published. Required fields are marked *