Electronic scale based on 51 single-chip microcomputer with dual power supply system

By designing a dual power supply system for the electronic scale, the problem of a single power supply method was solved, enabling stable operation and weighing accuracy in different environments, and broadening the application scenarios.

CN224317126UActive Publication Date: 2026-06-02INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
Filing Date
2025-06-06
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The current electronic scales have a single power supply method, which makes them unable to work properly in environments without mains power, thus limiting their application scenarios.

Method used

An electronic scale based on a 51 microcontroller was designed, employing a dual power supply system including a lithium battery and USB power supply. The power supply is automatically switched through a power control module to ensure stable operation in different scenarios.

Benefits of technology

It enables the electronic scale to work stably in both mains power and non-mains power environments, broadens its application scope, meets the weighing needs of vendors setting up outdoor stalls and researchers working in the field, and improves weighing accuracy and range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224317126U_ABST
    Figure CN224317126U_ABST
Patent Text Reader

Abstract

This application provides an electronic scale with a dual power supply system based on a 51 microcontroller, belonging to the technical field of electronic weighing equipment. The electronic scale includes: a sensor module, an A / D conversion module, an MCU main control module, a display module, and a dual power supply system. The sensor module converts the weight of an object into a differential voltage signal. The A / D conversion module is connected to the sensor module and receives the differential voltage signal, performs A / D conversion, and outputs a digital signal. The MCU main control module is connected to the A / D conversion module, receives the digital signal, and obtains the weight value of the object. The display module is connected to the MCU main control module and displays the weight value. The dual power supply system is connected to the MCU main control module and provides a stable power supply to the MCU main control module. This allows for flexible power supply, expanding its application range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model belongs to the field of electronic weighing equipment technology, and in particular relates to an electronic scale based on a 51 microcontroller with a dual power supply system. Background Technology

[0002] In the field of electronic weighing, electronic scales are widely used in commerce, industry, scientific research, and many other sectors. Traditional electronic scales have some design shortcomings, such as high cost, which limits their application in some cost-sensitive markets; and a single power supply method, which is inconvenient to use in certain scenarios, such as outdoor use, where they cannot function properly if they can only rely on mains power.

[0003] Therefore, this utility model provides an electronic scale with a dual power supply system based on a 51 microcontroller. Utility Model Content

[0004] This invention provides an electronic scale with a dual power supply system based on a 51 microcontroller, which at least solves the problem of the single power supply method in the prior art, which is inconvenient to use in some specific scenarios.

[0005] The electronic scale includes:

[0006] The sensor module is used to convert the weight of an object into a differential voltage signal;

[0007] An A / D conversion module, connected to the sensor module, is used to receive the differential voltage signal, convert the differential voltage signal into a digital signal, and output a digital signal.

[0008] The MCU main control module is connected to the A / D conversion module, receives the digital signal, and obtains the weight value of the object;

[0009] The display module is connected to the MCU main control module and is used to display the weight value;

[0010] The dual power supply system is connected to the MCU main control module and is used to provide a stable power supply to the MCU main control module.

[0011] Furthermore, the A / D conversion module includes a conversion chip U2, resistors R5, R6, R7, and R8, capacitors C5, C6, C8, C9, C10, and C20, connector P4, and connector P5 for connecting to the sensor module.

[0012] The conversion chip U2 includes the following pins: AINN, AINP, REFIN, REFOUT, SCLK, DOUT, VDD, and GND.

[0013] After connecting the REFIN pin and REFOUT pin of converter chip U2, connect capacitor C10 and the E+ pin of connector P4; the second end of capacitor C10 is connected to the first end of capacitor C9 and grounded.

[0014] The second end of capacitor C9 is connected to the AINN pin of converter chip U2, the first end of resistor R5, and the first end of capacitor C5. The second end of resistor R5 is connected to the S- pin of connector P5. The second end of capacitor C5 is connected to the AINP pin of converter chip U2, the first end of capacitor C6, and the first end of resistor R6. The second end of resistor R6 is connected to the S+ pin of connector P5. The second end of capacitor C6 is grounded.

[0015] The DOUT pin of the conversion chip U2 is connected to the first end of the resistor R7, and the second end of the resistor R7 is connected to the DOUT pin of the MCU main control module.

[0016] The SCLK pin of the conversion chip U2 is connected to the first end of the resistor R8, and the second end of the resistor R8 is connected to the SCLK pin of the MCU main control module.

[0017] The VDD pin of the converter chip U2 is used to connect to voltage, the first terminal of capacitor C8, and the first terminal of capacitor C20; the first terminals of capacitor C8 and capacitor C20 are both connected to voltage.

[0018] The second terminals of capacitor C8 and capacitor C20 are connected to the GND pin of converter chip U2 and then grounded.

[0019] Furthermore, the MCU main control module includes a main control chip U3, a serial interface H1, a filter capacitor C18, and a filter capacitor C19;

[0020] The main control chip U3 includes serial data pins, power pins, display pins, digital-to-analog conversion pins, power enable pins, and power-off pins;

[0021] The main control chip U3 is connected to the serial interface H1 via a serial data pin;

[0022] The main control chip U3 is connected to the power supply via a power pin;

[0023] The main control chip U3 is connected to the display module via display pins;

[0024] The main control chip U3 is connected to the A / D conversion module via a digital-to-analog conversion pin;

[0025] The main control chip U3 is connected to the dual power supply system via the power enable pin and receives the output power from the dual power supply system.

[0026] The main control chip U3 is connected to the dual power supply system via the power-off pin and receives the power switch control signal from the dual power supply system.

[0027] The first terminal of filter capacitor C18 is connected to the power supply pin, and the second terminal of filter capacitor C18 is grounded; the first terminal of filter capacitor C19 is connected to the power supply pin, and the second terminal of filter capacitor C19 is grounded.

[0028] Furthermore, the dual power supply system includes a power control module, a lithium battery charging management module, and a power interface module;

