Abstract: This paper applies EWB software to actual projects and designs a temperature measurement circuit. The designed temperature measurement circuit does not use a dedicated temperature sensor and a high-precision A/D converter, but uses the temperature characteristics of the transistor and the RC integral characteristics. Through the temperature scanning analysis and transient analysis of EWB, the corresponding relationship between the transistor temperature and the RC charging time is obtained, and the temperature measurement is converted into time measurement, thereby obtaining temperature data. Therefore, this circuit has the characteristics of low cost, high precision, simplicity and reliability, and is suitable for occasions where the measurement speed is not high. At the same time, a single-chip microcomputer is used to complete the tasks of temperature data collection, processing, and display, and the measurement program code is given.
Keywords: temperature measurement; electronic workbench; single-chip microcomputer
0 Introduction
EWB (Electronic Workbench) is an analog digital circuit simulation software with the advantages of intuitive interface, easy operation, and multiple analysis methods. It is very suitable for electronic engineers and students. EWB software has a green version, which does not need to be installed. It can be used after decompression. Click wewb32.exe to run the software. In the main interface, various operating functions used are displayed in a graphical manner, including: component library, instrumentation, analysis methods, etc. For the specific content of EWB, please refer to the book "Computer Simulation of Practical Communication and Electronic Circuits". The application of analysis methods often brings great convenience to experiments, even more convenient than real experiments. This article will use EWB's transient analysis and temperature scanning analysis to design a cheap and practical temperature measurement circuit.
1 Circuit principle and design
The temperature measurement circuit described in this article is for the measurement of water temperature (can be used in similar occasions), and the measurement range is 0~100℃. The usual method of temperature measurement is to use a temperature sensor to send the temperature signal to the single-chip microcomputer through an A/D converter to obtain temperature data. If the measurement display is required to have high accuracy (reaching more than 10 digits), the cost will increase greatly. Figure 1 is the schematic diagram of the temperature measurement circuit in this article. The circuit does not use a dedicated temperature sensor, nor does it use the A/Di conversion method. Instead, it uses a transistor Q1 as a temperature measurement element, and uses the temperature voltage characteristics of its pn junction to measure the temperature change. The temperature voltage signal and the R2, C1 integral signal are sent to the comparator input. After R2, C1 start charging, until their voltage exceeds the temperature voltage, the comparator flips. The charging time before flipping is measured by the microcontroller, and the temperature voltage value can be measured. The following describes the measurement principle in detail through the simulation of RC integral and temperature measurement.
Figure 2 is a transistor pn junction temperature measurement circuit. According to the transistor manual parameters, the voltage across the pn junction changes with temperature. This example measures water temperature, and the temperature range is 0-100°C. In practical applications, it is necessary to know the corresponding voltage change range and the voltage values at the start and end points. Using EMB for temperature scanning analysis has the advantages of being intuitive and fast. Draw the circuit of Figure 2 in EMB, select the analysis option in the main menu, select the temperature sweep function, and set the starting and ending temperature ranges in the dialog box that opens. Set the start temperature to 0, the end temperature to 100, the sweep type to linear, the output node to be simulated, and the other options to default. Then click simulate to get the simulation result as shown in Figure 3. Click cursors to accurately measure the x and y (temperature, voltage) values of the coordinates of each point on the curve. The measured results are that for the x value range of 0 to 100°C, the y value is 0.642 to 0.442V, the voltage change range is 200mV, and the change law is linear.
Figure 4 is an R, C integration circuit. At the initial moment of power on, the voltage across the capacitor is 0V. Later, as the capacitor is charged, the voltage across the capacitor will increase. The voltage change rule is:
From formula (1), it can be seen that Uc is not linear, but if the values of R and C are large, Uc is close to linear. This process can be determined by mathematical methods to find the curvature of Uc to determine the linearity and finally determine the size of R and C. However, the process is cumbersome and not intuitive. If EWB simulation is used, it is convenient, fast and intuitive. For the circuit in Figure 4, select transient simulation under analysis in the main menu, modify the start time to 0 and the end time to 0.02s in the dialog box that opens, add the measured nodes to the nodes for analysis dialog box, and then click simulate to obtain the results in Figure 5. The x and y data measured by the cursor are: when the voltage change range is 0.442~0.642V, the corresponding time range is 4ms.
It can be seen from the temperature simulation graph and the R and C simulation graph that both are linear. Combining the temperature simulation with the R and C simulation, the relationship between temperature and R and C charging time is determined. When the temperature changes from 0 to 100°C, the corresponding R and C charging time changes from 8 to 12ms. Let the temperature variable be tem and the time variable be t, then
the unit of t is ms.
In order to display the measured value more accurately, the fixed-point operation method is used to add 2 decimal places, then formula (2) is modified to
t in units of μs and
tem is the temperature value with 2 decimal places.
If the time change process is measured by a single-chip microcomputer, the corresponding temperature value can be calculated.
Figure 6 is a complete temperature measurement circuit. The single-chip microcomputer uses 89c2051, and the 4-digit digital tube displays the temperature value with a display accuracy of 2 decimal places. 89c2051 has a comparator. The input ports of the comparator are P1.0 and P1.1, and the output port is P3.6. The temperature measurement value of the transistor is connected to the P1.1 port. The R and C charging circuits are connected to P1.0. P1.0 is both the input port of the comparator and the output port of the microcontroller. It has the properties of the microcontroller port, that is, when P1.0 outputs a high level, it is equivalent to the internal collector open circuit state. Here, this function is used to control the charging and discharging of the capacitor. When the temperature is not measured, P1.0 outputs a low level, and the voltage across the capacitor is 0V. When measuring the temperature, first start the T0 counter, then set P1.0 to a high level, and R2 charges C1. At this time, the state of P3.6 is continuously judged until the voltage of P1.0 is greater than the voltage of P1.1, and the comparator output P3.6 flips, and the count value is taken out (if the microcontroller uses a 12MHz crystal, each number is exactly 1 μs), thereby obtaining the time value. According to formula (3), the temperature value can be obtained. The program code is as follows:
2 Conclusion
In summary, the role of EWB in the temperature measurement circuit is mainly reflected in the simulation of the unit circuit, including temperature scanning analysis and RC transient analysis. If these tasks are completed by real tests, they are very troublesome and require many harsh conditions. Under amateur conditions or general conditions, it is almost impossible to complete them. However, the use of EWB software successfully achieves the goal.
Previous article:Intelligent power management solutions help portable consumer applications
Next article:LED Dimming Technology Guide
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Problems encountered when LCD1602 scroll screen display
- In three minutes, you can understand the concept and classification of power amplifiers!
- Gate circuits: AND gate, OR gate, NOT gate circuits and examples
- 4 types of electrical energy conversion, let’s take a look
- Summary of the differences between SPMSM and IPMSM
- DSP system design - Why is the DSP with large on-chip RAM more efficient?
- 【NUCLEO-WL55JC2 Review】——by nich20xx
- Real-time control technology meets the needs of real-time industrial communications - Part 1
- How did I get 296g of energy from Alipay Ant Forest?
- Analysis of Circuits Containing Capacitors in Op Amp