A kind of charging pile electronic lock drive circuit
Technical field
The present invention relates to charging pile field, be specifically related to a kind of charging pile electronic lock drive circuit.
Background technology
Charging pile is that one is fixed on ground or wall, is installed on public building and parking lot, residential quarter or charging station
In, can be according to the device of the charging electric vehicle that different electric pressures is various signal;The input of charging pile with exchange
Electrical network is directly connected to, and outfan is equipped with charging plug for for charging electric vehicle.
And in order to prevent the accident in charging process from disconnecting, charging inlet and vehicle interface all must have latch functions,
And the locking system with latch functions used in charging inlet is exactly electronic lock, it is used for preventing the accident of charging process from breaking
Open, thus accident occurs.
The most conventional electronic lock is pulse drive mode, and driving voltage is 12Vdc, and it drives requirement such as Fig. 1 of signal
Shown in, maximum drive current is 1000mA, pulsating sphere at 600-1000ms, its drive circuit used as shown in Figure 2 and Figure 3,
Wherein the LOCK1 in Fig. 2 is control signal of locking, and is connected with MCU, and the LCOK2 in Fig. 3 is unlocking control signal, also with MCU phase
Even;LOCK+ is connected to the positive pole of electronic lock, and LOCK-is connected to the negative pole of electronic lock;When LOCK1 is high level, the second relay
K2 adhesive, electronic lock is locked, and when LOCK2 is high level, the 3rd relay K 3 adhesive, electronic lock unlocks;Second relay K 2 He
What the 3rd relay K 3 used is all electromagnetic relay, and its reaction all can have delay, and inherent delay is even up to 10ms, Er Qieyin
For there being the existence of delay, the drive signal impulse of electronic lock cannot be precisely controlled, causes pulse-length error to increase, even
Up to 10ms level;And electromagnetic relay is expensive, its cost is caused to raise;Relay also needs to driving voltage, typically
Having 3V, 5V, 12V, 24V, the power supply that therefore can cause drive circuit is complex so that in the driving power consumption of whole drive circuit
Rise, and relay and diode volume are relatively big, cause whole drive circuit volume bigger.
Summary of the invention
The invention aims to provide a kind of reduction to drive time delay, the time improving electronic lock signal pulsewidth controls essence
Degree, reduces drive circuit cost, reduces the charging pile electronic lock drive circuit of drive circuit volume.
The present invention is achieved through the following technical solutions: a kind of charging pile electronic lock drive circuit, defeated including MCU, electronic lock
Go out terminal, output setting module, output enable module, the first isolation drive module, the second isolation drive module, metal-oxide-semiconductor switch
Circuit, driving power supply, described MCU is respectively connecting to export setting module and output enables module, and described output setting module connects
Being connected to the first isolation drive module, described output enables module and is connected to the second isolation drive module, described second isolation drive
Module is also associated with driving power supply, and described first isolation drive module and the second isolation drive module are connected to metal-oxide-semiconductor switch
Circuit, described metal-oxide-semiconductor on-off circuit is connected to electronic lock lead-out terminal;Described output setting module includes control signal mould of locking
Block conciliates lock control signaling module, and described first isolation drive module includes control signal isolation drive module reconciliation lock control of locking
Signal isolation drive module processed, described in control signal module of locking be connected to control signal isolation drive module of locking, described on
Lock control signal isolation drive module is then connected to metal-oxide-semiconductor on-off circuit, and described unlocking control signal module is connected to solve lock control
Signal isolation drive module processed, described unlocking control signal isolation drive module is also connected to metal-oxide-semiconductor on-off circuit;Described lock
Control signal module includes the 6th electric capacity and the 9th resistance, and one end of described 9th resistance is connected to the LOCK1 end of MCU, described
One end of 9th resistance is additionally coupled to one end of the 6th electric capacity, and the other end of described 9th resistance and the 6th electric capacity all meets GND;Institute
State control signal isolation drive module of locking and include that the 8th resistance and the second optocoupler, one end of described 8th resistance are connected to lock
One end of 6th electric capacity in control signal module, the other end of described 8th resistance is connected to the first pin of the second optocoupler, institute
The second pin stating the second optocoupler meets GND, and the 3rd pin of described second optocoupler meets-12V power supply, the 4th of described second optocoupler
Pin is connected to metal-oxide-semiconductor on-off circuit;Described unlocking control signal module includes the 7th electric capacity and the 11st resistance, the described tenth
One end of one resistance is connected to the LOCK2 end of MCU, and one end of described 11st resistance is additionally coupled to one end of the 7th electric capacity, institute
The other end stating the 11st resistance and the 7th electric capacity all meets GND;Described unlocking control signal isolation drive module includes the tenth electricity
Resistance and the 3rd optocoupler, one end of described tenth resistance is connected to one end of the 7th electric capacity in unlocking control signal module, and described the
The other end of ten resistance connects the first pin of the 3rd optocoupler, and the second pin of described 3rd optocoupler connects GND, described 3rd optocoupler
The 3rd pin connect-12V power supply, the 4th pin of described 3rd optocoupler is connected to metal-oxide-semiconductor on-off circuit;Described output enables mould
Block includes the 3rd resistance and the first electric capacity, and one end of described 3rd resistance is connected to the LOCKAct end of MCU, described 3rd resistance
One end be also connected with one end of the first electric capacity, the other end of described 3rd resistance and the first electric capacity all meets GND;Described second isolation
Drive module include the first optocoupler and the second resistance, one end of described second resistance be connected to output enable module, described second
The resistance other end is connected to the first pin of the first optocoupler, and the second pin of described first optocoupler meets GND, described first optocoupler
3rd pin is connected to metal-oxide-semiconductor on-off circuit, and the 4th pin of described first optocoupler is connected to drive power supply;Described driving power supply
Including 12V power supply and the first resistance, described 12V power supply is connected to the 4th pin of the first optocoupler by the first resistance;Described
One resistance is adjustable resistance;Described metal-oxide-semiconductor on-off circuit includes the first metal-oxide-semiconductor, the second metal-oxide-semiconductor, the 3rd metal-oxide-semiconductor, the 4th MOS
Pipe, the 4th resistance, the 5th resistance, the 6th resistance, the 7th resistance, the second electric capacity, the 3rd electric capacity, the 4th electric capacity and the 5th electric capacity,
Described one end of 4th resistance and one end of the 5th resistance are connected with each other and are connected to the second isolation drive module, described 4th electricity
The other end of resistance is connected to one end of the second electric capacity, another termination-12V power supply of described second electric capacity, described second electric capacity
One end is additionally coupled to the grid of the first metal-oxide-semiconductor, and the source electrode of described first metal-oxide-semiconductor is connected to one end of the 4th resistance, and described first
The drain electrode of metal-oxide-semiconductor is connected to the positive pole of electronic lock lead-out terminal;The other end of described 4th resistance is also connected with the one of the 6th resistance
End, one end of described 6th resistance connects one end of the 4th electric capacity, and one end of described 6th resistance is also connected with the grid of the 3rd metal-oxide-semiconductor
Pole, the drain electrode of described 3rd metal-oxide-semiconductor is also connected to the positive pole of electronic lock lead-out terminal, and one end of described 4th electric capacity is additionally coupled to
Control signal of locking isolation drive module, the other end of described 4th electric capacity is connected to the source electrode of the 3rd metal-oxide-semiconductor, and described first
The drain electrode of metal-oxide-semiconductor and the drain electrode of the 3rd metal-oxide-semiconductor are connected with each other;The other end of described 5th resistance connects one end of the 3rd electric capacity,
The other end-12V the power supply of described 3rd electric capacity, one end of described 3rd electric capacity is additionally coupled to the grid of the second metal-oxide-semiconductor, and described
The source electrode of two metal-oxide-semiconductors connects one end of the 5th resistance, and the drain electrode of described second metal-oxide-semiconductor is connected to the negative of electronic lock lead-out terminal
Pole, the other end of described 5th resistance is additionally coupled to one end of the 7th resistance, and the other end of described 7th resistance connects the 5th electricity
The one end held, one end of described 5th electric capacity is additionally coupled to unlocking control signal isolation drive module, described 7th resistance another
One end is additionally coupled to the grid of the 4th metal-oxide-semiconductor, and the drain electrode of described 4th metal-oxide-semiconductor is connected to the negative pole of electronic lock lead-out terminal, institute
The other end stating the 5th electric capacity is connected to the 4th metal-oxide-semiconductor source electrode;The drain electrode of described 4th metal-oxide-semiconductor and the drain electrode phase of the second metal-oxide-semiconductor
Connecting, the described source electrode of the 4th metal-oxide-semiconductor and the source electrode of the 3rd metal-oxide-semiconductor are connected with each other and connect-12V power supply;Described first metal-oxide-semiconductor
Being P-channel enhancement type field effect transistor with the second metal-oxide-semiconductor, described 3rd metal-oxide-semiconductor and the 4th metal-oxide-semiconductor are N-channel enhancement mode field effect
Pipe;The model of described first metal-oxide-semiconductor and the second metal-oxide-semiconductor is DTS4501, and the model of described 3rd metal-oxide-semiconductor and the 4th metal-oxide-semiconductor is
DTS3400。
The present invention uses the electromagnetic type relay switch that metal-oxide-semiconductor switch in place is traditional, not only reduces the overall one-tenth of circuit
This, reduce the volume of circuit, and reduce the inherent delay of circuit, and the time that just can improve electronic lock signal pulsewidth controls essence
Degree;And the signal voltage of MCU can keep consistent with the driving voltage of metal-oxide-semiconductor, it is not necessary to other driving voltage, reduce electricity
The power consumption on road, and add output enable module enable signal as electronic lock, anti-stop signal is stirred the maloperation caused, is carried
The anti-interference of high circuit.
Compared with prior art, the invention have benefit that: 1) use metal-oxide-semiconductor switch in place electromagnetic type relay to open
Close, reduce the time delay of circuit;2) MCU can accurately control to drive signal pulsewidth;3) metal-oxide-semiconductor price is low, reduces whole driving electricity
Road hardware cost;4) metal-oxide-semiconductor small volume, reduces the overall volume of circuit;5) driving voltage of metal-oxide-semiconductor and the signal of MCU
Voltage keeps consistent, it is not necessary to other driving voltage, reduces the power consumption of circuit;6) increase output enable module to make as electronic lock
Energy signal, improves the anti-interference of circuit.
Accompanying drawing explanation
Fig. 1 is the voltage pattern driving semaphore request of conventional electrical lock.
Fig. 2 is the upper lock control drive circuit of conventional electrical lock.
Fig. 3 is the unlocking signal drive circuit of conventional electrical lock.
Fig. 4 is the module frame diagram of the present invention.
Fig. 5 is the circuit theory diagrams of the present invention.
Fig. 6 is the output signal truth table of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings with detailed description of the invention, the invention will be further described.
See Fig. 1 to Fig. 6, a kind of charging pile electronic lock drive circuit, set mould including MCU, electronic lock lead-out terminal, output
Block, output enable module, the first isolation drive module, the second isolation drive module, metal-oxide-semiconductor on-off circuit, drive power supply, described
MCU is respectively connecting to export setting module and output enables module, and described output setting module is connected to the first isolation drive mould
Block, described output enables module and is connected to the second isolation drive module, and described second isolation drive module is also associated with driving electricity
Source, described first isolation drive module and the second isolation drive module are connected to metal-oxide-semiconductor on-off circuit, described metal-oxide-semiconductor switch
Circuit is connected to electronic lock lead-out terminal;Described output setting module includes control signal module reconciliation lock control signal mode of locking
Block, described first isolation drive module includes lock control signal isolation drive module and unlocking control signal isolation drive mould
Block, described in control signal module of locking be connected to control signal isolation drive module of locking, described in control signal isolation of locking drive
Dynamic model block is then connected to metal-oxide-semiconductor on-off circuit, and described unlocking control signal module is connected to unlocking control signal isolation drive mould
Block, described unlocking control signal isolation drive module is also connected to metal-oxide-semiconductor on-off circuit;Described control signal module of locking includes
One end of 6th electric capacity C6 and the 9th resistance R9, described 9th resistance R9 is connected to the LOCK1 end of MCU, described 9th resistance R9
One end be additionally coupled to one end of the 6th electric capacity C6, the other end of described 9th resistance R9 and the 6th electric capacity C6 all meets GND;Described
Control signal of locking isolation drive module includes that the 8th resistance R8 and the second optocoupler E2, one end of described 8th resistance R8 are connected to
One end of 6th electric capacity C6 in control signal of locking module, the other end of described 8th resistance R8 is connected to the of the second optocoupler E2
One pin, second pin of described second optocoupler E2 meets GND, and the 3rd pin of described second optocoupler E2 connects-12V power supply, described
4th pin of the second optocoupler E2 is connected to metal-oxide-semiconductor on-off circuit;Described unlocking control signal module include the 7th electric capacity C7 and
One end of 11st resistance R11, described 11st resistance R11 is connected to the LOCK2 end of MCU, the one of described 11st resistance R11
End is additionally coupled to one end of the 7th electric capacity C7, the other end of described 11st resistance R11 and the 7th electric capacity C7 all meets GND;Described
Unlocking control signal isolation drive module includes that one end of the tenth resistance R10 and the 3rd optocoupler E3, described tenth resistance R10 connects
One end of the 7th electric capacity C7 in unlocking control signal module, the other end of described tenth resistance R10 connects the 3rd optocoupler E3's
First pin, second pin of described 3rd optocoupler E3 meets GND, and the 3rd pin of described 3rd optocoupler E3 connects-12V power supply, institute
The 4th pin stating the 3rd optocoupler E3 is connected to metal-oxide-semiconductor on-off circuit;Described output enables module and includes the 3rd resistance R3 and the
One end of one electric capacity C1, described 3rd resistance R3 is connected to the LOCKAct end of MCU, and one end of described 3rd resistance R3 is also connected with
One end of first electric capacity C1, the other end of described 3rd resistance R3 and the first electric capacity C1 all meets GND;Described second isolation drive mould
Block include the first optocoupler E1 and the second resistance R2, one end of described second resistance R2 be connected to output enable module, described second
The resistance R2 other end is connected to first pin of the first optocoupler E1, and second pin of described first optocoupler E1 meets GND, and described first
3rd pin of optocoupler E1 is connected to metal-oxide-semiconductor on-off circuit, and the 4th pin of described first optocoupler E1 is connected to drive power supply;Institute
Stating driving power supply and include 12V power supply and the first resistance R1, described 12V power supply is connected to the first optocoupler E1's by the first resistance R1
4th pin;Described first resistance R1 is adjustable resistance;Described metal-oxide-semiconductor on-off circuit includes the first metal-oxide-semiconductor Q1, the second metal-oxide-semiconductor
Q2, the 3rd metal-oxide-semiconductor Q3, the 4th metal-oxide-semiconductor Q4, the 4th resistance R4, the 5th resistance R5, the 6th resistance R6, the 7th resistance R7, the second electricity
Hold C2, the 3rd electric capacity C3, the 4th electric capacity C4 and the 5th electric capacity C5, one end of described 4th resistance R4 and one end of the 5th resistance R5
Being connected with each other and be connected to the second isolation drive module, the other end of described 4th resistance R4 is connected to the one of the second electric capacity C2
End, another termination-12V power supply of described second electric capacity C2, one end of described second electric capacity C2 is additionally coupled to the first metal-oxide-semiconductor Q1's
Grid, the source electrode of described first metal-oxide-semiconductor Q1 is connected to one end of the 4th resistance R4, and the drain electrode of described first metal-oxide-semiconductor Q1 is connected to
The positive pole of electronic lock lead-out terminal;The other end of described 4th resistance R4 is also connected with one end of the 6th resistance R6, described 6th electricity
One end of resistance R6 connects one end of the 4th electric capacity C4, and one end of described 6th resistance R6 is also connected with the grid of the 3rd metal-oxide-semiconductor Q3, institute
The drain electrode stating the 3rd metal-oxide-semiconductor Q3 is also connected to the positive pole of electronic lock lead-out terminal, and one end of described 4th electric capacity C4 is additionally coupled to
Control signal of locking isolation drive module, the other end of described 4th electric capacity C4 is connected to the source electrode of the 3rd metal-oxide-semiconductor Q3, and described
The drain electrode of one metal-oxide-semiconductor Q1 and the drain electrode of the 3rd metal-oxide-semiconductor Q3 are connected with each other;The other end of described 5th resistance R5 connects the 3rd electric capacity
One end of C3, the other end-12V power supply of described 3rd electric capacity C3, one end of described 3rd electric capacity C3 is additionally coupled to the second metal-oxide-semiconductor
The grid of Q2, the source electrode of described second metal-oxide-semiconductor Q2 connects one end of the 5th resistance R5, and the drain electrode of described second metal-oxide-semiconductor Q2 connects
To the negative pole of electronic lock lead-out terminal, the other end of described 5th resistance R5 is additionally coupled to one end of the 7th resistance R7, and described
The other end of seven resistance R7 connects one end of the 5th electric capacity C5, and one end of described 5th electric capacity C5 is additionally coupled to unlocking control signal
Isolation drive module, the other end of described 7th resistance R7 is additionally coupled to the grid of the 4th metal-oxide-semiconductor Q4, described 4th metal-oxide-semiconductor Q4
Drain electrode be connected to the negative pole of electronic lock lead-out terminal, the other end of described 5th electric capacity C5 is connected to the 4th metal-oxide-semiconductor Q4 source electrode;
The drain electrode of described 4th metal-oxide-semiconductor Q4 and the drain electrode of the second metal-oxide-semiconductor Q2 are connected with each other, the source electrode and the 3rd of described 4th metal-oxide-semiconductor Q4
The source electrode of metal-oxide-semiconductor Q3 is connected with each other and connects-12V power supply;Described first metal-oxide-semiconductor Q1 and the second metal-oxide-semiconductor Q2 is P-channel enhancement type field
Effect pipe, described 3rd metal-oxide-semiconductor Q3 and the 4th metal-oxide-semiconductor Q4 is N-channel enhancement mode field effect transistor;Described first metal-oxide-semiconductor Q1 and
The model of two metal-oxide-semiconductor Q2 is DTS4501, and the model of described 3rd metal-oxide-semiconductor Q3 and the 4th metal-oxide-semiconductor Q4 is DTS3400.
In present embodiment, described first resistance R1 is adjustable resistance, and power supply enters metal-oxide-semiconductor by the first resistance R1 and switchs
Circuit drives power supply as electronic lock, and the first resistance R1 is for limiting the maximum drive current of electronic lock.
In present embodiment ,+12V power supply and-12V power supply are the driving power supply of electronic lock, and maximum output current reaches
1000mA;MCU is by LOCKAct end, LOCK1 end and LOCK2 end output control signal, the most extremely LOCK+ of its electronic lock, electricity
The negative pole of son lock is LOCK-.
In present embodiment, when needs to electronic lock positive pulse to lock time, LOCKAct end and LOCK1 end set high level,
LOCK2 end sets low level;First optocoupler E1 and the second optocoupler E2 turns on, now the first metal-oxide-semiconductor Q1 and the grid of the 3rd metal-oxide-semiconductor Q3
Pole is just for low level, and the first metal-oxide-semiconductor Q1 will open, and the 3rd metal-oxide-semiconductor Q3 then can close, and the positive pole LOCK+ port of electronic lock is just
There is+12V voltage;3rd optocoupler E3 closes, and now the grid of the second metal-oxide-semiconductor Q2 and the 4th metal-oxide-semiconductor Q4 is all high level, and second
Metal-oxide-semiconductor Q2 may turn off, and the 4th metal-oxide-semiconductor Q4 then can open, and the negative pole LOCK-port of electronic lock just has-12V voltage, and circuit is just
Positive pulse can be released;At this moment, when LOCKAct end sets low level, close power supply, then stop positive pulse output;This process can complete to fill
Electricity stake electronic lock is locked process.
In present embodiment, when needs to electronic lock negative pulse to unlock time, LOCKAct end and LOCK2 end set high level,
LOCK1 end sets low level;First optocoupler E1 conducting, the second optocoupler E2 closes, now the first metal-oxide-semiconductor Q1 and the 3rd metal-oxide-semiconductor Q3
Grid is just for high level, and the first metal-oxide-semiconductor Q1 may turn off, and the 3rd metal-oxide-semiconductor Q3 then can open, the positive pole LOCK+ port of electronic lock
Just there is-12V voltage;3rd optocoupler E3 turns on, and the grid of the second metal-oxide-semiconductor Q2 and the 4th metal-oxide-semiconductor Q4 is then low level, and second
Metal-oxide-semiconductor Q2 will open, and the 4th metal-oxide-semiconductor Q4 then can close, and the negative pole LOCK-port of electronic lock just has+12V voltage, and circuit is just
Negative pulse can be released;At this moment, when LOCKAct end sets low level, close power supply, then stop negative pulse output;This process can complete to fill
Electricity stake electronic lock releasing process.
In present embodiment, the first optocoupler E1, the second optocoupler E2 and the 3rd optocoupler E3 are TLP127 optocoupler.
In present embodiment, the first metal-oxide-semiconductor Q1 and the second metal-oxide-semiconductor Q2 is P-channel enhancement type field effect transistor, and maximum delay is
30ns, the 3rd metal-oxide-semiconductor Q3 and the 4th metal-oxide-semiconductor Q4 are N-channel enhancement mode field effect transistor, and maximum delay is 75ns, the time delay of optocoupler
Then being not more than 80us, the total time delay of whole circuit is not more than 0.1ms, and the 10ms inherent delay comparing electromagnetic relay drops the most significantly
Low;Thus so that MCU accurately controls to drive the pulsewidth of signal, precision reaches ± 0.1ms;And the driving of metal-oxide-semiconductor is electric
Press and keep consistent with the signal voltage of MCU, it is not necessary to other driving voltages, metal-oxide-semiconductor Monolithic driver electric current maximum 250uA, monomer body
Power consumption is less than 1mW;The power consumption of optocoupler is about 15mW, and whole circuit power consumption is about 35mW, reduces the overall power consumption of circuit;And
Using metal-oxide-semiconductor to replace electromagnetic relay type of drive, its circuit area can be down to 25%, circuit height can drop to 25%.
Protection scope of the present invention includes but not limited to embodiment of above, and protection scope of the present invention is with claims
It is as the criterion, replacement that any those skilled in the art making this technology is readily apparent that, deforms, improve and each fall within the present invention's
Protection domain.