Low Power Asterisk – 4 telephones on 3W

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
Sipura SPA-2000 5 0.46 2.3
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!

Future work

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.

This is the great thing about and software – you can modify the system to meet exactly your needs, rather than being constrained by what the manufacturer had in mind.

Now of only we had an open hardware wifi router……
pornography capturingcar porn mpgspornos caramelcaramel porn the starporn captors cardporn carebearcarey pornsites porn caribbean boys Map

11 thoughts on “Low Power Asterisk – 4 telephones on 3W”

  1. My quick calculations in a late night…

    Let us assume that an IP04 takes an average of 0.5 A during working hours. Let us make it 10 hours a day. We need 5 Ah. If we give an autonomy to the system of 4 days without sun and use 50% as maximum depth of discharge of the battery, we can use a battery of 40 Ah. In Africa we can get at least 2.5 sun peak-hours in the worse month so we need a panel that provides 2 A or 20 Wp.

  2. What would the maximum line length be for a FXS with a line voltage of 24V? Could the line voltage be made configurable so the operator could set it given the local situation?

    Here in Nepal houses in villages can be clustered or scattered around. Line lengths greater than a few hundred meters may be required.

  3. Mithro – good idea. There is also a MOSFET based DC-DC topology possible with the Si labs chips that is more efficient than the BJT version we use at the moment. I guess the next step would be a detailed power audit of all parts of the system, work out where we are burning power.

    Hemendra – good question. I think there are tables of distance/wire gauge/resistance available that let you answer this question. If the voltage to the phone gets less than around 7V, it may stop working properly. So given the loop resistance, and the current, work out the voltage drop for a given line, and set the voltage based on this. Yes it is possible to change the line voltage, just reload the driver as above in the post (say via a web-based GUI). It could even be set on a line by line basis with some driver mods.

    In some cases an even lower voltage (like 12V could be used), further saving power.

  4. You could reduce wasted power in short loops modulating battery voltage when going off-hook: just reduce the battery voltage to the point where loop current is guaranteed, slightly more to have a safe margin, while keep an higher value when on-hook, to guarantee ring and loop closure detection. This would save many Joule is the line is often off-hook and the loop is short. I do not have datasheet at hand but you should be able to read loop current with 3215.

  5. Hi David,

    I would make that power down feature optional. Some people really do want to process audio when on-hook. Land line SMS works in that way.

  6. You would expect a phone to not care about the on hook voltage too much. It seems like its only what happens when drawing 35mA (or whatever the current source for the loop is) that should matter. In practice I’ve found a lot of phones are rather quirky when attached to 24V lines. Some PBXes power the phones with 24V, on the basis that loops will always be short. Some CTI cards, like the Dialogic station cards, do too. A lot of phones act weird on these lines.

  7. Hi David,

    Maybe slightly off-topic …

    What are the key differences between Si3215 and Si3210?
    There is no DTMF detection in Si3215. So is it done is software now?


  8. Hi Bill,

    DTMF detection with Zaptel/Asterisk is always done in software. I can’t recall the differences in the two chips, maybe check out the data sheets.


  9. Hi David,

    About V_DC or VUNREG (in your schematic), it appears:
    1. User plugs in V_DC which could be anything from 5-20V? And 12V is preferable?

    2. Higher the VUNREG ( = 3.3, 5, 9 or 12V), higher the power consumption.

    3. Lower the VUNREG, larger the fluctuations in the peak/average input currents (we want to keep input and output voltage levels as close as possible). But say, the input source clamps the current usage, would this be ok?

    4. MOSFET based circuit option is better?

    5. If lower VUNREG is used (say 5V), would this help for the audio noise?
    “The Si3215 supports two enhancements to the dc-dc
    converter. The first is a multi-threshold error control
    algorithm that enables the dc-dc converter to adjust
    more quickly to voltage changes. This option is enabled
    by setting DCSU = 1 (direct Register 108, bit 5). The
    second enhancement is an audio band filter that
    removes audio band noise from the dc-dc converter
    control loop. This option is enabled by setting DCFIL = 1
    (direct Register 108, bit 1).”

Comments are closed.