For the last few days I have been working to reduce the power consumption of the IP04 configured with FXS ports. With some simple software changes I have managed to halve the idle power from 6W to 3W with 4 FXS ports running. A bonus is that the FXS modules run much cooler, which is great for reliability and extending their life.
Power consumption is a very big deal for developing world applications – in many parts of the world electricity is the the number one problem when running IT equipment (arguably more of an issue than capital cost). In places without an electricity supply, solar electricity is used. There is a great chapter on solar power systems in the Wireless networks for the Developing World book.
The cost of a solar power system is directly proportional to the power consumption. So if we can reduce our power consumption by 50%, the size (and expense) of the panel and battery are reduced by 50%.
My specific aim is to minimise the power consumption of an IP04 Wifi “node” in the proposed Village Telco network.
Halving the IP04 power consumption
I set up an IP04 in a “worst case” configuration – 4 FXS ports. FXS ports connect directly to analog telephones and need to supply the 48V line voltage to power each phone. Each FXS port module has a DC-DC converter for this purpose. I powered the IP04 from a bench power supply that was metered for current and voltage.
I am mainly concerned with the idle power consumption, as this is how phones spend much of their time. Unless of course the phone belongs to my wife or teenage daughter. The idle power dominates the calculations for the size of the solar panel and battery and therefore the cost of the system.
After trying a few calls I noticed something odd. Just after booting, 0.31A was being used. However after I made a call, the current jumped up to 0.36A and stayed there after the call had finished! This was repeated for all ports, such that after completing a call on each port the total idle current was now 0.51A (6.1W with a 12VDC supply voltage). Huh?
After a few hours of looking at the wcfxs.c driver and the Si Labs 3215 data sheet I worked out the problem. After a call was completed, the audio circuits of the 3215 chip were being left powered up. At boot time, the audio circuits were powered down. So the driver was setting the idle state to the incorrect mode at the end of each call. We don’t need to process audio while the handset is on hook, so a one line driver mod dropped the idle current from 0.51A (6.1W) to 0.31A (3.7W).
The other refinement was to use the wcfxs drivers lowpower option, i.e if you start the driver like this:
root:~> modprobe wcfxs lowpower=1
This sets the line voltage to 24V rather than 48V, lowering the idel current to 0.25A (3W). An added benefit is that the FXS modules run much cooler, extending their life and reliability. A lower line voltage is fine for many applications. The higher voltage is really only required for very long phone lines (1000’s or meters) to overcome line resistance. You are just burning power when using a 48V line voltage for shorter lines.
Installing the new Zaptel driver on your IP04
root:~> ipkg update
root:~> ipkg remove zaptel-spi
root:~> ipkg install zaptel-spi
Edit /etc/init.d/zaptel and set LOWPOWER=1, then reboot. If you measure the voltage across a FXS port it should be 24V.
Typical power consumption
While messing with the IP04 power consumption I took the opportunity to measure a bunch of common devices used for VOIP and Wifi:
|Device||Voltage (V)||Current (A)||Power (W)|
|IP04 – no analog modules||12||0.09||1.1|
|IP04 – 4 FXS ports idle||12||0.25||3|
|IP04 – 4 FXS ports off hook||12||0.6||7.2|
|WRT54GL – running OpenWRT||12||0.21||2.5|
|Minitar Wireless AP||12||0.21||2.5|
|SipTone 2 SIP phone||12||0.2||2.4|
|1.6GHz x86 Laptop||18|
|500MHz x86 Desktop – no monitor||34|
An Asterisk IP-PBX on 1W (no analog modules) is not too shabby (beats a much less powerful WRT54). But the real win is with 4 FXS ports, just 3W. By comparison a low-end 500MHz x86 Desktop with a Digium PCI card (4 analog modules) drew 34W. So an idle power of 3W for an Asterisk IP-PBX with multiple analog ports is a great result.
My friend Alberto from IT 46 did some quick calculations that showed we could power an IP04 plus Wifi router with a 20W panel (allowing extra power for cloudy days, charging the battery etc). That means we could install a four-phone Village Telco system using just a 20W panel.
Next step – set up a solar powered IP04 in my back yard!
This work only scratched the surface on reducing power consumption. All the IP04 really needs to do while idle is provide DC to the phones, and monitor the hook state. So it might be reduce the clock of the CPU (say from 400 to 40MHz), or put it in sleep mode awaiting a hook event or an incoming Ethernet packet (e.g. an incoming VOIP call). It would also be interesting to compare different FXS chipsets on the basis of power consumption.