A kind of ticket-issuing device circuit and H-bridge drive circuit thereof
Technical field
The present invention relates to circuit design field, particularly relate to a kind of ticket-issuing device circuit for ticket-issuing device and H-bridge drive circuit thereof.
Background technology
At present, known ticket-issuing device is drawn a bill by Dao Piao mechanism, worm-and-wheel gear, extruding wheel, electric eye, control circuit and motor form.When electric eye detect lottery ticket put into Dao Piao mechanism lead ticket groove time, control circuit sends signal enabling motor, and driven by motor worm-and-wheel gear rotates, and worm-and-wheel gear drives and extrudes the rotating of wheel of drawing a bill, and extruding is drawn a bill.Control circuit decides the speed of drawing a bill by resistance capacitance timing, started by the conducting of triode and stop motor with cut-off.
But existing ticket-issuing device has the following disadvantages: 1. owing to not possessing reverse function, can not rotate backward when there is card ticket and exit card ticket.2. owing to not having brake function, motor may be burnt when load is overweight.3. control circuit adopts resistance capacitance timing out of true, easily causes having more ticket or drawing a bill less.4. control circuit adopts Darlington transistor TI P120TI P122D2061 and so on semiconductor devices, and its efficiency is low, and pressure drop is large, and power consumption is large, easy heating burnout.5. there is no lotting ratio/ticket proportion by subtraction, when namely going out display one point (representative fraction) on main frame that a ticket shows somewhat (representative fraction) or user on the main frame of user ticket-issuing device this go out the selection function of several tickets.
Summary of the invention
The object of the invention is to provide a kind of returned ticket of can reversing, overload braking, draws a bill precisely, the ticket-issuing device circuit of the durable and choosing multiple lotting ratio/ticket proportion by subtraction of components and parts and H-bridge drive circuit thereof.
The invention provides a kind of ticket-issuing device circuit, it comprises: microcontroller (1), H-bridge drive circuit (2) and interface circuit (3);
Described H-bridge drive circuit (2) has the first field effect transistor (U3A), the second field effect transistor (U3B), the 3rd field effect transistor (U4A), the 4th field effect transistor (U4B), motor (M), the first triode and the second triode;
The drain electrode of described first field effect transistor (U3A) is connected with the drain electrode of described second field effect transistor (U3B), the drain electrode of described 3rd field effect transistor (U4A) is connected with the drain electrode of the 4th field effect transistor (U4B), one end of described motor (M) is connected with the drain electrode of described first field effect transistor (U3A), and the other end is connected with the drain electrode of described 3rd field effect transistor (U4A);
The collector of described first triode (Q4) is connected with the grid of described first field effect transistor (U3A) and the grid of the second field effect transistor (U3B) respectively, and the base stage of described first triode (Q4) is connected with described microcontroller;
The collector of described second triode (Q7) is connected with the grid of described 3rd field effect transistor (U4A) and the grid of the 4th field effect transistor (U4B) respectively, and the base stage of described second triode (Q7) is connected with described microcontroller;
Described interface circuit is connected with described microcontroller.
Preferably, described ticket-issuing device circuit also has dress ticket on-off circuit, ticket re-selling on-off circuit, low and high level selection circuit, electric eye circuit and remaining ticket memory circuit, and described dress ticket on-off circuit, described ticket re-selling on-off circuit, described low and high level selection circuit, described electric eye circuit and described remaining ticket memory circuit are connected with described microcontroller respectively.
Preferably, described first field effect transistor (U3A) is P-channel field-effect transistor (PEFT) pipe, described second field effect transistor (U3B) is N channel field-effect pipe, described 3rd field effect transistor (U4A) is P-channel field-effect transistor (PEFT) pipe, and described 4th field effect transistor (U4B) is N channel field-effect pipe.
Preferably, described microcontroller is connected with a toggle switch.
Preferably, timer conter is provided with in described microcontroller.
Ticket-issuing device circuit working process of the present invention is as follows:
(1), when the first triode (Q4) saturation conduction described in described microprocessor controls, described second triode (Q7) cut-off, thus cause the conducting of described first field effect transistor (U3A), described second field effect transistor (U3B) cut-off; Described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, now, described motor (M) rotates forward;
(2) when the first triode (Q4) cut-off described in described microprocessor controls, described second triode (Q7) saturation conduction, thus cause the conducting of described second field effect transistor (U3B), described first field effect transistor (U3A) cut-off; Described 4th field effect transistor (U4B) cut-off, described 3rd field effect transistor (U4A) conducting, now, described motor (M) reverses;
(3) when the second field effect transistor (U3B) conducting described in described microprocessor controls, described first field effect transistor (U3A) cut-off; Described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, now, described motor (M) short circuit, thus realize the emergency brake of motor (M), namely shut down.
As from the foregoing, when ticket-issuing device circuit of the present invention install with ticket-issuing device in time, by H-bridge drive circuit described in described microprocessor controls, make ticket-issuing device can realize reversion and return ticket and overload braking.
In addition, ticket-issuing device circuit of the present invention adopts the double channel field effect transistor of N raceway groove and the combination of P raceway groove to carry out drive motor, and it is little, low in energy consumption and substantially do not generate heat that double channel field effect transistor has pressure drop.
The invention provides also a kind of H-bridge drive circuit (2), it comprises: the first field effect transistor (U3A), the second field effect transistor (U3B), the 3rd field effect transistor (U4A), the 4th field effect transistor (U4B), motor (M), the first triode (Q4) and the second triode (Q7);
The drain electrode of described first field effect transistor (U3A) is connected with the drain electrode of described second field effect transistor (U3B), the drain electrode of described 3rd field effect transistor (U4A) is connected with the drain electrode of the 4th field effect transistor (U4B), one end of described motor (M) is connected with the drain electrode of described first field effect transistor (U3A), and the other end is connected with the drain electrode of described 3rd field effect transistor (U4A);
The collector of described first triode (Q4) is connected with the grid of described first field effect transistor (U3A) and the grid of the second field effect transistor (U3B) respectively;
The collector of described second triode (Q7) is connected with the grid of described 3rd field effect transistor (U4A) and the grid of the 4th field effect transistor (U4B) respectively.
Preferably, described first field effect transistor (U3A) is P-channel field-effect transistor (PEFT) pipe, described second field effect transistor (U3B) is N channel field-effect pipe, described 3rd field effect transistor (U4A) is P-channel field-effect transistor (PEFT) pipe, and described 4th field effect transistor (U4B) is N channel field-effect pipe.
The present invention reoffers a kind of H-bridge drive circuit (2), and it comprises: the first double channel field effect transistor (21), the second double channel field effect transistor (22), motor (M), the first triode (Q4) and the second triode (Q7);
Described first double channel field effect transistor is made up of the first field effect transistor (U3A) and the second field effect transistor (U3B), described first field effect transistor (U3A) is P-channel field-effect transistor (PEFT) pipe, described second field effect transistor (U3B) is N channel field-effect pipe, and the drain electrode of described first field effect transistor (U3A) is connected with the drain electrode of described second field effect transistor (U3B);
Described second double channel field effect transistor is made up of the 3rd field effect transistor (U4A) and the 4th field effect transistor (U4B), described 3rd field effect transistor (U4A) is P-channel field-effect transistor (PEFT) pipe, described 4th field effect transistor (U4B) is N channel field-effect pipe, and the drain electrode of described 3rd field effect transistor (U4A) is connected with the drain electrode of described 4th field effect transistor (U4B);
One end of described motor (M) is connected with the drain electrode of described first field effect transistor (U 3A), and the other end is connected with the drain electrode of described 3rd field effect transistor (U4A);
The collector of described first triode (Q4) is connected with the grid of described first field effect transistor (U3A) and the grid of the second field effect transistor (U3B) respectively;
The collector of described second triode (Q7) is connected with the grid of described 3rd field effect transistor (U4A) and the grid of the 4th field effect transistor (U4B) respectively.
Preferably, the model of described first double channel field effect transistor and described second double channel field effect transistor is respectively MT4606.
The course of work of H-bridge drive circuit of the present invention is as follows: (1), when control described first triode (Q4) saturation conduction, when described second triode (Q7) is ended, the conducting of described first field effect transistor (U3A), described second field effect transistor (U3B) cut-off; Described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, described motor (M) rotates forward;
(2) when described first triode (Q4) cut-off of control, during described second triode (Q7) saturation conduction, the conducting of described second field effect transistor (U3B), when described first field effect transistor (U3A) is ended; Described 4th field effect transistor (U4B) cut-off, described 3rd field effect transistor (U4A) conducting, described motor (M) reverses;
(3) when control controls the conducting of described second field effect transistor (U3B), described first field effect transistor (U3A) cut-off; Described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, now, described motor (M) short circuit, thus realize the emergency brake of motor (M), namely shut down.
As from the foregoing, when H-bridge drive circuit of the present invention is installed in ticket-issuing device, ticket-issuing device can realize reversion and return ticket and overload braking.
In addition, H-bridge drive circuit of the present invention adopts the double channel field effect transistor of N raceway groove and the combination of P raceway groove to carry out drive motor, and it is little, low in energy consumption and substantially do not generate heat that double channel field effect transistor has pressure drop.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a application's part, does not form inappropriate limitation of the present invention.
Fig. 1 is ticket-issuing device circuit diagram of the present invention.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific embodiment, be used for explaining the present invention in this illustrative examples of the present invention and explanation, but not as a limitation of the invention.
Please refer to Fig. 1, the invention provides a kind of for the ticket-issuing device circuit in ticket-issuing device, this ticket-issuing device circuit is connected with the main frame of the game machine of public place of entertainment, and it comprises: microcontroller 1 (MCU), H-bridge drive circuit 2, interface circuit 3, dress ticket on-off circuit 4, ticket re-selling on-off circuit 5, low and high level selection circuit 6, remaining ticket memory circuit 7, electric eye circuit 8, toggle switch 9 and power circuit 10.
Described H-bridge drive circuit 2 comprises the first double channel field effect transistor 21, second double channel field effect transistor 22, motor M, the first triode Q4 and the second triode Q7, and the model of described first double channel field effect transistor 21 and described second double channel field effect transistor 22 is respectively MT4606.
Described first double channel field effect transistor 21 is made up of the first field effect transistor U3A and the second field effect transistor U3B, described first field effect transistor U3A is P-channel field-effect transistor (PEFT) pipe, described second field effect transistor U3B is N channel field-effect pipe, and the drain electrode of described first field effect transistor U3A is connected with the drain electrode of described second field effect transistor U3B.
Described second double channel field effect transistor 22 is made up of the 3rd field effect transistor U4A and the 4th field effect transistor U4B, described 3rd field effect transistor U4A is P-channel field-effect transistor (PEFT) pipe, described 4th field effect transistor U4B is N channel field-effect pipe, and the drain electrode of described 3rd field effect transistor U4A is connected with the drain electrode of described 4th field effect transistor U4B.
First electrode tip M1 of described motor M is connected with the drain electrode of described first field effect transistor U3A, and the second electrode tip M2 of described motor M is connected with the drain electrode of described 3rd field effect transistor U4A.
The base electrode of described first triode (Q4) is connected with described microcontroller 1, the collector of described first triode (Q4) is connected with the grid of described first field effect transistor (U3A) by resistance R25, meanwhile, the collector of described first triode (Q4) is connected with the grid of described second field effect transistor (U3B) by resistance R26.
The base electrode of described second triode (Q7) is connected with described microcontroller 1, the collector of described second triode (Q7) is connected with the grid of described 3rd field effect transistor (U4A) by resistance R30, meanwhile, the collector of described second triode (Q7) is connected with the grid of described 4th field effect transistor (U4B) by resistance R28.
Described interface circuit 3 is connected with described microcontroller 1, and for being connected with the main frame of game machine, described interface circuit 3 comprises input circuit 31 and output circuit 32, and wherein said output circuit 32 has output folding selector switch 321.
Described dress ticket on-off circuit 4 is connected with described microcontroller 1 respectively with described ticket re-selling on-off circuit 5, is respectively used to control dress ticket and ticket re-selling.
Described low and high level selection circuit 6 is connected with described microcontroller 1, if the main frame of game machine is high level when drawing a bill, then needs the low and high level switch 61 of described low and high level selection circuit 6 to get to high level end, otherwise gets to low level end.
Described remaining ticket memory circuit 7 is connected with described microcontroller 1, and it has two functions, and the first, altogether go out how many tickets from bringing into use to current for preserving ticket-issuing device; The second, when meet the main frame of game machine send a pulse request go out a lot of tickets time, save the data in its storer 71, prevent because the ticket in ticket-issuing device is inadequate, again fill loss of data after ticket, in the present embodiment, the model of described storer 71 is 24c02.
Described toggle switch 9 is connected with described microcontroller 1, described toggle switch 9 has 6 toggle switches, the closed representative of one of them toggle switch in 6 toggle switches starts lotting ratio, disconnect representative and start ticket proportion by subtraction, the open and close situation of 5 remaining toggle switches represents different lotting ratios and different ticket proportions by subtraction, and namely described toggle switch has the 6 power kind states of 2.The purposes of described toggle switch 9 is: the field master of public place of entertainment can arrange lotting ratio or ticket proportion by subtraction according to demand, as public place of entertainment field master as described in toggle switch sets lotting ratio is 1 to 2 time, now, if the client of field master obtained 1 point (showing on the main frame of game machine) in the process of Play Station games, then described drawing machine went out 2 tickets.Microcontroller 1 of the present invention scans the open and close situation of 6 described toggle switches by setting program.
Described power circuit 10 is powered for described microcontroller 1, described H-bridge drive circuit 2, described interface circuit 3, described dress ticket on-off circuit 4, described ticket re-selling on-off circuit 5, described low and high level selection circuit 6, remaining ticket memory circuit 7 and described electric eye circuit 8.
Be provided with timer conter in microcontroller 1 of the present invention, the pulse that timer conter is beamed back for counting electric eye circuit 8, thus calculating ticket-issuing device how many tickets are gone out.
Ticket-issuing device circuit working process of the present invention is as follows:
(1) when extraneous main frame send draw a bill signal time, described microcontroller 1 controls described first triode (Q4) saturation conduction, described second triode (Q7) cut-off, thus make the conducting of described first field effect transistor (U3A), described second field effect transistor (U3B) cut-off, described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, so electric current flows to the second electrode tip M2 from the first electrode tip M1, described motor (M) rotates forward, and ticket is normally derived;
(2) when there is card ticket, described microcontroller 1 controls the cut-off of described first triode (Q4), described second triode (Q7) saturation conduction, thus make the conducting of described second field effect transistor (U3B), described first field effect transistor (U3A) cut-off, described 4th field effect transistor (U4B) cut-off, described 3rd field effect transistor (U4A) conducting, so electric current flows to the first electrode tip M1 from the second electrode tip M2, described motor (M) reverses, and card ticket is withdrawn;
(3) when load is overweight, described microcontroller 1 controls the conducting of described second field effect transistor (U3B), described first field effect transistor (U3A) cut-off; Described 4th field effect transistor (U4B) conducting, described 3rd field effect transistor (U4A) cut-off, so described motor (M) short circuit, thus realize the emergency brake of motor (M), namely shut down, thus prevent from burning motor (M) when load is overweight.
In sum, the benefit of ticket-issuing device circuit of the present invention is:
(1), by H-bridge drive circuit described in described microprocessor controls, make ticket-issuing device can realize reversion and return ticket and overload braking;
(2), ticket-issuing device circuit of the present invention adopts the double channel field effect transistor of N raceway groove and the combination of P raceway groove to carry out drive motor, and it is little, low in energy consumption and substantially do not generate heat that double channel field effect transistor has pressure drop;
(3), the present invention by being provided with timer conter counting in the microcontroller, make to draw a bill more accurate;
(4), adopt toggle switch and microcontroller to combine, choosing multiple lotting ratio/ticket proportion by subtraction, has higher cost performance;
(5), described remaining ticket memory circuit has data hold function, prevents from again filling loss of data after ticket.
Above the technical scheme that the embodiment of the present invention provides is described in detail, apply specific case herein to set forth the principle of the embodiment of the present invention and embodiment, the explanation of above embodiment is only applicable to the principle helping to understand the embodiment of the present invention; Meanwhile, for one of ordinary skill in the art, according to the embodiment of the present invention, embodiment and range of application all will change, and in sum, this description should not be construed as limitation of the present invention.