-->
Page 1 of 1

ESP8266 12E with PIR Motion Sensor

PostPosted: Mon Feb 08, 2016 11:11 am
by WinkyWalia
Hi experts

I worked with Arduino UNO little bit in the past but new to ESP8266. I have been a programmer all my life, but did not work much with circuits.

I am trying to build push notification on the cloud when PIR motion sensor triggers. For this I am using followings:

ESP8266 12E from NodeMCU
PIR Motion Sensor - HC-SR501

I updated the firmware already with Arduino IDE and setup ESP8266 lib on Arduino IDE. I tested ESP successfully with blink sketch and wrote another sketch to turn the LED on or off from the web page by making ESP an access point.

My issue is, making it work with PIR sensor, as ESP works with 3.3v and PIR works with 5v. I tried different ways but nothing worked so far. Finally I decided to use Arduino UNO R3 with ESP8266 as UNO uses 5v and that is perfect for PIR sensor. I tested the above mentioned sketches successfully after putting them together. Then I tried PIR by connecting them as follows:

Arduino UNO | ESP8266 12E NodeMcu
RX (D0) | TX
TX (D1) | RX
3.3v | 3.3v
GND | GND

Arduino | PIR
D3 | OUT
5v | VCC
GND | GND

Link I used for testing:
http://www.instructables.com/id/Arduino ... /?ALLSTEPS

I even tried to connect RX (D0) | RX and TX (D1) | TX, but no luck. To upload a sketch on ESP, I am connecting USB to it, then disconnect USB after the uploading, and power ESP from UNO to test the code.

For some reasons it is not triggering PIR. Please advice what am I doing wrong, or is there any other way I can make it work, means without using Arduino UNO. I am open for any suggestion.

Thank you very much for helping.

Winky

Re: ESP8266 12E with PIR Motion Sensor

PostPosted: Tue Feb 09, 2016 6:01 am
by eduperez
Does not answer your question but...

Have a look at the schematics at https://www.mpja.com/download/31227sc.pdf: the HC-SR501 has a 7133 regulator just after the power input, so all the circuit works at 3.3v. If you manage to bypass that regulator, you can use it with 3.3v; I believe there are instructions somewhere about how to do this.