The main components of the system are: platinum temperature measurement drive circuit (realized by constant current source), mains voltage zero-crossing detection circuit. Power drive circuit (realized by solid-state relay), small signal amplification circuit (realized by instrument op amp), STM32 microcontroller minimum system. 500W water temperature heating tube.
1. Platinum resistance temperature measurement drive circuit
Drive the PT100 platinum temperature measuring resistor. The principle is similar to the resistance bridge. Use a 1MA precision constant current source to add to one end of the platinum resistor and the other end to ground. Use another 1MA precision constant current source to add to one end of the precision 100 ohm resistor and the other end to ground. (100 ohms is selected because the resistance value of PT100 is 100 ohms at zero degrees)
This is a platinum resistor driving circuit. R3 is a platinum resistor. When the temperature changes, the resistance will change, which will affect the voltage difference between VF1 and VF2 to be non-zero. They are respectively used as the input ends of the INA128 instrument amplifier (the advantages of the instrument amplifier are very high input impedance, good common-mode rejection ratio, and very suitable for bridge circuits). After amplification, the differential mode signal is output. However, the common mode signal of its input is relatively narrow, and the maximum can only reach near the power supply voltage. At this time, the output voltage can be adjusted by adjusting the Ref end. Then use OPA335 to complete the 10-fold amplification work to make its output within a suitable range, which is convenient for AD acquisition.
2. The current source driving the resistance bridge is 1 mA, so a precision current source must be used. Ensure that the change in resistance does not affect the current of the current source. If it is not a precision current source, the change in resistance cannot truly reflect the change in temperature, affecting the accuracy of the entire system. I used a HowLand current pump
This is a 1 mA current source. It has been tested and built to be very stable and is suitable for driving a bridge temperature measurement circuit.
3. The heating wire driving circuit uses a solid-state relay. It has stable performance but is expensive. The zero-crossing detection circuit used when adjusting the heating power notifies the microcontroller to enter an interrupt, adjusts the relay on-off time, controls the conduction angle, and thus controls the heating power. In fact, zero-crossing detection is not necessary, but it is used here because it can accurately adjust the input power, control more accurately, and have less impact on the power grid, making the entire system work more stably.
4. Temperature control algorithm. In the control field, water is a medium with serious hysteresis. In the control of heating power, a certain algorithm control must be adopted. Here, the PID control algorithm is adopted, which is simple and easy. By adjusting the proportion, integral, and differential constants, the power is controlled to avoid overshoot. The following is the program algorithm model
struct PID {
unsigned int SetPoint; // Set the target Desired Value
unsigned int Proportion; // Proportional constant Proportional Const
unsigned int Integral; // Integral constant Integral Const
unsigned int Derivative; // differential constant Derivative Const
unsigned int LastError; // Error[-1]
unsigned int PrevError; // Error[-2]
unsigned int SumError; // Sums of Errors
};
//PID processing function
//================================================ ================================================== ===*/
unsigned int PIDCalc( struct PID *pp, unsigned int NextPoint )
{
unsigned int dError,Error;
Error = pp->SetPoint - NextPoint; // Deviation
pp->SumError += Error; // integral
dError = pp->LastError - pp->PrevError; // Current differential
pp->PrevError = pp->LastError;
pp->LastError = Error;
return (pp->Proportion * Error // Proportional term
+ pp->Integral * pp->SumError // Integral term
+ pp->Derivative * dError); // differential term
}
This model is easy to implement on a single-chip microcomputer and has good performance. It has been verified to meet higher requirements. For the selection of various parameters, I used matching and adjusted the parameters according to the effect, and finally adjusted them to the appropriate parameters.
5. The last point is that the reference voltage source for AD acquisition is also very important, which directly affects the sampling accuracy. If possible, try to use a dedicated reference voltage source chip to control the AD sampling error.
The above are the design points of the entire water temperature control system, which are relatively simple. But they are very helpful for understanding PID control, as well as the use of instrument op amps, current sources, and bridge circuits. Both hardware and software have achieved a certain training effect.
Previous article:Detailed explanation of STM32 serial port function library functions and advanced application of DMA serial port (reprinted)
Next article:Detailed explanation of ucosii transplantation on stm32 4
Recommended ReadingLatest update time:2024-11-16 23:46
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- About the problem of using DMAX's SPI slave mode for transmission
- Making friends through dismantling, review of dismantling articles
- AVR MCU I2C bus program
- How to design wearable electronic products with MCU
- Good luck in resuming work!!!
- 【Goodbye 2021, Hello 2022】+ It’s time to sum up the year again
- Triode lawn mower circuit
- In the CNNE instruction, if (a) < (driet), then 1->cy, is this explanation correct?
- Share the common problems of MSP430: LCD display driver
- Network port with a speed of 5G or above