[0029] The power interface module is used to connect to lithium battery power and USB power supply;

[0030] The lithium battery charging management module is connected to the power interface module, and the power control module is connected to both the lithium battery charging management module and the MCU main control module. It is used to output power to the MCU main control module and output power switch control signals to the MCU main control module.

[0031] Furthermore, the lithium battery charging management module includes: a charging management chip U1, capacitors C1, C2, C3, and C4, resistors R1, R2, R3, and R4, and indicator lights Red / LED and Green / LED; the charging management chip U1 includes a TEMP pin, a PROG pin, a GND pin, a VCC pin, a BAT pin, a STDBY pin, a CHRG pin, and a CE pin;

[0032] The first terminals of capacitors C1 and C2 are both connected to the first terminal of resistor R4, the VCC pin of charging management chip U1, and the CE pin of charging management chip U1; the second terminals of capacitors C1 and C2 are both grounded; the second terminal of resistor R4 is connected to the VUSB port for connecting USB power; the CHRG pin of charging management chip U1 is connected to the negative terminal of indicator light Red / LED, the positive terminal of indicator light Red / LED is connected to the first terminal of resistor R2, and the second terminal of resistor R2 is connected to the first terminal of resistor R4;

[0033] The STDBY pin of the charging management chip U1 is connected to the negative terminal of the indicator light Green / LED, the positive terminal of the indicator light Green / LED is connected to the first terminal of resistor R3, and the second terminal of resistor R3 is connected to the first terminal of resistor R4.

[0034] The BAT pin of the charging management chip U1 is connected to the first end of capacitor C3 and the first end of capacitor C4. The BAT pin of the charging management chip U1 is also connected to the VBAT port for connecting the lithium battery. The second end of capacitor C3 and the second end of capacitor C4 are both grounded.

[0035] The GND pin and TEMP pin of the charging management chip U1 are both grounded, and the PROG pin of the charging management chip U1 is grounded after being connected to resistor R1.

[0036] The power interface module includes: a fuse F1, a USB interface P1 for connecting to an external USB power source, and a connector CN2 for connecting to a lithium battery;

[0037] The VCC pin of USB interface P1 is connected to the VUSB port of the lithium battery charging management module through fuse F1; the GND pin of USB interface P1 is grounded; the first pin of connector CN2 is connected to the VBAT port of the lithium battery charging management module; the first pin of connector CN2 is grounded.

[0038] The power control module includes: a VUSB port control output terminal for connecting to the VUSB port, a VBAT port control output terminal for connecting to the VBAT port, resistors R12 and R13, diodes D2, D3, and D4, PMOS transistors Q6 and Q7, transistor Q8, a power output terminal POWER, a power control terminal SHUT_DOWN for connecting to the power off pin of the main control chip U3, and a signal control terminal PWR_EN for connecting to the power enable pin of the main control chip U3.

[0039] The gate (G) of PMOS transistor Q6 is connected to the first terminal of resistor R12, the control output terminal of the VUSB port, and the anode of diode D2; the second terminal of resistor R12 is grounded; the drain (D) of PMOS transistor Q6 is connected to the control output terminal of the VBAT port; the source (S) of PMOS transistor Q6 is connected to the cathode of diode D2, the first terminal of resistor R13, and the source (S) of PMOS transistor Q7; the drain (D) of PMOS transistor Q7 is connected to the power output terminal VCC.

[0040] The gate (G) of PMOS transistor Q7 is connected to the second terminal of resistor R13, the anode of diode D3, and the collector (c) of transistor Q8; the base (b) of transistor Q8 is connected to the power enable pin of the main control chip U3 through the signal control terminal PWR_EN; the emitter (e) of transistor Q8 is grounded; the cathode of diode D3 is connected to the cathode of diode D4 and the first terminal of the power output terminal POWER, and the second terminal of the power output terminal POWER is grounded; the anode of diode D4 is connected to the power off pin of the main control chip U3 through the power control terminal SHUT_DOWN.

[0041] Furthermore, the electronic scale also includes a battery voltage acquisition module; the battery voltage acquisition module includes resistors R15, R16, R17, and R18, capacitor C23, and PMOS transistor Q9;

[0042] The first terminal of resistor R17 and the source (S) of PMOS transistor Q9 are connected to the VBAT port of the lithium battery charging management module; the gate (G) of PMOS transistor Q9 is connected to the first terminal of resistor R18, and the second terminal of resistor R18 is connected to the second terminal of resistor R17, which is then connected to the BAT_ADC_EN pin of the MCU main control module; the drain (D) of PMOS transistor Q9 is connected to the first terminal of resistor R15, and the second terminal of resistor R15 is connected to the first terminal of resistor R16, which is grounded; the second terminal of resistor R15, the first terminal of resistor R16, and the first terminal of capacitor C23 are all connected to the BAT_ADC pin of the MCU main control module; the second terminal of capacitor C23 is connected to the second terminal of resistor R16 and then grounded.

[0043] Furthermore, the electronic scale also includes an indicator light module; the indicator light module includes resistor R9, resistor R10, indicator light LED3, and indicator light LED4;

[0044] The first terminals of resistor R9 and resistor R10 are connected to the voltage output of the voltage conversion module;

[0045] The second end of resistor R9 is connected to the anode of indicator LED3, and the cathode of indicator LED3 is connected to the LED1 pin of the MCU main control module;

[0046] The second end of resistor R10 is connected to the anode of indicator LED4, and the cathode of indicator LED4 is connected to the LED2 pin of the MCU main control module.

[0047] Furthermore, the electronic scale also includes a button module; the button module includes a tare button KEY1, a zero button KEY2, a weighing unit switching button KEY3, capacitors C15, C16, and C17;

[0048] The first end of the tare button KEY1 and the first end of the capacitor C15 are both connected to the KEY1 pin of the MCU main control module. The second end of the tare button KEY1 and the second end of the capacitor C15 are connected to ground.

