And other portable electronic products, hemodynamic parameters gauge to be compact and slim, durable, reliable performance, and standby time is long.
Therefore, a system designed to reduce power consumption and battery life of daunting challenges. Power management module is a very important part of the system, it includes battery charger, battery testing, CPU state transitions, LCD and keypad backlight control. This article from the hardware and software design two angles to achieve these features.Large practice has proved that the system idle time total running time of a majority.
Power management is to reduce the system idle time of energy consumption, make energy efficient embedded systems to maximize the supply rate, thereby extending battery life. In order to extend battery life, in the hardware field, low-power circuit design methodology has been widely applied. However, the mere use of a low-power circuit still not enough, in system design, the use of "dynamic power management" concept, that is, the system is not in use by the component to close or enter low power mode (standby mode). In addition to a more efficient approach is to dynamically variable voltage DVS and dynamic variable frequency DFS, in run-time dynamic adjustment of the CPU frequency or voltage. So you can meet instantaneous performance, making the effective rate of energy supply.1 system design
The entire instrument design uses S3C44B0 chip and uClinux OS.
S3C44B0 chip is industry application, lower power consumption, low cost of mid-range products. It provides five kinds of work status: NORMAL, SLOW, STOP and IDLE, SL_IDLE [1]. The system works in the NORMAL state, when a user without operating window larger than a certain threshold, you go to the IDLE state, the user presses enter False shutdown, then STOP State system power consumption is very low. For ease of administration, application layer on the power management State had a fine Division, the introduction of power management in six States: data collection status, functional status, readiness, rest State, IDLE status and STOP State. Among them, the IDLE status and STOP State and chip provides the same content, the application is responsible for the status of migration. The entire instrument power is the largest component is backlight (EL backlight and keyboard LED), LCD and sensor-driven, followed by CPU, power management state migration as shown in Figure 1.Figure 1 system power management state migration
1.1 power management model
Figure 2 is a power management principle diagram, which consists of six modules: Vcore, Vio, Backup, Charge, Vdriver and Vlcd, they are part of the system.
Figure 2 system power management diagrams
Vcore-system kernel power supply voltage V 1.8; Vio is the system's i/o port power supply, power supply voltage for system Backup 3.3V; backup battery, battery voltage: 3 V; Charge the battery for charging circuit voltage of the battery; 3.6V Vdriver sensor power supply circuit, voltage ± 5 V; power for LCD module Vlcd, power supply voltage is 3 .3V and 200VCA.
Battery charging circuit principle: when the CPU detects that there is an external power supply, CPU use ADC detection voltage battery 2-side, and determine the need to charge; when the battery voltage falls below the specified value, the open circuit Charge to the battery charging current, and testing to ensure that the battery charger, safely and effectively in charge to set value to stop charging; no external power supply, battery, power supply for the entire system CPU detection, when the battery voltage falls below a set voltage, decide whether the alarm, in order to protect the battery.
Vcore and Vio respectively to the system's kernel and i/o port power supply, power supply for memory Vio.
Backup battery backup battery for the system.Provided for the sensor Vdriver ± 5 v voltage, and current 25 ± 1 mA.
Vlcd for LCD module provides two groups of voltage, V for LCD display 3.3 provide voltage, the LCD backlight 200VAC provide voltage.
1.2 driver design
1.2.1 driver interface
System hardware power management module for system power management function of providing the necessary hardware, infrastructure, and as a driver with the following programming interfaces:
¡Ô system power supply interfaces, this interface drivers and applications to know the system at this point is the battery or external power supply;
◆ Battery testing interface through this interface driver can be detected by the system of power, the application can implement the system battery display and battery alarm;
◆ Battery charge status, when the system uses an external power supply, available on the system battery, adopted this interface driver to get the battery charge status (charging or battery is full);
◆ Battery temperature detection interface through this interface driver detects the temperature of the battery, the battery temperature and battery power available to calculate the combined battery usage time, while in battery overheating (battery) alert the user when to alert the user to shut down or replace the battery.
Power management-driven part of the principal to the upper level provides the following interfaces.
(1) the battery and system electricity consumption
Read through the port ADC1 battery voltage.
Maximum voltage to lower voltage, V 4.2 3.6 V, alarm voltage 3.6 V, forcibly shutdown voltage 3.4V. A number ofAccording to voltage relationship: 1024-5 V, 0-0 V.Battery charging management consists of the hardware, but the battery charge to 4.2 v, delay 30min off charging function (application layer).
Control port is GPC1, 1 for an external power supply, 0 is on battery power.
In the system with an external power supply, the system by an external power supply.(2) battery charge control
Control port is 0 for charging GPA9,, 1 to turn off the charge, when battery power is less than 3.8 V, GPA9 is set to 0, and start charging (application layer).
5V power supply is used only for data acquisition, data collecting State closes 5 V power supply (ADC).
Control port is the GPC2, 0 is open, 1 to off.(3) false shutdown
Shut down state, just close the keyboard lights and LCD screen, but the system is still in the running state.
Close the keyboard lights, LCD, and other peripheral devices work by top software.1.2.2 program process
UClinux startup called module_init (Power_44b0_init) function, which in turn to the called power_44b0_init, related to initialize:
◆ Power0_44b0_reg_init () initialize the hardware registers;
◆ Power_44b0_device_register () register power_44b0_fops and interrupt handler function power_key_44b0_interrupt (), and initialize the timer power_down_timer;
◆ The user program by power_44b0_open () function to open/dev/power device through power_44b0_release () function frees/dev/power device through power_44b0_ioctl () function to achieve various actions on the device;
◆ Shutdown into stop mode, the interrupt handler function power_key_44b0_interrupt () handles shutdown key corresponds to the interrupt, press the down key when using power_down_timer timings, 3s, power_down_timer corresponding actions occur, power_down_timer_call () to enter the stop mode.
1.2.3 interface design and interface function
(1) data structure description
Power and device status indicated by power_status_t results.
(2) the value of the file_operations
Power management module-driven file_operations specific values are:
(3) design power_44b0_ioctl () function
Function prototype: static int power_44b0_ioctl (struct inode *, struct inode file * filp, unsigned int cmd, unsigned int arg).
Function description: the device ioctl operation function.
Parameter description: inode, the file pointer, perform an action type, according to the action type to specify a different parameter.
Return values: 0 for success, otherwise return ENOTTY.
Determine the value of the cmd, according to the different values of cmd different actions, the power supply of the main achievement of the following ioctl: 14
(4)power_key_44b0_interrupt
Function prototype: static void power_key_44b0_interrupt (int, void * dev_id irq, struct pt_regs * regs).
Function description: response to shut down key, enter the stop mode.
Parameter description: interrupt, device id, register structure.
The following describes the functions of the algorithm description.
In a normal state:
2 Summary
Instrument configuration of Ni-MH battery 2200mAh, tested, and power management module allows the entire system of 60% less power.
System in the data collection status, output current from the battery to approximately 220mA; if it is in IDLE state, the current total consumption to 80mA; in STOP State (close ARM and all equipment, maintain a 32768 Hz clock), the current can be reduced to 10mA. Experiments show that the use of dynamic power management, portable medical devices enable efficient power management.Reference documents
1 horse-Mei.
ARM embedded processor architecture and application infrastructure. Beijing: Beijing University Press, 20022 Xu Hai-yan. Embedded systems technologies and applications. Beijing: China machine press, 2002
No comments:
Post a Comment