Monday 3 April 2017

Capacitors are your friend - but how much of a friend?

On one hand I agree, when dealing with large momentary current draw, capacitors are your friend. This I agree with. However using this phrase without knowing the details of the circuit or limitations is just plain stupid. There comes a point of diminishing returns.

GSM applications are a great example of dealing with large currents for a short period of time. Most GSM modules can pull up to 2A for a very short period of time before dropping back down to a nominal current draw in the milli-Amp range. As the nominal current draw is in the in milli-Amp range, we don't necessarily need a power supply that can supply 2A all the time. This would be expensive and bulky. In this case, capacitors can be charged to store this energy when it is needed. This is a typical application of when the phrase "capacitors are your friend", applies.

It's not quite as simple as adding a bunch of 100uF capacitors and we should be alright. Usually when a large current draw is necessary, we get an inductor effect. The device will try pull this power, if it can't supply this power, it will caus the voltage to drop, to try and meet this current. Once the voltage drops below a certain level, our circuit, microcontrollers and other devices will stop working. We absolutely do not want this to happen.

In order to stop this from happening, we need to know three things:
  1. How much energy is needed
  2. How quickly this current draw is needed
  3. How often it is needed
How much energy is dictated by the voltage, the current and the duration of the current pulse.

How quickly we need it dictates our ESR (equivalent series resistance) of the capacitor. The larger the resistance, the slower it will provide this stored energy. It's also important to note, the lower the resistance, the more expensive the capacitor.

How often is it needed tells us if we have enough time to charge the capacitor(s) before the next current pulse. While expecting the capacitor to discharge with the current pulse, we often forget the capacitor has to charge back up again in time for the next pulse.

We also need to know what our power supply can handle as this dictates our charge time. 

The GSM modules are a great example of a case where capacitors are your friend. The 2A pulse happens only for a very short amount of time (~2ms). Using the following equation:

C = t x I / V

Where C is our capacitance, t is the duration of the spike, I is our current spike and V is the acceptable voltage drop. A greater acceptable voltage drop, will allow for a smaller capacitor. For the current, we're specifically interested in the current above what our power supply can provide. Let's assume a 500mA supply.

t = 0.002 seconds (2ms)
I = 2 Amps - 500mA = 1.5 Amps
V = 0.5 Volt

C = 0.002 x (1.5 / 0.5) = 0.006 Farads = 6mF


In the world of IoT, I'm currently working with Sigfox. While I have no problems with the European (RCZ1) products that need a 50mA pulse, it's the US/AUS/NZ (RCZ2 and RCZ4)  that need a much larger current pulse (250mA) that provide a problem

Taking the European Sigfox, a 3.6V Lithium Thionyl Chloride C Cell battery can provide up to 100mA without problems. The transmission time is a little longer at 6 seconds for 3 transmissions. I'm working with 6 seconds here as there isn't really any time for a capacitor to charge to full again in between each transmission. The following equation assumes the battery can't supply the 50mA. 

t = 6 seconds
I = 0.05 Amps
V = 0.5 Volts

C = 6 x (0.05 / 0.2) = 0.6 Farads 
(this seems large, but the battery can easily handle this, so we don't care)

Now, let's take the same battery for the US/AUS/NZ networks. The current draw is larger than what the battery can supply. The transmission time is shorter, but the current is larger. 

t = 3 seconds
I = 0.250 Amps - 0.1 Amps (supplied from the battery) = 0.15 Amps
V = 0.5 Volts

C = 3 x (0.150 / 0.5) = 0.9 Farads

We can see that we need 0.9 Farads of capacitance to ensure no more than 0.5 Volt drop over 3 seconds with a battery providing 100mA. Compare this to the GSM module, this means a capacitor 150 times larger for the Sigfox solution. I'll admit, this isn't quite what I was expecting from something that advertises itself as a low power wireless evolution. That's even assuming 0.5 volt drop is acceptable, which in most cases, it won't be. 0.2 Volt drop is more acceptable, but this increases the needed capacitance to 2.25 Farads. With an ESR below 1 ohm, this capacitor will be both large and costly to the product. 

While Capacitance is your friend, it is subject to diminishing returns. In GSM applications, capacitance will help you without affecting costs too much. In the case of US/AUS/NZ Sigfox applications, a larger battery with better current handling is necessary alongside some smaller bulk and decoupling capacitance to ensure sufficient power when you need it.