[0049] The first end of the reset button KEY2 and the first end of the capacitor C16 are both connected to the KEY2 pin of the MCU main control module. The second end of the reset button KEY2 and the second end of the capacitor C16 are connected to ground.

[0050] The first end of the weighing unit switching button KEY3 and the first end of capacitor C17 are both connected to the KEY3 pin of the MCU main control module. The second end of the weighing unit switching button KEY3 and the second end of capacitor C17 are connected to ground.

[0051] Furthermore, the electronic scale also includes a voltage conversion module; the voltage conversion module includes a voltage regulator chip U4, polarized capacitors C11, C12, C13, and C14, a resistor R11, and an indicator LED5; the voltage regulator chip U4 includes a TAB pin, an OUT pin, an ln pin, and a GND pin;

[0052] The first terminal of polarized capacitor C11 is used to connect the input voltage VCC, the first terminal of capacitor C12, and the ln pin of voltage regulator chip U4. The first terminal of capacitor C12 is connected to the ln pin of voltage regulator chip U4. The second terminal of polarized capacitor C11 is connected to the second terminal of capacitor C12 and the GND pin and then grounded.

[0053] The first terminal of polarized capacitor C13 is connected to the OUT pin and the TAB pin of voltage regulator chip U4. The second terminal of polarized capacitor C13 is connected to the first terminal of capacitor C14 and then grounded. The second terminal of capacitor C14 is connected to the voltage output.

[0054] The first end of resistor R11 is connected to the voltage output, the second end of resistor R11 is connected to the anode of indicator LED5, and the cathode of indicator LED5 is grounded.

[0055] Furthermore, the conversion chip U2 uses a chip with the model number CS1237_JX.

[0056] As can be seen from the above technical solutions, this utility model has the following advantages:

[0057] The electronic scale based on the 51 microcontroller with a dual power supply system provided in this application takes into account the usage needs and environments of different user groups, and aims to lower the barrier to entry for using the electronic scale as much as possible. The dual power supply system design allows the electronic scale to work stably in an indoor environment with mains power via USB power, and to run continuously on a lithium battery in outdoor or field scenarios without mains power. This meets the weighing needs of different scenarios such as outdoor stalls for vendors and fieldwork for researchers, and broadens the application scope of the electronic scale.

[0058] The A / D conversion module can accurately acquire the differential voltage signal output by the sensor module. Through the cooperation of the sensor module and the A / D conversion module, the weighing accuracy and range of the electronic scale are improved, and reliable weighing data is provided. Attached Figure Description

[0059] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a block diagram of an electronic scale with a dual power supply system based on a 51 microcontroller.

[0061] Figure 2 This is the circuit schematic of the A / D conversion module.

[0062] Figure 3 This is the circuit schematic of the MCU main control module.

[0063] Figure 4 This is the circuit schematic of the display module.

[0064] Figure 5 This is the circuit schematic of the power control module.

[0065] Figure 6 Circuit diagram of the circuit that powers the lithium battery.

[0066] Figure 7 This is the circuit schematic for the power interface circuit.

[0067] Figure 8 This is the circuit schematic of the battery voltage acquisition module.

[0068] Figure 9 This is the circuit diagram of the indicator light module.

[0069] Figure 10 This is the circuit schematic of the button module.

[0070] Figure 11 This is the circuit schematic of the voltage conversion module. Detailed Implementation

[0071] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this patent, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this patent.

[0072] This application provides an electronic scale with a dual power supply system based on a 51 microcontroller, which solves the current urgent technical problem of the inconvenience of using a single power supply method in some specific scenarios.

[0073] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0074] Figure 1This is a block diagram illustrating the principle of an electronic scale with a dual power supply system based on a 51 microcontroller, provided as an embodiment of this application. Figure 1 As shown in the embodiment of this application, an electronic scale with a dual power supply system based on a 51 microcontroller is provided. The electronic scale includes:

[0075] The sensor module is used to convert the weight of an object into a differential voltage signal;

[0076] The A / D conversion module, connected to the sensor module, receives the differential voltage signal, performs A / D conversion on the differential voltage signal, and outputs a digital signal. The sensor module is installed below the weighing platform of the electronic scale to ensure that it can accurately sense the weight of the object. The output terminal of the sensor module is connected to the input terminal of the A / D conversion module. The A / D conversion module can accurately perform A / D conversion on the received differential voltage signal, converting the analog signal into a digital signal and outputting it to the MCU main control module.

[0077] The MCU main control module is connected to the A / D conversion module, receives the digital signal, and obtains the weight value of the object;

[0078] The display module, connected to the MCU main control module, is used to display the weight value. The MCU main control module converts the digital signal into the corresponding weight value and outputs the weight value to the display module for display. The display module uses an LCD screen to intuitively show the weighing result to the user.

[0079] The dual power supply system is connected to the MCU main control module and is used to provide a stable power supply to the MCU main control module.

[0080] Combining 1 and Figure 2 The A / D conversion module includes a conversion chip U2, resistors R5, R6, R7, and R8, capacitors C5, C6, C8, C9, C10, and C20, connector P4, and connector P5 for connecting to the sensor module.

[0081] The conversion chip U2 includes the following pins: AINN, AINP, REFIN, REFOUT, SCLK, DOUT, VDD, and GND.

[0082] After connecting the REFIN pin and REFOUT pin of converter chip U2, connect capacitor C10 and the E+ pin of connector P4; the second end of capacitor C10 is connected to the first end of capacitor C9 and grounded.

[0083] The second end of capacitor C9 is connected to the AINN pin of converter chip U2, the first end of resistor R5, and the first end of capacitor C5. The second end of resistor R5 is connected to the S- pin of connector P5. The second end of capacitor C5 is connected to the AINP pin of converter chip U2, the first end of capacitor C6, and the first end of resistor R6. The second end of resistor R6 is connected to the S+ pin of connector P5. The second end of capacitor C6 is grounded.

