Go Down

Topic: Calculating power consumption of an Arduino System (Read 340 times) previous topic - next topic

petrosztn

Jul 02, 2020, 04:25 pm Last Edit: Jul 02, 2020, 04:48 pm by petrosztn Reason: Adde the [url][/url]
Hello to everyone.


I am using:

1) Arduino Mega 2560
2) 3 LEDs for typical use, 3 Resistors (330 Ω)
3) Buzzer (https://components101.com/sites/default/files/component_datasheet/Buzzer%20Datasheet.pdf)
4) NEO-6M (https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_(GPS.G6-HW-09005).pdf)
5) Relay (https://www.circuitbasics.com/wp-content/uploads/2015/11/SRD-05VDC-SL-C-Datasheet.pdf)
6) MQ3 (https://www.sparkfun.com/datasheets/Sensors/MQ-3.pdf)
7) Fingerprint reader (https://cdn-learn.adafruit.com/downloads/pdf/adafruit-optical-fingerprint-sensor.pdf)
8 ) LCD 16X2 (https://components101.com/sites/default/files/component_datasheet/16x2%20LCD%20Datasheet.pdf)
9) SIM900 (https://simcom.ee/documents/SIM900/SIM900_Hardware%20Design_V2.05.pdf)

Notes

1) Arduino Mega 2560 is connected with USB on laptop.
2) SIM900 is powered by a power supply 12V/2A.
3) NEO-6M is powered by 3.3V pin of Arduino Mega 2560.
4) LEDs are connected to Analog pins of Arduino Mega 2560.
5) All the rest components are powered by the same 5V pin of Arduino Mega 2560.
Powering all the components with the above way, the system works as I want.

What I want
1) I want to calculate the power consumption of my system (Not with multimeter, but from datasheet).
2) If I power Arduino with a 9V battery (For instance this battery: Panasonic pro power 9V - https://media.digikey.com/pdf/Data%20Sheets/Panasonic%20Batteries%20PDFS/6LR61XWA.pdf) and the SIM900 with another 9V battery, will the system work? And how long will the system lasts?


DrDiettrich

What I want
1) I want to calculate the power consumption of my system (Not with multimeter, but from datasheet).
2) If I power Arduino with a 9V battery
1) Go on, get the data sheets and calculate yourself.
2) Depending on the actual current a battery may work from a few minutes to a few hours. 9V batteries are not a good Arduino power supply.

petrosztn

1) Go on, get the data sheets and calculate yourself.
2) Depending on the actual current a battery may work from a few minutes to a few hours. 9V batteries are not a good Arduino power supply.
If i knew, I wouldn't ask forum's help.

I don't know the way and which values in datasheets should I check. Also when i find the sum of all power, what is the power of Arduino Mega 2560?

And finally, making the change and powering with batteries, how can i calculate the time that it will last.

These are my two questions, I hope somebody from here can guide me and help me.

hammy

The only real way with any certainty is to measure it. Get a cheap multimeter .

groundFungus

You could go through the data sheets and estimate the current, but I don't know how accurate that will really be.  I know that you don't want to heat it, but the best way is to actually measure the current while the project is operating.  That way you can know the maximum and average current over time.  Then you will be able to estimate how long a particular battery will last.

With the relay activated and the MQ-3 heater going, a 9V smoke alarm battery not last long at all.  Probably minutes.
You will save everyone's time if you read and follow the forum guidelines.  https://forum.arduino.cc/index.php/topic,148850.0.html

petrosztn

Thank you very much for the answers. In the datasheets, which value of current should I check? I'm really very confused with that.
Then for calculating the power of every component, I have to multiply the current with the voltage (5V) ?


Also, about the use of multimeter and measuring the current. I have to connect the multimeter as Amperemeter between component's 5V pin and the Arduino's 5V pin?

srnet

I want to calculate the power consumption of my system (Not with multimeter, but from datasheet)
I doubt that is possible in reality.

If you just look at the ATMega, you would need to look at every component in the schematic and work out how much 'power' each component would take in a specific set of circumstances which will change over time. It might just be possible to do that but a better use of time is to watch grass grow.

And the GPS 'power' consumption varies tremendously depending on how long its been on, and the quality of the fix. Perhaps with enough time you could model the actual positions of the GPS satellites in orbit and work out how that affects GPS power consumption, but I would rather watch grass grow.

Measuring current consumption would take what, 10 seconds ?

If you want a measured power consumption over time, hook up one of those cheap USB power meters.

petrosztn

Finally, I bought a multimeter and measured the currents for all components.

I have two questions.

1) With an alkaline 9V battery (For example this) and having measured the total required current, how can i calculate how long will it last? If I understand well, i can check it from the 1st & 2nd diagram on page 2 of the above datasheet. Am I right?

2) How do I measure the current for LCD 16X2? Should I measure the the current for all the pins that are connected with 5V? And then sum the currents?

3) What is the current for a 3.3V pin, 5V pin and an analog pin? (I have read different values for every case.)


DrDiettrich

Why do you bother with currents if you don't have an idea of electric basics?

Are you also concerned with the fuel consumption of a wheel of your car?

Use your DVM to measure the total current while everything is connected and your sketch is running.

For battery life divide the capacity (mAh) by the current (mA) to get the working hours (h). Divide by 2 or more for older batteries, hot weather, China ware...

sterretje

1) With an alkaline 9V battery (For example this) and having measured the total required current, how can i calculate how long will it last? If I understand well, i can check it from the 1st & 2nd diagram on page 2 of the above datasheet. Am I right?
That battery can deliver 673 mA for a maximum of an hour. So theoretically, if you draw 50 mA from it, it will last just over 13 hours. However, the curves are important as they show the voltage that the battery will supply "over time". E.g. an Arduino Uno requires a minimum of 7V on the Vin pin; once the voltage drops below that, the Arduino Uno will start misbehaving.

2) How do I measure the current for LCD 16X2? Should I measure the the current for all the pins that are connected with 5V? And then sum the currents?
In general you can ignore the input pins; they are high impedance and will load the system with a few microamps. The datasheet of the controller (usually HD44780 for a 16x2 if I'm not mistaken) will tell you; check the specification called input leakage (IIL and IIH)

3) What is the current for a 3.3V pin, 5V pin and an analog pin? (I have read different values for every case.)
Not sure if I understand; 3.3.V and 5V don't draw current, they supply. But the 3.3V is derived from the 5V so draws current from the 5V if used.

As mentioned, any pin that acts is an input is a high impedance; that also applies to the analog pins.

Hope this helps.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up