How to add a capacitor to keep RTC running on PC Engines ALIX


ALIX is the name of a nice motherboard family designed by PC Engines to build small fanless, quiet, cheap and still powerful servers. Those motherboards are sold without battery for the RTC clock, so as soon as the power is lost, the clock is lost and at next boot, the clock will be set to Jan 1st 2000.
When working on packaging a Linux distribution for these motherboards, it is normal to encounter various boot errors and to have to power cycle the board tens of times a day. After a while, having to set the clock manually becomes irritating, and at least being able to keep it running for a few minutes would be very useful.


Since the RTC clock is known to run from very low power, I decided to experiment with a few capacitors with pretty interesting results. A 1000µF charged at 3V3 and connected to the 3V battery input is able to keep the clock running for about 30 minutes. This is more than enough for most of the power cycles I have to run through.
This capacitor will have to be charged during operation. Since the power supply does not charge the battery, a diode will have to be connected between the 3V3 power line and the capacitor. Unfortunately, a silicon diode shows an important voltage drop (0V6) which considerably reduces the efficiency of the solution.
Experiments with a germanium diode with a lower drop (0V3) connected to the 3V3 power line charges the capacitor to 3V. Another test with a silicon diode connected to the 5V power line charges the capacitor to 4V4, providing slightly increase longevity.
I finally decided that both of my 2C3 motherboards used as servers will have a 1000µF capacitor charged at 3V through a Ge diode, to power the clock for about 30 minutes. The 3C2 board which I carry everywhere with me for development and experimentation purposes will have a bigger 0.1F capacitor charged at 4V4, managing to keep the clock running for two days.

Installation on the 2C3 motherboard

Locate the power lines

 On the 2C3 motherboard, it is very easy to locate the power lines. The 3V3 is available on C172, very close to the battery connector, and a small capacitor already brings the ground even closer, basically at the distance of a capacitor, so this will be quite helpful. Click on the image on the right to get a full size view.

Identify the connection points

Here is a close-up of the work area enlightened above. The view has been rotated for easier identification. The components will be connected as indicated on the image. Click on the image to get a full size view. First, prepare the terminals with some solder. Put a drop of solder on the pin of C172 facing U12, as the diode will be connected there. Do the same on the "-" pin of C26, which is also facing U12 ; the capacitor will be connected there.

Prepare the components

Prepare a Germanium (or Schottky) diode as indicated on the image (click for a closer view). The pins must be bent several times for the diode to pass over U12 and provide a connection for the capacitor.

Then, get a 1000µF 6V3 radial capacitor, cut its pins to 8mm, and bend the positive terminal perpendicularly for horizontal soldering (not shown on the image).

Install the diode

Solder the diode first. Its anode connects to C172, on the pin facing U12, and the cathode connects to the battery's connector, in the hole designated as BT1+ (in fact it's the + terminal of battery BT1). It is important to leave the cathode exposed (not isolated), because the positive pin of the capacitor will be soldered directly on it.

Install the capacitor

Solder the negative pin of the capacitor to the negative pin of C26. Orientate it so that the positive pin joins the diode's cathode on BT1+.

Installation on the 3C2 motherboard

Install the diode

Here on this photo, the +5V is taken from the left pin of C23. The diode is not easily identifiable, it is the small black plastic thing located just above the R20 printing. Its anode is connected to the +5V via the yellow wire, and its cathode is connected to the BT1+ pin on the board.

Install the capacitor

The capacitor is what is sometimes called a "SuperCap". Its capacity is 0.1F, or 100000µF, which is 100 times the capacity of the ones used on the 2C3 motherboards. It is slightly bigger and there was no easy place to install it. I finally decided to stick it on top of the CS5536 (U11) which is approximately the same size and is perfectly flat.

Another advantage of this location is that the power line from the BT1+pin enters the CS5536 via the C38 capacitor, which provides an easy access to both the positive and negative terminals. Also, it is important to note that BT1+ is not directly connected to C38, but passes through R20 first, a 47 ohm resistor.

In the end, it is a good thing that there is a small resistor between the power supply and this capacitor. It has a very big capacity and a small internal resistance, and having R20in the path ensures that it does not pull too much power through the diode at start-up.

Connect the capacitor to C38 as on the image on the right, with the negative pin to the left ot C38 and the positive pin on the right. That's all, you're done.

Various links


How to build a cheap UPS for PC Engines ALIX


ALIX is the name of a nice motherboard family designed by PC Engines to build small fanless, quiet, cheap and still powerful servers. Those motherboards drain so little power that they can be powered by a simple 9V battery ! Typical power usage sits around 3W for a 500 MHz processor.

I recently experienced a power outage which made me realize that not having a battery backup for such servers is a shame, given how easy it is to power them. I experienced a bit with complex circuits involving MOSFETs and transistors in order to achieve the lowest power drop but finally went back to a very simple 3-component design.


Circuit diagram

The principle is very simple. The ALIX power supply delivers 18V to the motherboard. In parallel, a 9V rechargeable battery (B1) is installed in series with a current-limiting resistor (R1). The charging current is defined as the the difference between the power supply's voltage and the battery's voltage, divided by the resistor. I chose 1k5 for R1, which sets the charging current to (18-9)/1500 = 6mA.

A Zener diode installed in parallel with the battery prevents it from over-charging, by draining all the charging current when the battery is fully charged. The diode's voltage must equal the battery's full charge voltage. 9V NiCd battery packs are not 9V in reality, but 8V4 assembled from 7 1V2 batteries. Since they reach 9V6 when fully charged, I used the same value for the diode. The diode may heat a little bit depending on the charging current and the voltage. The power dissipated by the diode equals the difference between the power supply's voltage and the diode's multiplied by the current, which is (18-9.6)²/1500 = 47mW. A small 100mW diode is enough.
A low voltage drop Schottky diode is installed in the discharge path between the battery and the power line so that nearly all of the battery power goes to the motherboard during power outages. The diode has to support at least 1A of continuous current depending on how the motherboard will operate. Also, since the motherboard is equipped with a switching voltage regulator, it will drain a higher current when the battery is low. The diode I used only shows a drop of 0V2, which is quite acceptable.

Test results

My first tests show that the cheapest 120mAh battery maintains the motherboard online for about 10 minutes until the voltage drops to 7V. It requires about 24 hours for a complete charge with the 1k5 resistor. The charging rate may be increased to 10mA with a 820 ohms resistor, but above, a bigger Zener diode will be required.
I also noticed that my SpeedTouch ADSL modem uses a 9V input... I tried the same module on it. Bingo! it worked too. This means that with a few of those modules, I can maintain my network access up during short power outages.

Possible improvements

The 8V4 nominal voltage of this battery pack is very close to the low voltage limit of the motherboard (7V). This leaves a very small work margin. Other battery packs from 9V6 to 12V may be more interesting to experiment with. However, they will require a bigger Zener diode and will probably cost much more.
An interesting enhancement consists in daisy-chaining as many of such modules as there are motherboards to power. This will ensure that all power supplies are able to backup any one which would fail, and it will also optimize the offline duration of the batteries in the even that some batteries are less sollicited. In this case, it would also make sense to use a bigger battery such as a 12V/7Ah as commonly found in medium-sized UPS. Such a battery could power an ALIX motherboard for a full day!

Approximative cost

I got this 9V battery for 1 Euro, but they are generally sold around 5 Euros. There are between 1 and 2 Euros of components, including the male and female jacks. A small plastic box and a PCB to hold the battery and the connectors would be a nice improvement. What would be very nice would be if PC Engines could sell such a module as an option, just as they do with the PoE injector.

Various links