[0084] The differential voltage signal output by the sensor module is input to the AINN pin and AINP pin of the conversion chip U2 through connector P5.

[0085] The DOUT pin of the conversion chip U2 is connected to the first end of the resistor R7, and the second end of the resistor R7 is connected to the DOUT pin of the MCU main control module.

[0086] The SCLK pin of the conversion chip U2 is connected to the first end of the resistor R8, and the second end of the resistor R8 is connected to the SCLK pin of the MCU main control module.

[0087] The VDD pin of the converter chip U2 is used to connect to voltage, the first terminal of capacitor C8, and the first terminal of capacitor C20; the first terminals of capacitor C8 and capacitor C20 are both connected to voltage; the voltage conversion module is connected to the converter chip U2 to provide 3.3V voltage to the converter chip U2.

[0088] The second terminals of capacitor C8 and capacitor C20 are connected to the GND pin of converter chip U2 and then grounded.

[0089] The A / D conversion module uses a CS1237_JX conversion chip U2 to convert analog signals into digital signals. The VDD pin of the conversion chip U2 receives a 3.3V power supply, and the GND pin of the conversion chip U2 is connected to ground.

[0090] The AINN and AINP pins of converter chip U2 receive the differential voltage signal output from the sensor module via connector P5. The REFIN and REFOUT pins of converter chip U2 are used to provide and stabilize the reference voltage. Capacitors C10 (100nF) and C9 (100pF) are used for filtering to ensure the stability of the reference voltage. Filtering and impedance matching are achieved through resistors R5 and R6 (100Ω each) and capacitors C5 and C6 (100nF each).

[0091] The SCLK pin of converter chip U2 is used for synchronous data transmission. Resistor R8 (100Ω) is used for termination matching. The DOUT pin of converter chip U2 is connected to the data receiving device through resistor R7 (100Ω).

[0092] Data is transmitted serially to the MCU main control module via the DOUT pin of the conversion chip U2.

[0093] Capacitors C8 (100nF) and C20 (22uF) are used for power supply decoupling to reduce the impact of power supply noise on the chip.

[0094] Combination Figure 3 The MCU main control module includes a main control chip U3, a serial interface H1, a filter capacitor C18, and a filter capacitor C19.

[0095] The main control chip U3 includes serial data pins, power pins, display pins, digital-to-analog conversion pins, power enable pins, and power-off pins;

[0096] The main control chip U3 is connected to the serial interface H1 via a serial data pin;

[0097] The main control chip U3 is connected to the power supply via a power pin;

[0098] The main control chip U3 is connected to the display module via display pins;

[0099] Combination Figure 4 The VCC pin of the display module is connected to a 3.3V power supply. The GND pin of the display module is connected to the circuit ground. The D0 (SCLK) pin of the display module is the serial clock line pin, used for synchronous data transmission. The D1 (SDA) pin of the display module is the serial data line pin, used for data transmission. The RES# pin of the display module is the reset pin, used to reset the display screen. The DC# pin of the display module is the data / command control pin, used to distinguish whether data or commands are being sent.

[0100] The main control chip U3 is connected to the A / D conversion module via a digital-to-analog conversion pin;

[0101] The main control chip U3 is connected to the dual power supply system via the power enable pin and receives the output power from the dual power supply system.

[0102] The main control chip U3 is connected to the dual power supply system via the power-off pin and receives the power switch control signal from the dual power supply system.

[0103] The first terminal of filter capacitor C18 is connected to the power supply pin, and the second terminal of filter capacitor C18 is grounded; the first terminal of filter capacitor C19 is connected to the power supply pin, and the second terminal of filter capacitor C19 is grounded.

[0104] The main control chip U3 uses a 51 microcontroller with the model number STC15W4K48S4-30I-LQFP32.

[0105] The serial data pins include the RxD pin and the TxD pin. The RxD pin is used to receive serial data at timed intervals, and the TxD pin is used to send serial data at timed intervals.

[0106] The power supply pin is the VCC pin, used to connect to the power supply;

[0107] The display pins include OLED_CS, OLED_DC, OLED_RES, OLED_SDA, and OLED_SCL. The OLED_CS pin is the chip select signal pin for the display module; the OLED_DC pin is the data / command control pin for the display module; the OLED_RES pin is the reset pin for the display module; the OLED_SDA pin is the serial data pin for the display module; and the OLED_SCL pin is the serial clock pin for the display module.

[0108] The digital-to-analog converter pins include: SCLK pin and DOUT pin; SCLK pin is the serial clock pin, used for SPI communication; DOUT pin is the data output pin, used to output analog signals.

[0109] The power enable pins include the PWR_EN pin; the power off pins include the SHUT_DOWN pin.

[0110] The main control chip U3 also includes indicator light pins, which include LED1 pin and LED2 pin;

[0111] The main control chip U3 also includes key input pins, which include pins KEY1, KEY2, and KEY3.

[0112] The main control chip U3 also includes battery voltage acquisition pins, which include the BAT_ADC pin and the BAT_ADC_EN pin.

[0113] The BAT_ADC pin is the battery voltage ADC input pin; the BAT_ADC_EN pin is used to control the analog-to-digital conversion (ADC) function of the battery voltage for voltage measurement tasks to monitor the battery voltage.

[0114] Combination Figure 1 , Figure 5 , Figure 6 and Figure 7 The dual power supply system includes a power control module, a lithium battery charging management module, and a power interface module.

[0115] The power interface module is used to connect to lithium battery power and USB power supply;

[0116] The lithium battery charging management module is connected to the power interface module, and the power control module is connected to both the lithium battery charging management module and the MCU main control module. It is used to output power to the MCU main control module and output power switch control signals to the MCU main control module.

[0117] The lithium battery charging management module includes: a charging management chip U1, capacitors C1, C2, C3, and C4, resistors R1, R2, R3, and R4, and indicator lights Red / LED and Green / LED. The charging management chip U1 includes TEMP pin, PROG pin, GND pin, VCC pin, BAT pin, STDBY pin, CHRG pin, and CE pin.

[0118] The first terminals of capacitors C1 and C2 are both connected to the first terminal of resistor R4, the VCC pin of charging management chip U1, and the CE pin of charging management chip U1; the second terminals of capacitors C1 and C2 are both grounded; the second terminal of resistor R4 is connected to the VUSB port for connecting USB power; the CHRG pin of charging management chip U1 is connected to the negative terminal of indicator light Red / LED, the positive terminal of indicator light Red / LED is connected to the first terminal of resistor R2, and the second terminal of resistor R2 is connected to the first terminal of resistor R4;

[0119] The STDBY pin of the charging management chip U1 is connected to the negative terminal of the indicator light Green / LED, the positive terminal of the indicator light Green / LED is connected to the first terminal of resistor R3, and the second terminal of resistor R3 is connected to the first terminal of resistor R4.

[0120] The BAT pin of the charging management chip U1 is connected to the first end of capacitor C3 and the first end of capacitor C4. The BAT pin of the charging management chip U1 is also connected to the VBAT port for connecting the lithium battery. The second end of capacitor C3 and the second end of capacitor C4 are both grounded.

[0121] The GND pin and TEMP pin of the charging management chip U1 are both grounded, and the PROG pin of the charging management chip U1 is grounded after being connected to resistor R1.

[0122] The lithium battery charging management module enables charging management of the lithium battery and displays the charging status via LED indicators.

[0123] The power interface module includes: a fuse F1, a USB interface P1 for connecting to an external USB power source, and a connector CN2 for connecting to a lithium battery;

[0124] The VCC pin of USB interface P1 is connected to the VUSB port of the lithium battery charging management module through fuse F1; the GND pin of USB interface P1 is grounded; the first pin of connector CN2 is connected to the VBAT port of the lithium battery charging management module; the first pin of connector CN2 is grounded.

[0125] When the USB power supply is plugged into the USB interface P1, the USB power enters the module through the VCC pin of the USB interface P1 and is connected to the VUSB port of the lithium battery charging management module through fuse F1. Fuse F1 is used to prevent overcurrent from damaging the module. If the current exceeds the rated value of fuse F1, fuse F1 will blow, thereby cutting off the power supply.

[0126] Capacitors C1 (10uF / 10V) and C2 (100nF / 50V) are used to filter the USB power supply, removing high-frequency and low-frequency noise and making the voltage input to the charging management chip U1 more stable. Resistors R4, C1, and C2 are used to monitor the charging status and adjust the charging current. The ID pin of the USB interface P1 is used to identify the type of USB power supply (such as standard downstream port, charging downstream port) to adapt to different charging strategies. The CE pin of the charging management chip U1 enables or disables the charging function by being active high or low. The CHRG pin of the charging management chip U1 is connected to the indicator light Red / LED; the indicator light Red / LED lights up during charging to indicate the charging status. The TEMP pin of the charging management chip U1 is used to connect to a temperature sensor to monitor the battery or chip temperature and prevent overheating during charging.

[0127] The power control module includes: a VUSB port control output terminal for connecting to the VUSB port, a VBAT port control output terminal for connecting to the VBAT port, resistors R12 and R13, diodes D2, D3, and D4, PMOS transistors Q6 and Q7, transistor Q8, a power output terminal POWER, a power control terminal SHUT_DOWN for connecting to the power off pin of the main control chip U3, and a signal control terminal PWR_EN for connecting to the power enable pin of the main control chip U3.

[0128] The gate (G) of PMOS transistor Q6 is connected to the first terminal of resistor R12, the control output terminal of the VUSB port, and the anode of diode D2; the second terminal of resistor R12 is grounded; the drain (D) of PMOS transistor Q6 is connected to the control output terminal of the VBAT port; the source (S) of PMOS transistor Q6 is connected to the cathode of diode D2, the first terminal of resistor R13, and the source (S) of PMOS transistor Q7; the drain (D) of PMOS transistor Q7 is connected to the power output terminal VCC.

[0129] The gate (G) of PMOS transistor Q7 is connected to the second terminal of resistor R13, the anode of diode D3, and the collector (c) of transistor Q8; the base (b) of transistor Q8 is connected to the power enable pin of the main control chip U3 through the signal control terminal PWR_EN; the emitter (e) of transistor Q8 is grounded; the cathode of diode D3 is connected to the cathode of diode D4 and the first terminal of the power output terminal POWER, and the second terminal of the power output terminal POWER is grounded; the anode of diode D4 is connected to the power off pin of the main control chip U3 through the power control terminal SHUT_DOWN.

[0130] The VUSB and VBAT port control outputs are switched and controlled via diodes D2, D3, D4, PMOS transistors Q6 and Q7. When the VUSB port is connected to the VUSB port control output, diode D2 conducts, providing power to the MCU main control module, and PMOS transistor Q7 prevents reverse discharge of the VBAT port control output. The gates G of PMOS transistors Q6 and Q7 are controlled by the signal control terminal PWR_EN, which is connected to the microcontroller. When PWR_EN is high, PMOS transistors Q6 and Q7 conduct, allowing power output; when PWR_EN is low, power output is cut off, achieving power switching control. Resistor R12 acts as a pull-down resistor, and resistor R13 acts as a pull-up resistor, ensuring that the gates G of PMOS transistors Q6 and Q7 are in a stable voltage level. Transistor Q8 is used to further amplify the control signal and enhance the driving capability of PMOS transistors Q6 and Q7.

