CN109239612B - Electronic device and method capable of monitoring battery capacity - Google Patents

Electronic device and method capable of monitoring battery capacity Download PDF

Info

Publication number
CN109239612B
CN109239612B CN201710556139.8A CN201710556139A CN109239612B CN 109239612 B CN109239612 B CN 109239612B CN 201710556139 A CN201710556139 A CN 201710556139A CN 109239612 B CN109239612 B CN 109239612B
Authority
CN
China
Prior art keywords
record
electronic device
power
section
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710556139.8A
Other languages
Chinese (zh)
Other versions
CN109239612A (en
Inventor
陈毓奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shencloud Technology Co Ltd
Shunda Computer Factory Co Ltd
Original Assignee
Shencloud Technology Co Ltd
Shunda Computer Factory Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shencloud Technology Co Ltd, Shunda Computer Factory Co Ltd filed Critical Shencloud Technology Co Ltd
Priority to CN201710556139.8A priority Critical patent/CN109239612B/en
Publication of CN109239612A publication Critical patent/CN109239612A/en
Application granted granted Critical
Publication of CN109239612B publication Critical patent/CN109239612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Power Sources (AREA)
  • Secondary Cells (AREA)

Abstract

An electronic device capable of monitoring battery capacity comprises a battery module, a controller, a non-volatile memory, a processing unit and a random access memory unit. The battery module is used for providing power supply, and the controller is used for detecting the residual capacity of the battery module. The non-volatile memory is used for storing the basic input and output system, and when the electronic device is started, the processing unit starts to execute the basic input and output system. When the processing unit executes the BIOS, the processing unit generates a power record according to the remaining power detected by the controller, and stores the power record in the memory segment of the RAM unit.

Description

Electronic device and method capable of monitoring battery capacity
Technical Field
The present invention relates to an electronic device capable of monitoring battery power, and more particularly, to an electronic device capable of monitoring battery power when an operating system is not operating.
Background
In addition to an external power source, most of the current electronic devices include a battery module for providing power, for example, the electronic devices such as a mobile phone, a notebook computer, a tablet computer, or a Point of Sale (POS) machine have a battery module for being portable by a user. Generally, a user needs to install an Operating System (OS) and then view the OS after the OS is started to know the power of a battery module in the electronic device. Therefore, after the manufacturer manufactures and ships the electronic device, the user cannot determine the amount of power of the battery module until the user turns on the operating system. Since the amount of power cannot be recorded during the period before the operating system is installed, even if the user finds that the amount of power of the battery module is abnormal (e.g., the amount of power is exhausted or too low) while acquiring the electronic device, it is difficult for the user and the maintenance personnel to judge whether the reason is the malfunction of the battery module or the carelessness in the production/transportation process.
In order to improve the above problems, a better power management method for managing the battery electric module is still needed.
Disclosure of Invention
The present invention is directed to an electronic device and a method for monitoring battery power, which can record the usage of a battery module after the electronic device is manufactured and shipped and before a user formally installs an operating system.
In order to solve the above technical problems, the present invention provides an electronic device capable of monitoring battery power, which includes a battery module, a controller, a non-volatile memory, a processing unit and a random access memory unit. The battery module is used for providing power to the electronic device, the controller is coupled to the battery module and used for detecting the residual capacity of the battery module, the non-volatile memory is used for storing a Basic Input Output System (BIOS), and the random access memory unit is coupled to the processing unit. The processing unit is coupled to the controller and the non-volatile memory, and when the electronic device is powered on, the processing unit executes the BIOS to generate a power record according to the remaining power detected by the controller, and stores the power record in the memory segment of the RAM unit.
Preferably, the memory segment includes a first segment for storing the current power record of the power source and a second segment for storing the previous power record of the power source. In some preferred embodiments, the processing unit moves the data in the first sector to the second sector of the memory sector before executing the bios to store the power record in the first sector of the memory sector, so as to prevent the previous power record from being overwritten.
Preferably, the processing unit further comprises a real-time clock unit for generating the time signal. In addition, after the processing unit obtains the residual capacity detected by the controller, the processing unit executes the BIOS to generate a time record according to the time signal, and stores the time record in the first section of the machine access memory unit. Furthermore, before the processing unit executes the bios to store the current power-on record and the time record of the boot-up in the first memory segment of the ram unit, the processing unit first moves the data in the first segment of the memory segment to the second segment of the memory segment to avoid the previous power record and the current time being overwritten. Wherein the first section and the second section do not overlap. In some preferred embodiments, the first and second sections of the memory section are contiguous memory sections.
Preferably, the electronic device capable of monitoring the battery capacity further includes a capacity recording program code, and the processing unit is capable of executing the capacity recording program code to read the capacity record of the first memory section. Similarly, the processing unit can also execute the power record program code to read the power record of the second memory segment.
To solve the above technical problem, the present invention further provides a method for monitoring battery power, which is applicable to an electronic device, wherein the electronic device includes a battery module, a controller, a real-time clock unit, a processing unit and a random access memory unit, and when the electronic device is powered on, the processing unit executes a basic input/output system to perform the following steps:
generating a time signal through the real-time clock unit;
generating a time record according to the time signal;
obtaining a remaining capacity of the battery module through the controller;
generating a power record and a time record according to the time signal and the remaining power;
moving data in a first sector of the RAM cells to a second sector of the RAM cells; and
storing the power record and the time record of the current power-on in the first section of the memory section,
the first section is used for storing the electric quantity record and the time record of the current startup, and the second section is used for storing the electric quantity record and the time record of the previous startup.
Compared with the prior art, once the electronic device is powered on and started, the basic input and output system is started to execute the program, the starting time of each time and the residual electric quantity of the battery module are stored in the random access memory unit, and a user can still judge the use condition of the battery module through the record in the random access memory unit. In addition, by the method of the invention, even if the electronic device is not provided with an Operating System (OS), all the startup time and the electric quantity records can be stored in the random access memory unit in the mode of the invention, so that the use condition of the battery module can be recorded after the electronic device is manufactured and shipped and before a user formally installs the operating system. For example, after the electronic device leaves the factory, if the user does not start the electronic device and install the operating system, the battery module has no electric quantity, and the user or the maintenance personnel can still judge whether the electric quantity of the battery module is exhausted due to the error startup of the electronic device by accessing the data in the random access memory unit, so as to judge whether the production or transportation process of the electronic device is lost, and further improve the loss.
[ description of the drawings ]
Other features and advantages of the present invention will become apparent from the following detailed description of the preferred embodiments with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of an electronic device capable of monitoring battery power according to an embodiment of the invention.
FIG. 2 is a diagram illustrating a data capture frame of a random access memory cell according to an embodiment of the invention.
FIG. 3 is a flowchart illustrating the operation of the electronic device capable of monitoring the battery level according to the embodiment of FIG. 1.
[ detailed description ] embodiments
The embodiments or examples shown in the figures are expressed in a particular manner as set forth below. It is to be understood that the embodiment or examples are not to be construed as limiting. Any alterations and modifications in the described embodiments, and any further applications of the principles of the invention as described herein are contemplated as would normally occur to one skilled in the art to which the invention relates.
Fig. 1 is a diagram illustrating an electronic device 100 capable of monitoring battery power according to an embodiment of the invention. As shown in fig. 1, the electronic device 100 includes a Basic Input Output System (BIOS)110, a processing unit 120, a random access memory unit 130, a controller 140, and a battery module 150. The electronic device 100 may be a notebook computer, a tablet computer, or a Point of Sale (POS) station, which may be powered by a battery module. In some embodiments, the bios 110 is stored in a non-volatile memory, such as an Electrically Erasable Programmable Read Only Memory (EEPROM) or a Flash memory (Flash memory), and the memory storing the bios 110 is connected to the processing unit 120, and once the electronic device 100 is booted, the processing unit 120 starts to execute the bios 110 to perform the initialization, detect hardware, and boot the operating system. The processing unit 120 may be a System on Chip (System on Chip), wherein in an embodiment of the invention, the processing unit 120 further includes a Real-time clock (RTC) unit 122 for generating a time signal to provide the System of the electronic device 100 with a current time.
A random access memory unit 130 (e.g., a CMOS RAM) is connected to the processing unit 120, and the random access memory unit 130 is mainly used for storing data such as system status, hardware characteristics, configuration values or parameters of the electronic device 100. In some embodiments of the present invention, the ram unit 130 may reserve at least a portion of the memory segments for storing the power records of the battery module 150, for example, the ram unit 130 may include a plurality of memory segments for storing the power records of the battery module 150, and each memory segment is used for storing a single power record. In addition, a record of the amount of power in the memory segment may include time (e.g., time when the amount of power of the battery module is recorded or detected) and the amount of power (e.g., percentage of remaining power of the battery module). For example, one byte of the memory segment is used to store the remaining power percentage (0-100%), and two bytes are used to store the date (month/day), it should be understood that the form, format and display of the power record can be changed according to the requirement, but not limited thereto.
In some embodiments of the present invention, the processing unit 120 may obtain the power records in the ram unit 130 by executing a read power record program code (not shown) that includes addresses of memory sectors of the ram unit 130 for storing the power records, so as to instruct the processing unit 120 to obtain data of the memory sectors for the user to view. In some embodiments, when the user wants to view the power record, the user may execute a corresponding tool in an extensible firmware interface Shell (EFI Shell) after the electronic device 100 is powered on to retrieve the data stored in the ram unit 130, and may accordingly display the screen as shown in fig. 2 for the user to view. In the embodiment of fig. 2, the ram unit 130 has a memory segment of 0x70 to 0x78 for storing power records, and is divided into three memory segments A, B, C for storing a power record. For the memory segment A, the first two bytes "10" 14 "are used to record the date, which represents that the boot record is available for 14 days in 10 months, and the last byte" 0D "records the percentage of the power by 16-bit, which represents that the power is 13% at that time. In addition, the record of the memory segment B indicates that the computer is powered on for 14 days in 10 months and the power is 6%, and the record of the memory segment C indicates that the computer is powered on for 13 days in 10 months and the power is 53%. In some embodiments of the present invention, the controller 140 may be an embedded power controller, which is connected to the battery module 150 and is mainly used for monitoring and managing the battery module 150, for example, detecting the remaining power of the battery module 150, and the battery module 150 is used for supplying power to part or all of the electronic device 100.
The following describes an operation flow of the electronic device for monitoring battery power according to the present invention with reference to fig. 3 and fig. 1. First, in step S302, when the electronic device 100 is booted and turned on, the processing unit 120 starts to execute the bios 110. Next, in step S304, the processing unit 120 shifts (Shift) data in the memory segment of the ram unit 130 for storing the power records. For example, if the ram unit 130 has three memory segments A, B, C (as shown in fig. 2) reserved for storing the power records, the processing unit 120 can move the power records originally stored in the memory segment a to the memory segment B and move the power records originally stored in the memory segment B to the memory segment C, thereby freeing the memory segment a to store the latest power record, so that the ram unit 130 can continuously store the latest three power records in this embodiment. It should be appreciated that since memory segment A, B, C is a continuous memory segment, processing unit 120 can directly translate and overlay data in memory segment A, B onto memory segment B, C at the same time in step S304.
In other embodiments, the processing unit 120 may directly search the memory segment for storing the power records in step S304 without moving the original data until all the reserved segments are occupied, and then perform data overwriting from the beginning, for example, in step S304, the processing unit 120 may sequentially select the memory segment A, B, C to store the power records of each time, and overwrite the latest power record from the memory segment a from the beginning after the memory segment A, B, C stores the power records, so that the ram 130 continuously stores the latest three power records. It should be understood that the above examples are for convenience of illustration only and are not intended to limit the present invention, and any variation in the number of memory sectors or the selection order should be included in the present invention.
Next, in step S306, the processing unit 120 determines the remaining capacity of the battery module 150 through the controller 140. Specifically, the processing unit 120 first transmits a request for detecting the power level to the controller 140, and the controller 140 detects the remaining power level of the battery module 150 according to the request and transmits the detected result back to the processing unit 120.
Next, in step S308, the processing unit 120 determines the current time through the real-time clock unit 122, for example, the processing unit 120 generates time data indicating the current time according to the time signal of the real-time clock unit 122. Finally, in step S310, the record of the processing unit 120 corresponding to the current time and the remaining capacity of the battery module 150 is written into the memory interval selected in step S304.
It should be noted that the above steps are performed by the processing unit 120 executing the bios 110 through the processing unit 120, in other words, the above steps are performed by the processing unit 120 according to the program code of the bios 110. In addition, the sequence of steps S304, S306, and S308 is not limited to the above embodiment, and in other embodiments, the sequence may be arbitrarily changed, or performed simultaneously.
In summary, once the electronic device 100 is powered on and powered on, the bios 110 is executed to perform the above-mentioned procedure, the time for powering on and the remaining power of the battery module 150 are stored in the ram unit 130, and the user can still determine the usage of the battery module 150 through the record in the ram unit 130. In addition, even though the electronic device 100 does not have an Operating System (OS) installed, the method of the present invention can still record all the booting time and power consumption in the ram unit 130, so that the electronic device 100 can record the usage of the battery module 150 after being manufactured and shipped until the user formally installs the OS. For example, after the electronic device 100 leaves the factory, if the user does not start the electronic device 100 and install the operating system, and the battery module 150 has no electric quantity, the user or the maintenance personnel can still determine whether the electric quantity of the battery module 150 is exhausted due to the false boot of the electronic device 100 by accessing the data in the random access memory unit 130, so as to determine whether the production or transportation process of the electronic device is lost, thereby improving the loss.
The methods of the present invention, or certain aspects or portions thereof, may take the form of program code. The program code may be embodied in tangible media, such as floppy diskettes, cd-roms, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine thereby becomes an apparatus for practicing the invention. The program code may also be transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. When implemented in a general-purpose processing unit, the program code combines with the processing unit to provide a unique apparatus that operates analogously to specific logic circuits.
While the present invention has been described with reference to preferred embodiments, it is to be understood that the above disclosure is not intended to limit the embodiments of the invention. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Furthermore, the appended claims are to be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.

Claims (8)

1. An electronic device capable of monitoring battery power, comprising:
a battery module for providing power to the electronic device;
a controller coupled to the battery module for detecting a remaining capacity of the battery module;
a non-volatile memory for storing a basic input/output system;
a processing unit coupled to the controller and the non-volatile memory, for executing the BIOS when the electronic device is powered on; and
a random access memory unit coupled to the processing unit,
when the electronic device is powered on, the processing unit executes the BIOS to generate an electric quantity record according to the remaining electric quantity detected by the controller, and stores the electric quantity record in a memory section of the RAM unit, wherein the memory section comprises a first section and a second section, the first section is used for storing the electric quantity record of the current power on, and the second section is used for storing the electric quantity record of the previous power on; and
the processing unit executes the BIOS to store the power record of the current boot in the first section of the memory section, and the processing unit moves the data in the first section to the second section of the memory section.
2. The electronic device of claim 1, wherein the processing unit further comprises a real-time clock unit for generating a time signal.
3. The electronic device as claimed in claim 2, wherein the processing unit further executes the bios to generate a time record according to the time signal after acquiring the remaining power detected by the controller, and stores the time record in the memory segment of the ram unit.
4. The electronic device as claimed in claim 3, wherein the processing unit executes the BIOS to store the power record and the time record of the current power-on in front of the first section of the memory section and to move the data in the first section to the second section of the memory section.
5. The electronic device according to claim 4, wherein the first section and the second section of the memory section do not overlap.
6. The electronic device of claim 5, wherein the first segment and the second segment are consecutive memory segments.
7. The electronic device of claim 1, further comprising a power record reading program code, wherein the processing unit executes the power record program code to read the power record of the first memory segment.
8. A method for monitoring battery capacity is suitable for an electronic device, wherein the electronic device comprises a battery module, a controller, a real-time clock unit, a processing unit and a random access memory unit, and is characterized in that the electronic device is not provided with an operating system, and when the electronic device is started, the processing unit executes a basic input and output system to perform the following steps:
generating a time signal through the real-time clock unit;
generating a time record according to the time signal;
obtaining a remaining capacity of the battery module through the controller;
generating a power record and a time record according to the time signal and the remaining power;
moving data in a first sector of the RAM cells to a second sector of the RAM cells; and
storing the power record and the time record of the current power-on in the first section of the memory section,
the first section is used for storing the electric quantity record and the time record of the current startup, and the second section is used for storing the electric quantity record and the time record of the previous startup.
CN201710556139.8A 2017-07-10 2017-07-10 Electronic device and method capable of monitoring battery capacity Active CN109239612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710556139.8A CN109239612B (en) 2017-07-10 2017-07-10 Electronic device and method capable of monitoring battery capacity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710556139.8A CN109239612B (en) 2017-07-10 2017-07-10 Electronic device and method capable of monitoring battery capacity

Publications (2)

Publication Number Publication Date
CN109239612A CN109239612A (en) 2019-01-18
CN109239612B true CN109239612B (en) 2021-08-13

Family

ID=65082909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710556139.8A Active CN109239612B (en) 2017-07-10 2017-07-10 Electronic device and method capable of monitoring battery capacity

Country Status (1)

Country Link
CN (1) CN109239612B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503102A (en) * 2002-11-25 2004-06-09 神基科技股份有限公司 Method for accessing battery state by operation system of portable computer
CN101860048A (en) * 2010-04-13 2010-10-13 韩竞科 Black box for lithium power battery
CN104869235A (en) * 2015-04-27 2015-08-26 广东欧珀移动通信有限公司 Method, device and system for preventing error starting-up and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1094177A (en) * 1996-09-13 1998-04-10 Canon Inc Charger for rechargeable battery
CN101477178A (en) * 2009-02-06 2009-07-08 上海华勤通讯技术有限公司 Detection method and detection system for battery service time
CN106357903A (en) * 2016-09-14 2017-01-25 努比亚技术有限公司 Terminal starting control device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503102A (en) * 2002-11-25 2004-06-09 神基科技股份有限公司 Method for accessing battery state by operation system of portable computer
CN101860048A (en) * 2010-04-13 2010-10-13 韩竞科 Black box for lithium power battery
CN104869235A (en) * 2015-04-27 2015-08-26 广东欧珀移动通信有限公司 Method, device and system for preventing error starting-up and mobile terminal

Also Published As

Publication number Publication date
CN109239612A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US9645546B2 (en) Storage chip, imaging cartridge, method of changing serial number and method of using storage chip
US7908469B2 (en) Method for executing power on self test on a computer system and updating SMBIOS information partially
US20110302572A1 (en) Embedded network device and firmware upgrading method
US20140245286A1 (en) Application managing system and method using same
US20110119430A1 (en) Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage sysem using the same
US8086841B2 (en) BIOS switching system and a method thereof
CN104123153A (en) Apparatus and method for firmware upgrade using USB
JP5081076B2 (en) Memory management apparatus, image forming apparatus, and memory management method
JPWO2013103023A1 (en) Information processing apparatus, information processing method, and computer program
US6473569B1 (en) Camera and information processing apparatus
CN103593281A (en) Test system and test method
CN103514065A (en) Electronic device with automatic detection and recovery function and method
CN105138433A (en) Backup method for UBIFS file system in embedded type Linux operating system
CN102609290B (en) The method for upgrading software of electronic product
CN102075710B (en) Starting operation method for television and television
CN102750109A (en) Data synchronization system and method
CN102004656A (en) Redundancy backup and security updating technology of vehicle integration information liquid crystal display and control platform
CN110781026A (en) Embedded equipment data storage and repair method and device and embedded equipment
CN106775847B (en) Board card software version updating method and device
CN109582332A (en) The method for upgrading system and device of internet video camera
CN102360300B (en) Starting method and device of operation system
JP2006323751A (en) Information processing apparatus, life monitoring method and program
CN109239612B (en) Electronic device and method capable of monitoring battery capacity
JP2012174061A (en) Information processing device, information processing method, scanner device, and control method of scanner device
CN201869296U (en) Television

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant