Electrical – Embedded System power requirement calculation

armdatasheetelectricalembeddedpower

How can I measure total power requirement of an embedded system which consists of a lpc2138 interfaced with various other components such as lcd, humidity sensors and temperature sensors. Also the output actions taken are through relay. There is also motor interface. I realised that we can measure total consumption after the circuit gets implemented in hardware by measuring current via multimeter but how to estimate it while in design phase? Which data sheet values are to be considered while calculating power? There are various types of currents mentioned. How do I proceed for calculations? Please help.

Best Answer

Let's say that you have the following system (totally mock values) with multiple supplies:

3.3 V supply:

  1. MCU, maximum current 50 mA
  2. 3 x LED, maximum current 15 mA each
  3. Sensor A, maximum current 50 mA

5 V supply:

  1. Bus transceiver, maximum current 25 mA
  2. sensor B, maximum current 80 mA

12 V supply:

  1. Two relays, max inrush current 200 mA, holding current 50 mA

Assuming that you have a single 230 VAC input to the device it usually makes sense to generate the highest DC voltage and regulate it further "downstream".

So the budget (for maximum current) is:

  1. 3.3 V : 50 + 3*15 + 50 = 145 mA (0.4785 W)
  2. 5 V : 105 mA (0.525 W)
  3. 12 V : 2 * 200 = 400 mA (4.8 W)

This is the worst possible power consumption on those separate rails.

Example with linear regulators

Now, if you use only linear regulators to make 3.3 and 5 V from 12V all the currents will simply add. In the worst case you have to provide at least 145 + 105 + 400 = 650 mA. It is prudent to slightly oversize the 12V supply, for example assuming 700 mA (some current will be "burned" by the linear regulators themselves).

Example with switching regulators

If you make 3.3 and 5 V from 12 V using switchers that are 80% efficient at maximum current then the loads (as seen by the 12V supply) will be:

  1. From the 3.3 V rail : 0.4785 W / 0.8 = ~0.6 W (that is 0.05 A)
  2. From the 5 V rail : 0.525 W / 0.8 = ~0.66 W (that is 0.055 A)

Add the currents (and 12V consumers) and you will get the maximum current of the 12 V rail.

Tricks

The calculations were done for the worst case consumption. You should use those values if reliability of the device is critical. However you can optimize the design using some tricks. Battery-powered systems, for example, rarely ever run at their maximum power consumption.

  1. The 12 V relays don't have to switch at once (depending on the application of course). If you can sequence them (eg. delay switching them on by 500 ms, let's say) Then you "need" just one inrush current and holding current.

  2. The 3 LEDs will never be all on at the same time (again - depending on the application).

  3. Sensor B is used for a measurement every 10 seconds and that measurement takes 100 ms (in this case the average consumption of the sensor is 0.1/10 of the maximum consumption).

  4. MCU maximum current is often provided with the assumption that all the peripherals are enabled, clocked at maximum frequencies and used at the same time. This rarely happens in practice (you don't use all of them in a single device).

  5. If the peak consumption is short enough (and somewhat predictable) you can live with a lower maximum current power supply if you provide large enough capacitance on the supply rail (capacitors will provide the "missing" current, but only up to a certain time).

  6. If the battery can not provide the maximum current the device needs - slow down the clocks and pretend nothing happened (hello Apple!).

Low power design and power optimization is a huge topic. You can read for example some articles from CMicrotek