The Artima Developer Community
Sponsored Link

Python Buzz Forum
From the Archives: Fake load to keep my Xiaomi battery awake

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Aaron Brady

Posts: 576
Nickname: insommeuk
Registered: Aug, 2003

Aaron Brady is lead developer for Crestsource
From the Archives: Fake load to keep my Xiaomi battery awake Posted: Jun 26, 2016 2:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Aaron Brady.
Original Post: From the Archives: Fake load to keep my Xiaomi battery awake
Feed Title: insom.me.uk
Feed URL: http://feeds2.feedburner.com/insommeuk
Feed Description: Posts related to using Python. Some tricks and tips, observations, hacks, and the Brand New Things.
Latest Python Buzz Posts
Latest Python Buzz Posts by Aaron Brady
Latest Posts From insom.me.uk

Advertisement

This is really two very, very small hacks smushed together, but I realised I never wrote them up.

In October, I made up a nicely finished version of a hack I’ve used lots of times before: a USB-A plug to convenient 5V output. I put male and female 5V and male and female ground DuPont wires on the end and used heat-shrink tubing to make everything look less bad. The nice woven USB lead that I started with makes everything look a bit nicer, IMHO.

USB to 5V

For Christmas, I got a 5000mAh* Xiaomi battery pack. There’s an asterisk there because it’s 5000mAh at 3.7V, and the actual rating of 3300mAh at 5.1V isn’t mentioned anywhere except on the bottom of the unit itself. About 10% of the capacity of the unit is lost to the boost convertor, which seems alright to me.

Let’s call it 16Wh.

I don’t actually need to charge my phone on the go very often, my sedentary lifestyle means I move from one place where I have access to power, to another. Work, home, coffee shop, transit. But I would like a source of 5V for electronics projects that doesn’t tie me to a desk or a power outlet.

The Xiaomi charger will turn off if it detects that the device it’s charging is “full”. It appears to do this by monitoring the average current draw. My Arduino projects don’t draw enough to keep it on; damn their efficiency.

By experimentation, I found that around 90mA is sufficient to keep the charger on: I just kept trying lower and lower resistors and measuring the current draw with a multimeter until the unit steadily stayed on.

Power sink

I’m using four 220Ω 1/4W resistors in parallel, so we divide the amount of resistance to get 55Ω and then divide that into the 5.1V to get our current draw:

5.1V / (220Ω / 4) = 0.093A

Okay, that’s good enough to keep the charger on. How much heat are we dissipating by doing this?

0.093A × 5.1V = 0.47W

Half a watt! That’s hot enough to cause the current sink to be uncomfortable to touch after a while, but not dangerous, and only half of what the resistors are rated for. This is why I used four larger resistance resistors, rather fewer (or one) lower ohm ones.

I added an LED, itself protected by a current limiting resistor, just to verify when the unit is on. The 1 and 4 pins on the East side of the board are connected to the 5V and ground inputs on the West side, or I can just use the male DuPont wires to power my projects. Simple but useful.

Read: From the Archives: Fake load to keep my Xiaomi battery awake

Topic: Program 'Hello World' to an STM32F103C8, without an ST-Link Previous Topic   Next Topic Topic: Generating a Let's Encrypt certificate from a different machine

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use