Introduction: DIY Motion Sensor (ESP - 8266)

This project is designed for DIY home security. This project is based off the Konnected project. Konnected brings new life to homeowners that have pre-wired motion sensors from ADT and other companies. By giving it an update with new technology while not having a monthly fee. I encourage you to check out if you want to know more.

I am a big user of the Samsung Smartthings platform and this project was design for that. One problem I had out of the gate was my house was not pre-wired. I was tempted to wire my house but that's too much work. So I designed a 3D printed case to hold the motion sensor and an ESP-8266 that was flashed with Konnected for around 8 dollars. Before we get started yes I know I could of bought a GE Z-Wave Plus Wireless Smart Sensor; but it's fun to make products, learn something new, and save a little money. I am not including the Smartthings hub in the price. I expect you to have that already setup.

Step 1: Hardware

I DO NOT endorse, represent, or receive anything at all for the examples below.

Step 2: Files and Software to Download

Programs used are for windows computers.

Step 3: Software Setup / Flashing

Flashing the firmware.

Plug in the ESP 8266 into your computer.

  • Open the nodemcu-flasher-master folder (which is in your downloads folder)
  • Select win 32 or win 64 ( depending on your computer)
  • Open the release folder and double click the ESP8266Flasher.exe

NodeMcu firmware programmer

  • In the operations tab verify the com port is correct.
  • Select the Config tab
  • Click the first gear icon
  • File explorer should of opened. Locate the konnected-firmware-X-X-X.bin file. (downloads- konnected security master -firmware)
  • Select the operations tab.
  • Click flash. The progress will be displayed near the bottom.

Wait till the flash is done before you continue.

ESPlorer -Installing the lua files.

  • Open the ESPlorer program
  • Verify the drop down box next to donate is set to 115200 -click open (it will change to close) -click the RTS button a few times till you see (Konnected Firmware)
  • Click upload near the bottom
  • File explorer will open. Locate the src folder (within the konnected security mater folder ) Press control A to select all.
  • Click open The side will tell you the progress.

Connecting to Wifi and setting up Smartthings.

I followed the instructions on the konnected website to setup Wifi and Smartthings

Step 4: Wiring

Using the wire in the description or any you might have laying around.

  • Connecting
    • Ground from the PIR to any GND on the ESP 8266
    • Output from the PIR to pin D1 on the ESP 8266
    • 5 v pin to the 3.3v on the ESP 8266 ( yes this will work)


Plug the ESP 8266 into Power, wait a couple minutes.

test it by moving in front of the sensor.

If everything worked, gently slide the electronics into the 3D printed case.

Step 5: ​Lastly My Experience 

I’m mentioning the problems/ changes I had to make in-case you run into it them.

Not detecting motion? Adjusting the sensitivity -

Going off every minute ? I had to replace the Sensor and wires.

I use a 2 Amp charging block.

After a week of use, I set up an automation in the Smartthings app for my room lights.

That’s a wrap. I hope you enjoyed the project.