[0131] The lithium battery charging management module provides a stable DC power supply for the electronic scale. When the lithium battery is low, the user can connect a USB power source via USB interface P1 to power the scale. The power control module detects the power supply status of the power interface module and controls the power supply status of the lithium battery charging management module (lithium battery power or USB power). When a USB power source is connected to USB interface P1, the power control module automatically switches the power supply from the lithium battery to the USB power source, while simultaneously charging the lithium battery; when no USB power source is connected to USB interface P1, the power control module switches the power supply back to the lithium battery. This automatic power supply switching allows for flexible power supply in different scenarios. A dual power supply system is used to provide power to the electronic scale, and this system has the function of automatically switching power supplies.

[0132] Combination Figure 1 and Figure 8The electronic scale also includes a battery voltage acquisition module; the battery voltage acquisition module includes resistors R15, R16, R17, and R18, capacitor C23, and PMOS transistor Q9;

[0133] The first terminal of resistor R17 and the source (S) of PMOS transistor Q9 are connected to the VBAT port of the lithium battery charging management module; the gate (G) of PMOS transistor Q9 is connected to the first terminal of resistor R18, and the second terminal of resistor R18 is connected to the second terminal of resistor R17, which is then connected to the BAT_ADC_EN pin of the main control chip U3; the drain (D) of PMOS transistor Q9 is connected to the first terminal of resistor R15, and the second terminal of resistor R15 is connected to the first terminal of resistor R16, which is grounded; the second terminal of resistor R15, the first terminal of resistor R16, and the first terminal of capacitor C23 are all connected to the BAT_ADC pin of the main control chip U3; the second terminal of capacitor C23 is connected to the second terminal of resistor R16 and then grounded.

[0134] The battery voltage acquisition module is used to acquire the battery voltage and feed it back to the MCU main control module. The voltage Vout between resistors R15 and R16 is Vout = Vin × R16 / (R15 + R16). The resistor ratio is adjusted to match the voltage input range of the MCU main control module.

[0135] Combination Figure 9 The electronic scale also includes an indicator light module; the indicator light module includes resistor R9, resistor R10, indicator light LED3, and indicator light LED4;

[0136] The first terminals of resistors R9 and R10 are connected to the voltage output of the voltage conversion module; the voltage conversion module outputs 3.3V to power the indicator light module.

[0137] The second end of resistor R9 is connected to the anode of indicator LED3, and the cathode of indicator LED3 is connected to the LED1 pin of the main control chip U3;

[0138] The second end of resistor R10 is connected to the anode of indicator LED4, and the cathode of indicator LED4 is connected to the LED2 pin of the main control chip U3.

[0139] The indicator module is powered by a 3.3V power supply. Each indicator LED (LED3) and LED4 has a 1kΩ resistor (R9 and R10) in front of it. These resistors limit the current flowing through the LEDs to prevent damage due to excessive current. LED3 and LED4 are two LEDs connected in series. When the circuit is powered on, current flows from the 3.3V power supply through resistor R9, LED3, LED4, and resistor R10, causing LED3 and LED4 to light up, indicating that the circuit is in operation. This operational status is then sent to the LED1 and LED2 pins of the main control chip U3.

[0140] Combination Figure 10 The electronic scale also includes a button module; the button module includes a tare button KEY1, a zero button KEY2, a weighing unit switching button KEY3, a capacitor C15, a capacitor C16, and a capacitor C17;

[0141] The first end of the tare button KEY1 and the first end of the capacitor C15 are both connected to the KEY1 pin of the main control chip U3. The second end of the tare button KEY1 and the second end of the capacitor C15 are connected to ground.

[0142] The first end of the reset button KEY2 and the first end of the capacitor C16 are both connected to the KEY2 pin of the main control chip U3. The second end of the reset button KEY2 and the second end of the capacitor C16 are connected to ground.

[0143] The first end of the weighing unit switching button KEY3 and the first end of capacitor C17 are both connected to the KEY3 pin of the main control chip U3. The second end of the weighing unit switching button KEY3 and the second end of capacitor C17 are connected to ground.

[0144] The button module comprises three independent button circuits, each containing a button switch and a debouncing capacitor. When a button is not pressed, the switch is open, and there is no connection between the circuit input and ground. When a button is pressed, the switch closes, creating a connection between the circuit input and ground. Each button circuit includes a 0.1uF capacitor (C15, C16, C17), which is used to eliminate bounce (i.e., momentary voltage fluctuations due to mechanical and electrical reasons) generated when the button is pressed or released. When a button is pressed or released rapidly, multiple momentary switching actions may occur, resulting in multiple brief high and low level changes at the circuit input. The capacitor temporarily stores charge during button action, thus smoothing these momentary voltage changes and making the level changes at the circuit input more stable. The buttons are connected to the MCU main control module, which determines whether a button is pressed by detecting changes in the pin level.

[0145] Combination Figure 11 The electronic scale also includes a voltage conversion module; the voltage conversion module includes a voltage regulator chip U4, polarized capacitors C11, C12, C13, and C14, a resistor R11, and an indicator LED5; the voltage regulator chip U4 includes a TAB pin, an OUT pin, an ln pin, and a GND pin;

[0146] The first terminal of polarized capacitor C11 is used to connect the input voltage VCC, the first terminal of capacitor C12, and the ln pin of voltage regulator chip U4. The first terminal of capacitor C12 is connected to the ln pin of voltage regulator chip U4. The second terminal of polarized capacitor C11 is connected to the second terminal of capacitor C12 and the GND pin and then grounded.

[0147] The first terminal of polarized capacitor C13 is connected to the OUT pin and the TAB pin of voltage regulator chip U4. The second terminal of polarized capacitor C13 is connected to the first terminal of capacitor C14 and then grounded. The second terminal of capacitor C14 is connected to the voltage output.

[0148] The first end of resistor R11 is connected to the voltage output, the second end of resistor R11 is connected to the anode of indicator LED5, and the cathode of indicator LED5 is grounded.

[0149] The voltage conversion module uses the AMS1117-3.3 voltage regulator chip U4, which converts the input voltage VCC into a stable 3.3V output voltage to provide voltage for the A / D conversion module and indicator light module.

