嵌入式系统代写代做代考 Embedded Systems Reconfigurable computing

Reconfigurable computing

Small Embedded Systems

Unit 3.7 Battery Operation and Power Saving Modes

Battery Operation
The Ampere-hour is commonly used to specify battery capacity
Battery Capacity (Q) = I (current) * T (time)
1 Ah is equal to 3600 Coulombs.
A battery of 1 Ah capacity will drive a load of 1 A for one hour or equally 1 mA for 1000 hours (almost 6 weeks)
Typical figures
9V 500 mAh;
AAA 1000 mAh;
AA 2400 mAh;
C 6000 mAh;
D 12000 mAh

Battery capacity (mAh)
Batteries in series double voltage with same capacity
Batteries in parallel double capacity with same voltage

AAA
1000 mAh @ 1.5 V
GND
1000 mAh @ 3.0 V
GND
GND
2000 mAh @ 1.5 V

Power Saving Modes
Power consumption is important on mobile or battery powered devices.
Power saving features can be found in microcontrollers.
Common generic power modes normally supported are:
Active mode – fully functional
Idle mode – the CPU is not clocked but the peripherals are clocked
Sleep mode – both the CPU and the peripherals are not clocked
Most microcontrollers implement these, but also have a wider range of partial sleep modes

ATmega328P Power Saving Modes
Idle mode stops CPU but allows SRAM, Timer/Counters, USART, I2C and SPI interfaces to continue functioning.
Power-down mode freezes the oscillator, disabling all other chip functions until next interrupt or hardware reset.
Power-save mode allow the timer to run, while the rest of the device is sleeping.
ADC noise reduction mode stops CPU and all I/O modules to minimize switching noise during ADC conversions.
Standby mode allows the oscillator to run while the rest of the device is sleeping. This is to allows fast start-up combined with low power consumption.

Power Saving Example
This code example will put an Arduino Nano into power down mode until it is woken up by the occurrence of interrupt 0.

void go_to_sleep() {
sleep_enable();
attachInterrupt(0, wake_up, LOW);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_cpu();
}
void wake_up() {
sleep_disable();
detachInterrupt(0, wakeup, LOW);
}
#include

ESP8266 Power Saving Modes
Modem-sleep mode: CPU is operational and the Wi-Fi radios are disabled.
Light-sleep mode: CPU and peripherals sleep, but Wi-Fi is operational.
Deep-sleep mode: CPU, peripherals and WiFi sleep. Only the real time clock is functional in order to generate periodic wake-up interrupts

Battery Life Example
A simple condition monitoring system based around a PIC18F2525 microcontroller draws the following typical currents:
100 nA in sleep mode (98% of the time)
2.5 µA in idle mode (1% of the time)
20 mA in active mode (1% of the time)
Therefore, in one hour, the charge required is
(0.98 × 100 × 10-9) + (0.01 × 2.5 × 10-6) + (0.01 × 20 × 10-3)
= 2 × 10-4 Ah
This is powered by two AAA batteries in series
We could expect this to last 1000 × 10-3 / 2 × 10-4
= 5000 hours

Summary
Many simple embedded systems must operate for long periods from battery
Microcontrollers offer a range of power saving modes to save energy in quiet periods between bursts of activity

/docProps/thumbnail.jpeg