# \[HOW TO\] make Xiaomi sensors usb powered

**URL:** <https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304>\
**Category:** Tutorials\
**Created:** [January 2, 2021, 12:21pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304 "2021-01-02T12:21:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ziglar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ziglar/32/1009_2.png) [@Ziglar](https://community.homey.app/u/Ziglar)\
**Post date:** [January 2, 2021, 12:21pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/1 "2021-01-02T12:21:06Z")

</div>

Hi all,  
for a few years now i’ve been struggling with the Xiaomi sensors battery replacement and for this wanted a solution so that i’d never have to replace the battery’s again. with a little help i found what i was looking for.

first off i drilled a hole in de side of the casing:

 ![20210102_125515](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/4/946c37fc9ba97abe5c9c5c4bdb8b1a8119564c4a.jpeg)  
then i soldered the ground and the 3.3v output pin from a voltage reducer to the battery contacts: ![20210102_125607](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/4/342bd6b2982a65b72a1d86d51a9677c2a505e555.jpeg)  
Voltage reducer 4.5-24V to 3.3V : [Link](https://www.tinytronics.nl/shop/nl/componenten/spanningsregelaars/ht7533-1-3.3v-spanningsregelaar-to92)  
then i hot glued the cable and connected the - to the - of the sensor: ![20210102_125652](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/7/b75fdae31474ab3e5a36b46188ae1732817ee1b6.jpeg)  
then solder the + from the usb cable to the imput of the reducer: ![20210102_125724](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/7/0754f7afda522aa4a77938519589409342a67350.jpeg).  
now connect the usb-cable to a wall-socket/power supply and press the connect button to see it work.  
after this i used some UV-Resin to make sure the cables are not connecting when something moves(few drops) and UV glued the cable to the side of the case: ![20210102_125335](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/7/475e23d9cdd015daeb696ad368a16e5670e132ec.jpeg)

this way the battery lid can still be closed, the unit will never go into power-save, will never disconnect and reports to homey correctly.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/9/c91daf3a8b49b70aa650edf7e82bfd1c87fdfeff.png)

let me know if you have any suggestions or better ideas 🙂

kind regards  
Ziglar

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [January 2, 2021, 6:46pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/2 "2021-01-02T18:46:26Z")

</div>

Good solution!  
Maybe a capacitor could be added to bridge short power fail?

---

<div class="post-metadata">

**Author:** ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)\
**Post date:** [January 2, 2021, 10:23pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/3 "2021-01-02T22:23:44Z")

</div>

Should not be necessary if you use a standard USB cable. You can only connect it in one (the right) way.

---

<div class="post-metadata">

