Multi-channel temperature sampling circuit
By designing a multi-channel temperature sampling circuit, using the temperature sampling module, microcontroller and optocoupling isolation module, the multiple temperature signals are converted into adjustable PWM signals, which solves the problem that multiple temperature acquisition occupies too much pin resources in the existing technology. The problem is to achieve efficient multi-channel temperature signal acquisition.
Patent Information
- Application Number
- CN202421660817.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2034-07-15
AI Technical Summary
The existing multi-channel temperature sampling circuit occupies too much pin resources of the main control system, especially when there are insufficient pins, it is impossible to easily achieve multi-channel temperature acquisition.
Design a multi-channel temperature sampling circuit, converting multiple temperature signals into analog voltage signals through multiple temperature sampling modules, and converting them into PWM digital signals with adjustable duty cycle and frequency through a microcontroller, through an optical coupling The isolation module outputs a single digital input pin to the master control system.
It realizes that only one digital input pin of the master control system can collect multiple temperature signals, reducing the use of pin resources of the master control system.
Smart Images

Figure CN222441689U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of temperature sampling circuits, in particular to a multi-channel temperature sampling circuit. Background Art
[0002] Temperature sampling circuits can collect temperature and are widely used in various industries. In some scenarios, it is necessary to collect the temperature of multiple targets. For example, when multiple IGBTs are connected in parallel, the temperature of each IGBT needs to be collected, which requires a multi-channel temperature sampling circuit. Each temperature sampling circuit in the current multi-channel temperature sampling circuit needs to occupy a pin of the main control system, which occupies a lot of main control system pin resources, and when the main control system has insufficient pins, it is not easy to achieve multi-channel temperature collection. Utility Model Content
[0003] The utility model solves the technical problem of how to reduce the pin resources of the main control system occupied by the multi-channel temperature sampling circuit by providing the multi-channel temperature sampling circuit.
[0004] The utility model provides the following technical solutions:
[0005] A multi-channel temperature sampling circuit includes multiple temperature sampling modules, a microcontroller and an optical coupling isolation module;
[0006] The output end of each of the temperature sampling modules is connected to an analog input pin of the microcontroller, and the temperature sampling module is used to output an analog voltage signal representing the temperature;
[0007] The PWM output pin of the microcontroller is connected to the input end of the optical coupling isolation module, and the microcontroller is used to convert the analog voltage signal into a PWM digital signal with adjustable duty cycle and frequency;
[0008] The output end of the optocoupler isolation module is connected to a single digital quantity input pin of the main control system, and the secondary side of the optocoupler isolation module shares a common ground with the main control system.
[0009] Optionally, the temperature sampling module includes a first power supply, a first voltage-dividing resistor module, a second voltage-dividing resistor module and a thermistor;
[0010] The first power supply is grounded via the first voltage-dividing resistor module and the second voltage-dividing resistor module connected in series in sequence, the thermistor is connected in parallel with the second voltage-dividing resistor module, and the common end of the first voltage-dividing resistor module and the thermistor is the output end of the temperature sampling module.
[0011] Optionally, the first voltage-dividing resistor module includes a resistor R127, the first power supply is grounded via the resistor R127 and the second voltage-dividing resistor module connected in series, and the common end of the resistor R127 and the thermistor is the output end of the temperature sampling module.
[0012] Optionally, the second voltage-dividing resistor module includes a resistor R131 and a resistor R132, the resistor R131, the resistor R132, and the thermistor are connected in parallel, and the first power supply is grounded in sequence through the first voltage-dividing resistor module, the parallel resistors R131 and R132, and the thermistor.
[0013] Optionally, the temperature sampling module further includes a clamping diode, and the clamping diode is connected in reverse parallel to the first voltage-dividing resistor module.
[0014] Optionally, the optical coupling isolation module includes a second power supply, a third power supply, a photoelectric coupler, a third voltage-dividing resistor module and a fourth voltage-dividing resistor module;
[0015] The second power supply is grounded via the primary side of the photoelectric coupler and the third voltage-dividing resistor module in sequence, and the common end of the primary side of the photoelectric coupler and the third voltage-dividing resistor module is the input end of the optical coupling isolation module;
[0016] The third power source is grounded via the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler in sequence, and a common end of the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler is the output end of the photocoupler isolation module.
[0017] Optionally, the model of the photoelectric coupler is LTV356T-D.
[0018] Optionally, the number of the temperature sampling modules is 9.
[0019] Optionally, the model of the microcontroller is STM32F103CBT6.
[0020] Optionally, the temperature sampling circuit is an IGBT temperature sampling circuit of a type I three-level module.
[0021] The technical solution provided by the utility model has at least the following technical effects or advantages:
[0022] The utility model converts multi-channel temperature signals into multi-channel analog voltage signals through multiple temperature sampling modules and inputs the signals into the microcontroller through the analog input pins of the corresponding microcontroller. The microcontroller can convert the multi-channel analog voltage signals into PWM digital signals with adjustable duty cycle and frequency and output the signals to a single digital input pin of the main control system through an optical coupling isolation module. In this way, the collection of multi-channel temperature signals is realized by occupying only one digital input pin of the main control system, thereby reducing the occupation of the pin resources of the main control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 This is a structural block diagram of a multi-channel temperature sampling circuit in an embodiment of the utility model;
[0025] Figure 2 A circuit diagram of multiple temperature sampling modules in an embodiment of the utility model;
[0026] Figure 3 1 is a circuit diagram of a microcontroller and an optocoupler isolation module in an embodiment of the present utility model. DETAILED DESCRIPTION
[0027] The embodiment of the utility model solves the technical problem of how to reduce the pin resources of the main control system occupied by the multi-channel temperature sampling circuit by providing a multi-channel temperature sampling circuit.
[0028] In order to better understand the technical solution of the present invention, the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0029] like Figure 1 As shown, the multi-channel temperature sampling circuit of the embodiment of the utility model includes multiple temperature sampling modules, a microcontroller and an optocoupler isolation module; the output end of each temperature sampling module is connected to an analog input pin of the microcontroller, and the temperature sampling module is used to output an analog voltage signal representing the temperature; the PWM output pin of the microcontroller is connected to the input end of the optocoupler isolation module, and the microcontroller is used to convert the analog voltage signal into a PWM digital signal with adjustable duty cycle and frequency; the output end of the optocoupler isolation module is connected to a single digital input pin of the main control system, and the secondary side of the optocoupler isolation module is grounded with the main control system.
[0030] Among them, the temperature sampling module can convert the temperature signal into a voltage signal through a thermistor; the duty cycle of the PWM digital signal output by the microcontroller is related to its analog input pin, that is, according to the duty cycle of the PWM digital signal, it can be determined which temperature sampling module collects the temperature. For example, if there are 9 temperature sampling modules, the duty cycles of the PWM digital signals corresponding to the 9 analog input pins can be 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% in turn. The duty cycles of the PWM digital signals corresponding to each analog input pin can be varied and are not limited here; the frequency of the PWM digital signal output by the microcontroller is related to the temperature, for example, the frequency is equal to the temperature multiplied by 1KHz, so the collected temperature value can be determined according to the frequency of the PWM digital signal. It should be noted that the function of the microcontroller to convert the analog voltage signal into a PWM digital signal with adjustable duty cycle and frequency is a conventional function of the microcontroller and does not involve improvements to the method.
[0031] Among them, the optocoupler isolation module can isolate and output the PWM digital signal output by the microcontroller while keeping the duty cycle, frequency and amplitude unchanged; the secondary side of the optocoupler isolation module must share a common ground with the main control system. If the secondary side of the optocoupler isolation module does not share a common ground with the main control system, the output signal of the optocoupler isolation module will lose reference at the main control system, resulting in errors.
[0032] Among them, the main control system can determine the specific temperature information collected by the specific channel according to the duty cycle and frequency of the PWM digital signal.
[0033] As can be seen from the above, the multi-channel temperature sampling circuit of the embodiment of the utility model converts multi-channel temperature signals into multi-channel analog voltage signals through multiple temperature sampling modules and inputs the signals into the microcontroller through the analog input pins of the corresponding microcontroller. The microcontroller can convert the multi-channel analog voltage signals into PWM digital signals with adjustable duty cycle and frequency and output them to a single digital input pin of the main control system through an optocoupler isolation module. In this way, the collection of multi-channel temperature signals is realized by occupying only one digital input pin of the main control system, thereby reducing the occupation of the pin resources of the main control system.
[0034] like Figure 1As shown, the temperature sampling module of the embodiment of the utility model includes a first power supply, a first voltage-dividing resistor module, a second voltage-dividing resistor module and a thermistor. The first power supply is connected in series with the first voltage-dividing resistor module and the second voltage-dividing resistor module to ground. The thermistor is connected in parallel with the second voltage-dividing resistor module. The common end of the first voltage-dividing resistor module and the thermistor is the output end of the temperature sampling module. Among them, the first power supply can provide a 3V power supply, the first voltage-dividing resistor module and the second voltage-dividing resistor module are used for voltage division, and the thermistor can be an NTC. When the temperature changes, the resistance value of the thermistor changes accordingly, and the analog voltage signal output by the temperature sampling module also changes, thereby realizing the output of an analog voltage signal representing the temperature.
[0035] The present utility model embodiment takes the number of temperature sampling modules as 9 as an example for description. Figure 2 As shown, the 9 analog voltage signals representing the temperature are ADC IN0-ADC IN8, which correspond to the analog input pins 10-18 of the input microcontroller. Taking ADC IN0 as an example, the first voltage-dividing resistor module may include a resistor R127, and the second voltage-dividing resistor module may include a resistor R131 and a resistor R132. The resistors R131, R132, and the thermistor NTC1 are connected in parallel, and the first power supply is connected to the ground in sequence through the resistor R127, the parallel resistors R131 and R132, and the thermistor NTC1. Considering that if the input voltage of the analog input pin of the microcontroller is too high, the microcontroller will be burned. In order to avoid the input voltage of the analog input pin of the microcontroller being too high, the temperature sampling module of the embodiment of the utility model may also include a clamping diode, such as a clamping diode D46, which is reversely connected in parallel with the first voltage-dividing resistor module. When the input voltage of the pin 10 of the microcontroller is too high, the clamping diode D46 is turned on, and the input voltage of the pin 10 can be clamped to a voltage close to the first power supply voltage.
[0036] like Figure 3 As shown, the model of the microcontroller in the embodiment of the utility model may be STM32F103CBT6, the PWM output pin of STM32F103CBT6 may be pin 29, and the PWM digital signal output by the microcontroller is PWM TMP.
[0037] like Figure 1As shown, the optocoupler isolation module of the utility model embodiment may include a second power supply, a third power supply, a photoelectric coupler, a third voltage-dividing resistor module and a fourth voltage-dividing resistor module; the second power supply is connected to ground via the primary side of the photoelectric coupler and the third voltage-dividing resistor module in sequence, and the common end of the primary side of the photoelectric coupler and the third voltage-dividing resistor module is the input end of the optocoupler isolation module; the third power supply is connected to ground via the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler in sequence, and the common end of the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler is the output end of the optocoupler isolation module. Among them, the third voltage-dividing resistor module and the fourth voltage-dividing resistor module are used for voltage division.
[0038] Specifically, Figure 3 As shown, the second power supply outputs 3V voltage, the model of the photocoupler U52 can be LTV356T-D, the third voltage-dividing resistor module includes a resistor R169, the third power supply outputs 3.3V voltage, the fourth voltage-dividing resistor module includes a resistor R170, the secondary side of the photocoupler U52 and the main control system share the ground SGND, and the output signal of the optocoupler isolation module is S TEMP. When the PWM digital signal output by the microcontroller is at a high level, the light-emitting diode of the photocoupler U52 does not emit light, the phototransistor of the photocoupler U52 is turned off, and S TEMP is a high level; when the PWM digital signal output by the microcontroller is at a low level, the light-emitting diode of the photocoupler U52 emits light, the phototransistor of the photocoupler U52 is turned on, and S TEMP is a low level; thereby realizing the function of the optocoupler isolation module to isolate and output the PWM digital signal output by the microcontroller and keep the duty cycle, frequency and amplitude unchanged.
[0039] Furthermore, the temperature sampling circuit of the embodiment of the utility model may be an IGBT temperature sampling circuit of an I-type three-level module. The number of IGBTs of the I-type three-level module may be 9, and the number of temperature sampling modules in the temperature sampling circuit is 9.
[0040] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0041] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A multi-channel temperature sampling circuit, characterized in that: It includes multiple temperature sampling modules, microcontrollers and optocoupler isolation modules; The output end of each of the temperature sampling modules is connected to an analog input pin of the microcontroller, and the temperature sampling module is used to output an analog voltage signal representing the temperature; The PWM output pin of the microcontroller is connected to the input end of the optical coupling isolation module, and the microcontroller is used to convert the analog voltage signal into a PWM digital signal with adjustable duty cycle and frequency; The output end of the optocoupler isolation module is connected to a single digital quantity input pin of the main control system, and the secondary side of the optocoupler isolation module shares a common ground with the main control system.
2. The multi-channel temperature sampling circuit according to claim 1, characterized in that: The temperature sampling module includes a first power supply, a first voltage-dividing resistor module, a second voltage-dividing resistor module and a thermistor; The first power supply is grounded via the first voltage-dividing resistor module and the second voltage-dividing resistor module connected in series in sequence, the thermistor is connected in parallel with the second voltage-dividing resistor module, and the common end of the first voltage-dividing resistor module and the thermistor is the output end of the temperature sampling module.
3. The multi-channel temperature sampling circuit according to claim 2, characterized in that: The first voltage-dividing resistor module includes a resistor R127, the first power supply is connected to ground via the resistor R127 and the second voltage-dividing resistor module connected in series, and the common end of the resistor R127 and the thermistor is the output end of the temperature sampling module.
4. The multi-channel temperature sampling circuit according to claim 2, characterized in that: The second voltage-dividing resistor module includes a resistor R131 and a resistor R132. The resistor R131, the resistor R132 and the thermistor are connected in parallel. The first power supply is grounded in sequence through the first voltage-dividing resistor module, the parallel resistors R131 and R132 and the thermistor.
5. The multi-channel temperature sampling circuit according to claim 2, characterized in that: The temperature sampling module further includes a clamping diode, and the clamping diode is connected in reverse parallel with the first voltage-dividing resistor module.
6. The multi-channel temperature sampling circuit according to claim 1, characterized in that: The optical coupling isolation module includes a second power supply, a third power supply, a photoelectric coupler, a third voltage-dividing resistor module and a fourth voltage-dividing resistor module; The second power supply is grounded via the primary side of the photoelectric coupler and the third voltage-dividing resistor module in sequence, and the common end of the primary side of the photoelectric coupler and the third voltage-dividing resistor module is the input end of the optical coupling isolation module; The third power source is grounded via the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler in sequence, and a common end of the fourth voltage-dividing resistor module and the secondary side of the photoelectric coupler is the output end of the photocoupler isolation module.
7. The multi-channel temperature sampling circuit according to claim 6, characterized in that: The model of the photoelectric coupler is LTV356T-D.
8. The multi-channel temperature sampling circuit according to claim 1, characterized in that: The number of the temperature sampling modules is 9.
9. The multi-channel temperature sampling circuit according to claim 1, characterized in that: The model of the microcontroller is STM32F103CBT6.
10. The multi-channel temperature sampling circuit according to claim 1, characterized in that: The temperature sampling circuit is an IGBT temperature sampling circuit of an I-type three-level module.