Domain Get… again!

Another domain? You betcha!

My blog is now also accessible at http://jasongin.com. There isn’t any real different content if you follow the link; it just links to my normal domain at http://ripitapart.com.

But why another domain?

In a nutshell, it’s for the ability to register a more professional email address for work-related use (think resumes and so on). Coupled with WordPress G Suite integration, this allows me to easily create an email address that is truly unique (since a similarly named Gmail address has already been taken πŸ˜› ).

The cost isn’t too high, about $100 CAD for a year’s worth in subscription fees.

Now, for formal communication, I am reachable at jason.gin@jasongin.com but any other conversation should be directed towards my personal email, ginbot86@gmail.com.

Advertisements

Self-discharge test of Kentli PH5 1.5V Li-ion AA (Part 1)

As an extension to my previous performance analysis of Kentli’s PH5 Li-ion AA battery, I fully charged an unused PH5 and left it on my desk to self-discharge. Every now and then, a Texas Instruments bq27621-G1 fuel gauge is hooked up to the Li-ion battery terminals (in the case of the PH5, the recessed ring around the 1.5V terminal) and the bq27621’s default settings are used to measure the voltage and state of charge.

I started this test on June 18th, 2015 and will keep taking occasional measurements until the protection IC in the PH5 shuts down.

Since the 18th, the voltage dropped from 4.216 volts down to 4.192 volts as of July 6, 2015; the bq27621’s State of Charge reading remains at 100% for the time being. The voltage drop has been fairly linear so far, but I expect it to taper off as the battery discharges to the Li-ion cell’s “flat region”, and only after that do I expect the cell’s voltage to decline more rapidly.

Ramble/WordPress auto-post time: 2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

Madison Square Garden can seat 20,000 people for a concert. This blog was viewed about 66,000 times in 2014. If it were a concert at Madison Square Garden, it would take about 3 sold-out performances for that many people to see it.

Click here to see the complete report.

Ramble: Flappy Bird crash investigation

Although it’s already been pulled off the iOS App Store and the Google Play Store, I managed to get a copy of the .apk file and decided to play it on my phone. Seeing others’ experiences along with my own, I noticed there is a pattern to how the annoying little birds fly and crash.

Bird-control theory

The bird is controlled by tapping the screen, which causes the bird to move upward shortly before falling down again. Unlike other similar games, the screen needs to be periodically tapped to keep the bird in the air. This is basically pulse-density modulation at work; each tap of the screen causes a rise of a fixed amplitude and duration.

After playing over 200 rounds, I tabulated the data in a giant Excel spreadsheet, documenting the score along with how and where the bird crashed. With this data, I created a bunch of charts showing how and where crashes occur.

Charts

scorescrash typecrash locationscrash proximityBreakdown

From what I’ve collected, the majority of crashes are overshoots (the bird flies too high and hits the pipe), hitting the top pipe either to the left side or in the center. This can be attributed to the bird’s behavior when flying. When the screen is tapped, the bird moves a certain distance upwards but cannot be controlled. If the bird is too close to the pipe, an overshoot will occur and crash the bird.

I created a bunch of statistics in the spreadsheet outlining the most common crash IDs (explained in the picture) and score information (my highest was 34 πŸ™‚ )

statsWas this a good way to cure boredom? Probably, but also possibly a bit too much work given the premise of this game.

If you want a copy of the Excel spreadsheet, click the link below.

Flappy Bird Crash Data

Looking inside an iPhone 4/4S battery

A classmate of mine had a couple broken iPhones that he ‘relieved’ of their batteries and let me take a look at them. Being the curious type I peeled away the outer layers of tape to reveal the protection circuit. I spotted a current sense resistor, andΒ  that got me thinking…

… can it be? Yes, I found a bq27541 fuel gauge chip inside the battery! After fooling around with the battery, I found out that the battery is using the HDQ interface.

iphone battery pinoutThe HDQ bus, which stands for ‘High-speed Data Queue’, is a single-wire communications bus used by TI fuel gauges. It’s similar to Maxim’s 1-Wire protocol but runs with different protocols and timing. It operates at 7 kilobits per second (so much for ‘high speed’ right? πŸ˜› ) and a refresh of the data memory in the TI software can take almost half a minute. However, it’s good enough for occasional polling (like every minute or so) since it’s unlikely that the gauge will be read from every second.

