A circuit for automatic power supply switching during calibration of a position sensor chip
The automatic power switching circuit utilizes PMOS transistors and current-limiting resistors to automatically switch the power supply between the position sensor chip and the microcontroller, solving the problems of time-consuming and labor-intensive manual operation and high failure rate during calibration, thus improving production efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- HEFEI WAL FUEL SYST CO LTD
- Filing Date
- 2025-07-18
- Publication Date
- 2026-07-03
AI Technical Summary
In the existing technology, the calibration process of position sensor chips requires manual disconnection and restoration of the power connection, which is time-consuming, laborious, and prone to introducing faults such as solder bridging and cold solder joints. In particular, it is impossible to recalibrate after the circuit board has been potted with glue.
An automatic power switching circuit is adopted, which uses PMOS transistors and current-limiting resistors to automatically switch the power connection between the position sensor chip and the microcontroller when the calibration tool is inserted and removed, thus avoiding manual operation.
It automates the calibration of position sensor chips, reduces the failure rate, improves production efficiency, saves time, and can even calibrate the circuit board after it has been potted with glue.
Smart Images

Figure CN224459358U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of circuit protection, and in particular to a circuit for automatic power supply switching during the calibration of a position sensor chip. Background Technology
[0002] Commonly used position sensor chips are mainly Hall effect sensors, used to sense changes in the position of a magnet. When the magnet rotates or undergoes linear displacement, the output voltage of the position sensor chip also changes linearly. The position sensor chip converts the magnet's position signal into a voltage signal and transmits it to the microcontroller, which then controls the motor's rotation. Unused position sensor chips do not have an established internal position-voltage relationship and require a dedicated position sensor chip calibration tool for calibration. During calibration, the position sensor chip's power supply voltage is provided by the calibration tool (7V), while the microcontroller's power supply is provided by a power supply chip (5V). Since these voltages are different, both power supplies must be disconnected during calibration. After calibration, the calibration tool is removed, and the position sensor chip's power supply and the microcontroller's power supply become identical. Therefore, the power supplies of the position sensor chip and the microcontroller must be reconnected. The commonly used method is to connect a 0-ohm resistor in series between the power supply of the microcontroller and the position sensor chip. During calibration, the resistor is manually removed, and after calibration, it is soldered back. This is time-consuming and labor-intensive, and it is easy to introduce faults such as bridging and cold solder joints. Some circuit boards are potted with glue, and once the glue is applied, it is impossible to perform calibration again. Utility Model Content
[0003] The purpose of this invention is to provide an automatic power switching circuit that automatically disconnects the power connection between the microcontroller and the position sensor chip when the calibration tool is plugged in, and automatically restores the power connection between the microcontroller and the position sensor chip when the calibration tool is unplugged.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A circuit for automatic power switching during position sensor chip calibration includes a power chip, an automatic power switching circuit, a position sensor chip, a position sensor chip calibration tool, a microcontroller, a motor drive chip, a motor, and a magnet. The output terminal of the power chip is connected to the power pin of the microcontroller, and the power chip is connected to the power supply pin of the position sensor chip through the automatic power switching circuit. The power output terminal of the position sensor chip calibration tool is connected to the automatic power switching circuit, and the signal terminal is connected to the position sensor chip. The control output terminal of the microcontroller is connected to the control terminal of the motor through the motor drive chip, and the output shaft of the motor is connected to the magnet. The signal output terminal of the position sensor chip is connected to the signal input pin of the microcontroller. The automatic power switching circuit automatically disconnects the connection between the power chip and the position sensor chip when the calibration tool is connected, and automatically restores the connection when the calibration tool is disconnected.
[0006] As a further embodiment of this invention: the automatic power switching circuit includes a first PMOS transistor Q1, a second PMOS transistor Q2, a first current-limiting resistor R1, a second current-limiting resistor R2, a pull-down resistor R3, and a filter capacitor C1; the output terminal of the power chip is connected to the drain D of the first PMOS transistor Q1, the source S of the first PMOS transistor Q1 is connected to the source S of the second PMOS transistor Q2, and the drain D of the second PMOS transistor Q2 is connected to the power supply pin of the position sensor chip; the power output terminal of the calibration tool is connected to the gate G of the first PMOS transistor Q1 through the first current-limiting resistor R1, and to the gate G of the second PMOS transistor Q2 through the second current-limiting resistor R2; the gates of the first PMOS transistor Q1 and the second PMOS transistor Q2 are connected to ground through the pull-down resistor R3; the filter capacitor C1 is connected between the gate of the second PMOS transistor Q2 and ground.
[0007] As a further improvement of this utility model: the resistance values of the first current-limiting resistor R1 and the second current-limiting resistor R2 are both 10kΩ, the resistance value of the pull-down resistor R3 is 100kΩ, and the capacitance value of the filter capacitor C1 is 100nF.
[0008] As a further improvement of this invention: the first PMOS transistor Q1 and the second PMOS transistor Q2 are both enhancement-type PMOS transistors with a withstand voltage ≥10V.
[0009] As a further improvement of this invention, the position sensor chip is a Hall-type position sensor chip.
[0010] As a further improvement of this utility model, the displacement of the magnet is either angular displacement or linear displacement.
[0011] As a further improvement of this utility model: the power chip outputs a voltage of 5V, and the position sensor chip calibration tool outputs a voltage of 7V.
[0012] As a further improvement of this utility model: the microcontroller is an STM32 series microcontroller, and the motor driver chip is model L298N.
[0013] The beneficial effects of this utility model are as follows: During the production calibration of the product, the power supply of the position sensor chip is automatically switched between the power chip and the calibration tool, eliminating the need for workers to disassemble and install resistors. Even if the circuit board is potted with glue, calibration can still be achieved, reducing the product failure rate and improving production efficiency. It is estimated that each product can save 5 minutes of working time. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the system of this utility model. Detailed Implementation
[0015] The technical solution of this patent will be further described in detail below with reference to specific embodiments.
[0016] The embodiments of this patent are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this patent, and should not be construed as limiting this patent.
[0017] Reference Figure 1 A circuit for automatic power switching during the calibration of a position sensor chip includes: a power chip, an automatic power switching circuit, a position sensor chip, a position sensor chip calibration tool, a microcontroller, a motor drive chip, a motor, and a magnet. The power chip is connected to the microcontroller, and is connected to the position sensor chip via the automatic power switching circuit. The position sensor chip calibration tool is connected to both the position sensor chip and the automatic power switching circuit. The microcontroller is connected to the motor via the motor drive chip, driving the motor to rotate and displace the magnet. The position sensor chip senses the magnet's displacement and converts the position information into a voltage signal, which is then output to the microcontroller.
[0018] The power supply chip outputs a 5V voltage directly connected to the microcontroller's power pin, and simultaneously connected to the position sensor chip via two PMOS transistors. Specifically, the power supply chip's output is first connected to the drain of the first PMOS transistor, the source of the first PMOS transistor is connected to the source of the second PMOS transistor, and the drain of the second PMOS transistor is connected to the position sensor chip's power pin. The gates of both PMOS transistors are pulled down to ground through resistors and also connected to an external calibration tool through current-limiting resistors. When the calibration tool is not connected, the gates of both PMOS transistors are grounded, so both PMOS transistors can conduct, and the 5V output from the power supply chip is directly connected to the position sensor chip's power pin through the two PMOS transistors. In this case, the power supply to the position sensor chip and the microcontroller can be short-circuited. When the calibration tool is connected, the voltage (7V) provided by the calibration tool is connected to the gates of the two PMOS transistors, thus disconnecting the two PMOS transistors and disconnecting the power supply to the microcontroller and the position sensor chip.
[0019] The working principle is as follows:
[0020] When the calibration tool is connected, the voltage (7V) provided by the calibration tool is connected to the gate of the first PMOS transistor Q1 through resistor R1 and to the gate of the second PMOS transistor Q2 through resistor R2. Because the gate voltages of the first PMOS transistor Q1 and the second PMOS transistor Q2 are raised, the first PMOS transistor Q1 and the second PMOS transistor Q2 are turned off. The 5V voltage provided by the power supply chip and the power supply to the position sensor chip are disconnected. After calibration, the calibration tool is disconnected, the 7V power supply provided by the calibration tool disappears, the gates of the first PMOS transistor Q1 and the second PMOS transistor Q2 are pulled to ground through resistor R3, the first PMOS transistor Q1 and the second PMOS transistor Q2 are turned on, and the 5V provided by the power supply chip and the 5V of the position sensor chip are reconnected. The working principle of this invention is: utilizing PMOS transistors... The body diode conduction characteristic is as follows: When the calibration tool is not connected, the gate voltages of both the first PMOS transistor Q1 and the second PMOS transistor Q2 are low, and the first PMOS transistor Q1 is turned on through the body diode. After the first PMOS transistor Q1 is turned on, the source voltage of the first PMOS transistor Q1 rises, which can fully turn on the first PMOS transistor Q1. After the first PMOS transistor Q1 is turned on, the source voltage of the second PMOS transistor Q2 rises, and the second PMOS transistor Q2 is turned on. The power supplies of the microcontroller and the position sensor chip are both connected to the 5V output of the power supply chip. When the calibration tool is connected, the gate voltages of the first PMOS transistor Q1 and the second PMOS transistor Q2 are both raised. The first PMOS transistor Q1 can still be turned on through the body diode, but the second PMOS transistor Q2 is turned off, and the connection between the power supply of the position sensor chip and the power supply of the microcontroller is disconnected.
[0021] The above description is only a preferred embodiment of the present utility model, but the protection scope of the present utility model is not limited thereto. Any equivalent substitutions or changes made by those skilled in the art within the technical scope disclosed in the present utility model, based on the technical solution and the inventive concept of the present utility model, should be included within the protection scope of the present utility model.
Claims
1. A circuit for automatic power supply switching during calibration of a position sensor chip, characterized in that, The system includes a power chip, an automatic power switching circuit, a position sensor chip, a position sensor chip calibration tool, a microcontroller, a motor drive chip, a motor, and a magnet. The output of the power chip is connected to the power pin of the microcontroller, and the power chip is connected to the power supply pin of the position sensor chip through the automatic power switching circuit. The power output of the position sensor chip calibration tool is connected to the automatic power switching circuit, and its signal terminal is connected to the position sensor chip. The control output of the microcontroller is connected to the control terminal of the motor through the motor drive chip, and the output shaft of the motor is connected to the magnet. The signal output of the position sensor chip is connected to the signal input pin of the microcontroller. The automatic power switching circuit automatically disconnects the power chip from the position sensor chip when the calibration tool is connected and automatically restores the connection when the calibration tool is disconnected.
2. The circuit of claim 1, wherein, The automatic power switching circuit includes a first PMOS transistor Q1, a second PMOS transistor Q2, a first current-limiting resistor R1, a second current-limiting resistor R2, a pull-down resistor R3, and a filter capacitor C1. The output terminal of the power chip is connected to the drain D of the first PMOS transistor Q1, the source S of the first PMOS transistor Q1 is connected to the source S of the second PMOS transistor Q2, and the drain D of the second PMOS transistor Q2 is connected to the power supply pin of the position sensor chip. The power output terminal of the calibration tool is connected to the gate G of the first PMOS transistor Q1 through the first current-limiting resistor R1 and to the gate G of the second PMOS transistor Q2 through the second current-limiting resistor R2. The gates of the first PMOS transistor Q1 and the second PMOS transistor Q2 are connected to ground through the pull-down resistor R3. A filter capacitor C1 is connected between the gate of the second PMOS transistor Q2 and ground.
3. The circuit of claim 2, wherein, The first current-limiting resistor R1 and the second current-limiting resistor R2 both have a resistance of 10kΩ, the pull-down resistor R3 has a resistance of 100kΩ, and the filter capacitor C1 has a capacitance of 100nF.
4. The circuit of claim 2, wherein, The first PMOS transistor Q1 and the second PMOS transistor Q2 are both enhancement-mode PMOS transistors with a withstand voltage ≥10V.
5. The circuit of claim 1, wherein, The position sensor chip is a Hall-type position sensor chip.
6. The circuit of claim 1, wherein, The displacement of the magnet is either angular or linear.
7. The circuit of claim 1, wherein, The power chip outputs a voltage of 5V, and the position sensor chip calibration tool outputs a voltage of 7V.
8. The circuit of claim 1, wherein, The microcontroller is an STM32 series microcontroller, and the motor driver chip is model L298N.