An AC voltage measurement function board based on STM32
By designing an AC voltage measurement function board based on STM32, the problems of cumbersome and inaccurate measurement in the existing technology are solved, and high-precision AC voltage measurement is achieved, which is suitable for the measurement needs of various voltage values and frequencies.
Patent Information
- Application Number
- CN202110732964.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-06-29
AI Technical Summary
AC voltage measurement in the existing technology is cumbersome and inaccurate, resulting in large measurement data errors and a lack of high-precision automated measurement solutions.
An AC voltage measurement function board based on STM32 is designed, including MCU control module, AC voltage division signal conditioning module, voltage distribution module, RS485 communication module and RMS voltage measurement module. It is connected to the STM32f103zet6 chip through the 0805 package circuit to realize the measurement of different AC voltages. Accurate measurement of voltage values.
It achieves high-precision measurement of different AC voltage values, with a measurement error of less than 1%, and the functional board is highly flexible and adapts to the AC power measurement needs of different voltage values and frequencies.
Smart Images

Figure CN113376426B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of alternating current voltage measurement, and in particular relates to an alternating current voltage measurement function board based on STM32. Background Art
[0002] At present, AC voltage is usually measured by multimeter and other instruments on the market. Workers can only hold the multimeter probe for measurement. The measurement process is cumbersome and the measurement data is inaccurate, which causes large errors in subsequent test data. Therefore, there is an urgent need for an AC voltage measurement function board based on STM32. Summary of the invention
[0003] In view of this, the present invention aims to propose an AC voltage measurement function board based on STM32 to solve the problem that the AC voltage can only be measured manually, resulting in inaccurate measurement data and a cumbersome measurement process.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] An AC voltage measurement function board based on STM32, comprising a circuit board, an MCU control module, an AC voltage division signal conditioning module, a voltage distribution module, an RS485 communication module and an RMS voltage measurement module configured on the circuit board;
[0006] The AC voltage division signal conditioning module is connected to the MCU control module through a 0805 package circuit, and the AC voltage division signal conditioning module is connected to a transfer distribution module;
[0007] The AC voltage division signal conditioning module is connected to the voltage distribution module, and the voltage distribution module is connected to the MCU control module through the 0805 package circuit;
[0008] The voltage distribution module is connected to the RMS voltage measurement circuit, the RMS voltage measurement circuit is connected to the MCU control module through the ADC module, and the MCU control module is connected to a display control terminal for displaying test data through the RS485 communication module.
[0009] Furthermore, the MCU control module uses the STM32f103zet6 chip;
[0010] The switching distribution module components include JI module, J2 module, J3 module, J4 module, J5 module and J6 module. JI module, J2 module, J3 module, J4 module, J5 module and J6 module all use JX-40 chip;
[0011] The AC voltage division signal conditioning module includes multiple groups of AC voltage division conditioning circuits, including a 6V AC voltage division conditioning circuit, a 12V AC voltage division conditioning circuit, a 36V AC voltage division conditioning circuit and a 115V AC voltage division conditioning circuit;
[0012] The 6V AC voltage division conditioning circuit, the 12V AC voltage division conditioning circuit, the 36V AC voltage division conditioning circuit and the 115V AC voltage division conditioning circuit are all connected to the STM32f103zet6 chip through the 0805 package circuit.
[0013] Further, the 6V AC voltage-dividing conditioning circuit includes a U14 chip and a U19 chip, both of which are LH1502 chips, pin 1 of the U14 chip is connected to pin 3, pin 1 of the U14 chip is connected to pin PC5 of the STM32f103zet6 chip through a 0805 package circuit, pin 2 of the U14 is connected to pin 4, pin 4 is grounded, pin 7 of the U14 chip is connected to pin 7 of the U19 through resistors R5 and R10 in sequence, pins 6 and 8 of the U14 chip are connected to pin J1-40-4 of the J1 module, and pin 5 of the U14 is connected to pin J2-40-19 of the J2 module;
[0014] Pin 1 of the U19 chip is connected to pin 3, pin 1 of the U19 chip is connected to pin PC5 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U19 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U19 chip are connected to J1-40-6 of the J1 module, and pin 5 of the U19 chip is connected to pin J2-40-22 of the J2 module;
[0015] Both ends of the resistor R10 are connected to the voltage distribution module respectively;
[0016] One end of the resistor R5 connected to the U14 chip is also connected to the voltage distribution module.
[0017] Further, the 12V AC voltage-dividing conditioning circuit includes a U13 chip and a U18 chip. The U13 chip and the U18 chip adopt LH1502 model chips. Pin 1 of the U13 chip is connected to pin 3. Pin 1 of the U13 chip is connected to pin PC4 of the STM32f103zet6 chip through a 0805 package circuit. Pin 2 of the U13 is connected to pin 4, and pin 4 is grounded. Pin 7 of the U13 chip is connected to pin 7 of U18 through resistors R4 and R9 in sequence. Pins 6 and 8 of the U13 chip are connected to pin J1-40-18 of the J1 module, and pin 5 of the U13 is connected to pin J6-40-5 of the J6 module.
[0018] Pin 1 of the U18 chip is connected to pin 3. Pin 1 of the U18 chip is connected to pin PC4 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U18 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U18 chip are connected to J1-40-17 of the J1 module. Pin 5 of the U18 chip is connected to pin J5-40-33 of the J5 module.
[0019] Both ends of the resistor R9 are connected to the voltage distribution module respectively.
[0020] Furthermore, the 36V AC voltage-dividing conditioning circuit includes U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip. U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip all use LH1502 model chip. Pin 1 of U10 chip is connected to pin 3. Pin 1 of U10 chip is connected to STM32f103z through 0805 package circuit. The PC1 pin of et6 chip, the 2 pin of U10 is connected to the 4 pin, the 4 pin is grounded, the 7 pin of U10 chip is connected to the 7 pin of U15 through the resistor R1 and the resistor R6 in turn, the 7 pin of U10 chip is also connected to the 7 pin of U11 and the 7 pin of U12 respectively, the 6 pin and the 8 pin of U10 chip are connected to the J1-40-3 pin of J1 module, and the 5 pin of U10 is connected to the J2-40-18 pin of J2 module;
[0021] Pin 1 of the U11 chip is connected to pin 3. Pin 1 of the U11 chip is connected to pin PC2 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U11 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U11 chip are connected to pin J1-40-3 of the J1 module. Pin 5 of the U11 chip is connected to pin J5-40-9 of the J5 module.
[0022] Pin 1 of the U12 chip is connected to pin 3. Pin 1 of the U12 chip is connected to pin PC3 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U12 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U12 chip are connected to pins J1-40-3 of the J1 module. Pin 5 of the U12 chip is connected to pin J3-40-3 of the J3 module.
[0023] Pin 1 of the U15 chip is connected to pin 3. Pin 1 of the U15 chip is connected to pin PC1 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U15 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U15 chip are connected to J1-40-5 of the J1 module. Pin 7 of the U15 chip is connected to pin 7 of U16 and pin 7 of U17 respectively. Pin 5 of the U15 chip is connected to pin J2-40-21 of the J2 module.
[0024] Pin 1 of the U16 chip is connected to pin 3, pin 1 of the U16 chip is connected to pin PC2 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U16 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U16 chip are connected to J1-40-5 of the J1 module, and pin 5 of the U16 chip is connected to pin J2-40-10 of the J2 module;
[0025] Pin 1 of the U17 chip is connected to pin 3. Pin 1 of the U17 chip is connected to pin PC3 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U17 chip is connected to pin 4, which is grounded. Pins 6 and 8 of the U17 chip are connected to J1-40-5 of the J1 module. Pin 5 of the U17 chip is connected to pin J3-40-4 of the J3 module.
[0026] Both ends of the resistor R6 are connected to the voltage distribution module respectively.
[0027] Furthermore, the 115V AC voltage division conditioning circuit includes a U20 chip, which adopts an LH1502 chip. Pin 1 of the U20 chip is connected to pin 3, pin 1 of the U20 chip is connected to pin PC10 of the STM32f103zet6 chip through a 0805 package circuit, pin 2 of the U20 is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U20 chip are connected to a voltage distribution module, pin 5 of the U20 chip is connected to resistor R12 and resistor R14 respectively, the other end of resistor R12 is connected to pin J1-40-9 of the J1 module, the other end of resistor R14 is connected to the voltage distribution module, pin 7 of the U20 chip is connected to resistors R11 and R13 respectively, resistor R11 is connected to pin J1-40-8 of the J1 module, one end of resistor R13 away from pin 7 of the U20 chip is connected to resistor R14, and one end of resistor R13 away from pin 7 of the U20 chip is grounded.
[0028] Further, the voltage distribution module includes a voltage distribution circuit 1, a voltage distribution circuit 2, a voltage distribution circuit 3, a voltage distribution circuit 4 and a voltage distribution circuit 5;
[0029] The voltage distribution circuit 1 includes a U26 chip. The U26 chip adopts an AQW212A chip. Pins 1 and 3 of the U26 chip are connected to the PD9 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U26 chip are grounded. Pins 6 and 8 of the U26 chip are correspondingly connected to the two ends of the resistor R6. Pins 5 and 7 of the U26 chip are connected to the RMS voltage measurement module.
[0030] The voltage distribution circuit 2 includes a U29 chip. The U29 chip adopts an AQW212A chip. Pins 1 and 3 of the U29 chip are connected to the PD10 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R9. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module.
[0031] The voltage distribution circuit 3 includes a U30 chip. The U30 chip adopts an AQW212A chip. Pins 1 and 3 of the U30 chip are connected to the PD11 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R10. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module through port P1.
[0032] The voltage distribution circuit 4 includes a U31 chip. The U31 chip adopts an AQW212A chip. Pins 1 and 3 of the U31 chip are connected to the PD12 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U31 chip are grounded. Pin 8 of the U31 chip is connected to pin 8 of the U20 chip. Pin 6 of the U31 chip is connected to resistor R14. Pins 5 and 7 of the U31 chip are connected to an RMS voltage measurement module.
[0033] Voltage distribution circuit five includes U33 chip, U33 chip adopts AQW212A chip, pins 1 and 3 of U33 chip are connected to PD13 pin of STM32f103zet6 chip through 0805 package circuit, pins 2 and 4 of U33 chip are grounded, pins 6 and 8 of U33 chip are connected to both ends of resistor R5, and pins 5 and 7 of U33 chip are connected to RMS voltage measurement module.
[0034] Furthermore, the RMS voltage measurement module includes a U32 chip, which is an LTC1966 chip, and the U_In1 pin and the USS pin of the U32 chip are correspondingly connected to the 5 pin and the 7 pin of the U26 chip, the U29 chip, the U31 chip, and the U33 chip;
[0035] The U_In1 pin of the U32 chip is connected to the voltage source VCC through a diode D8 and to ground through a diode D7;
[0036] The U_In2 pin of the U32 chip is grounded through capacitor C20, and the USS pin of the U32 chip is grounded;
[0037] The GND pin of the U32 chip is connected to the EN pin, and the GND pin is grounded;
[0038] The VDD pin of the U32 chip is connected to the voltage source VCC;
[0039] The COM pin of the U32 chip is grounded, and the V_out pin of the U32 chip is grounded through capacitor C21;
[0040] The V_out pin of the U32 chip is connected to the PAO pin and PA1 pin of the STM32f103zet6 chip through the ADC module.
[0041] Further, the RS485 communication module includes a U34 chip, which adopts a SN65HVD78D chip model, an R pin of the U34 chip is connected to the PA3 pin of the STM32f103zet6 chip, an R pin of the U34 chip is connected to the VCC pin through a resistor R66, an RE pin and a DE pin of the U34 chip are both grounded through a resistor R67, an RE pin of the U34 chip is connected to the PF4 pin of the STM32f103zet6 chip, a D pin of the U34 chip is connected to the PA2 pin of the STM32f103zet6 chip, an A pin and a B pin of the U34 chip are respectively connected to the display control terminal, and a resistor R68 is also connected between the A pin and the B pin of the U34 chip;
[0042] The GND pin of chip U34 is grounded.
[0043] Furthermore, the STM32f103zet6 chip is connected to a power switching circuit for switching a 5V voltage source to a 3.3V voltage source and a Filter module for isolating a 3.3V power source and a ground.
[0044] Compared with the prior art, the AC voltage measurement function board based on STM32 described in the present invention has the following beneficial effects:
[0045] (1) The AC voltage measurement function board based on STM32 described in the present invention can be plugged into a plug-in box to measure different AC voltage values with high measurement accuracy and a measurement error of less than 1%;
[0046] (2) The AC voltage measurement function board based on STM32 described in the present invention can be designed in size according to needs, has high flexibility, and has a wide measurement range, and can complete AC power measurement of different voltage values and frequencies according to needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0048] Figure 1 This is the STM32f103zet6 chip pin diagram described in the embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of a 6V AC voltage division conditioning circuit according to an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of a 12V AC voltage division and conditioning circuit according to an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram of a 36V AC voltage division conditioning circuit according to an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of a 115V AC voltage division conditioning circuit according to an embodiment of the present invention;
[0053] Figure 6 Schematic diagrams of voltage distribution circuit 1, voltage distribution circuit 4, and voltage distribution circuit 5 according to the embodiments of the present invention;
[0054] Figure 7 Schematic diagram of the voltage distribution circuit 2 and the voltage distribution circuit 3 according to the embodiments of the present invention;
[0055] Figure 8 A pin diagram of a switching distribution module component according to an embodiment of the present invention;
[0056] Fig. 9 This is a circuit diagram of the RMS voltage measurement module according to an embodiment of the present invention;
[0057] Fig.10 The RS485 communication module circuit diagram of the embodiment of the present invention;
[0058] Fig.11 This is a 0805 package circuit diagram according to an embodiment of the present invention;
[0059] Fig.12 A power switching circuit diagram according to an embodiment of the present invention;
[0060] Fig.13This is a circuit diagram of the Filter module described in an embodiment of the present invention;
[0061] Fig.14 This is a circuit diagram of a BOOT module according to an embodiment of the present invention;
[0062] Fig.15 This is a circuit diagram of an ADC Ref module according to an embodiment of the present invention;
[0063] Fig.16 The circuit diagram of the OSC module according to the embodiment of the present invention;
[0064] Fig.17 This is a circuit diagram of the ADC module described in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0066] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0067] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0068] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0069] An AC voltage measurement function board based on STM32, comprising a circuit board, an MCU control module, an AC voltage division signal conditioning module, a voltage distribution module, an RS485 communication module and an RMS voltage measurement module configured on the circuit board;
[0070] The AC voltage division signal conditioning module is connected to the MCU control module through the 0805 package circuit. The AC voltage division signal conditioning module is connected to the transfer distribution module. The 0805 package circuit used in this patent application is a plurality of groups of chip resistors 0805 package. The chip resistor 0805 package adopts the existing technology. This patent application does not improve it. The 0805 package circuit is as follows Fig.11 As shown;
[0071] The AC voltage division signal conditioning module is connected to the voltage distribution module, and the voltage distribution module is connected to the MCU control module through the 0805 package circuit;
[0072] The voltage distribution module is connected to the RMS voltage measurement circuit, the RMS voltage measurement circuit is connected to the MCU control module through the ADC module, and the MCU control module is connected to a display control terminal for displaying test data through the RS485 communication module; Fig.17 As shown, the ADC module includes a resistor R60 and a resistor R61 connected in parallel, one end of the resistor R60 and the resistor R61 are connected to the V_out pin of the LTC1966 chip, and the other ends of the resistor R60 and the resistor R61 are respectively connected to the PA0 pin and the PA1 pin of the STM32f103zet6 chip. The ADC module is controlled on and off by a 0 ohm resistor, which can be short-circuited in actual use. The display control terminal used in this patent application is a display or other display device, which is all prior art and is not improved in this patent application.
[0073] like Figure 1 As shown, the MCU control module uses the STM32f103zet6 chip;
[0074] The transfer distribution module assembly includes a JI module, a J2 module, a J3 module, a J4 module, a J5 module and a J6 module. The JI module, the J2 module, the J3 module, the J4 module, the J5 module and the J6 module all use a JX-40 chip. The transfer distribution module assembly used in this technical solution is a prior art, and this patent application does not improve it. The transfer distribution module assembly is as follows: Figure 8 As shown;
[0075] like Figures 2 to 5 As shown, the AC voltage division signal conditioning module includes multiple groups of AC voltage division conditioning circuits, including a 6V AC voltage division conditioning circuit, a 12V AC voltage division conditioning circuit, a 36V AC voltage division conditioning circuit and a 115V AC voltage division conditioning circuit;
[0076] The 6V AC voltage division conditioning circuit, the 12V AC voltage division conditioning circuit, the 36V AC voltage division conditioning circuit and the 115V AC voltage division conditioning circuit are all connected to the STM32f103zet6 chip through the 0805 package circuit.
[0077] The 6V AC voltage-dividing conditioning circuit includes a U14 chip and a U19 chip. Both the U14 chip and the U19 chip use the LH1502 model chip. Pin 1 of the U14 chip is connected to pin 3. Pin 1 of the U14 chip is connected to pin PC5 of the STM32f103zet6 chip through a 0805 package circuit. Pin 2 of the U14 chip is connected to pin 4, and pin 4 is grounded. Pin 7 of the U14 chip is connected to pin 7 of the U19 through resistors R5 and R10 in turn. Pins 6 and 8 of the U14 chip are connected to pins J1-40-4 of the J1 module, and pin 5 of the U14 is connected to pin J2-40-19 of the J2 module.
[0078] Pin 1 of the U19 chip is connected to pin 3, pin 1 of the U19 chip is connected to pin PC5 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U19 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U19 chip are connected to J1-40-6 of the J1 module, and pin 5 of the U19 chip is connected to pin J2-40-22 of the J2 module;
[0079] Both ends of the resistor R10 are connected to the voltage distribution module respectively;
[0080] One end of the resistor R5 connected to the U14 chip is also connected to the voltage distribution module.
[0081] The 12V AC voltage-dividing conditioning circuit includes a U13 chip and a U18 chip. The U13 chip and the U18 chip use LH1502 model chips. Pin 1 of the U13 chip is connected to pin 3. Pin 1 of the U13 chip is connected to pin PC4 of the STM32f103zet6 chip through a 0805 package circuit. Pin 2 of the U13 chip is connected to pin 4, and pin 4 is grounded. Pin 7 of the U13 chip is connected to pin 7 of the U18 through resistors R4 and R9 in turn. Pins 6 and 8 of the U13 chip are connected to pins J1-40-18 of the J1 module, and pin 5 of the U13 chip is connected to pin J6-40-5 of the J6 module.
[0082] Pin 1 of the U18 chip is connected to pin 3. Pin 1 of the U18 chip is connected to pin PC4 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U18 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U18 chip are connected to J1-40-17 of the J1 module. Pin 5 of the U18 chip is connected to pin J5-40-33 of the J5 module.
[0083] Both ends of the resistor R9 are connected to the voltage distribution module respectively.
[0084] The 36V AC voltage-dividing conditioning circuit includes U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip. U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip all use LH1502 model chip. Pin 1 of U10 chip is connected to pin 3. Pin 1 of U10 chip is connected to STM32f103zet6 through 0805 package circuit. The PC1 pin of the chip, the 2 pin of U10 is connected to the 4 pin, the 4 pin is grounded, the 7 pin of the U10 chip is connected to the 7 pin of U15 through the resistor R1 and the resistor R6 in turn, the 7 pin of the U10 chip is also connected to the 7 pin of U11 and the 7 pin of U12 respectively, the 6 pin and the 8 pin of the U10 chip are connected to the J1-40-3 pin of the J1 module, and the 5 pin of U10 is connected to the J2-40-18 pin of the J2 module;
[0085] Pin 1 of the U11 chip is connected to pin 3. Pin 1 of the U11 chip is connected to pin PC2 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U11 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U11 chip are connected to pin J1-40-3 of the J1 module. Pin 5 of the U11 chip is connected to pin J5-40-9 of the J5 module.
[0086] Pin 1 of the U12 chip is connected to pin 3. Pin 1 of the U12 chip is connected to pin PC3 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U12 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U12 chip are connected to pins J1-40-3 of the J1 module. Pin 5 of the U12 chip is connected to pin J3-40-3 of the J3 module.
[0087] Pin 1 of the U15 chip is connected to pin 3. Pin 1 of the U15 chip is connected to pin PC1 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U15 chip is connected to pin 4, and pin 4 is grounded. Pins 6 and 8 of the U15 chip are connected to J1-40-5 of the J1 module. Pin 7 of the U15 chip is connected to pin 7 of U16 and pin 7 of U17 respectively. Pin 5 of the U15 chip is connected to pin J2-40-21 of the J2 module.
[0088] Pin 1 of the U16 chip is connected to pin 3, pin 1 of the U16 chip is connected to pin PC2 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U16 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U16 chip are connected to J1-40-5 of the J1 module, and pin 5 of the U16 chip is connected to pin J2-40-10 of the J2 module;
[0089] Pin 1 of the U17 chip is connected to pin 3. Pin 1 of the U17 chip is connected to pin PC3 of the STM32f103zet6 chip through the 0805 package circuit. Pin 2 of the U17 chip is connected to pin 4, which is grounded. Pins 6 and 8 of the U17 chip are connected to J1-40-5 of the J1 module. Pin 5 of the U17 chip is connected to pin J3-40-4 of the J3 module.
[0090] Both ends of the resistor R6 are connected to the voltage distribution module respectively.
[0091] The 115V AC voltage division conditioning circuit includes a U20 chip. The U20 chip adopts an LH1502 chip. Pin 1 of the U20 chip is connected to pin 3. Pin 1 of the U20 chip is connected to pin PC10 of the STM32f103zet6 chip through a 0805 package circuit. Pin 2 of the U20 is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U20 chip are connected to a voltage distribution module, pin 5 of the U20 chip is connected to resistor R12 and resistor R14 respectively, the other end of resistor R12 is connected to pin J1-40-9 of the J1 module, the other end of resistor R14 is connected to the voltage distribution module, pin 7 of the U20 chip is connected to resistors R11 and R13 respectively, resistor R11 is connected to pin J1-40-8 of the J1 module, one end of resistor R13 away from pin 7 of the U20 chip is connected to resistor R14, and one end of resistor R13 away from pin 7 of the U20 chip is grounded.
[0092] like Figure 6 and Figure 7 As shown, the voltage distribution module includes voltage distribution circuit 1, voltage distribution circuit 2, voltage distribution circuit 3, voltage distribution circuit 4 and voltage distribution circuit 5;
[0093] The voltage distribution circuit 1 includes a U26 chip. The U26 chip adopts an AQW212A chip. Pins 1 and 3 of the U26 chip are connected to the PD9 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U26 chip are grounded. Pins 6 and 8 of the U26 chip are correspondingly connected to the two ends of the resistor R6. Pins 5 and 7 of the U26 chip are connected to the RMS voltage measurement module.
[0094] The voltage distribution circuit 2 includes a U29 chip. The U29 chip adopts an AQW212A chip. Pins 1 and 3 of the U29 chip are connected to the PD10 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R9. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module.
[0095] The voltage distribution circuit 3 includes a U30 chip. The U30 chip adopts an AQW212A chip. Pins 1 and 3 of the U30 chip are connected to the PD11 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R10. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module through port P1.
[0096] The voltage distribution circuit 4 includes a U31 chip. The U31 chip adopts an AQW212A chip. Pins 1 and 3 of the U31 chip are connected to the PD12 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U31 chip are grounded. Pin 8 of the U31 chip is connected to pin 8 of the U20 chip. Pin 6 of the U31 chip is connected to resistor R14. Pins 5 and 7 of the U31 chip are connected to an RMS voltage measurement module.
[0097] Voltage distribution circuit five includes U33 chip, U33 chip adopts AQW212A chip, pins 1 and 3 of U33 chip are connected to PD13 pin of STM32f103zet6 chip through 0805 package circuit, pins 2 and 4 of U33 chip are grounded, pins 6 and 8 of U33 chip are connected to both ends of resistor R5, and pins 5 and 7 of U33 chip are connected to RMS voltage measurement module.
[0098] like Fig. 9 As shown, the RMS voltage measurement module includes a U32 chip, which uses an LTC1966 chip. The U_In1 pin and the USS pin of the U32 chip are correspondingly connected to the 5 pins and the 7 pins of the U26 chip, the U29 chip, the U31 chip, and the U33 chip;
[0099] The U_In1 pin of the U32 chip is connected to the voltage source VCC through a diode D8 and to ground through a diode D7;
[0100] The U_In2 pin of the U32 chip is grounded through capacitor C20, and the USS pin of the U32 chip is grounded;
[0101] The GND pin of the U32 chip is connected to the EN pin, and the GND pin is grounded;
[0102] The VDD pin of the U32 chip is connected to the voltage source VCC;
[0103] The COM pin of the U32 chip is grounded, and the V_out pin of the U32 chip is grounded through capacitor C21;
[0104] The V_out pin of the U32 chip is connected to the PAO pin and PA1 pin of the STM32f103zet6 chip through the ADC module.
[0105] like Fig.10 As shown, the RS485 communication module includes a U34 chip, which adopts a SN65HVD78D chip model, an R pin of the U34 chip is connected to the PA3 pin of the STM32f103zet6 chip, an R pin of the U34 chip is connected to the VCC pin through a resistor R66, and both the RE pin and the DE pin of the U34 chip are grounded through a resistor R67, an RE pin of the U34 chip is connected to the PF4 pin of the STM32f103zet6 chip, a D pin of the U34 chip is connected to the PA2 pin of the STM32f103zet6 chip, an A pin and a B pin of the U34 chip are respectively connected to the display control terminal, and a resistor R68 is also connected between the A pin and the B pin of the U34 chip;
[0106] The GND pin of chip U34 is grounded.
[0107] like Fig.12 and Fig.13 As shown, the STM32f103zet6 chip is connected with a power switching circuit for switching a 5V voltage source to a 3.3V voltage source and a Filter module for isolating a 3.3V power supply and a ground. The STM32f103zet6 chip is provided with a corresponding reset switch.
[0108] like Fig.14 As shown, the STM32f103zet6 chip is connected with a BOOT module. The BOOT module is a 2*3 pin header. Jumpers are used to switch between download and working states. The BOOT module is used to switch the working mode of the MCU control module. Terminals 1 and 3 of the P2 port are short-circuited, and terminals 4 and 6 are short-circuited. At this time, it is in the download state. Terminals 3 and 5 of the P2 port are short-circuited, and terminals 4 and 6 are short-circuited, which means it is in the working state.
[0109] like Fig.16 As shown, the STM32f103zet6 chip is connected to an OSC module for timing.
[0110] like Fig.15As shown, the STM32f103zet6 chip is connected with an ADC Ref module, and the 1st and 2nd terminals, and the 3rd and 4th terminals of the P4 port are short-circuited to achieve the reference voltage setting.
[0111] When this solution is implemented, taking 6V AC measurement as an example, the measured signal is input to U14 and U19 pin 8 through J1_40_4 pin and J1_40_6 pin of J1, and the PC5 pin of the MCU control module is high level. At this time, the CTL_6 pin is high level, and the 7 and 8 pins of U14 and U19 are turned on. After the voltage is divided by R10 and R5, the voltage between Test_A_5 and Test_B_5 is about 0.545V, which is between 0-3V.3V. At the same time, the MCU controls The module controls pins 1 and 3 of the U30 chip. At this time, pin DCT_CTL_5 is at a low level, and other pins DCT_CTL_1, DCT_CTL_2, DCT_CTL_3, DCT_CTL_4, DCT_CTL_6, and DCT_CTL_7 are at a high level. Only pins 5, 6, 7, and 8 of the U30 chip are turned on, and other voltage modules are not turned on and will not interfere with the measurement. Test_A_5 and Test_B_5 are connected to Test A and Test B respectively. The voltage is measured in the RMS voltage measurement module and output to the MCU molding module for collection. After the 485 communication module, the collection results are output to the display to complete the corresponding voltage measurement.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An AC voltage measurement function board based on STM32, characterized by: It includes a circuit board, an MCU control module, an AC voltage division signal conditioning module, a voltage distribution module, an RS485 communication module and an RMS voltage measurement module configured on the circuit board; The AC voltage division signal conditioning module is connected to the MCU control module through the 0805 package circuit, and the AC voltage division signal conditioning module is connected to the transfer distribution module; The AC voltage division signal conditioning module is connected to the voltage distribution module, and the voltage distribution module is connected to the MCU control module through the 0805 package circuit; The voltage distribution module is connected to the RMS voltage measurement circuit, the RMS voltage measurement circuit is connected to the MCU control module through the ADC module, and the MCU control module is connected to the display control terminal for displaying test data through the RS485 communication module; The MCU control module uses the STM32f103zet6 chip; The switching distribution module components include JI module, J2 module, J3 module, J4 module, J5 module and J6 module. JI module, J2 module, J3 module, J4 module, J5 module and J6 module all use JX-40 chip; The AC voltage division signal conditioning module includes multiple groups of AC voltage division conditioning circuits, including a 6V AC voltage division conditioning circuit, a 12V AC voltage division conditioning circuit, a 36V AC voltage division conditioning circuit and a 115V AC voltage division conditioning circuit; The 6V AC voltage-dividing conditioning circuit, the 12V AC voltage-dividing conditioning circuit, the 36V AC voltage-dividing conditioning circuit and the 115V AC voltage-dividing conditioning circuit are all connected to the STM32f103zet6 chip through the 0805 package circuit; The 6V AC voltage-dividing conditioning circuit includes U14 chip and U19 chip. Both U14 chip and U19 chip adopt LH1502 chip. Pin 1 of U14 chip is connected to pin 3. Pin 1 of U14 chip is connected to pin PC5 of STM32f103zet6 chip through 0805 package circuit. Pin 2 of U14 is connected to pin 4. Pin 4 is grounded. Pin 7 of U14 chip is connected to pin 7 of U19 through resistor R5 and resistor R10 in turn. Pin 6 and pin 8 of U14 chip are connected to pin J1-40-4 of J1 module. Pin 5 of U14 is connected to pin J2-40-19 of J2 module. Pin 1 of the U19 chip is connected to pin 3, pin 1 of the U19 chip is connected to pin PC5 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U19 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U19 chip are connected to J1-40-6 of the J1 module, and pin 5 of the U19 chip is connected to pin J2-40-22 of the J2 module; Both ends of the resistor R10 are connected to the voltage distribution module respectively; One end of resistor R5 connected to U14 chip is also connected to the voltage distribution module; The 12V AC voltage-dividing conditioning circuit includes U13 chip and U18 chip. U13 chip and U18 chip adopt LH1502 model chip. Pin 1 of U13 chip is connected to pin 3. Pin 1 of U13 chip is connected to pin PC4 of STM32f103zet6 chip through 0805 package circuit. Pin 2 of U13 is connected to pin 4. Pin 4 is grounded. Pin 7 of U13 chip is connected to pin 7 of U18 through resistor R4 and resistor R9 in turn. Pin 6 and pin 8 of U13 chip are connected to pin J1-40-18 of J1 module. Pin 5 of U13 is connected to pin J6-40-5 of J6 module. Pin 1 of the U18 chip is connected to pin 3, pin 1 of the U18 chip is connected to pin PC4 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U18 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U18 chip are connected to J1-40-17 of the J1 module, and pin 5 of the U18 chip is connected to pin J5-40-33 of the J5 module; Both ends of the resistor R9 are connected to the voltage distribution module respectively; The 36V AC voltage-dividing conditioning circuit includes U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip. U10 chip, U11 chip, U12 chip, U15 chip, U16 chip and U17 chip all adopt LH1502 chip. Pin 1 of U10 chip is connected to pin 3. Pin 1 of U10 chip is connected to pin PC1 of STM32f103zet6 chip through 0805 package circuit. Pin 2 of U10 is connected to pin 4. Pin 4 is grounded. Pin 7 of U10 chip is connected to pin 7 of U15 through resistor R1 and resistor R6 in sequence. Pin 7 of U10 chip is also connected to pin 7 of U11 and pin 7 of U12 respectively. Pin 6 and pin 8 of U10 chip are connected to pin 1 of U11 and pin 1 of U12 respectively. The pin is connected to the J1-40-3 pin of the J1 module, and the 5 pin of U10 is connected to the J2-40-18 pin of the J2 module; Pin 1 of U11 chip is connected to pin 3, pin 1 of U11 chip is connected to pin PC2 of STM32f103zet6 chip through 0805 package circuit, pin 2 of U11 is connected to pin 4, pin 4 is grounded, pins 6 and 8 of U11 chip are connected to pin J1-40-3 of J1 module, pin 5 of U11 chip is connected to pin J5-40-9 of J5 module; Pin 1 of U12 chip is connected to pin 3, pin 1 of U12 chip is connected to PC3 pin of STM32f103zet6 chip through 0805 package circuit, pin 2 of U12 is connected to pin 4, pin 4 is grounded, pins 6 and 8 of U12 chip are connected to J1-40-3 pin of J1 module, pin 5 of U12 chip is connected to J3-40-3 pin of J3 module; Pin 1 of U15 chip is connected to pin 3, pin 1 of U15 chip is connected to PC1 pin of STM32f103zet6 chip through 0805 package circuit, pin 2 of U15 chip is connected to pin 4, pin 4 is grounded, pin 6 and pin 8 of U15 chip are connected to J1-40-5 of J1 module, pin 7 of U15 chip is connected to pin 7 of U16 and pin 7 of U17 respectively, pin 5 of U15 chip is connected to pin J2-40-21 of J2 module; Pin 1 of the U16 chip is connected to pin 3, pin 1 of the U16 chip is connected to pin PC2 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U16 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U16 chip are connected to J1-40-5 of the J1 module, and pin 5 of the U16 chip is connected to pin J2-40-10 of the J2 module; Pin 1 of the U17 chip is connected to pin 3, pin 1 of the U17 chip is connected to pin PC3 of the STM32f103zet6 chip through the 0805 package circuit, pin 2 of the U17 chip is connected to pin 4, pin 4 is grounded, pins 6 and 8 of the U17 chip are connected to J1-40-5 of the J1 module, and pin 5 of the U17 chip is connected to pin J3-40-4 of the J3 module; Both ends of the resistor R6 are connected to the voltage distribution module respectively; The RS485 communication module includes a U34 chip. The U34 chip adopts a SN65HVD78D chip. The R pin of the U34 chip is connected to the PA3 pin of the STM32f103zet6 chip. The R pin of the U34 chip is connected to the VCC pin through a resistor R66. The RE pin and the DE pin of the U34 chip are both grounded through a resistor R67. The RE pin of the U34 chip is connected to the PF4 pin of the STM32f103zet6 chip. The D pin of the U34 chip is connected to the PA2 pin of the STM32f103zet6 chip. The A pin and the B pin of the U34 chip are respectively connected to the display control terminal. A resistor R68 is also connected between the A pin and the B pin of the U34 chip. The GND pin of chip U34 is grounded.
2. The AC voltage measurement function board based on STM32 according to claim 1, characterized in that: The 115V AC voltage division conditioning circuit includes a U20 chip. The U20 chip adopts an LH1502 chip. Pin 1 of the U20 chip is connected to pin 3. Pin 1 of the U20 chip is connected to pin PC10 of the STM32f103zet6 chip through a 0805 package circuit. Pin 2 of the U20 chip is connected to pin 4. Pin 4 is grounded. Pin 6 and pin 8 of the U20 chip are connected to a voltage distribution module. Pin 5 of the U20 chip is connected to resistor R12 and resistor R14 respectively. The other end of resistor R12 is connected to pin J1-40-9 of the J1 module. The other end of resistor R14 is connected to the voltage distribution module. Pin 7 of the U20 chip is connected to resistors R11 and R13 respectively. Resistor R11 is connected to pin J1-40-8 of the J1 module. Resistor R13 is far away from U20 chip 7. One end of the pin is connected to the resistor R14, and one end of the resistor R13 away from the pin 7 of the U20 chip is grounded.
3. The AC voltage measurement function board based on STM32 according to claim 2, characterized in that: The voltage distribution module includes a voltage distribution circuit 1, a voltage distribution circuit 2, a voltage distribution circuit 3, a voltage distribution circuit 4 and a voltage distribution circuit 5; The voltage distribution circuit 1 includes a U26 chip. The U26 chip adopts the AQW212A model chip. The 1st and 3rd pins of the U26 chip are connected to the PD9 pin of the STM32f103zet6 chip through the 0805 package circuit. The 2nd and 4th pins of the U26 chip are grounded. The 6th and 8th pins of the U26 chip are correspondingly connected to the two ends of the resistor R6. The 5th and 7th pins of the U26 chip are connected to the RMS voltage measurement module. The voltage distribution circuit 2 includes a U29 chip. The U29 chip adopts an AQW212A chip. Pins 1 and 3 of the U29 chip are connected to the PD10 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R9. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module. The voltage distribution circuit 3 includes a U30 chip. The U30 chip adopts an AQW212A chip. Pins 1 and 3 of the U30 chip are connected to the PD11 pin of the STM32f103zet6 chip through a 0805 package circuit. Pins 2 and 4 of the U29 chip are grounded. Pins 6 and 8 of the U29 chip are correspondingly connected to the two ends of the resistor R10. Pins 5 and 7 of the U29 chip are connected to the RMS voltage measurement module through port P1. Voltage distribution circuit 4 includes U31 chip. U31 chip adopts AQW212A chip. Pins 1 and 3 of U31 chip are connected to PD12 pin of STM32f103zet6 chip through 0805 package circuit. Pins 2 and 4 of U31 chip are grounded. Pin 8 of U31 chip is connected to pin 8 of U20 chip. Pin 6 of U31 chip is connected to resistor R14. Pins 5 and 7 of U31 chip are connected to RMS voltage measurement module. Voltage distribution circuit five includes U33 chip. U33 chip adopts AQW212A chip. Pins 1 and 3 of U33 chip are connected to PD13 pin of STM32f103zet6 chip through 0805 package circuit. Pins 2 and 4 of U33 chip are grounded. Pins 6 and 8 of U33 chip are connected to both ends of resistor R5. Pins 5 and 7 of U33 chip are connected to RMS voltage measurement module.
4. The AC voltage measurement function board based on STM32 according to claim 3 is characterized in that: The RMS voltage measurement module includes a U32 chip, which uses an LTC1966 chip. The U_In1 pin and the USS pin of the U32 chip are connected to the 5 pin and the 7 pin of the U26 chip, the U29 chip, the U31 chip, and the U33 chip respectively. The U_In1 pin of the U32 chip is connected to the voltage source VCC through the diode D8 and to the ground through the diode D7; The U_In2 pin of the U32 chip is grounded through capacitor C20, and the USS pin of the U32 chip is grounded; The GND pin of the U32 chip is connected to the EN pin, and the GND pin is grounded; The VDD pin of the U32 chip is connected to the voltage source VCC; The COM pin of the U32 chip is grounded, and the V_out pin of the U32 chip is grounded through capacitor C21; The V_out pin of the U32 chip is connected to the PAO pin and PA1 pin of the STM32f103zet6 chip through the ADC module.
5. The AC voltage measurement function board based on STM32 according to claim 1, characterized in that: The STM32f103zet6 chip is connected to a power switching circuit for switching a 5V voltage source to a 3.3V voltage source and a filter module for isolating the 3.3V power supply and ground.