[0150] The voltage conversion module receives the input voltage from the VCC terminal. Capacitors C11 (22uF) and C12 (0.1uF) at the input terminal filter out high-frequency noise in the input voltage, providing a more stable voltage to the voltage regulator chip U4. The voltage regulator chip U4 adjusts the input voltage to a 3.3V output, which powers the indicator light module and the A / D conversion module. Capacitors C13 (22uF) and C14 (0.1uF) at the output terminal filter out noise in the output voltage, ensuring its stability. The 3.3V output voltage drives indicator light LED5 through resistor R11 (1kΩ), forming an indicator light circuit.

[0151] The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0152] For those skilled in the art, designing different forms of control circuits based on the teachings of this invention does not require creative effort. Changes, modifications, substitutions, and variations made to the embodiments without departing from the principles and spirit of this invention still fall within the protection scope of this invention.

Claims

1. An electronic scale based on a 51 microcontroller with a dual power supply system, characterized in that, The electronic scale includes: The sensor module is used to convert the weight of an object into a differential voltage signal; An A / D conversion module, connected to the sensor module, is used to receive the differential voltage signal, convert the differential voltage signal into a digital signal, and output a digital signal. The MCU main control module is connected to the A / D conversion module, receives the digital signal, and obtains the weight value of the object; The display module is connected to the MCU main control module and is used to display the weight value; The dual power supply system is connected to the MCU main control module and is used to provide a stable power supply to the MCU main control module.

2. The electronic scale as described in claim 1, characterized in that, The A / D conversion module includes a conversion chip U2, resistors R5, R6, R7, and R8, capacitors C5, C6, C8, C9, C10, and C20, connector P4, and connector P5 for connecting to the sensor module. The conversion chip U2 includes the following pins: AINN, AINP, REFIN, REFOUT, SCLK, DOUT, VDD, and GND. After connecting the REFIN pin and REFOUT pin of converter chip U2, connect capacitor C10 and the E+ pin of connector P4; the second end of capacitor C10 is connected to the first end of capacitor C9 and grounded. The second end of capacitor C9 is connected to the AINN pin of converter chip U2, the first end of resistor R5, and the first end of capacitor C5. The second end of resistor R5 is connected to the S- pin of connector P5. The second end of capacitor C5 is connected to the AINP pin of converter chip U2, the first end of capacitor C6, and the first end of resistor R6. The second end of resistor R6 is connected to the S+ pin of connector P5. The second end of capacitor C6 is grounded. The DOUT pin of the conversion chip U2 is connected to the first end of the resistor R7, and the second end of the resistor R7 is connected to the DOUT pin of the MCU main control module. The SCLK pin of the conversion chip U2 is connected to the first end of the resistor R8, and the second end of the resistor R8 is connected to the SCLK pin of the MCU main control module. The VDD pin of the converter chip U2 is used to connect to voltage, the first terminal of capacitor C8, and the first terminal of capacitor C20; the first terminals of capacitor C8 and capacitor C20 are both connected to voltage. The second terminals of capacitor C8 and capacitor C20 are connected to the GND pin of converter chip U2 and then grounded.

3. The electronic scale as described in claim 2, characterized in that, The MCU main control module includes a main control chip U3, a serial interface H1, a filter capacitor C18, and a filter capacitor C19. The main control chip U3 includes serial data pins, power pins, display pins, digital-to-analog conversion pins, power enable pins, and power-off pins; The main control chip U3 is connected to the serial interface H1 via a serial data pin; The main control chip U3 is connected to the power supply via a power pin; The main control chip U3 is connected to the display module via display pins; The main control chip U3 is connected to the A / D conversion module via a digital-to-analog conversion pin; The main control chip U3 is connected to the dual power supply system via the power enable pin and receives the output power from the dual power supply system. The main control chip U3 is connected to the dual power supply system via the power-off pin and receives the power switch control signal from the dual power supply system. The first terminal of filter capacitor C18 is connected to the power supply pin, and the second terminal of filter capacitor C18 is grounded; the first terminal of filter capacitor C19 is connected to the power supply pin, and the second terminal of filter capacitor C19 is grounded.

4. The electronic scale as described in claim 3, characterized in that, The dual power supply system includes a power control module, a lithium battery charging management module, and a power interface module; The power interface module is used to connect to lithium battery power and USB power supply; The lithium battery charging management module is connected to the power interface module, and the power control module is connected to both the lithium battery charging management module and the MCU main control module. It is used to output power to the MCU main control module and output power switch control signals to the MCU main control module.