**Author:** ![Fire69](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fire69/32/8758_2.png) [@Fire69](https://community.homey.app/u/Fire69)\
**Post date:** [January 2, 2021, 11:04pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/4 "2021-01-02T23:04:28Z")

</div>

> [@Ziglar](#):
>
> the unit will never go into power-save, will never disconnect and reports to homey correctly.

How does the device know it’s not powered by a battery anymore?

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [January 2, 2021, 11:06pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/5 "2021-01-02T23:06:56Z")

</div>

Don’t think it does.

---

<div class="post-metadata">

**Author:** ![Otter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/otter/32/11467_2.png) [@Otter](https://community.homey.app/u/Otter)\
**Post date:** [January 3, 2021, 7:10am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/6 "2021-01-03T07:10:13Z")

</div>

Cool idea. And nice to find a workarround.  
Now you have to have access to a power source;) unscrewing the cap from a sensor one every 3 years is more trouble than all this?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 3, 2021, 7:23am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/7 "2021-01-03T07:23:41Z")

</div>

Decent quality USB chargers will do that already 🙂

---

<div class="post-metadata">

**Author:** ![Jan\_Peeters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_peeters/32/86660_2.png) [@Jan\_Peeters](https://community.homey.app/u/Jan_Peeters)\
**Post date:** [January 3, 2021, 8:14am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/8 "2021-01-03T08:14:28Z")

</div>

Great idea.  
One could probably also use:

> **[US $1.02 11% OFF|TZT CP2102 USB 2.0 to TTL UART Module 6Pin Serial Converter...](https://www.aliexpress.com/item/32713654275.html?spm=a2g0o.productlist.0.0.6fa05b738NiEXg&algo_pvid=0bef0b47-9e75-419b-ae40-79fb5ccb019d&algo_expid=0bef0b47-9e75-419b-ae40-79fb5ccb019d-2&btsid=0b0a556c16096616169223268ef10d&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)**
>
> Smarter Shopping, Better Living! Aliexpress.com

---

<div class="post-metadata">

**Author:** ![Ziglar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ziglar/32/1009_2.png) [@Ziglar](https://community.homey.app/u/Ziglar)\
**Post date:** [January 3, 2021, 12:38pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/9 "2021-01-03T12:38:22Z")

</div>

it doesnt 🙂 but since the voltage is always 3.3v and never drops the unit beleaves the battery is always 100%

---

<div class="post-metadata">

**Author:** ![Ziglar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ziglar/32/1009_2.png) [@Ziglar](https://community.homey.app/u/Ziglar)\
**Post date:** [January 3, 2021, 12:41pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/10 "2021-01-03T12:41:02Z")

</div>

if it was 3 years i wouldnt do this, in my case all of my Xiaomi sensors (11) lasts only 3weeks-\>3months.  
plus this ‘mod’ is being done within half an hour.

---

<div class="post-metadata">

**Author:** ![Ziglar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ziglar/32/1009_2.png) [@Ziglar](https://community.homey.app/u/Ziglar)\
**Post date:** [January 3, 2021, 12:44pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/11 "2021-01-03T12:44:06Z")

</div>

Yes that would also work !, but since you’d still have to drill and solder i think my mod is more ‘clean’

---

<div class="post-metadata">

**Author:** ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)\
**Post date:** [January 3, 2021, 7:15pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/12 "2021-01-03T19:15:18Z")

</div>

Strange. Even the ones in the fridges and freezers last longer than that.  
Or did you perform the 5 sec hack on those?

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [January 3, 2021, 7:23pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/13 "2021-01-03T19:23:19Z")

</div>

Motion sensors in the fridge, to check on the midnight snack? My only sensor which drains fast is the deep freeze

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 3, 2021, 7:46pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/14 "2021-01-03T19:46:00Z")

</div>

> [@PetervdK](#):
>
> Or did you perform the 5 sec hack on those?

In my experience that doesn’t really matter, all my motion sensors have that hack and their batteries have lasted for more than a year now.

---

<div class="post-metadata">

**Author:** ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)\
**Post date:** [January 3, 2021, 10:42pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/15 "2021-01-03T22:42:28Z")

</div>

Maybe I am mistaken, but I see a temp sensor in @Ziglar’s post, not a motion sensor…

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [January 3, 2021, 10:54pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/16 "2021-01-03T22:54:21Z")

</div>

Didn’t know there was a5 second hack for the temp sensors too, my bad

---

<div class="post-metadata">

**Author:** ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)\
**Post date:** [January 3, 2021, 11:12pm UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/17 "2021-01-03T23:12:20Z")

</div>

And i thought it was also for temp/hum sensors, so my bad too 😛

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [January 4, 2021, 12:02am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/18 "2021-01-04T00:02:43Z")

</div>

I cannot find any info on Aqara hacks; other than for the motion sensor…  
Can someone share a link perhaps?

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [January 4, 2021, 6:43am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/19 "2021-01-04T06:43:14Z")

</div>

Can’t imagine there is. Wouldn’t make Sense tbh. It reports in intervals and when there is a significant change.

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [January 4, 2021, 7:41am UTC](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304/20 "2021-01-04T07:41:53Z")

</div>

Agree, just curious what these hacks would be…

[Next page](https://community.homey.app/t/how-to-make-xiaomi-sensors-usb-powered/40304.md?page=2)
