Disclosure of Invention
The inventor finds that some robots integrate two charging modes, when one charging port is charged, the other charging port is also charged, and safety accidents are caused.
According to the embodiment of the disclosure, in a scene where a plurality of charging ports coexist, the switching assembly is arranged on the charging branch where each charging port is located, and the switching assembly is turned on when the charging branch is charged and turned off under other working conditions, so that one charging port is not charged under the influence of charging of another charging port or power supply of a battery port, and the charging and power utilization safety is improved. In addition, under the scene that a plurality of charging ports coexist, a comparator component is arranged for the charging branch where each charging port is located, whether the corresponding charging port is charging can be judged according to the level output by the comparator component, and the charging mode corresponding to the charging port which is being charged is determined as the charging mode of the charging device, so that corresponding business control is performed based on the charging mode of the charging device.
Some embodiments of the present disclosure provide a charging device, including:
a first charging port for charging the battery with a first electric charge,
a first switch assembly for controlling the operation of the switch,
a second charging port is provided on the second side of the housing,
a second switch assembly, and
a port of the battery is provided,
the first switch assembly is respectively connected with the first charging port and the battery port, is in a conducting state when the first charging port is charged, and is in a closing state when the second charging port is charged or when a rechargeable battery connected with the battery port releases electric energy outwards;
the second switch assembly is respectively connected with the second charging port and the battery port, is in a conducting state when the second charging port is charged, and is in a closing state when the first charging port is charged or when a rechargeable battery connected with the battery port releases electric energy outwards.
In some embodiments, the charging device further comprises:
a first comparator component, a first input end of the first comparator component is connected with the first charging port, a second input end of the first comparator component is connected with a reference voltage, an output end of the first comparator component is connected with the controller,
a second comparator component, a first input end of the second comparator component is connected with the second charging port, a second input end of the second comparator component is connected with the reference voltage, an output end of the second comparator component is connected with the controller,
and the controller is configured to determine whether the first charging port is charging according to the detected high level or low level output by the output end of the first comparator component, determine whether the second charging port is charging according to the detected high level or low level output by the output end of the second comparator component, and determine the charging mode corresponding to the charging port or the charging port which is being charged as the charging mode of the charging device.
In some embodiments, the controller is further configured to control the robot to which the charging device belongs not to respond to the scheduled task or remain stationary when the first charging port or the second charging port being charged corresponds to the first preset charging mode.
In some embodiments, the controller is further configured to control the robot to which the charging device belongs to maintain a response to the scheduling task during charging when the first charging port or the second charging port being charged corresponds to the second preset charging mode.
In some embodiments, the first comparator component comprises a first comparator and a first level shifter, or, the second comparator component comprises a second comparator and a second level shifter,
the first input end of the first comparator is connected with the first charging port, the second input end of the first comparator is connected with the reference voltage, the output end of the first comparator is connected with the first level shifter, and the output end of the first level shifter is connected with the controller;
the first input end of the second comparator is connected with the second charging port, the second input end of the second comparator is connected with the reference voltage, the output end of the second comparator is connected with the second level shifter, and the output end of the second level shifter is connected with the controller.
In some embodiments, a first voltage dividing resistor is provided on a connection line between the first input of the first comparator and the first charging port, or a second voltage dividing resistor is provided on a connection line between the first input of the second comparator and the second charging port.
In some embodiments, the first level shifter is a first NPN transistor, a base of which is connected to the output terminal of the first comparator, a collector of which is connected to the power supply and the controller, and an emitter of which is connected to ground; or the second level shifter is a second NPN type triode, a base of the second NPN type triode is connected to the output end of the second comparator, a collector of the second NPN type triode is connected to the power supply and the controller, and an emitter of the second NPN type triode is connected to the ground.
In some embodiments, the first switching assembly comprises a first fet and a first control unit, or, the second switching assembly comprises a second fet and a second control unit,
the source electrode of the first field effect transistor is connected with the first charging port and the anode port of the first control unit, the grid electrode of the first field effect transistor is connected with the gate electrode port of the first control unit, and the drain electrode of the first field effect transistor is connected with the cathode port of the first control unit;
the source electrode of the second field effect transistor is connected with the second charging port and the anode port of the second control unit, the grid electrode of the second field effect transistor is connected with the gate electrode port of the second control unit, and the drain electrode of the second field effect transistor is connected with the cathode port of the second control unit.
In some embodiments, the first control unit is configured to control the gate port of the first control unit to output a high level to the gate of the first field effect transistor when the anode port of the first control unit reaches the first working voltage, so as to turn on the first field effect transistor; when the voltage of the cathode port of the first field effect transistor is larger than the voltage of the gate port of the first field effect transistor, controlling the gate port of the first field effect transistor not to output an electric signal, and enabling the first field effect transistor to be in a closed state; or, the second control unit is configured to control the gate port of the second control unit to output a high level to the gate of the second field effect transistor when the anode port of the second control unit reaches the second working voltage, so that the second field effect transistor is turned on; when the voltage of the cathode port is larger than that of the gate port, the gate port is controlled not to output an electric signal, so that the second field effect transistor is in a closed state.
In some embodiments, the first fet or the second fet is an NMOS fet.
In some embodiments, a first fuse is disposed on a connection line between the first charging port and the first switch component; or a second fuse is arranged on a connecting circuit between the second charging port and the second switch component; or a third fuse is arranged on a connecting line between the battery port and the first switch assembly and the second switch assembly.
In some embodiments, a first diode for protection is arranged on a connection line between the first fuse and the ground; or a second diode for protection is arranged on a connecting line between the second fuse and the ground.
In some embodiments, the first charging port and the second charging port are a contact charging port and a plug-in charging port, respectively.
Some embodiments of the present disclosure provide a robot, comprising: a charging device.
Some embodiments of the present disclosure provide a charging method detection method based on a charging device, including:
detecting a voltage of an output terminal of the first comparator component and a voltage of an output terminal of the second comparator component;
judging whether the first charging port is charged or not according to the detected high level or low level output by the output end of the first comparator component;
judging whether the second charging port is charged or not according to the detected high level or low level output by the output end of the second comparator component;
and determining the charging mode corresponding to the first charging port or the second charging port which is being charged as the charging mode of the charging device.
In some embodiments, the charging mode detection method further includes: when the charging mode of the charging device is a plug-in charging mode, controlling the robot to which the charging device belongs not to respond to a scheduling task or to keep static; or, when the charging mode of the charging device is a contact charging mode, controlling the robot to which the charging device belongs to keep responding to the scheduling task during charging.
Some embodiments of the present disclosure provide a charging protection method based on a charging device, including:
when the anode port of the first control unit is detected to reach a first working voltage, the gate port of the first control unit is controlled to output a high level to the gate of the first field-effect tube, so that the first field-effect tube is conducted;
when the voltage of the cathode port of the first control unit is detected to be greater than the voltage of the gate port of the first control unit, the gate port of the first control unit is controlled not to output an electric signal, so that the first field effect transistor is in a closed state;
when the anode port of the second control unit reaches a second working voltage, controlling the gate port of the second control unit to output a high level to the grid of the second field-effect tube to enable the second field-effect tube to be conducted;
when the voltage of the cathode port of the second control unit is detected to be larger than the voltage of the gate port of the second control unit, the gate port of the second control unit is controlled not to output an electric signal, and the second field effect transistor is in a closed state.
Some embodiments of the present disclosure provide a non-transitory computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a charging mode detection method or a charging protection method.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure.
Unless specifically stated otherwise, the descriptions of "first", "second", etc. in this disclosure are used to distinguish different objects, and are not used to indicate the meaning of size or timing, etc.
The charging device of the present disclosure can be applied to a robot or other equipment requiring charging, for example.
Fig. 1 shows a schematic diagram of a service robot of some embodiments of the present disclosure. The service robot is provided with a plurality of sensors, a display device, a voice interaction device, a power device and a charging device, and can provide services such as voice interaction, display interaction, path guidance and the like for a user. As shown in fig. 1, the service robot 100 includes, for example, a camera 110, an emoticon 120, a card swiping area 130, a depth camera 140, a display 150, an ultrasound module 160, a laser radar 170, a pitch degree of freedom joint 180, a charging device 190, and the like, and may further include a microphone, an indicator light, and the like. The robot can adopt the lithium cell to supply power, need charge to the robot after working a period. One or more charging ports of the charging device are generally exposed to facilitate connection to a power source, and other components of the charging device may be built into the robot. The service robot can be equipped with, for example, two charging modes. The robot charging method comprises a contact type charging mode, wherein a charging pile is required to be charged, a charging electrode is fixed on the charging pile, the charging electrode is also installed at a corresponding height of the robot, and when the robot needs to be charged, the robot enables the charging electrode of the robot and the charging electrode of the charging pile to be in contact charging through a navigation system. The second mode is a plug-in charging mode, the robot needs to be provided with a charging connector, when the robot needs to be charged, an operator inserts an external charger into the charging connector on the robot body to charge, and when the robot is charged, the operator needs to plug out the charging connector.
Fig. 2 illustrates a schematic circuit diagram of a charging device according to some embodiments of the present disclosure.
As shown in fig. 2, the charging device 200 of this embodiment includes: a first charging port J1, a first SWITCH assembly SWITCH1, a second charging port J2, a second SWITCH assembly SWITCH2, and a battery port J3. The battery port J3 is connected with a charging battery which is charged and discharged at the same port. The power supply charges the rechargeable battery through the first charging port J1 or the second charging port J2. The stored electrical energy of the rechargeable battery may power the robot to which the charging device 200 is fitted.
The first SWITCH assembly SWITCH1 is respectively connected to the first charging port J1 and the battery port J3, and is in an on state when the first charging port J1 is charged, and is in an off state when the second charging port J2 is charged or when a rechargeable battery connected to the battery port J3 discharges electric energy outwards. The second SWITCH assembly SWITCH2 is respectively connected to the second charging port J2 and the battery port J3, and is in an on state when the second charging port J2 is charged, and is in an off state when the first charging port J1 is charged or when the rechargeable battery connected to the battery port J3 releases electric energy outwards.
Therefore, when the first charging port J1 is charged, the second charging port J2 and the battery port J3 are not charged; when the second charging port J2 is charged, the first charging port J1 and the battery port J3 are not charged; when the rechargeable battery discharges electric energy through the battery port J3, the first charging port J1 and the second charging port J2 are not charged. The first charging port J1 and the second charging port J2 are charging ports with different charging modes, such as a contact charging port and a plug-in charging port, respectively. When the plug-in charging port is used for charging, the contact charging port is not electrified; when the contact type charging port is used for charging, the plug-in type charging port is not electrified.
Under the coexistence scene of a plurality of charging ports, a switch component is arranged on a charging branch where each charging port is located, the switch component is switched on when the charging branch is charged, and is switched off under other working conditions, so that one charging port is not charged under the influence of charging of the other charging port or power supply of the battery port J3, and the charging and power utilization safety is improved.
The switch assembly described above is a device capable of performing a switching function, and may be formed of one or more electronic devices.
As shown in fig. 2, the first SWITCH assembly SWITCH1 includes a first FET1 and a first control unit U1. A source S1 of the first FET1 is connected to the first charging port J1 and an Anode port Anode1 of the first control unit U1, a Gate G1 of the first FET1 is connected to a Gate port Gate1 of the first control unit U1, and a drain D1 of the first FET1 is connected to a Cathode port Cathode1 of the first control unit U1.
A first control unit U1 configured to control a Gate port Gate1 thereof to output a high level to a Gate G1 of a first FET1 to turn on the first FET1 when an Anode port Anode1 thereof reaches a first operating voltage; when the voltage of the Cathode port Cathode1 is greater than the voltage of the Gate port Gate1, the Gate port Gate1 is controlled not to output an electric signal, so that the first field effect transistor FET1 is in a closed state. Thereby, on/off control of the first FET1 is realized.
The first FET1 is, for example, an NMOS FET or a PMOS FET. The NMOS field effect transistor has smaller internal resistance and less heat generation.
As shown in fig. 2, the second switching element SWITCH2 includes a second FET2 and a second control unit U2. The source S2 of the second FET2 is connected to the second charging port J2 and the Anode port Anode2 of the second control unit U2, the Gate G2 of the second FET2 is connected to the Gate port Gate2 of the second control unit U2, and the drain D2 of the second FET2 is connected to the Cathode port Cathode2 of the second control unit U2.
The second control unit U2 is configured to control the Gate port Gate2 thereof to output a high level to the Gate G2 of the second FET2 when the Anode port Anode2 thereof reaches the second operating voltage, so as to turn on the second FET 2; when the voltage of the Cathode port Cathode2 is larger than the voltage of the Gate port Gate2, the Gate port Gate2 is controlled not to output an electric signal, so that the second field effect transistor FET2 is in a closed state. Thereby, on/off control of the second FET2 is realized.
The second FET2 is, for example, an NMOS FET or a PMOS FET. The NMOS field effect transistor has smaller internal resistance and less heat generation.
As shown in fig. 2, the charging device 200 of this embodiment further includes: a first comparator component Com1, a second comparator component Com2, and a Controller.
The first input terminal Vin + of the first comparator component Com1 is connected to the first charging port J1, the second input terminal Vin-of the first comparator component Com1 is connected to the reference voltage, and the OUTPUT terminal OUTPUT of the first comparator component Com1 is connected to the Controller.
The first input terminal Vin + of the second comparator component Com2 is connected to the second charging port J2, the second input terminal Vin-of the second comparator component Com2 is connected to the reference voltage, and the OUTPUT terminal OUTPUT of the second comparator component Com2 is connected to the Controller.
And a Controller configured to determine whether the first charging port J1 is being charged according to the detected high level or low level OUTPUT by the OUTPUT terminal OUTPUT of the first comparator component Com1, determine whether the second charging port J2 is being charged according to the detected high level or low level OUTPUT by the OUTPUT terminal OUTPUT of the second comparator component Com2, and determine a charging mode corresponding to the first charging port J1 or the second charging port J2 being charged as the charging mode of the charging device.
For example, if the OUTPUT terminal OUTPUT of the first comparator component Com1 is at a low level, which indicates that the first charging port J1 is charging, the current charging mode of the charging device is the charging mode corresponding to the first charging port J1; if the OUTPUT terminal OUTPUT of the first comparator component Com1 is at a high level, it indicates that the first charging port J1 is not being charged; if the OUTPUT of the OUTPUT terminal OUTPUT of the second comparator component Com2 is low, it indicates that the second charging port J2 is charging, and the current charging mode of the charging device is the charging mode corresponding to the second charging port J2; if the OUTPUT terminal OUTPUT of the second comparator component Com2 is high, it indicates that the second charging port J2 is not being charged.
Under the coexistence scene of a plurality of charging ports, a comparator component is arranged for the charging branch where each charging port is located, whether the corresponding charging port is charging can be judged according to the level output by the comparator component, and the charging mode corresponding to the charging port which is being charged is determined as the charging mode of the charging device, so that the corresponding business control can be carried out based on the charging mode of the charging device.
The first comparator component Com1 includes a first comparator C1 and a first level shifter T1. The first input terminal Vin + of the first comparator C1 is connected to the first charging port J1, the second input terminal Vin-of the first comparator C1 is connected to the reference voltage, the OUTPUT terminal OUTPUT of the first comparator C1 is connected to the first level shifter T1, and the OUTPUT terminal OUTPUT of the first level shifter T1 is connected to the Controller.
First voltage dividing resistors R1 and R2 are provided on a connection line between the first input terminal Vin + of the first comparator C1 and the first charging port J1, and the voltage of the first input terminal Vin + of the first comparator C1 can be adjusted by adjusting the ratio between the resistance value of R1 and the resistance value of R2. The ratio between the resistance of R1 and the resistance of R2 is preset so that the voltage at the first input terminal Vin + of the first comparator C1 is greater than the reference voltage at the second input terminal Vin-thereof when the first charging port J1 is being charged.
The first level shifter T1 is, for example, a first NPN-type triode NPN1, a base thereof is connected to the OUTPUT terminal OUTPUT of the first comparator C1, a collector thereof is connected to the power supply and Controller, and an emitter thereof is connected to ground. A resistor R3 can be arranged between the collector of the first NPN transistor NPN1 and the power supply to perform a protection function.
When the first charging port J1 is charging, the voltage of the first input terminal Vin + of the first comparator C1 is greater than the reference voltage of the second input terminal Vin-, the output terminal of the first comparator C1 outputs a high level, so that the first level shifter T1 is turned on, and the collector of the first comparator C1 (i.e., the output terminal of the first comparator component Com 1) becomes a low level. That is, if a low level is detected at the collector of the first comparator C1 (at the detection level V1 in fig. 2), it indicates that the first charging port J1 is charging.
The output voltage of the comparator is adapted by means of a level shifter, making it easier to detect and decide.
The second comparator component Com2 includes a second comparator C2 and a second level shifter T2. A first input terminal Vin + of the second comparator C2 is connected to the second charging port J2, a second input terminal Vin-of the second comparator C2 is connected to the reference voltage, an OUTPUT terminal OUTPUT of the second comparator C2 is connected to the second level shifter T2, and an OUTPUT terminal OUTPUT of the second level shifter T2 is connected to the Controller.
Second voltage-dividing resistors R4 and R5 are disposed on a connection line between the first input terminal Vin + of the second comparator C2 and the second charging port J2, and the voltage of the first input terminal Vin + of the second comparator C2 can be adjusted by adjusting the ratio between the resistance value of R4 and the resistance value of R5. The ratio between the resistance of R4 and the resistance of R5 is preset such that the voltage at the first input terminal Vin + of the second comparator C2 is greater than the reference voltage at the second input terminal Vin-thereof when the second charging port J2 is being charged.
The second level shifter T2 is, for example, a second NPN type transistor, and has a base connected to the OUTPUT terminal OUTPUT of the second comparator C2, a collector connected to the power supply and Controller, and an emitter connected to ground. A resistor R6 can be arranged between the collector of the second NPN transistor NPN2 and the power supply to perform a protection function.
When the second charging port J2 is being charged, the voltage of the first input terminal Vin + of the second comparator C2 is greater than the reference voltage of the second input terminal Vin-, the output terminal of the second comparator C2 outputs a high level, so that the second level shifter T2 is turned on, and the collector of the second comparator C2 (i.e., the output terminal of the second comparator component Com 2) becomes a low level. That is, if a low level is detected at the collector of the second comparator C2 (at the detection level V2 in fig. 2), it is interpreted that the second charging port J2 is being charged.
The output voltage of the comparator is adapted by means of a level shifter, making it easier to detect and decide.
A first fuse F1 is arranged on a connecting line between the first charging port J1 and the first SWITCH component SWITCH 1; a second fuse F2 is arranged on a connecting line between the second charging port J2 and the second SWITCH assembly SWITCH 2; a third fuse F3 is disposed on a connection line between the battery port J3 and the first and second SWITCH assemblies SWITCH1 and SWITCH 2. The whole circuit is protected from overload by the fuse.
A first diode TVS1 for protection is arranged on a connecting line between the first fuse F1 and the ground; a second diode TVS2 for protection is provided on a connection line between the second fuse F2 and the ground. The first diode TVS1 and the second diode TVS2 are, for example, transient Voltage Super (TVS), which are high-performance protection devices in the form of diodes, capable of effectively protecting precise components in electronic circuits from being damaged by surge pulses, and have the advantages of fast response speed, large Transient power, low leakage current, small breakdown Voltage deviation, easy control of clamping Voltage, no damage limit, small size, and the like.
Various operation processes of the charging device will be described below.
When neither the first charging port J1 nor the second charging port J2 is charged, the charging battery (whose voltage is VIN 3) supplies power to the robot power input end P through the third fuse F3, at this time, the voltage at the Cathode1 of the NMOS1 is greater than the voltage at the Gate1, and when the NMOS1 is in a cut-off state, the first charging port J1 is not charged. Similarly, the voltage at the Cathode2 end of the NMOS2 is greater than the voltage at the Gate2 end, and the NMOS2 is in the cut-off state, so the second charging port J2 is not charged. Therefore, when the rechargeable battery supplies power, the first charging port J1 and the second charging port J2 of the ports are ensured to be uncharged, and the occurrence of electric leakage accidents of exposed electrodes is avoided.
When the robot is charged by using the first charging port J1, a power supply current flows in through the first fuse F1 of the first charging port J1, the first control unit U1 enters a working state after detecting that the Anode1 reaches a threshold working voltage, and a high level is output to the Gate1 by a charge pump inside the U1, so that V _ Gate1-V _ Anode1> Vth, that is, vgs of the NMOS 1> Vth, the NMOS1 enters a conducting state, the power supply current reaches the power supply input end P of the robot through the NMOS1 to supply power to the robot, and simultaneously flows through the third fuse F3 and the battery port J3 to charge the rechargeable battery, while the NMOS2 is in a cut-off state, and the second charging port J2 is uncharged. After the voltage VIN1 of the first charging port J1 is divided by the voltage R1 and the voltage R2, VIN + = VIN1 × R2/(R2 + R1) of the voltage C1, at this time, VIN + of the voltage C1 is greater than the reference voltage REF, a high level is output after passing through the comparator C1, so that the NPN1 enters a conducting state, the detection level V1 changes from 3.3V to 0V, and the Controller determines that the charging device is using the first charging port J1 for charging according to the conversion of the detection level V1, that is, the current charging mode of the charging device is the corresponding charging mode of the first charging port J1.
When the robot is charged by using the second charging port J2, a power supply current flows in through the second charging port J2 and the second fuse F2, the second control unit U2 enters a working state after detecting that the Anode2 reaches a threshold working voltage, and outputs a high level to the Gate2 through a charge pump inside the U2, so that V _ Gate2-V _ Cathode2> Vth, that is, vgs > Vth of the NMOS2, and the NMOS2 enters a conducting state, the second charging port J2 reaches the power supply input end P of the robot to supply power to the robot, and simultaneously flows through the third fuse F3 and the battery port J3 to charge the rechargeable battery, while the NMOS1 is in a cut-off state, and the first charging port J1 is not charged. After the voltage VIN2 of the second charging port J2 is divided by R4 and R5, VIN + = VIN2 × R4/(R4 + R5) of C2, at this time, VIN + of C2 is greater than the reference voltage REF, and a high level is output after passing through the comparator C2, so that the NPN2 enters an on state, the detection level V2 is changed from 3.3V to 0V, and the Controller determines that the charging device is using the second charging port J2 for charging according to the conversion of the detection level V2, that is, the current charging mode of the charging device is the charging mode corresponding to the second charging port J2.
And the Controller is further configured to control the robot to which the charging device belongs not to respond to the scheduling task or to remain stationary when the first charging port J1 or the second charging port J2 being charged corresponds to a first preset charging mode (e.g., a plug-in charging mode).
For example, if the second charging port J2 is a plug-in charging port, when the detection level V2 is a low level 0V, it indicates that the charging device is currently charging using a plug-in charging manner, and does not respond to the scheduling task at this time, thereby avoiding a safety accident caused by dragging a charging cable when the robot moves, when the detection level V2 becomes a high level 3.3V, it indicates that charging is completed, the plug-in charging cable can be pulled out, and at this time, the robot can respond to the scheduling task.
And the Controller is further configured to control the robot to which the charging device belongs to maintain a response to the scheduling task during charging when the first charging port J1 or the second charging port J2 being charged corresponds to a second preset charging mode (e.g., a contact charging mode).
For example, if the first charging port J1 is a contact charging port, when the detection level V1 is a low level 0V, it indicates that the charging device is currently charging using a contact charging method, and at this time, if the amount of electricity is above a certain value, it may respond to a scheduling task. Therefore, the robot still keeps the response to the scheduling task in the charging process of the second preset charging mode (such as a contact charging mode), and the task requirement and the charging requirement are considered.
Fig. 3 illustrates a circuit diagram of a charging device of some embodiments of the present disclosure.
As shown in fig. 3, the NMOS1 and the first control unit U1 form a first switch component, the NMOS2 and the second control unit U2 form a second switch component, and the first control unit U1 and the second control unit U2 can be implemented by, for example, an LM74700QDBVRQ1 chip. The first comparator component Com1 integrates the functions of the first comparator C1 and the first level shifter T1, and the second comparator component Com2 integrates the functions of the second comparator C2 and the second level shifter T2. The first comparator component Com1 and the second comparator component Com2 may be implemented, for example, by using an LM397MF chip.
The ports 1,2,3,4,5,6 of the first control unit U1 respectively represent the port VCAP1, the ground port GND1, the enable port EN1, the Cathode port Cathode1, the Gate port Gate1, and the Anode port Anode1. Similarly, the ports 1,2,3,4,5,6 of the second control unit U2 respectively represent the port VCAP2, the ground port GND2, the enable port EN2, the Cathode port Cathode2, the Gate port Gate2, and the Anode port Anode2. The ports 1,2,3,4,5 of the first comparator component Com1 represent the second input VIN-, the ground port GND, the first input VIN +, the OUTPUT, the port VS of the first comparator component, respectively. Similarly, the ports 1,2,3,4,5 of the second comparator component Com2 represent the second input VIN-, the ground port GND, the first input VIN +, the OUTPUT, the port VS of the second comparator component, respectively.
As shown in fig. 3, the first charging port J1 is connected to a first fuse F1, the first fuse F1 is connected to an Anode1 of the first control unit U1 and a source of an NMOS1, a Gate1 of the first control unit U1 is connected to a Gate of the NMOS1, a drain of the NMOS1 is connected to a Cathode1 of the first control unit U1, and is connected to the battery port J3 through a third fuse F3. The first charging port J1 is connected to the enable port EN1 of the first control unit U1 after being divided by resistors R7 and R8. A capacitor C1 is connected to a port VCAP1 of the first control unit U1 to ensure the internal voltage of the control unit to be stable. The ground port GND1 of the first control unit U1 is grounded. A TVS1 for protection and a capacitor C2 are also provided between the first fuse F1 and ground.
As shown in fig. 3, the second charging port J2 is connected to a second fuse F2, the second fuse F2 is connected to the Anode2 of the second control unit U2 and the source of the NMOS2, the Gate2 of the second control unit U2 is connected to the Gate of the NMOS2, the drain of the NMOS2 is connected to the Cathode1 of the second control unit U2, and is connected to the battery port J3 through a third fuse F3. The second charging port J2 is connected to the enable port EN2 of the second control unit U2 after being divided by resistors R9 and R10. A capacitor C3 is connected to the port VCAP2 of the second control unit U2 to ensure the internal voltage of the control unit to be stable. The ground port GND2 of the second control unit U2 is grounded. A TVS2 for protection and a capacitor C4 are also provided between the second fuse F2 and ground.
As shown in fig. 3, the first fuse F1 is connected to the first input terminal VIN + of the first comparator component Com1 through voltage dividing resistors R1 and R2, the reference voltage +5V is connected to the second input terminal VIN + of the first comparator component Com1 through voltage dividing resistors R11 and R12, and the OUTPUT terminal OUTPUT of the first comparator component Com1 is connected to the 3.3V power supply through resistor R3. The port VS of the first comparator component Com1 is connected to a 5V power supply, and the 5V power supply is connected to the capacitor C5 and grounded. The ground port GND of the first comparator component Com1 is grounded.
As shown in fig. 3, the second fuse F2 is connected to the second input terminal VIN + of the second comparator component Com2 through voltage dividing resistors R5 and R4, the reference voltage +5V is connected to the second input terminal VIN "of the second comparator component Com2 through voltage dividing resistors R13 and R14, and the OUTPUT terminal OUTPUT of the second comparator component Com2 is connected to the 3.3V power supply through resistor R6. The port VS of the second comparator component Com2 is connected to a 5V power supply, and the 5V power supply is connected to the capacitor C6 and grounded. The ground port GND of the second comparator component Com2 is grounded.
As shown in fig. 3, the third fuse F3 of the battery port J3 is connected to the TVS3 and to ground, the third fuse F3 is connected to the light emitting diode LED and to ground, and the LED is connected in parallel to the capacitors C7 and C8.
The charging device shown in fig. 3 has the same working principle and working process as the charging device shown in fig. 2, and specific reference is made to the foregoing description, and details are not repeated here.
Fig. 4 is a flowchart illustrating a charging protection method of a charging device according to some embodiments of the disclosure. The structure of the charging device is shown in fig. 2-3. The charge protection method is executed by the first control unit U1 and the second control unit U2, for example.
As shown in fig. 4, the charge protection method of this embodiment includes:
in step S410, when it is detected that the anode port of the first control unit U1 reaches the first working voltage, for example, when the first charging port is charged, the gate port of the first control unit U1 is controlled to output a high level to the gate of the first FET1, so that the first FET1 is turned on;
in step S420, when it is detected that the voltage at the cathode port of the first control unit U1 is greater than the voltage at the gate port thereof, for example, when the battery port supplies power, the gate port thereof is controlled not to output an electrical signal, so that the first FET1 is in a turned-off state;
in step S430, when it is detected that the anode port of the second control unit U2 reaches the second working voltage, for example, when the second charging port is charged, the gate port of the second control unit U2 is controlled to output a high level to the gate of the second FET2, so that the second FET2 is turned on;
in step S440, when it is detected that the voltage of the cathode port of the second control unit U2 is greater than the voltage of the gate port thereof, for example, when the battery port is powered, the gate port thereof is controlled not to output the electric signal, so that the second FET2 is in the off state.
Under the coexistence scene of a plurality of charging ports, a switch component is arranged on a charging branch where each charging port is located, the switch component is switched on when the charging branch is charged, and is switched off under other working conditions, so that one charging port is ensured not to be charged under the influence of charging of the other charging port or power supply of the battery port when the charging port is not charged, and the charging and power utilization safety is improved.
Fig. 5 is a flowchart illustrating a charging method detection method of a charging device according to some embodiments of the disclosure. The structure of the charging device is shown in fig. 2-3. The charging manner detection method is executed by the controller, for example.
As shown in fig. 5, the charging method detection method of this embodiment includes:
in step S510, detecting a voltage at an output terminal of the first comparator component Com 1;
in step S520, according to the detected high level or low level output by the output terminal of the first comparator component Com1, it is determined whether the first charging port J1 is charging;
in step S530, detecting a voltage at an output terminal of the second comparator element Com 2;
in step S540, according to the detected high level or low level output by the output terminal of the second comparator component Com2, it is determined whether the second charging port J2 is charging;
in step S550, the charging method corresponding to the first charging port J1 or the second charging port J2 being charged is determined as the charging method of the charging device.
After determining the charging mode of the charging device, corresponding service control can be performed based on the charging mode of the charging device. For example, step S560 or S570 is performed.
In step S560, when the charging mode of the charging device is the plug-in charging mode, the robot to which the charging device belongs is controlled not to respond to the scheduling task or to remain stationary.
Thereby, avoid the safety accident that drags charging cable and arouse when robot removes
In step S570, when the charging method of the charging device is the contact charging method, the robot to which the charging device belongs is controlled to maintain a response to the scheduling task at the time of charging.
Therefore, the robot still keeps the response to the scheduling task in the contact charging mode charging process, and the task requirement and the charging requirement are considered.
Under the coexistence scene of a plurality of charging ports, a comparator component is arranged for the charging branch where each charging port is located, whether the corresponding charging port is charging can be judged according to the level output by the comparator component, and the charging mode corresponding to the charging port which is being charged is determined as the charging mode of the charging device, so that the corresponding business control can be carried out based on the charging mode of the charging device.
The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the charging mode detection method in any one of the embodiments or the charging protection method in any one of the embodiments. The storage medium may be provided inside the robot.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more non-transitory computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.