I built a full portable system based on Radxa Zero

After a year of working very slowly on it, I finally finished building a portable computer based on a Radxa Zero! It would not have been possible without the help of this forum for making the screen work, and explaining how to power the zero via GPIO and much more.

Here’s a full detailed writeup about it: http://ralsina.me/weblog/posts/so-i-built-a-laptop.html

1 Like

Very cool! I need to get around to posting a thread about my Zero-based handheld. You mention that the battery gauge sucks. In a previous iteration of my project I used an ADC with a voltage divider to read the battery voltage and estimate remaining charge. That’s a common “ballpark” solution but one that I found frustratingly inaccurate and unpredictable. I ended up designing a circuit around an i2c coulomb counter and it works great. Linux sees it as a native power supply so I can get accurate charge values to the percent, and charging/discharging indicators.

I was thinking of just plugging it into two GPIO pins and reading the voltage then collect some data to do estimations, but your solution sounds cool, do you have written it down somewhere?

Sure do. Here’s the schematic of the fuel gauge subcircuit:

The IC is the LTC2941. I used the MSOPO-8 package for ease of hand soldering. There’s also a 25 mΩ current sense resistor. If memory serves, this is just the typical application circuit straight from the datasheet.

You’ll see the yellow flags indicating how it fits into the rest of the circuit. At the top there’s Charger+ on the left and Battery+ on the right. These contact points basically sit between the positive terminal of the battery and whatever point on the charger the positive battery terminal would normally connect to. Then on the bottom there’s Fuel_Gauge_SCL on the left and Fuel_Gauge_SDA on the right. These are just the two i2c data lines that connect to SCL and SDA on the Radxa Zero GPIO header.

In my case I used i2c3 on pins 3 and 5. I have a device tree overlay for the LTC2941 here. I’m sorry it’s in patch format, but the important bits are at the bottom of the file and you could easily copy these into a clean .dts file.