Friday, December 25, 2009

Freerunner Battery Mod, Case Mod, Runs Android

Oklahoma was hit by the biggest snow storm in state history this Christmas. Since we were snowed in and couldn't visit relatives, I found myself with some unexpected time on my hands. So I built my own Android phone.


I bought a Neo Freerunner last year, but some design flaws kept it from being usable to me as an everyday phone: pitiful battery life, audio problems, and no single Linux distribution stood out as the one best choice to use. But the battery was the worst problem.


My previous experiments had shown that if you remove the battery monitor circuit board from the original battery:


...you can transfer it to a larger Li-Ion battery, like this one from a portable DVD player, and it will work. Surprisingly the BQ27000 chip on the smart battery board is able to learn the larger battery capacity.


Of course, I didn't let the old battery go to waste either...


The prototype battery mod worked but I needed to give the phone a bigger enclosure so the battery wouldn't have to be on the outside where it might be damaged.


Having proved the concept, I exchanged the junk DVD player battery for a brand new 6 AH Li-Ion battery from Sparkfun, and put it all into the case from a 2.5 inch portable hard drive. (To put that in perspective, the original battery was only 1100 mAH.)


Rather than try to cut the hard drive case to perfectly match the Freerunner circuit board, I simply reused the original phone faceplate since it already had the proper board mounting locations. I cut an oval hole in the hard drive case (free hand with a dremel), and then used JB Weld to join the two pieces and to even out the gaps between them. I put the JB Weld on sloppy but used a wet paper towel to wash away the excess, leaving a nice even seam all the way around. (Turns out JB Weld is water soluble - who knew!)


By the way that silver squiggle shape on the front is the cellular antenna. I ran out of room on the inside, so I put the antenna on the outside! And putting the antenna next to my cheek is a good way to extend a sarcastic "bite me" to all those idiots who argue from a position of ignorance that cell phone signals cause cancer without knowing the first thing about the physics of radio signals.


Although from the faceplate it may appear as though an entire Freerunner has been simply embedded into the new case, behind the faceplate there is nothing left of the original Freerunner case, and some components have been moved and some improvements made as I tried to rectify my main complaints about the original phone.



Here it is charging at a total rate of nearly 2 amps using both the fast charge board and the Freerunner's internal charging circuitry. No apparent harm comes of running them both at once, and the extra charger doesn't confuse the battery gas gauge chip either.


The BQ27000 learns the battery capacity by observing a complete battery discharge cycle. Unfortunately software will shut down the phone when it thinks the battery is empty, so we'll never actually reach a full discharge of the new battery to recalibrate the gas gauge! Luckily I built a battery discharge device a while back, which is really just a mess of enormous low-ohm power resistors strapped to a massive heatsink with a fan on top. And a fancy digital temperature readout so I know whether I'm actually frying my power resistors. This discharges this battery at a rate of 1 amp, which is a bit too fast, but with a 6 AH battery I could be waiting all weekend for it to discharge at "normal" current draws.


The documentation for the BQ27000 gas gauge chip mentions that it doesn't revise its capacity estimate downward more than 1/8th of the total at a time. It doesn't say anything about how the estimate gets revised upward, but experimentation with the test battery from the DVD player indicates that it caps the upward change at 1/4th of the previous estimate each time. The test battery reached 2.2 AH, so I can only expect the BQ27000 to revise the estimate up by about 0.55 AH on this cycle. It's probably not worth the trouble to work it up to the full 6 AH reading, since the process takes 12 hours and I'll be slightly damaging the battery every time I completely discharge it! Maybe when the battery is deteriorated in a few years, I'll calibrate it to whatever reduced capacity is still in it.


Not really visible in the pictures, but I removed the speakerphone (which was useless in its old location because its proximity to the microphone made it impossible to actually use speakerphone without getting a loud feedback squeal) and connected it in place of the earpiece. I thought that, because it was bigger, it would be louder than the earpiece, but instead it is much softer, nearly inaudible. I think that's because the earpiece measures as high impedance while the speakerphone speaker is low impedance, so there isn't an efficient transfer of power. Tomorrow I'll cannibalize the audio amplifier IC from that same portable DVD player I got the test battery from, and use it to fabricate a tiny audio amplifier board to drive the earpiece & match the impedances. (I can design a circuit in my head and build it on a new board as fast as I can take the components off the board I'm cannibalizing.)


That will also provide me a physical volume control so I won't have to rely on the goofy software volume settings that never seem to work right on the Freerunner. Hmmm... Maybe I'll make it stereo while I'm at it. The Neo 1971 (prototype to the Freerunner) had stereo speakers in it, but not the Freerunner. The audio amplifier chip in the DVD player is stereo, and I can pull a stereo signal from the headphone jack. Interesting...


