I have two HC-SR501 PIR's I'd like to use to detect motion and light up a 12V LED strip when motion is detected (each PIR is assigned a LED strip).
I am, however, unsure on how to hook them up to my Wemos D1 Mini. I know I can't hook up a LED strip to an output (not enough current from the WEMOS) so, for now I just hooked up 2 leds instead while my relays are on order. My circuit works as long as only one PIR is hooked up, but when the second is hooked up the ESP8266 starts behaving weird / restarting. I guess I'm drawing too much current with two PIR's?
Excuse the poor photoshop. I couldn't find any online circuit diagram tool that has an Wemos D1 / ESP8266.
Ok, so, my reasoning is I'm drawing too much current. So I figure I try this:
This way, I can later, when the relays arrive, power the LED strip from the same 12V connection and simply hook the (now) LED contacts to a relais:
I was planning to power the Wemos simply from a USB power adapter (I have enough of the (genuine) 5W Apple USB power adapters laying around).
My question is: I'm unsure if this will work. Will it? If not, what would I need to change?
Basically I want to control 2 LED strips that turn on when a PIR detects movement; there is some more logic involved but that's all software. The software will be no problem. It's the circuit I'm uncertain about.
Bonus question: maybe I can do without the USB power and hook the Wemos to the 12V too? I guess I'd need a resistor? How would I hook it up correctly?
Bonus question two: Instead of a relay, I'm pretty sure I could use a MOSFET like this one (link) too, right?
I also asked this question here.
* The actual I/O pins I've used may differ, not sure, I hope the idea gets across.