I have a few sensors in locations near a receptacle but yet I continue to change batteries. Well no more! After reviewing several YouTube videos and doing a little research I found a small device a little smaller than a CR2 battery that converts 4-12V DC down to 3.3V DC which is the equivalent to 1 CR2 or 2 AAA batteries. I converted my first sensor today and thought I would share.
Here is a good video tutorial. I ended up getting a slightly different power module than the one mentioned in the video since this one has a higher range of input voltage. Plus it is smaller in size too.
This power supply module to down-convert the power:
https://www.amazon.com/gp/product/B01CONBSV0/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
First I hooked up a few wires to the power module that I hook up to a USB wire. I also hooked up a small wire to the positive pin of the 3.3v output so I can run it to the positive terminal of the sensor. I left the 3.3v negative pin alone as I will come to that in a bit.
I decided to put the power supply module inside my sensor where the CR2 battery would normally be. To do this I drilled a small hole to run the wire.
Next I placed the power module inside the battery slot of the sensor:
Then I put the sensor back together:
Since the 3.3V output is beside the negative terminal of the sensor, I bent that pin so it touches it. I then used the small wire coming from the positive pin and tuck it behind the input wires so it touches the positive terminal. I purposely did this so I can easily convert this sensor back to battery if I ever want to.
Then I added a few pins at the end of the wire hanging out so I can easily disconnect it from the USB wire. Then I installed the sensor back in my attic and plugged it in!
The power module has an LED on it so that is the red light you see within the sensor. That is it! No more changing batteries. I plan to do this to a few other sensors in my house as well.
In case you are interested in using the same type of male and female pins I used, here is a picture of the kit and crimper needed. I bought a kit since I have been doing other types of Arduino projects as well.
https://www.amazon.com/gp/product/B014YTPFT8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
https://www.amazon.com/gp/product/B00YGLKBSK/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1