Subway ticket vending machine input and output board detection circuit
By designing a detection circuit that combines power supply unit, detection unit and USB bus adapter unit, the problem of long and high cost of detection of IO board of the subway ticket vending machine is solved, and rapid fault positioning is achieved, which improves detection efficiency and reduces costs.
Patent Information
- Application Number
- CN202421833758.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2034-07-31
AI Technical Summary
The existing subway ticket vending machine input and output board (IO board) inspection requires separate inspection of each channel, which is time-consuming and costly, and has low working efficiency.
A subway ticket vending machine input and output board detection circuit is designed, and power is controlled through the control button to control power off by using the power supply unit, detection unit and USB bus adapter unit. The precompiled program is burned by the microcontroller U1 to quickly determine the fault of the IO board.
It realizes rapid locking of IO board failure points, improves detection efficiency and reduces detection costs.
Smart Images

Figure CN223259834U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of subway gate detection, in particular to an input and output board detection circuit of a subway automatic ticket vending machine. Background Art
[0002] Automatic ticket vending machines (TVMs) are station-level terminal devices within the automated fare collection system (AFC). They are a crucial component of the subway ticketing system. They automatically complete ticket sales and top-up tasks, reducing the workload of ticket sellers and queues for ticket purchases and top-up, thus providing convenience for passengers. As one of the devices in the subway ticketing system that directly interacts with passengers, the TVM's operation directly impacts both the ticket purchase and ride experience.
[0003] The TVM internally includes a power supply module, main control unit, banknote recovery module, banknote change module, reader / writer, maintenance light, maintenance printer, back-office maintenance panel, coin processing module, ticket issuance module, operation status display, fan, I / O board, audio board, and junction box. The I / O board primarily performs functions such as detecting unit position and resetting. Damage to the I / O board will directly cause the TVM to malfunction. The I / O board has 16 input and output ports, each with the same function. Currently, each port is individually tested, which is time-consuming, costly, and inefficient. Utility Model Content
[0004] The purpose of the present utility model is to address the deficiencies in the prior art and provide a detection circuit for an input and output board of a subway automatic ticket vending machine to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a detection circuit for an input and output board of a subway automatic ticket vending machine, comprising a power supply unit, wherein the power supply input end of the power supply unit is connected to a 24V DC power supply, the power supply output end of the power supply unit is simultaneously connected to a detection unit and a USB bus adapter unit through a control button, the control button is used to control the power on and off of the detection unit and the USB bus adapter unit, the signal input end of the detection unit is connected to a test board, the signal output end of the detection unit is connected to a signal input end of a USB bus adapter unit, the signal output end of the USB bus adapter unit is connected to an output board, the detection unit is connected to the automatic ticket vending machine to perform detection on the automatic ticket vending machine, and the detection results are fed back through the USB bus adapter unit and the output board.
[0006] Preferably, the detection unit includes a single-chip microcomputer U1, a crystal oscillator X1, a capacitor C6, a capacitor C7 and a step-down circuit, the single-chip microcomputer U1 is electrically connected to the power supply module, one end of the crystal oscillator X1 is electrically connected to pin 19 of the single-chip microcomputer U1, the other end of the crystal oscillator X1 is electrically connected to pin 18 of the single-chip microcomputer U1, one end of the capacitor C6 is electrically connected to one end of the crystal oscillator X1, the other end of the capacitor C6 is electrically connected to one end of the capacitor C7 and grounded, the other end of the capacitor C7 is electrically connected to the other end of the crystal oscillator X1, and the step-down circuit is electrically connected to the single-chip microcomputer U1.
[0007] Preferably, the detection unit further includes a resistor array RP0, a resistor array RP2, an NPN transistor Q1, an NPN transistor Q2, an NPN transistor Q3, an NPN transistor Q4, an NPN transistor Q5, an NPN transistor Q6, an NPN transistor Q7, an NPN transistor Q8, a PNP transistor Q9, a PNP transistor Q10, a PNP transistor Q11, a PNP transistor Q12, a PNP transistor Q13, a PNP transistor Q14, a PNP transistor Q15, a PNP transistor Q16, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, a resistor R8 and a connector J2, pins 2, 3, and 4 of RP0. Pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 are electrically connected to pin 39, pin 38, pin 37, pin 36, pin 35, pin 34, pin 33 and pin 32 of the microcontroller U1 in sequence, respectively. Pin 1 of RP0 is electrically connected to the power supply module. Pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of RP2 are electrically connected to pin 21, pin 22, pin 23, pin 24, pin 25, pin 26, pin 27 and pin 28 of the microcontroller U1 in sequence, respectively. The base of the NPN transistor Q1 is electrically connected to pin 39 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, and one end of the resistor R1 is electrically connected to the collector of the NPN transistor Q1. The other end is electrically connected to the base of the PNP transistor Q9, the collector of the PNP transistor Q9 is electrically connected to pin 1 of J2, the emitter of the PNP transistor Q9 is electrically connected to the power supply module, the base of the NPN transistor Q2 is electrically connected to pin 38 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, one end of the resistor R2 is electrically connected to the collector of the NPN transistor Q2, the other end is electrically connected to the base of the PNP transistor Q10, the collector of the PNP transistor Q10 is electrically connected to pin 2 of J2, the emitter of the PNP transistor Q10 is electrically connected to the power supply module, the base of the NPN transistor Q3 is electrically connected to pin 37 of the microcontroller U1, the emitter of the NPN transistor Q3 is grounded, and one end of the resistor R3 is electrically connected to the collector of the NPN transistor Q2. One end of the resistor R4 is electrically connected to the collector of the NPN transistor Q3, and the other end is electrically connected to the base of the PNP transistor Q11. The collector of the PNP transistor Q11 is electrically connected to pin 3 of J2. The emitter of the PNP transistor Q11 is electrically connected to the power supply module. The base of the NPN transistor Q4 is electrically connected to pin 36 of the microcontroller U1. The emitter of the NPN transistor Q4 is grounded. One end of the resistor R4 is electrically connected to the collector of the NPN transistor Q4, and the other end is electrically connected to the base of the PNP transistor Q12. The collector of the PNP transistor Q12 is electrically connected to pin 4 of J2. The emitter of the PNP transistor Q12 is electrically connected to the power supply module. The base of the NPN transistor Q5 is electrically connected to pin 35 of the microcontroller U1.The emitter of the NPN transistor Q5 is grounded, one end of the resistor R5 is electrically connected to the collector of the NPN transistor Q5, and the other end is electrically connected to the base of the PNP transistor Q13, the collector of the PNP transistor Q13 is electrically connected to pin 5 of J2, the emitter of the PNP transistor Q13 is electrically connected to the power supply module, the base of the NPN transistor Q6 is electrically connected to pin 34 of the microcontroller U1, the emitter of the NPN transistor Q6 is grounded, one end of the resistor R6 is electrically connected to the collector of the NPN transistor Q6, and the other end is electrically connected to the base of the PNP transistor Q14, the collector of the PNP transistor Q14 is electrically connected to pin 6 of J2, the emitter of the PNP transistor Q14 is electrically connected to the power supply module, the base of the NPN transistor Q7 is electrically connected to pin 34 of the microcontroller U1, the emitter of the NPN transistor Q6 is grounded, Connected to pin 33 of microcontroller U1, the emitter of NPN transistor Q7 is grounded, one end of resistor R7 is electrically connected to the collector of NPN transistor Q7, and the other end is electrically connected to the base of PNP transistor Q15, the collector of PNP transistor Q15 is electrically connected to pin 7 of J2, the emitter of PNP transistor Q15 is electrically connected to the power supply module, the base of NPN transistor Q8 is electrically connected to pin 32 of microcontroller U1, the emitter of NPN transistor Q8 is grounded, one end of resistor R8 is electrically connected to the collector of NPN transistor Q8, and the other end is electrically connected to the base of PNP transistor Q16, the collector of PNP transistor Q16 is electrically connected to pin 8 of J2, and the emitter of PNP transistor Q16 is electrically connected to the power supply module.
[0008] Preferably, the detection unit further includes a connector J1, a connector J3, a resistor RP1 and a resistor RP3, pin 1 of the resistor RP1 is connected to the power supply module, and pins 2, 3, 4, 5, 6, 7, 8 and 9 of the resistor RP1 are electrically connected to pins 1, 2, 3, 4, 5, 6, 7 and 8 of the microcontroller U1 in sequence, respectively; pin 1 of the resistor RP3 is connected to the power supply module, and pins 2, 3, 4, 5, 6, 7, 8 and 9 of the resistor RP3 are electrically connected to pins 10, 11, 12, 13, 14, 15, 16 and 17 of the microcontroller U1 in sequence, respectively; pins 1 and 2 of J1 are electrically connected at the same time. Connect the power supply module, pin 12, pin 11, pin 10, pin 9, pin 8, pin 7, pin 6, and pin 5 of J1 are electrically connected to pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, and pin 8 of the microcontroller U1 in sequence, respectively, pin 14, pin 16, pin 13, and pin 17 of J1 are electrically connected to pin 12, pin 13, pin 14, and pin 15 of the microcontroller U1 in sequence, pin 3, pin 4, pin 19, and pin 20 of J1 are grounded at the same time, and pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, and pin 8 of J3 are electrically connected to pin 21, pin 22, pin 23, pin 24, pin 25, pin 26, pin 27, and pin 28 of the microcontroller U1 in sequence.
[0009] Preferably, pin 3 of the USB bus adapter unit is electrically connected to pin 10 of the microcontroller U1, pin 4 of the USB bus adapter unit is electrically connected to pin 11 of the microcontroller U1, pin 1 of the USB bus adapter unit is connected to the power supply module, and pin 5 of the USB bus adapter unit is grounded.
[0010] Preferably, the input end of the step-down circuit is connected to 24V DC, and the output end of the step-down circuit is connected to the power supply input end of the power supply unit. The step-down circuit includes a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a capacitor C1, a capacitor C3, a chip U2, a capacitor C4 and a capacitor C2. The positive electrode of the diode D1 is electrically connected to the power supply module, the positive electrode of the diode D2 is electrically connected to the negative electrode of the diode D1, and the negative electrode of the diode D2 is electrically connected to the positive electrode of the diode D3. The positive electrode of diode D4 is electrically connected to the negative electrode of diode D3, the negative electrode of diode D4 is electrically connected to the positive electrode of diode D5, the positive electrode of capacitor C1 is electrically connected to the negative electrode of diode D5, one end of capacitor C3, pin 1 of chip U2 and the power supply module at the same time, the negative electrode of capacitor C1 is electrically connected to the other end of capacitor C3, pin 2 of chip U2, one end of capacitor C4 and the negative electrode of capacitor C2 are grounded at the same time, and the positive electrode of capacitor C2 is electrically connected to the other end of capacitor C4 and pin 3 of chip U2 at the same time.
[0011] Beneficial effect: By burning the pre-compiled program into the single-chip microcomputer U1 and controlling the operation of the control button, the detection unit and the USB bus adapter unit are powered on. At this time, the detection unit will have high and low level outputs at the IO port according to the input signal. The fault path can be quickly judged according to the display mode of the LED lights on or off on the different input and output boards being detected, and the fault condition of the maintenance parts can be detected, so as to quickly lock the fault point. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a detection flow chart of the utility model;
[0013] Figure 2 This is a partial circuit diagram of the detection unit of the utility model;
[0014] Figure 3 This is a step-down circuit diagram of the utility model. DETAILED DESCRIPTION
[0015] Please refer to Figures 1 to 3The utility model provides a technical solution: a subway automatic ticket vending machine input and output board detection circuit, including a power supply unit, the power supply input end of the power supply unit is connected to 24V DC, the power supply output end of the power supply unit is simultaneously connected to the detection unit and the USB bus adapter unit through a control button, the control button is used to control the power on and off of the detection unit and the USB bus adapter unit, the signal input end of the detection unit is connected to the test board, the signal output end of the detection unit is connected to the signal input end of the USB bus adapter unit, and the signal output end of the USB bus adapter unit is connected to the output board. First, by burning the pre-compiled program on the single-chip microcomputer U1, after the program burning is completed, the automatic ticket vending machine to be detected is connected to the control button operation control to power on the detection unit and the USB bus adapter unit. At this time, the detection unit will have high and low level outputs at the IO port according to the input signal. According to the different display modes of the LED lights on or off on the input and output boards being detected, the fault path can be quickly judged, the fault condition of the maintenance parts can be detected, and the fault point can be quickly locked.
[0016] In a further embodiment, the detection unit includes a single-chip microcomputer U1, a crystal oscillator X1, a capacitor C6, a capacitor C7, a resistor RP0, a resistor RP2, an NPN transistor Q1, an NPN transistor Q2, an NPN transistor Q3, an NPN transistor Q4, an NPN transistor Q5, an NPN transistor Q6, an NPN transistor Q7, an NPN transistor Q8, a PNP transistor Q9, a PNP transistor Q10, a PNP transistor Q11, a PNP transistor Q12, a PNP transistor Q13, a PNP transistor Q14, a PNP transistor Q15, a PNP transistor Q16, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, resistor R8, connector J2, connector J1, connector J3, resistor RP1, resistor RP3 and step-down circuit, wherein the single-chip microcomputer U1 adopts the STC87C51 model single-chip microcomputer, the resistor RP0 and the resistor RP2 both adopt the A09-103JP resistor, the connector J2 adopts the PZ254V-11-08P pin header, the connector J1 adopts the IDC connector model 2.54-2*10P simple cow connector, the connector J3 adopts the PZ254V-11-08P connector, the resistor RP1 and the resistor RP3 both adopt the A09-103JP resistor, the single-chip microcomputer U1 is electrically connected to the power supply module, one end of the crystal oscillator X1 is electrically connected to pin 19 of the single-chip microcomputer U1, and the other end of the crystal oscillator X1 is electrically connected to pin 19 of the single-chip microcomputer U1. The end is electrically connected to pin 18 of the single-chip microcomputer U1, one end of the capacitor C6 is electrically connected to one end of the crystal oscillator X1, the other end of the capacitor C6 is electrically connected to one end of the capacitor C7 and grounded, the other end of the capacitor C7 is electrically connected to the other end of the crystal oscillator X1, the step-down circuit is electrically connected to the single-chip microcomputer U1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of the resistor RP0 are electrically connected to pin 39, pin 38, pin 37, pin 36, pin 35, pin 34, pin 33 and pin 32 of the single-chip microcomputer U1 in sequence, pin 1 of the resistor RP0 is electrically connected to the power supply module, and pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of the resistor RP2 are electrically connected to pin 39, pin 38, pin 37, pin 36, pin 35, pin 34, pin 33 and pin 32 of the single-chip microcomputer U1 in sequence. Pins 21, 22, 23, 24, 25, 26, 27, and 28 of the microcontroller U1 are electrically connected, the base of the NPN transistor Q1 is electrically connected to pin 39 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, one end of the resistor R1 is electrically connected to the collector of the NPN transistor Q1, and the other end is electrically connected to the base of the PNP transistor Q9, the collector of the PNP transistor Q9 is electrically connected to pin 1 of J2, the emitter of the PNP transistor Q9 is electrically connected to the power supply module, the base of the NPN transistor Q2 is electrically connected to pin 38 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, and one end of the resistor R2 is electrically connected to the collector of the NPN transistor Q2.The other end is electrically connected to the base of the PNP transistor Q10, the collector of the PNP transistor Q10 is electrically connected to pin 2 of J2, the emitter of the PNP transistor Q10 is electrically connected to the power supply module, the base of the NPN transistor Q3 is electrically connected to pin 37 of the microcontroller U1, the emitter of the NPN transistor Q3 is grounded, one end of the resistor R3 is electrically connected to the collector of the NPN transistor Q3, and the other end is electrically connected to the base of the PNP transistor Q11, the collector of the PNP transistor Q11 is electrically connected to pin 3 of J2, the emitter of the PNP transistor Q11 is electrically connected to the power supply module, the base of the NPN transistor Q4 is electrically connected to pin 36 of the microcontroller U1, the emitter of the NPN transistor Q4 is grounded, and the resistor One end of R4 is electrically connected to the collector of NPN transistor Q4, and the other end is electrically connected to the base of PNP transistor Q12. The collector of PNP transistor Q12 is electrically connected to pin 4 of J2. The emitter of PNP transistor Q12 is electrically connected to the power supply module. The base of NPN transistor Q5 is electrically connected to pin 35 of microcontroller U1. The emitter of NPN transistor Q5 is grounded. One end of resistor R5 is electrically connected to the collector of NPN transistor Q5, and the other end is electrically connected to the base of PNP transistor Q13. The collector of PNP transistor Q13 is electrically connected to pin 5 of J2. The emitter of PNP transistor Q13 is electrically connected to the power supply module. The base of NPN transistor Q6 is electrically connected to pin 1 of microcontroller U1. Pin 34, the emitter of NPN transistor Q6 is grounded, one end of resistor R6 is electrically connected to the collector of NPN transistor Q6, and the other end is electrically connected to the base of PNP transistor Q14, the collector of PNP transistor Q14 is electrically connected to pin 6 of J2, the emitter of PNP transistor Q14 is electrically connected to the power supply module, the base of NPN transistor Q7 is electrically connected to pin 33 of microcontroller U1, the emitter of NPN transistor Q7 is grounded, one end of resistor R7 is electrically connected to the collector of NPN transistor Q7, and the other end is electrically connected to the base of PNP transistor Q15, the collector of PNP transistor Q15 is electrically connected to pin 7 of J2, the emitter of PNP transistor Q15 is electrically connected to the power supply module, N The base of the PN transistor Q8 is electrically connected to pin 32 of the microcontroller U1, the emitter of the NPN transistor Q8 is grounded, one end of the resistor R8 is electrically connected to the collector of the NPN transistor Q8, and the other end is electrically connected to the base of the PNP transistor Q16, the collector of the PNP transistor Q16 is electrically connected to pin 8 of J2, the emitter of the PNP transistor Q16 is electrically connected to the power supply module, pin 1 of the resistor RP1 is connected to the power supply module, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of the resistor RP1 are electrically connected to pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7 and pin 8 of the microcontroller U1 in sequence, and pin 1 of the resistor RP3 is connected to the power supply module.Pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of the resistor RP3 are electrically connected to pin 10, pin 11, pin 12, pin 13, pin 14, pin 15, pin 16 and pin 17 of the microcontroller U1 in sequence, and pin 1 and pin 2 of J1 are electrically connected to the power supply module at the same time. Pin 12, pin 11, pin 10, pin 9, pin 8, pin 7, pin 6 and pin 5 of J1 are electrically connected to pin 1, pin 2, pin 3, pin 4, pin 5, pin 17 of the microcontroller U1 in sequence. 6, pin 7 and pin 8 are electrically connected, pin 14, pin 16, pin 13 and pin 17 of J1 are electrically connected to pin 12, pin 13, pin 14 and pin 15 of microcontroller U1 in sequence respectively, pin 3, pin 4, pin 19 and pin 20 of J1 are grounded at the same time, pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7 and pin 8 of J3 are electrically connected to pin 21, pin 22, pin 23, pin 24, pin 25, pin 26, pin 27 and pin 28 of microcontroller U1 in sequence respectively.
[0017] In further implementation, pin 3 of the USB bus adapter unit is electrically connected to pin 10 of the microcontroller U1, pin 4 of the USB bus adapter unit is electrically connected to pin 11 of the microcontroller U1, pin 1 of the USB bus adapter unit is connected to the power supply module, and pin 5 of the USB bus adapter unit is grounded.
[0018] In a further implementation, the input end of the step-down circuit is connected to 24V DC, and the output end of the step-down circuit is connected to the power supply input end of the power supply unit. The step-down circuit includes a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a capacitor C1, a capacitor C3, a chip U2, a capacitor C4 and a capacitor C2, wherein the diodes D1-D5 are all 1N4001 type diodes, the chip U2 is an LM7805 chip, the positive electrode of the diode D1 is electrically connected to the power supply module, and the positive electrode of the diode D2 is electrically connected to the negative electrode of the diode D1. The cathode of diode D2 is electrically connected to the anode of diode D3, the anode of diode D4 is electrically connected to the cathode of diode D3, the cathode of diode D4 is electrically connected to the anode of diode D5, the anode of capacitor C1 is electrically connected to the cathode of diode D5, one end of capacitor C3, pin 1 of chip U2 and electrically connected to the power supply module at the same time, the cathode of capacitor C1 is electrically connected to the other end of capacitor C3, pin 2 of chip U2, one end of capacitor C4 and the cathode of capacitor C2 are grounded at the same time, and the anode of capacitor C2 is electrically connected to the other end of capacitor C4 and pin 3 of chip U2 at the same time.
[0019] It should be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
Claims
1. A subway automatic ticket vending machine input and output board detection circuit, characterized in that: The device comprises a power supply unit, wherein the power supply input end of the power supply unit is connected to 24V DC power, the power supply output end of the power supply unit is simultaneously connected to the detection unit and the USB bus adapter unit through a control button, the control button is used to control the power on and off of the detection unit and the USB bus adapter unit, the signal input end of the detection unit is connected to the test board, the signal output end of the detection unit is connected to the signal input end of the USB bus adapter unit, the signal output end of the USB bus adapter unit is connected to the output board, the detection unit is connected to the automatic ticket vending machine to perform detection on the automatic ticket vending machine, and the detection result is fed back through the USB bus adapter unit and the output board.
2. The detection circuit for an input and output board of a subway automatic ticket vending machine according to claim 1, characterized in that: The detection unit includes a single-chip microcomputer U1, a crystal oscillator X1, a capacitor C6, a capacitor C7 and a step-down circuit. The single-chip microcomputer U1 is electrically connected to the power supply module, one end of the crystal oscillator X1 is electrically connected to pin 19 of the single-chip microcomputer U1, and the other end of the crystal oscillator X1 is electrically connected to pin 18 of the single-chip microcomputer U1. One end of the capacitor C6 is electrically connected to one end of the crystal oscillator X1, and the other end of the capacitor C6 is electrically connected to one end of the capacitor C7 and grounded. The other end of the capacitor C7 is electrically connected to the other end of the crystal oscillator X1. The step-down circuit is electrically connected to the single-chip microcomputer U1.
3. The detection circuit for an input and output board of a subway automatic ticket vending machine according to claim 2, characterized in that: The detection unit also includes a resistor array RP0, a resistor array RP2, an NPN transistor Q1, an NPN transistor Q2, an NPN transistor Q3, an NPN transistor Q4, an NPN transistor Q5, an NPN transistor Q6, an NPN transistor Q7, an NPN transistor Q8, a PNP transistor Q9, a PNP transistor Q10, a PNP transistor Q11, a PNP transistor Q12, a PNP transistor Q13, a PNP transistor Q14, a PNP transistor Q15, a PNP transistor Q16, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, a resistor R8 and a connector J2, pins 2, 3 and 4 of RP0 , pin 5, pin 6, pin 7, pin 8 and pin 9 are electrically connected to pin 39, pin 38, pin 37, pin 36, pin 35, pin 34, pin 33 and pin 32 of the microcontroller U1 in sequence respectively, pin 1 of RP0 is electrically connected to the power supply module, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8 and pin 9 of RP2 are electrically connected to pin 21, pin 22, pin 23, pin 24, pin 25, pin 26, pin 27 and pin 28 of the microcontroller U1 in sequence respectively, the base of the NPN transistor Q1 is electrically connected to pin 39 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, one end of the resistor R1 is electrically connected to the collector of the NPN transistor Q1, and the other end The end is electrically connected to the base of the PNP transistor Q9, the collector of the PNP transistor Q9 is electrically connected to pin 1 of J2, the emitter of the PNP transistor Q9 is electrically connected to the power supply module, the base of the NPN transistor Q2 is electrically connected to pin 38 of the microcontroller U1, the emitter of the NPN transistor Q1 is grounded, one end of the resistor R2 is electrically connected to the collector of the NPN transistor Q2, and the other end is electrically connected to the base of the PNP transistor Q10, the collector of the PNP transistor Q10 is electrically connected to pin 2 of J2, the emitter of the PNP transistor Q10 is electrically connected to the power supply module, the base of the NPN transistor Q3 is electrically connected to pin 37 of the microcontroller U1, the emitter of the NPN transistor Q3 is grounded, and one end of the resistor R3 is electrically connected to the collector of the NPN transistor Q2. The resistor R4 is electrically connected to the collector of the NPN transistor Q3, and the other end is electrically connected to the base of the PNP transistor Q11. The collector of the PNP transistor Q11 is electrically connected to pin 3 of J2. The emitter of the PNP transistor Q11 is electrically connected to the power supply module. The base of the NPN transistor Q4 is electrically connected to pin 36 of the microcontroller U1. The emitter of the NPN transistor Q4 is grounded. One end of the resistor R4 is electrically connected to the collector of the NPN transistor Q4, and the other end is electrically connected to the base of the PNP transistor Q12. The collector of the PNP transistor Q12 is electrically connected to pin 4 of J2. The emitter of the PNP transistor Q12 is electrically connected to the power supply module. The base of the NPN transistor Q5 is electrically connected to pin 35 of the microcontroller U1.The emitter of the NPN transistor Q5 is grounded, one end of the resistor R5 is electrically connected to the collector of the NPN transistor Q5, and the other end is electrically connected to the base of the PNP transistor Q13, the collector of the PNP transistor Q13 is electrically connected to pin 5 of J2, the emitter of the PNP transistor Q13 is electrically connected to the power supply module, the base of the NPN transistor Q6 is electrically connected to pin 34 of the microcontroller U1, the emitter of the NPN transistor Q6 is grounded, one end of the resistor R6 is electrically connected to the collector of the NPN transistor Q6, and the other end is electrically connected to the base of the PNP transistor Q14, the collector of the PNP transistor Q14 is electrically connected to pin 6 of J2, the emitter of the PNP transistor Q14 is electrically connected to the power supply module, the base of the NPN transistor Q7 is electrically connected to pin 34 of the microcontroller U1, the emitter of the NPN transistor Q6 is grounded, Connected to pin 33 of microcontroller U1, the emitter of NPN transistor Q7 is grounded, one end of resistor R7 is electrically connected to the collector of NPN transistor Q7, and the other end is electrically connected to the base of PNP transistor Q15, the collector of PNP transistor Q15 is electrically connected to pin 7 of J2, the emitter of PNP transistor Q15 is electrically connected to the power supply module, the base of NPN transistor Q8 is electrically connected to pin 32 of microcontroller U1, the emitter of NPN transistor Q8 is grounded, one end of resistor R8 is electrically connected to the collector of NPN transistor Q8, and the other end is electrically connected to the base of PNP transistor Q16, the collector of PNP transistor Q16 is electrically connected to pin 8 of J2, and the emitter of PNP transistor Q16 is electrically connected to the power supply module.
4. The detection circuit for an input and output board of a subway automatic ticket vending machine according to claim 2, characterized in that: The detection unit also includes a connector J1, a connector J3, a resistor RP1 and a resistor RP3, wherein the pin 1 of the resistor RP1 is connected to the power supply module, and the pins 2, 3, 4, 5, 6, 7, 8 and 9 of the resistor RP1 are electrically connected to the pins 1, 2, 3, 4, 5, 6, 7 and 8 of the microcontroller U1 in sequence, respectively; the pin 1 of the resistor RP3 is connected to the power supply module, and the pins 2, 3, 4, 5, 6, 7, 8 and 9 of the resistor RP3 are electrically connected to the pins 10, 11, 12, 13, 14, 15, 16 and 17 of the microcontroller U1 in sequence, respectively; the pins 1 and 2 of J1 are electrically connected to the power supply module at the same time. Electrical module, pin 12, pin 11, pin 10, pin 9, pin 8, pin 7, pin 6, pin 5 of J1 are electrically connected to pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7 and pin 8 of the microcontroller U1 in sequence, respectively, pin 14, pin 16, pin 13 and pin 17 of J1 are electrically connected to pin 12, pin 13, pin 14 and pin 15 of the microcontroller U1 in sequence, pin 3, pin 4, pin 19 and pin 20 of J1 are grounded at the same time, pin 1, pin 2, pin 3, pin 4, pin 5, pin 6, pin 7 and pin 8 of J3 are electrically connected to pin 21, pin 22, pin 23, pin 24, pin 25, pin 26, pin 27 and pin 28 of the microcontroller U1 in sequence.
5. The detection circuit of the input and output board of a subway automatic ticket vending machine according to claim 1, characterized in that: Pin 3 of the USB bus adapter unit is electrically connected to pin 10 of the single-chip microcomputer U1, pin 4 of the USB bus adapter unit is electrically connected to pin 11 of the single-chip microcomputer U1, pin 1 of the USB bus adapter unit is connected to the power supply module, and pin 5 of the USB bus adapter unit is grounded.
6. A subway automatic ticket vending machine input and output board detection circuit according to claim 2, characterized in that: The input end of the step-down circuit is connected to 24V DC, and the output end of the step-down circuit is connected to the power supply input end of the power supply unit. The step-down circuit includes a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a capacitor C1, a capacitor C3, a chip U2, a capacitor C4 and a capacitor C2. The positive electrode of the diode D1 is electrically connected to the power supply module, the positive electrode of the diode D2 is electrically connected to the negative electrode of the diode D1, the negative electrode of the diode D2 is electrically connected to the positive electrode of the diode D3, the positive electrode of the diode D4 is electrically connected to the negative electrode of the diode D3, and the negative electrode of the diode D4 is electrically connected to the positive electrode of the diode D5. The positive electrode of the capacitor C1 is simultaneously electrically connected to the negative electrode of the diode D5, one end of the capacitor C3, and pin 1 of the chip U2, and is simultaneously electrically connected to the power supply module. The negative electrode of the capacitor C1 is simultaneously electrically connected to the other end of the capacitor C3, pin 2 of the chip U2, one end of the capacitor C4, and the negative electrode of the capacitor C2 are simultaneously grounded. The positive electrode of the capacitor C2 is simultaneously electrically connected to the other end of the capacitor C4 and pin 3 of the chip U2.