Summary of the invention
The objective of the invention is to propose a kind of safe ready and the higher charger Auto-Sensing and the method for distributing electric current of charge efficiency.
For achieving the above object, a kind of method that the present invention proposes charger Auto-Sensing and distribute electric current comprises the following steps:
Step S1:MCU control unit reads the charging current limiter value of default described a plurality of charging inlets;
Step S2: described MCU control unit detects the charging current value of described a plurality of charging inlets, judges that whether the charging current value sum of described a plurality of charging inlets is greater than described charging current limiter value, if carry out step S3; If not, described MCU control unit control is charged to described a plurality of charging inlets;
Step S3: described MCU control unit, according to charging current value and the charging current limiter value of described a plurality of charging inlets, calculates at least one charging inlet to be charged, and the charging current value sum of described at least one charging inlet to be charged equals described charging current limiter value;
Step S4: described MCU control unit is controlled described at least one charging inlet to be charged is charged, and closes the charging to other charging inlets.
Further,, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, also comprise before described step S1: charging current limiter value corresponding to a plurality of charging inlets of charger that will set by keyboard is stored in the information memory cell of charger.
Further, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, described information memory cell can be the storage chip of EEPROM or FLASH.
Further,, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, also comprise before the charging current limiter value step that described storage is set: the MCU control unit of charger and demonstration indicating member carry out initialization.
Further,, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, also comprise after described step S4: by showing indicating member, show and indicate the charging port state of described a plurality of charging inlets.
Further,, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, also comprise before described step S3: described MCU control unit is controlled the charging inlet that is provided with Priority flag in described a plurality of charging inlets is preferentially charged.
Further, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, the step that described charging current limiter value corresponding to a plurality of charging inlets of charger that will set by keyboard is stored in the information memory cell of charger specifically comprises:
Step S101: turn-off keyboard interrupt, remove the keyboard interrupt identification;
Step S102:, to the keyboard shake that disappears, read the keyboard value;
Step S103: the charging current limiter value that a plurality of charging inlets of the charger that will set are corresponding is stored in the storage chip of EEPROM or FLASH;
Step S104: open keyboard interrupt.
Further, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, described step S2 specifically comprises:
Step S21: whether described MCU control unit detects described a plurality of charging inlets has charging device to insert, if carry out step S22; If not, set up without the charging sign;
Step S22: whether described MCU control unit detects described a plurality of charging inlets charging port short circuit or reversal connection, if carry out step S23; If not, set up short circuit, reversal connection sign;
Step S23: described MCU control unit judges that whether the charging current value sum of described a plurality of charging inlets is greater than described charging current limiter value, if carry out step S24; If not, described MCU control unit control is charged to described a plurality of charging inlets;
Step S24: described MCU control unit detects the charging current value of each charging inlet in described a plurality of charging inlet successively, when this charging inlet being detected greater than described charging current limiter value, closes this charging inlet, sets up the sign that this interface is closed.
Further, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, described a plurality of charging inlets comprise A type USB female seat, Mini USB plug, Micro USB plug, IPHONE Docking plug and DC Plug plug.
Further, at above-mentioned charger Auto-Sensing with in distributing the method for electric current, described demonstration indicating member is LCD or LED display, is used for showing that charging arranges limits value ,Ge road charge value and charging current.
Charger Auto-Sensing of the present invention and to distribute the method for electric current be that a plurality of electronic equipments charge simultaneously by a plurality of charging inlets, distribute charging inlet according to interface current value automated intelligent, and its charge efficiency is higher, and safe ready, cost are lower.
Embodiment
Describe the preferred embodiments of the present invention in detail below in conjunction with accompanying drawing.
See also Fig. 1, Fig. 1 is charger Auto-Sensing of the present invention and distributes the schematic flow sheet of the embodiment of the method one of electric current.
The method of charger Auto-Sensing of the present invention and distribution electric current comprises the following steps:
Step S1:MCU control unit reads the charging current limiter value of default described a plurality of charging inlets;
Step S2: described MCU control unit detects the charging current value of described a plurality of charging inlets, judges that whether the charging current value sum of described a plurality of charging inlets is greater than described charging current limiter value, if carry out step S3; If not, described MCU control unit control is charged to described a plurality of charging inlets;
Step S3: described MCU control unit, according to charging current value and the charging current limiter value of described a plurality of charging inlets, calculates at least one charging inlet to be charged, and the charging current value sum of described at least one charging inlet to be charged equals described charging current limiter value;
Step S4: described MCU control unit is controlled described at least one charging inlet to be charged is charged, and closes the charging to other charging inlets.
Also comprise before described step S1: charging current limiter value corresponding to a plurality of charging inlets of charger that will set by keyboard is stored in the information memory cell of charger.
The charging adapter of described charger is selected the adapter of different AC/DC power outputs, as 5V/2A, 5V/3A, 5V/4A, namely each charging port total current of a plurality of charging inlets can not exceed the gross power of charging adapter, by described button, can arrange and preserve current limit value in information memory cell.
Described information memory cell can be the storage chip of EEPROM or FLASH.
Also comprise before the charging current limiter value step that described storage is set: the MCU control unit of charger and demonstration indicating member carry out initialization.It comprises: Status Flag initialization, I/O interface initialization, A/D, D/A initialization of register, output control unit initialization, keyboard interrupt initialization, timer is set interrupts and interrupt priority level is set.
Consider the needs of special emergent charging, can, by the priority of described a plurality of charging inlets is set, namely also comprise before described step S3: described MCU control unit is controlled the charging inlet that is provided with Priority flag in described a plurality of charging inlets is preferentially charged.Just guaranteed that preferential equipment to special urgent need charging charges, then according to charging current value and charging current limiter value, distribute electric current like this, automatically selected charging inlet to charge.
Also comprise after described step S4: by showing indicating member, show and indicate the charging port state of described a plurality of charging inlets.
See also Fig. 2, Fig. 2 is the idiographic flow schematic diagram of the charging current limiter value step of keyboard storage setting of the present invention.The step that described information memory cell is stored charging current limiter value corresponding to a plurality of charging inlets of charger of setting by keyboard specifically comprises:
Step S101: turn-off keyboard interrupt, remove the keyboard interrupt identification;
Step S102:, to the keyboard shake that disappears, read the keyboard value;
Step S103: the charging current limiter value that a plurality of charging inlets of the charger that will set are corresponding is stored in the storage chip of EEPROM or FLASH;
Step S104: open keyboard interrupt.
See also Fig. 3, Fig. 3 is the idiographic flow schematic diagram of described step S2, and it comprises:
Step S21: whether described MCU control unit detects described a plurality of charging inlets has charging device to insert, if carry out step S22; If not, set up without the charging sign;
Step S22: whether described MCU control unit detects described a plurality of charging inlets charging port short circuit or reversal connection, if carry out step S23; If not, set up short circuit, reversal connection sign;
Step S23: described MCU control unit judges that whether the charging current value sum of described a plurality of charging inlets is greater than described charging current limiter value, if carry out step S24; If not, described MCU control unit control is charged to described a plurality of charging inlets;
Step S24: described MCU control unit detects the charging current value of each charging inlet in described a plurality of charging inlet successively, when this charging inlet being detected greater than described charging current limiter value, closes this charging inlet, sets up the sign that this interface is closed.
Below in conjunction with specific embodiment, charger Auto-Sensing of the present invention and the method for distributing electric current are described.
In the present embodiment, the charging adapter of charger is the output 5V/5A of AC/DC conversion, and namely each charging port total current can not surpass 5A.
described a plurality of charging inlet comprises A type USB female seat, the Mini USB plug, the Micro USB plug, IPHONE Docking plug and DC Plug plug, its charging current value is respectively 2A, 1A, 3A, 4A and 6A, when described A type USB female seat, in the situation that Mini USB plug and Micro USB plug are all inserted, the charging current value of above-mentioned three interfaces of described MCU control unit dynamic monitoring, judge the charging current value sum 6A of described a plurality of charging inlets greater than described charging current limiter value 5A, therefore the charging current value according to above-mentioned three interfaces, the charging current value sum that calculates described A type USB female seat and Micro USB plug equals charging current limiter value 5A just, therefore this two interface is made as charging inlet to be charged and it is charged, and close charging to the charging inlet of Mini USB plug.So not only guarantee the total current of described a plurality of charging inlet sockets in real time less than Limited Current value 5A charger, and improved the charge efficiency of charger, be conducive to saves energy.
Be used for facilitating the user to check each charging inlet charged state, send out a warning during charging, rushed rear described charging indicator light and extinguished, while filling soon, red light dodges, and dodges green light during trickle charge.
When described charger reversal connection, short circuit, described MCU control unit can intelligence cut off a plurality of charging inlet power supplies, and by buzzer warning, and described charging indicator light extinguishes.
Described demonstration indicating member is LCD or LED display, is used for showing that charging arranges limits value ,Ge road charge value and charging current.
Than prior art, the method for charger Auto-Sensing of the present invention and distribution electric current has the following advantages:
1, realize the 5V/2A charging adapter of common AC/DC, commercially available general, low price, need not reprocessing and produce;
2, can be simultaneously to a plurality of fashion mancarried electronic aid chargings, MP3/MP4 player, DV/ digital camera, mobile phone, apple IPAD panel computer, portable little sound equipment etc.;
3, real-time detection and the intelligent management of charging current, overcurrent, low pressure, short circuit, reverse power connection etc.
4, charged state shows, sends sound and light alarm during charge fault;
5, optional a plurality of USB turns other model charging plug seat, has really accomplished to have a charger, not anxious portable equipment charging.
To sum up, charger Auto-Sensing of the present invention and to distribute the method for electric current be that a plurality of electronic equipments charge simultaneously by a plurality of charging inlets, distribute charging inlet according to interface current value automated intelligent, and its charge efficiency is higher, and safe ready, cost are lower.
Here description of the invention and application is illustrative, not wants with scope restriction of the present invention in the above-described embodiments.Here the distortion of disclosed embodiment and change is possible, and the various parts of the replacement of embodiment and equivalence are known for those those of ordinary skill in the art.Those skilled in the art are noted that in the situation that do not break away from spirit of the present invention or substantive characteristics, and the present invention can be with other form, structure, layout, ratio, and with other assembly, material and parts, realizes., in the situation that do not break away from the scope of the invention and spirit, can carry out other distortion and change to disclosed embodiment here.