So... Android right? Remember at the top I said that my original goal was to address some specific flaws with the Freerunner, one of which being lack of a definite distribution to stick with. I didn't actually like Android when I first tried it (still not sure about it) but it seems to be where the ball is rolling. When I began to think I wanted a Motorola Droid, and when blogs and podcasts started going crazy over the (latest) rumored Google phone, I had to stop and remember, wait a minute, I already HAVE hardware capable of running Android. It's just been sitting on my desk in pieces waiting for me to put it together.


Installing Android was a breeze; easier than any other install I've done on the Freerunner. You just untar a file onto an SD card, and then booting off the SD card prepares Android on the Freerunner. No messing around with the flashing the phone over USB, and no messing around with bootstrapping the system on the phone itself like Debian does. Just pop in the SD card and it just works. Not much else to it - except wifi doesn't work. Why does wifi never work for me on Linux? Oh well...

15 comments:

l3th0x said...

guauu..that´s awesome, if neo FreeRunner with battery weighs 133 grams ... now How much does it weigh?

Dennis said...

Pretty heavy. At least as much as a portable hard drive. But the way I look at it, the Freerunner was already too big to fit *comfortably* in a pocket, so while it's not pocketable now, it wasn't before either. I'll have to wear it in a camera case.

Anonymous said...

What's that thing under the display?

I would like to see a camera and control stick/arrow buttons/whateveritis mod. They are the things that I think FreeRunner needs. Well 3G would be nice but quite hard to do...

Anonymous said...

you probably wouldn't want to hear what the original designer(s) of gta02 FR had to criticize on this.
Thus just the shortest of the dozen remarks that came to my mind: Installing SHR on a uSD for sure is *not* more fiddling and hussle than doing same with Android.

Nevertheless a funny mod anyway.

cheers
jOERG

l3th0x said...

Hi,
Thanks for the answer! I think is a good mod, (the time when one cannot mod something, we´ll be lost..jeje)
It is great, to give things a try, with different soft && hard! And check at least, that it could be possible..jeje
Thank you so much for this!!

Levy Sant'Anna said...

Cool!

Wifi works nice with other HW and Linux, but Openmoko looks strange!

I am very interested on what you did with LiPo Fast Charger!
Could you, please, show where do I need to weld to do this work?

Thaks and good luck with your hacks!

Vasili Sviridov said...

Did they fix that weird bug when phone just starts on it's own every 30 seconds? What about the painful overall slowness due to un-accelerated video driver?

Dennis said...

Thanks everyone who took the time to read and comment on this!

@l3th0x: Thanks for the encouragement and enthusiasm!

@Anonymous1: I presume you're referring to the antenna, which I taped to the outside under the display, hahaha...

@Anonymous2: Funny you should mention because I originally had a long rant in the draft of this post where I talked about what I see as some poor design decisions on the part of the gta02/FR product team, but I decided to remove that part from the text before I posted!

@Levy: I'm not really sure why the wifi is not working for me under Android actually. On the Om2007/Om2008 distributions for the phone it would only connect once, never reconnect. Under Debian and FYP it would work but I couldn't get wpa to work. It seems like every Linux distribution for the Freerunner has different hardware glitches than the others.

@Vasili: I haven't noticed it starting on its own, but Android on the FR does seem to act weird with regard to suspending at inappropriate times. I found a developer's setting to make it never suspend if the charger is plugged in, so that should help.

Yes, the menus are painfully slow to pop up or respond. I had assumed it was a CPU use issue but you're probably right, it's probably un-accelerated video drivers. (For others reading this: sadly despite being an overall open platform the Freerunner has a GPU chip with only closed-source drivers and non-open hardware specs, so we can't even get the info on the hardware needed to write our own drivers. At least that was the state of things last I looked into it, which was over a year ago.)

buy viagra said...

great inventions and modifications friend, I congratulate you.

Unknown said...

A good battery will do your computer work without any problem. Time ago i had too much problem with my laptop and after suffer this bad moment finally i found a great battery and now it work very well. Actually i saw a site by internet called costa rica investment opportunities i think it is very interesting i want to share it for you.

ttyS2 said...

Very interesting!

It's possible to calibrate the BQ27000-Chip.

Maximum capacity is 6000 mAh.

http://e2e.ti.com/support/power_management/battery_management/f/180/t/23356.aspx

www.vbarcelone.com said...

Pretty helpful info, much thanks for the article.

Viagra said...

Thanks for this tutorial!

feitingen said...

Hi,
sorry to revisit something this old, but I'm thinking about doing a similar battery mod, just wondering how your mod is holding up?
It didn't catch fire or something yet? :P

Dennis said...

I eventually needed the battery for another project and swapped the battery's original monitor board back onto it. The battery still works, but I didn't charge it many times with the other board so I'm not sure if that proves anything.