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.
-
\$\begingroup\$ In the design phase you calculate a power budget - take every single chip / display / module you have in the system, take the maximum power consumption and add together. If the system has multiple voltages it has to be done for each of them separately to size the individual regulators. This gives the pessimistic power consumption. \$\endgroup\$– filoCommented Dec 8, 2018 at 21:29
-
\$\begingroup\$ Thank you very much. I have a power supply which has outlets as 12V, 5V and 3.3 V reaching to different ICs. By multiple voltages , do you mean these voltages? Also, what do you mean by size the individual regulators? Can you please explain this. Thank you. \$\endgroup\$– MeghCommented Dec 9, 2018 at 6:50
-
\$\begingroup\$ @filo What I have inferred is that I should calculate power budget for components connected to all these supplies separately. For example power budget for all the components connected to 5V separately. Is this right? But then if this is the case then, should I simply add all of these to find the total? \$\endgroup\$– MeghCommented Dec 9, 2018 at 17:03
-
\$\begingroup\$ If the system has already been built, you can measure the power consumption during operation. If the system has not yet been built, then you can estimate the power consumption by breaking it up into subsystems. Will this system be battery powered? Are you trying to estimate how big the battery needs to be? If so, please update your question to include that information. \$\endgroup\$– user57037Commented Dec 9, 2018 at 17:49
-
1\$\begingroup\$ @mkeith I have designed a power supply unit with step down transformer and linear regulator IC. I am trying to find the power budget. The system is not buit. Thanks. \$\endgroup\$– MeghCommented Dec 9, 2018 at 19:16
1 Answer
Let's say that you have the following system (totally mock values) with multiple supplies:
3.3 V supply:
- MCU, maximum current 50 mA
- 3 x LED, maximum current 15 mA each
- Sensor A, maximum current 50 mA
5 V supply:
- Bus transceiver, maximum current 25 mA
- sensor B, maximum current 80 mA
12 V supply:
- 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:
- 3.3 V : 50 + 3*15 + 50 = 145 mA (0.4785 W)
- 5 V : 105 mA (0.525 W)
- 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:
- From the 3.3 V rail : 0.4785 W / 0.8 = ~0.6 W (that is 0.05 A)
- 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.
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.
The 3 LEDs will never be all on at the same time (again - depending on the application).
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).
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).
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).
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