PIR Sensor with Wemos D1 Mini and Tasmota

I ordered a couple of these AM312 PIR sensors from Banggood recently, to test using them in a multi-function sensor with Tasmota. There is some good information on configuring Tasmota with these sensors, and the manual can be found here.

You can see an image of the sensor below, along with pin assignments. Thanks to the creator of this image; unfortunately I can't find the original source to offer credit, but am happy to do so if you reach out to me!



These PIR modules simply behave as a switch. To experiment, I've simply connected the OUT pin to D2 (GPIO4) on a Wemos D1 Mini module, and have configured the LED on D4 (GPIO2) on the Wemos to turn on when the PIR sensor is triggered, as a visual indicator. You can see the setup on a small breadboard here.


The configuration is Tasmota is here. Note that the LED is on D4 (GPIO2) but needs to be pulled high to turn the LED off, and pulled low to turn the LED on. Hence, the need to invert the signal using RelayXi.


And finally, here is the LED being triggered by the PIR sensor.




Comments

Popular posts from this blog

Smart Irrigation Controller with Tasmota and Home Assistant

Controlling Samsung Air Conditioner from Home Assistant