The bq27541(labeled BQ 7541) in the iPhone battery runs an unusual firmware version. It’s running version 1.35 and doesn’t match with any release on TI’s website. The gas gauge is sealed so initially it seems like gaining access to the Data Flash memory would be impossible. However, in non-Apple fashion, the gauge’s passwords are left at the default; 0x36720414 and 0xFFFFFFFF for the unseal and full-access keys, respectively (and it’s not the first time Apple’s done this!). Since the firmware version is unknown, I told bqEVSW to treat the chip as if it were the bq27541-V200. I then saved only the calibration, capacity, resistance and lifetime data.

Updating the firmware over HDQ was a nightmare. It took over a dozen tries for each of the two batteries I had, and the update process took 45 minutes (!) to update the bq27541 to the V200 firmware. At one point, it seemed as if I bricked the chip, but a power-on reset of the chip by shorting the cell very quickly πŸ˜€ sent the device into ROM mode (ie. firmware-update mode). From there I used bqCONFIG to update the firmware, and it was successful! Now I could use GaugeStudio to interface with the gauge rather than the unsightly bqEVSW software.

bq27541 updated to version 2.00

bq27541 updated to version 2.00

Given how long it took for me to update the firmware of the gauge, I have doubts that iPhones will update their batteries’ firmware in-system. Hell, the iPhone OS ignores the bq27541’s State of Charge readings and substitutes its own. Nice going, Apple!

Now to start going through cell phone recycling bins to pull out dead iPhone batteries for their gauges…

Tearing down and analyzing a cheap-ass “Xtreme” $3.50 external phone battery

I was shopping around at this electronics liquidation store and stumbled upon a couple cheap buys: A “1900 mAh” external phone battery and another 4400 mAh pack (which will be the subject of another post and teardown). The batteries were originally priced at $7 and $38 respectively, but they were on sale at half price. For $3.50, I was curious enough about the 1900 mAh battery’s real capacity that I bought it anyway, expecting to be disappointed.

The pack itself is roughly half the size of a typical smartphone and about 1.5 times thicker. The casing itself has no screws; the manufacturer decided it was too expensive to use screws so they simply ultrasonic-welded the case shut. After about half an hour with a plastic spudger tool, I was able to crack the case open.

2014-01-05 00.11.26The soldering quality, surprisingly, is pretty good for a sub-$10 device, save for a bunch of hand-soldered components with flux residue left behind. The circuit board is made up of a battery protection circuit (yes, they actually put one in!), an ME2108A-50 boost converter,Β  something I’d assume to be a charging circuit, and an LM324 op-amp as a “gas gauge” (if you could even call it that!).

2014-01-05 00.11.36The cell appears to be a thicker version of a typical cell phone battery. It’s similar in size to something like a Nokia BL-5C which is a 1020 mAh cell, and is 5.6 mm thick. The cell in the charger is 7.7 mm thick. The charger’s cell is only 37.5% thicker but should have 190% of the capacity… yeah, no. This is not going to be very promising, given how the spot-welded nickel strips literally fell off the cell when I tried to desolder it from the PCB.

After soldering some 20-gauge solid wire to the terminals and hooking it up to a bq27425-G2A fuel gauge chip, I noticed that it reported that the fully-charged voltage is 4.25 volts. This charger tries to squeeze the most out of the cell by overcharging it! Granted, a Li-Ion cell’s maximum terminal voltage is 4.25 volts but it shouldn’t settle down to this voltage after charging!

1900 mah charger overvoltageAfter performing a few learning cycles to determine capacity and resistance, the cell holds merely 1370 mAh. The internal resistance is about 85 milliohms, which tells me that at least they used a relatively fresh cell in this charger and not just some recycled cell (*cough* UltraFire *cough*).

1900 mah charger graphI knew from the get-go that this battery was going to be a let-down, and I was right. But hey, for $3.50 I get a half-decent 1370 mAh cell and a few scrap chips (no way I’m reusing that battery’s PCB as-is!). But my verdict: Avoid this battery pack if you intend to use it to, I dunno, charge your phone. πŸ˜›