5. The electronic scale as described in claim 4, characterized in that, The lithium battery charging management module includes: a charging management chip U1, capacitors C1, C2, C3, and C4, resistors R1, R2, R3, and R4, and indicator lights Red / LED and Green / LED. The charging management chip U1 includes TEMP pin, PROG pin, GND pin, VCC pin, BAT pin, STDBY pin, CHRG pin, and CE pin. The first terminals of capacitors C1 and C2 are both connected to the first terminal of resistor R4, the VCC pin of charging management chip U1, and the CE pin of charging management chip U1; the second terminals of capacitors C1 and C2 are both grounded; the second terminal of resistor R4 is connected to the VUSB port for connecting USB power; the CHRG pin of charging management chip U1 is connected to the negative terminal of indicator light Red / LED, the positive terminal of indicator light Red / LED is connected to the first terminal of resistor R2, and the second terminal of resistor R2 is connected to the first terminal of resistor R4; The STDBY pin of the charging management chip U1 is connected to the negative terminal of the indicator light Green / LED, the positive terminal of the indicator light Green / LED is connected to the first terminal of resistor R3, and the second terminal of resistor R3 is connected to the first terminal of resistor R4. The BAT pin of the charging management chip U1 is connected to the first end of capacitor C3 and the first end of capacitor C4. The BAT pin of the charging management chip U1 is also connected to the VBAT port for connecting the lithium battery. The second end of capacitor C3 and the second end of capacitor C4 are both grounded. The GND pin and TEMP pin of the charging management chip U1 are both grounded, and the PROG pin of the charging management chip U1 is grounded after being connected to resistor R1. The power interface module includes: a fuse F1, a USB interface P1 for connecting to an external USB power source, and a connector CN2 for connecting to a lithium battery; The VCC pin of USB interface P1 is connected to the VUSB port of the lithium battery charging management module through fuse F1; the GND pin of USB interface P1 is grounded; the first pin of connector CN2 is connected to the VBAT port of the lithium battery charging management module; the first pin of connector CN2 is grounded. The power control module includes: a VUSB port control output terminal for connecting to the VUSB port, a VBAT port control output terminal for connecting to the VBAT port, resistors R12 and R13, diodes D2, D3, and D4, PMOS transistors Q6 and Q7, transistor Q8, a power output terminal POWER, a power control terminal SHUT_DOWN for connecting to the power off pin of the main control chip U3, and a signal control terminal PWR_EN for connecting to the power enable pin of the main control chip U3. The gate (G) of PMOS transistor Q6 is connected to the first terminal of resistor R12, the control output terminal of the VUSB port, and the anode of diode D2; the second terminal of resistor R12 is grounded; the drain (D) of PMOS transistor Q6 is connected to the control output terminal of the VBAT port; the source (S) of PMOS transistor Q6 is connected to the cathode of diode D2, the first terminal of resistor R13, and the source (S) of PMOS transistor Q7; the drain (D) of PMOS transistor Q7 is connected to the power output terminal VCC. The gate (G) of PMOS transistor Q7 is connected to the second terminal of resistor R13, the anode of diode D3, and the collector (c) of transistor Q8; the base (b) of transistor Q8 is connected to the power enable pin of the main control chip U3 through the signal control terminal PWR_EN; the emitter (e) of transistor Q8 is grounded; the cathode of diode D3 is connected to the cathode of diode D4 and the first terminal of the power output terminal POWER, and the second terminal of the power output terminal POWER is grounded; the anode of diode D4 is connected to the power off pin of the main control chip U3 through the power control terminal SHUT_DOWN.

6. The electronic scale as described in claim 5, characterized in that, The electronic scale also includes a battery voltage acquisition module; the battery voltage acquisition module includes resistors R15, R16, R17, and R18, capacitor C23, and PMOS transistor Q9; The first terminal of resistor R17 and the source (S) of PMOS transistor Q9 are connected to the VBAT port of the lithium battery charging management module; the gate (G) of PMOS transistor Q9 is connected to the first terminal of resistor R18, and the second terminal of resistor R18 is connected to the second terminal of resistor R17, which is then connected to the BAT_ADC_EN pin of the MCU main control module; the drain (D) of PMOS transistor Q9 is connected to the first terminal of resistor R15, and the second terminal of resistor R15 is connected to the first terminal of resistor R16, which is grounded; the second terminal of resistor R15, the first terminal of resistor R16, and the first terminal of capacitor C23 are all connected to the BAT_ADC pin of the MCU main control module; the second terminal of capacitor C23 is connected to the second terminal of resistor R16 and then grounded.

7. The electronic scale as described in claim 6, characterized in that, The electronic scale also includes an indicator light module; the indicator light module includes resistor R9, resistor R10, indicator light LED3, and indicator light LED4; The first terminals of resistor R9 and resistor R10 are connected to the voltage output of the voltage conversion module; The second end of resistor R9 is connected to the anode of indicator LED3, and the cathode of indicator LED3 is connected to the LED1 pin of the MCU main control module; The second end of resistor R10 is connected to the anode of indicator LED4, and the cathode of indicator LED4 is connected to the LED2 pin of the MCU main control module.

8. The electronic scale as described in claim 7, characterized in that, The electronic scale also includes a button module; the button module includes a tare button KEY1, a zero button KEY2, a weighing unit switching button KEY3, capacitor C15, capacitor C16, and capacitor C17; The first end of the tare button KEY1 and the first end of the capacitor C15 are both connected to the KEY1 pin of the MCU main control module. The second end of the tare button KEY1 and the second end of the capacitor C15 are connected to ground. The first end of the reset button KEY2 and the first end of the capacitor C16 are both connected to the KEY2 pin of the MCU main control module. The second end of the reset button KEY2 and the second end of the capacitor C16 are connected to ground. The first end of the weighing unit switching button KEY3 and the first end of capacitor C17 are both connected to the KEY3 pin of the MCU main control module. The second end of the weighing unit switching button KEY3 and the second end of capacitor C17 are connected to ground.

9. The electronic scale as described in claim 8, characterized in that, The electronic scale also includes a voltage conversion module; the voltage conversion module includes a voltage regulator chip U4, polarized capacitors C11, C12, C13, and C14, a resistor R11, and an indicator LED5; the voltage regulator chip U4 includes a TAB pin, an OUT pin, an ln pin, and a GND pin. The first terminal of polarized capacitor C11 is used to connect the input voltage VCC, the first terminal of capacitor C12, and the ln pin of voltage regulator chip U4. The first terminal of capacitor C12 is connected to the ln pin of voltage regulator chip U4. The second terminal of polarized capacitor C11 is connected to the second terminal of capacitor C12 and the GND pin and then grounded. The first terminal of polarized capacitor C13 is connected to the OUT pin and the TAB pin of voltage regulator chip U4. The second terminal of polarized capacitor C13 is connected to the first terminal of capacitor C14 and then grounded. The second terminal of capacitor C14 is connected to the voltage output. The first end of resistor R11 is connected to the voltage output, the second end of resistor R11 is connected to the anode of indicator LED5, and the cathode of indicator LED5 is grounded.

10. The electronic scale as described in claim 9, characterized in that, The conversion chip U2 uses a chip with the model number CS1237_JX.