Intermediate circuit for upgrading electric control program of vending machine
By designing an intermediate circuit to enable direct program reading and writing between the USB flash drive and the vending machine control module, the problem of time-consuming and labor-intensive upgrades in existing technologies is solved, achieving efficient and low-cost electronic control program upgrades.
Patent Information
- Application Number
- CN202520253082.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2035-02-18
AI Technical Summary
Upgrading the existing electronic control program of vending machines is time-consuming, labor-intensive, and costly. It also requires the manufacturer to send personnel to perform the upgrade on-site, which affects the efficiency of business operations.
Design an intermediate circuit that connects to a USB flash drive via a USB interface, and uses chips U1 and U2 to read and write programs, directly writing the application program from the USB flash drive into the vending machine control module to upgrade the electronic control program.
No need to replace the programmable motherboard or perform on-site upgrades, which improves upgrade efficiency and reduces costs.
Smart Images

Figure CN223664994U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of program reading and writing technology, and in particular relates to an intermediate circuit for upgrading the electronic control program of an automatic vending machine. Background Technology
[0002] Currently, most vending machines on the market have their electronic control programs pre-installed at the factory. When these machines are deployed nationwide, if defects are found in the electronic control program or additional functions are desired, the manufacturer must send a new control motherboard for replacement and upgrade. This involves the coordinated operation of multiple circuit boards, making the upgrade time-consuming, labor-intensive, and lengthy, directly impacting business operations. Sending personnel from the manufacturer to the sales site for upgrades is not only inefficient but also generally expensive, contradicting the principle of low-cost operation. Utility Model Content
[0003] I. Technical problems to be solved
[0004] To address the aforementioned problems, this invention proposes an intermediate circuit for upgrading the electronic control program of vending machines. This intermediate circuit can directly read the application program from a USB flash drive and write it into the vending machine control module, thereby upgrading the vending machine's electronic control program and solving the problems of low efficiency and high cost in previous upgrade processes.
[0005] II. Technical Solution
[0006] To achieve the above objectives, the present invention adopts the following technical solution, including:
[0007] The intermediate circuit has its input connected to USB interface CN1 and its output connected to TTL serial interface CN2. The intermediate circuit includes a USB circuit module and a power supply regulation module. The USB circuit module includes chip U1. Pin 1 of chip U1 is connected to pin 10 of TTL serial interface CN2. Pin 2 of chip U1 is connected to capacitor C41 through resistor R17, and the other end of capacitor C41 is connected to a second DC power supply. Pins 3 and 10 of chip U1 are interconnected and then grounded. Pin 4 of chip U1 is connected to pin 7 of TTL serial interface CN2. Pin 5 of chip U1 is also connected to pin 5 of TTL serial interface CN2. Pin 7 of chip U1 is connected to the second DC power supply through resistor R16. Pin 8 of chip U1 is connected to the USB interface... Pin 3 of interface CN1 is connected; pin 9 of chip U1 is connected to pin 2 of USB interface CN1; pin 11 of chip U1 is connected to crystal oscillator Y2 and capacitor C40; pin 12 of chip U1 is connected to the other end of crystal oscillator Y2 and capacitor C39; the other ends of capacitor C40 and capacitor C39 are both grounded; pin 13 of chip U1 is connected to pin 4 of TTL serial interface CN2; pin 14 of chip U1 is connected to pin 3 of TTL serial interface CN2; pin 15 of chip U1 is connected to pin 2 of TTL serial interface CN2; pin 16 of chip U1 is connected to pin 1 of TTL serial interface CN2; pin 20 of chip U1 is connected to the second DC power supply and capacitor C38 respectively; the other end of capacitor C38 is grounded.
[0008] Pin 1 of USB interface CN1 is connected to the first DC power supply through resistor R14, and pin 4 of USB interface CN1 is grounded; pin 9 of TTL serial interface CN2 is connected to the second DC power supply, pin 6 of TTL serial interface CN2 is connected to the first DC power supply, and pin 8 of TTL serial interface CN2 is grounded.
[0009] Furthermore, the power supply voltage regulation module includes chip U2. Pin 1 of chip U2 is grounded. Pin 2 of chip U2 outputs a second DC power supply and is connected to capacitor C4 and resistor R15. The other end of resistor R15 is connected to light-emitting diode LED1. The other ends of capacitor C4 and LED1 are both grounded. Pin 3 of chip U2 is connected to the first DC power supply and capacitor C3. The other end of capacitor C3 is grounded.
[0010] Preferably, the first DC power supply is +5V and the second DC power supply is +3.3V.
[0011] Preferably, chip U1 is CH376T and chip U2 is LM1117.
[0012] III. Beneficial Effects
[0013] This utility model discloses an intermediate circuit for upgrading the electronic control program of vending machines. It can directly read the application program from a USB flash drive and write it into the control template of the vending machine, thereby upgrading the electronic control program of the vending machine. This eliminates the need for the manufacturer to send a new programmable motherboard for replacement and upgrade, and also eliminates the need for the manufacturer to send personnel to the sales site to upgrade and modify the vending machine. This improves work efficiency and reduces operating costs. Attached Figure Description
[0014] Figure 1 This is a block diagram of the circuit structure of this utility model.
[0015] Figure 2 This is the schematic diagram of the USB circuit module of this utility model.
[0016] Figure 3 This is a schematic diagram of the power supply voltage regulation module of this utility model. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can have a clearer understanding of it.
[0018] like Figure 1 As shown, this utility model includes an intermediate circuit, the input of which is connected to a USB interface CN1, and the output of which is connected to a TTL serial interface CN2.
[0019] like Figure 2As shown, the intermediate circuit includes a USB circuit module. This module communicates with the vending machine control module via a TTL serial interface CN2, allowing it to read and write the application program from the USB flash drive (USB) to the control module. The USB circuit module includes a chip U1. Pin 1 of chip U1 is connected to pin 10 of the TTL serial interface CN2. Pin 2 of chip U1 is connected to capacitor C41 via resistor R17, and the other end of capacitor C41 is connected to a second DC power supply. Pins 3 and 10 of chip U1 are interconnected and then grounded. Pin 4 of chip U1 is connected to pin 7 of the TTL serial interface CN2, and pin 5 of chip U1 is also connected to pin 5 of the TTL serial interface CN2. Pin 7 of chip U1 is connected to a second DC power supply via resistor R16. Pin 8 of chip U1 is connected to pin 3 of USB interface CN1, and pin 9 of chip U1 is connected to pin 2 of USB interface CN1. Pin 11 of chip U1 is connected to crystal oscillator Y2 and capacitor C40. Pin 12 of chip U1 is connected to the other end of crystal oscillator Y2 and capacitor C39. The other ends of capacitor C40 and capacitor C39 are both grounded. Pin 13 of chip U1 is connected to pin 4 of TTL serial interface CN2. Pin 14 of chip U1 is connected to pin 3 of TTL serial interface CN2. Pin 15 of chip U1 is connected to pin 2 of TTL serial interface CN2. Pin 16 of chip U1 is connected to pin 1 of TTL serial interface CN2. Pin 20 of chip U1 is connected to the second DC power supply and capacitor C38 respectively. The other end of capacitor C38 is grounded.
[0020] like Figure 2 As shown, pin 1 of USB interface CN1 is connected to the first DC power supply through resistor R14, and pin 4 of USB interface CN1 is grounded; pin 9 of TTL serial interface CN2 is connected to the second DC power supply, pin 6 of TTL serial interface CN2 is connected to the first DC power supply, and pin 8 of TTL serial interface CN2 is grounded.
[0021] like Figure 3 As shown, the intermediate circuit also includes a power supply voltage regulation module. The power supply voltage regulation module takes in a +5V DC power supply and outputs a +3.3V DC power supply. The power supply voltage regulation module includes a chip U2. Pin 1 of chip U2 is grounded. Pin 2 of chip U2 outputs a second DC power supply and is connected to capacitor C4 and resistor R15. The other end of resistor R15 is connected to LED1. The other ends of capacitor C4 and LED1 are both grounded. Pin 3 of chip U2 is connected to a first DC power supply and capacitor C3. The other end of capacitor C3 is grounded.
[0022] As a preferred embodiment of this invention, +5V is the first DC power supply, and +3.3V is the second DC power supply.
[0023] As a preferred embodiment of this invention, chip U1 is CH376T and chip U2 is LM1117.
[0024] Methods for upgrading the electronic control program of vending machines:
[0025] The vending machine control module contains two programs: a bootloader upgrade program IAP_VMC kj and a vending machine control program VMC mn. Both IAP_VMC kj and VMC mn are stored in the program storage area of the vending machine control module's microcontroller. During the upgrade, a USB flash drive is inserted into the USB interface CN1, and the bootloader upgrade program IAP_VMC kj is started. Upon detecting the USB flash drive, the program automatically executes the upgrade process.
[0026] Since the vending machine is normally in the running stage of the vending machine control program VMC mn, in order to facilitate the operator's upgrade operation, the VMC mn program itself needs to be able to read and recognize the upgrade file from the USB flash drive. When the vending machine control program recognizes the upgrade program file VMC mn, it first executes the Bootloader upgrade program IAP_VMC kj. On the one hand, it reads and recognizes the upgrade file, and on the other hand, it reads the upgrade flag. After both conditions are met, the upgrade process is automatically started. The only operation required by the operator is to insert the USB flash drive. Everything else is completed automatically. After the upgrade is completed, a prompt will be displayed on the vending machine's screen indicating that the upgrade is complete.
[0027] This utility model discloses an intermediate circuit for upgrading the electronic control program of vending machines. It can directly read the application program from a USB flash drive and write it into the control template of the vending machine, thereby upgrading the electronic control program of the vending machine. This eliminates the need for the manufacturer to send a new programmable motherboard for replacement and upgrade, and also eliminates the need for the manufacturer to send personnel to the sales site to upgrade and modify the vending machine. This improves work efficiency and reduces operating costs.
Claims
1. An intermediate circuit for upgrading the electronic control program of an automatic vending machine, wherein the input of the intermediate circuit is connected to a USB interface CN1, and the output of the intermediate circuit is connected to a TTL serial interface CN2, characterized in that: The intermediate circuit includes a USB circuit module and a power supply voltage regulation module. The USB circuit module includes a chip U1. Pin 1 of chip U1 is connected to pin 10 of TTL serial interface CN2. Pin 2 of chip U1 is connected to capacitor C41 through resistor R17, and the other end of capacitor C41 is connected to a second DC power supply. Pins 3 and 10 of chip U1 are interconnected and then grounded. Pin 4 of chip U1 is connected to pin 7 of TTL serial interface CN2. Pin 5 of chip U1 is also connected to pin 5 of TTL serial interface CN2. Pin 7 of chip U1 is connected to a second DC power supply through resistor R16. Pin 8 of chip U1 is connected to pin 3 of USB interface CN1. Pin 9 of chip U1 is connected to... Pin 2 of USB interface CN1 is connected; pin 11 of chip U1 is connected to crystal oscillator Y2 and capacitor C40; pin 12 of chip U1 is connected to the other end of crystal oscillator Y2 and capacitor C39; the other ends of capacitor C40 and capacitor C39 are both grounded; pin 13 of chip U1 is connected to pin 4 of TTL serial interface CN2; pin 14 of chip U1 is connected to pin 3 of TTL serial interface CN2; pin 15 of chip U1 is connected to pin 2 of TTL serial interface CN2; pin 16 of chip U1 is connected to pin 1 of TTL serial interface CN2; pin 20 of chip U1 is connected to the second DC power supply and capacitor C38 respectively; the other end of capacitor C38 is grounded. Pin 1 of the USB interface CN1 is connected to the first DC power supply through resistor R14, and pin 4 of the USB interface CN1 is grounded; pin 9 of the TTL serial interface CN2 is connected to the second DC power supply, pin 6 of the TTL serial interface CN2 is connected to the first DC power supply, and pin 8 of the TTL serial interface CN2 is grounded.
2. The intermediate circuit according to claim 1, characterized in that: The power supply voltage regulation module includes a chip U2. Pin 1 of chip U2 is grounded. Pin 2 of chip U2 outputs a second DC power supply and is connected to capacitor C4 and resistor R15. The other end of resistor R15 is connected to light-emitting diode LED1. The other ends of capacitor C4 and LED1 are both grounded. Pin 3 of chip U2 is connected to a first DC power supply and capacitor C3. The other end of capacitor C3 is grounded.
3. The intermediate circuit according to claim 2, characterized in that: The first DC power supply is +5V, and the second DC power supply is +3.3V.
4. The intermediate circuit according to claim 3, characterized in that: The chip U1 is CH376T, and the chip U2 is LM1117.