A multi-channel sensor analog and switching value detection circuit
By integrating analog and digital signal detection modules and utilizing an analog multiplexer HC in conjunction with an MCU, the problem of low integration in multi-channel detection circuits is solved, hardware resources are optimized and signal interference is reduced, thereby improving circuit stability and power consumption control.
Patent Information
- Application Number
- CN202522778613.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2035-12-29
AI Technical Summary
Existing multi-channel detection circuits have low integration, requiring separate circuits for analog and digital signals, which consumes a lot of hardware resources and is susceptible to signal interference. Furthermore, they lack MCU control mechanisms, affecting circuit stability and power consumption control.
Design a multi-channel sensor analog and digital quantity detection circuit, integrating analog quantity detection module and digital quantity detection module, and using an analog multiplexer HC to cooperate with a microcontroller MCU to realize signal interaction and MCU reset control, reducing hardware resource consumption and reducing the risk of signal interference.
It improves the integration of the circuit, reduces the risk of signal interference, enhances the coordination between MCU reset and channel selection, and improves the stability and power consumption control efficiency of the circuit.
Smart Images

Figure CN225032139U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of detection circuit technology, and in particular to a multi-channel sensor analog and switching quantity detection circuit. Background Technology
[0002] In fields such as industrial automation and equipment monitoring, the acquisition and detection of multi-channel sensor signals are fundamental to achieving system status monitoring and automatic control. Currently, multi-channel detection circuits in related technologies often suffer from low integration: analog and digital signals require separate acquisition circuits, which not only consumes significant hardware resources but also increases the risk of signal interference due to circuit dispersion. Furthermore, some detection circuits lack control mechanisms for the microcontroller (MCU), making it difficult to coordinate MCU reset and channel selection as needed, thus affecting circuit stability and power consumption control efficiency. Utility Model Content
[0003] The main objective of this invention is to provide a multi-channel sensor analog and switching quantity detection circuit to solve the problems raised in related technologies.
[0004] To achieve the above objectives, according to one aspect of the present invention, a multi-channel sensor analog and switching quantity detection circuit is provided, including an analog multiplexer HC and a microcontroller MCU, and further comprising:
[0005] An analog signal detection module is connected to an external sensor for collecting analog signal data, and is also connected to an analog multiplexer HC for transmitting the collected analog signal data to the analog multiplexer HC.
[0006] A switch quantity detection module is connected to an external channel contact for acquiring switch quantity signals. The switch quantity detection module is also connected to an analog multiplexer HC for transmitting the acquired switch quantity signals to the analog multiplexer HC.
[0007] A signal interaction circuit is connected between the analog multiplexer HC and the microcontroller MCU. The microcontroller MCU controls the channel selection of the analog multiplexer HC through the signal interaction circuit.
[0008] A control circuit, which is connected to a microcontroller (MCU), is used to control the MCU to reset.
[0009] Furthermore, the analog quantity detection module includes three analog quantity control circuits. The three analog quantity control circuits have the same structure, each including an operational amplifier, a resistor, and a capacitor. The resistor and capacitor are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier. The input terminal P of the operational amplifier is connected to a sensor for acquiring analog quantity signals.
[0010] Furthermore, the output terminals of the operational amplifiers in the three analog control circuits are connected in series with channels K1, K2, and K3 of the analog multiplexer HC, respectively. The other ends of channels K1, K2, and K3 are connected to analog input pins AN1, AN2, and AN3 of the microcontroller MCU, respectively.
[0011] Furthermore, the switch quantity detection module includes three switch quantity detection circuits. The three switch quantity detection circuits have the same structure, each including an optocoupler, a resistor, and a capacitor. A capacitor is connected in series between the collector and emitter of the optocoupler. The emitter of the optocoupler is grounded through the capacitor. The collector is connected in series with the resistor. The cathode is grounded. The anode is connected to the channel contact for acquiring switch quantity signals.
[0012] Furthermore, the collectors of the optocouplers in the three-way switching detection circuits are connected in series with channels K4, K5, and K6 of the analog multiplexer HC, respectively. The other ends of channels K4, K5, and K6 are connected to the switching input pins DI1, DI2, and DI3 of the microcontroller MCU, respectively.
[0013] Furthermore, the signal interaction circuit includes an operational amplifier U7, a resistor R7, and a capacitor C7. The resistor R7 and the capacitor C7 are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier U7. The non-inverting input terminal of the operational amplifier U7 is connected to the enable pin ER of the analog multiplexer HC, and the output terminal is connected to the communication interface GR of the microcontroller MCU. The microcontroller MCU controls the channel selection of the analog multiplexer HC through the signal interaction circuit.
[0014] Furthermore, the control circuit includes an operational amplifier U8, a resistor R8, and a capacitor C8. The resistor R8 and the capacitor C8 are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier U8. The output terminal of the operational amplifier U8 is connected to the reset pin RES of the microcontroller MCU, and the non-inverting input terminal is connected to a reset signal. The reset signal resets the microcontroller MCU through the control circuit.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] 1. This application integrates analog signal detection module and digital signal detection module, and uses an analog multiplexer to achieve multiplexing and acquisition of multi-channel signals, which reduces hardware resource consumption and lowers the risk of signal interference.
[0017] 2. By leveraging the cooperation of control circuits and signal interaction circuits, precise coordination between MCU reset control and channel selection is achieved, improving the stability of circuit operation and the rationality of power consumption control.
[0018] 3. The analog signal acquired by the analog control circuit first enters the operational amplifier to increase the input impedance and avoid interference with the sensor. Then, the analog signal is filtered by the filter circuit composed of capacitors and resistors in the circuit to remove high-frequency noise and improve the anti-interference ability of the analog signal.
[0019] 4. The switching signal acquired by the switching signal detection circuit first enters the optocoupler. The optocoupler realizes electrical isolation between this circuit and the external circuit. The debouncing circuit composed of capacitors and resistors in this circuit isolates and debounces the switching signal, filtering the bouncing noise of the switch. Attached Figure Description
[0020] Figure 1 This is the circuit diagram of this utility model. Detailed Implementation
[0021] To further illustrate the technical means and effects adopted by this utility model in order to achieve the intended utility model purpose, the following detailed description of the specific implementation methods, structure, features and effects of this utility model is provided in conjunction with the accompanying drawings and preferred embodiments.
[0022] This embodiment provides a multi-channel sensor analog and switching quantity detection circuit, such as... Figure 1 As shown, it includes an analog multiplexer HC, a microcontroller MCU, an analog quantity detection module, a digital quantity detection module, a signal interaction circuit, and a control circuit.
[0023] The analog signal detection module is used to acquire analog data output from external sensors. It contains three identical analog control circuits. Each analog control circuit includes an operational amplifier, resistors, and capacitors. Specifically, the first analog control circuit includes operational amplifier U1, resistor R1, and capacitor C1; the second analog control circuit includes operational amplifier U2, resistor R2, and capacitor C2; and the third analog control circuit includes operational amplifier U3, resistor R3, and capacitor C3. The resistors and capacitors in each analog control circuit are connected in parallel and then in series between the inverting input and output of the corresponding operational amplifier, forming a voltage follower structure. The input terminal P of the operational amplifier is directly connected to the external sensor to acquire the analog signal. Simultaneously, the high input impedance of the voltage follower avoids interference with the output of the external sensor. In the three-channel analog control circuit, the output of the operational amplifier is connected in series with channels K1, K2, and K3 of the analog multiplexer HC, respectively. The other ends of channels K1, K2, and K3 are connected to the analog input pins AN1, AN2, and AN3 of the microcontroller MCU, so that the acquired analog signal can be transmitted to the MCU through the analog multiplexer HC.
[0024] The switch quantity detection module is used to acquire switch quantity signals output from external channel contacts. It contains three identical switch quantity detection circuits. Each switch quantity detection circuit includes an optocoupler, a resistor, and a capacitor. Specifically, the first switch quantity detection circuit includes an optocoupler PC1, a resistor R4, and a capacitor C4; the second switch quantity detection circuit includes an optocoupler PC2, a resistor R5, and a capacitor C5; and the third switch quantity detection circuit includes an optocoupler PC3, a resistor R6, and a capacitor C6. In each switch quantity detection circuit, the cathode of the optocoupler is grounded, and the anode is connected to the external channel contact to acquire the switch quantity signal. The collector of the optocoupler is connected in series with the corresponding resistor, and the emitter is grounded through a capacitor. The capacitor is connected in series between the collector and emitter of the optocoupler. This capacitor, together with the collector and emitter of the optocoupler, forms a debouncing structure to prevent the bouncing signal from the channel contact from interfering with the detection results. In the three-channel switch quantity detection circuit, the collector of the optocoupler is connected in series with channels K4, K5, and K6 of the analog multiplexer HC, respectively. The other end of channels K4, K5, and K6 is connected to the switch quantity input pins DI1, DI2, and DI3 of the microcontroller MCU, so that the processed switch quantity signal can be transmitted to the MCU through the analog multiplexer HC.
[0025] The signal interaction circuit connects the analog multiplexer HC and the microcontroller MCU. It includes an operational amplifier U7, a resistor R7, and a capacitor C7. The resistor R7 and capacitor C7 are connected in parallel and then in series between the inverting input and output of the operational amplifier U7. The non-inverting input of the operational amplifier U7 is connected to the enable pin ER of the analog multiplexer HC, and the output is connected to the communication interface GR of the microcontroller MCU. The microcontroller MCU outputs a control signal to the operational amplifier U7 through the communication interface GR. After being conditioned by the operational amplifier U7, the signal is transmitted to the enable pin ER, thereby controlling the channel selection of the analog multiplexer HC and realizing the time-division multiplexing of analog signals and digital signals.
[0026] The control circuit is connected to the microcontroller (MCU) and is used to control the MCU reset. It includes an operational amplifier U8, a resistor R8, and a capacitor C8. The resistor R8 and capacitor C8 are connected in parallel and then in series between the inverting input and output of the operational amplifier U8. The output of the operational amplifier U8 is connected to the reset pin RES of the microcontroller (MCU), and the non-inverting input is used to receive external reset signals. When an external reset signal is input, it is conditioned by the operational amplifier U8 and transmitted to the reset pin RES, enabling the microcontroller (MCU) to complete the reset operation and ensuring the stability of the circuit operation.
[0027] In addition, the microcontroller (MCU) is equipped with signal output pins CU1 to CU8. This group of pins is used to output control signals, which can directly drive external actuators, such as relays and solenoid valves, to realize the control linkage between the detection signal and the external device.
[0028] The analog multiplexer HC has its VDD pin connected to a +5V power supply and its VCC pin connected to a -5V power supply to provide power to the analog multiplexer HC; the analog multiplexer HC has its VEE pin grounded.
[0029] The above description is merely a preferred embodiment of the present utility model and is not intended to limit the present utility model in any way. Although the present utility model has been disclosed above with reference to a preferred embodiment, it is not intended to limit the present utility model. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present utility model. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present utility model without departing from the scope of the present utility model shall still fall within the scope of the present utility model.
Claims
1. A multi-channel sensor analog and switching quantity detection circuit, comprising an analog multiplexer HC and a microcontroller MCU, characterized in that, Also includes: An analog signal detection module is connected to an external sensor for collecting analog signal data, and is also connected to an analog multiplexer HC for transmitting the collected analog signal data to the analog multiplexer HC. A switch quantity detection module is connected to an external channel contact for acquiring switch quantity signals. The switch quantity detection module is also connected to an analog multiplexer HC for transmitting the acquired switch quantity signals to the analog multiplexer HC. A signal interaction circuit is connected between the analog multiplexer HC and the microcontroller MCU. The microcontroller MCU controls the channel selection of the analog multiplexer HC through the signal interaction circuit. A control circuit, which is connected to a microcontroller (MCU), is used to control the MCU to reset.
2. The multi-channel sensor analog and switching quantity detection circuit according to claim 1, characterized in that, The analog signal detection module includes three analog signal control circuits. The three analog signal control circuits have the same structure, each including an operational amplifier, a resistor, and a capacitor. The resistor and capacitor are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier. The input terminal P of the operational amplifier is connected to a sensor for acquiring analog signals.
3. The multi-channel sensor analog and switching quantity detection circuit according to claim 2, characterized in that, In the three analog control circuits, the output terminals of the operational amplifiers are connected in series with channels K1, K2, and K3 of the analog multiplexer HC, respectively. The other ends of channels K1, K2, and K3 are connected to analog input pins AN1, AN2, and AN3 of the microcontroller MCU, respectively.
4. The multi-channel sensor analog and switching quantity detection circuit according to claim 1, characterized in that, The switch quantity detection module includes three switch quantity detection circuits. The three switch quantity detection circuits have the same structure, each including an optocoupler, a resistor, and a capacitor. A capacitor is connected in series between the collector and emitter of the optocoupler. The emitter of the optocoupler is grounded through the capacitor. The collector is connected in series with the resistor. The cathode is grounded. The anode is connected to the channel contact for acquiring switch quantity signals.
5. The multi-channel sensor analog and switching quantity detection circuit according to claim 4, characterized in that, In the three-way switch quantity detection circuit, the collector of the optocoupler is connected in series with channels K4, K5 and K6 of the analog multiplexer HC, respectively. The other ends of channels K4, K5 and K6 are connected to the switch quantity input pins DI1, DI2 and DI3 of the microcontroller MCU, respectively.
6. The multi-channel sensor analog and switching quantity detection circuit according to claim 1, characterized in that, The signal interaction circuit includes an operational amplifier U7, a resistor R7, and a capacitor C7. The resistor R7 and the capacitor C7 are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier U7. The non-inverting input terminal of the operational amplifier U7 is connected to the enable pin ER of the analog multiplexer HC, and the output terminal is connected to the communication interface GR of the microcontroller MCU. The microcontroller MCU controls the channel selection of the analog multiplexer HC through the signal interaction circuit.
7. The multi-channel sensor analog and switching quantity detection circuit according to claim 1, characterized in that, The control circuit includes an operational amplifier U8, a resistor R8, and a capacitor C8. The resistor R8 and the capacitor C8 are connected in parallel and then connected in series between the inverting input terminal and the output terminal of the operational amplifier U8. The output terminal of the operational amplifier U8 is connected to the reset pin RES of the microcontroller MCU, and the non-inverting input terminal is connected to the reset signal. The reset signal resets the microcontroller MCU through the control circuit.
