USB PowerMeter
-
Hi, This Is my project : I want to know if my phone is plug. ( and then make some rule in my home automation)
I was thinking to buy cheap usb cord then plug it to my Arduino then plug my Arduino into usb wall plug. then if my phone is plug send "1" to my gateway
My issue is I don't know if it can be done this way, I don't know how to do it, and I don't know how to code it ...
A litre bit of help would be really cool !
Also, I have a lot of Arduino Mini pro can I use this or I need a different model ?
THANKS YOU !!
-
I'd suggest you to look at Tasker app, otherwise it could get a little complicated and if you aren't very familiar with mains power it's better to stay away from it ️
-
I already know Tasker but I have Iphones so I need another solution
-
You can make a box with an USB input and a USB socket with inside an Arduino with an Hall sensor that measures the current flowing to USB socket that is charging phone. Keep in mind that it may give some issues since iPhone is very picky about charging. The other option could be a sonoff pow that could trigger something when power used goes over a certain threshold. The problem with both is that when charge is complete the phones uses very low power so you can have hard time getting the right mininum threshold to understand if phone is actually connected to charger or not
-
You could probably hack one of these:
-
And don't forget that charging after 80% is done with pulses to make things more complicated. If I were you I'd make a dash button next to the phone charger
-
Yeah... I forgot about full charge phone ... I'm gonna try to find something else to find who is in bed and who is awake ...
-
I saw few videos about bed occupancy sensors, maybe you could take some ideas from those