SOLUTIONS

CONTINUOUS CUSTOMER-ORIENTED & ONE-STOP MARINE SERVICE

The Application of PT100 Temp. Sensor

    PT100 temperature sensor is a platinum wire thermistor sensor with good stability and linearity, which can operate in the range of -200 ℃ to 850 ℃. This circuit is selected to operate in the range of -19 ℃ to 500 ℃. The entire circuit is divided into two parts: the sensor preamplifier circuit, and the microcontroller A/D conversion and display, control, software nonlinear correction, etc

 

Working principle:

    The connection of sensors is very simple, as it is only connected to PT100 through a 3K92 resistor from the 5V power supply end of the system. This connection method usually causes serious nonlinear problems, but due to the software calibration of the microcontroller as a backing, the connection method of sensors is simplified

According to the parameters of PT100, its resistance value is between 100 and 280.9 Ω in the range of 0 ℃ to 500 ℃. Based on the revelation of its series voltage division, we use the formula: Vcc/(PT100+3K92) * PT100=output voltage (mV) to calculate its output voltage at 100 ℃, as shown in the table below:



Temp  ℃

PT100 resistance Ω

Sensing voltage at both ends mV

0

100.00

124.38

1

100.39

124.8

50

119.40

147.79

100

138.51

170.64

150

157.33

192.93

200

175.86

214.68

250

194.10

235.90

300

212.05

256.59

350

229.72

276.79

400

247.09

296.48

450

264.18

315.69

500

280.98

334.42


    The 10 bit A/D of the microcontroller is displayed as 1023 words at full scale. In order to obtain the input voltage of the microcontroller A/D conversion when the output voltage of the PT100 sensor is displayed as 500 words, the original output voltage of the sensor must be amplified. The calculation formula is: (500/1023 * Vcc)/the voltage at both ends of the sensor (mV/℃), (Vcc=system power supply=5V), and the amplification factor can be obtained as 10.466.

 

Explanation on magnification:

    A friendly user friend inquired that according to (500/1023 * Vcc)/sensor voltage, a result of 10.666 cannot be obtained, but a result of 11.635 can be obtained. In fact, the ideal value of 500 words cannot be naturally obtained by the circuit itself, and the naturally obtained number is only 450 words. Therefore, the value of 500 ℃ in the formula in actual calculation is 450 instead of 500. 450/1023 * 5/(0.33442-0.12438) ≈ 10.47. In fact, there are various calculation methods, and the key is to use the mV/℃ of the sensor as the basis rather than the measured temperature value. Let's take a look and add a nonlinear correction coefficient: 10.47 * 1.1117=11.639499. In this way, the calculation results of enthusiastic friends will be consistent. The operational amplifier is divided into two stages, with a fixed amplification of 5 times in the rear stage (12K/3K+1=5 in the schematic) and a amplification of 10.465922/5=2.0931844 times in the front stage. In order to prevent component and other deviations during adjustment, a precision fine-tuning potentiometer is used to fine tune the amplification factor, which can ensure accurate adjustment to the required amplification factor (10K/(8K2+Rw)+1 in the schematic).

Usually, in temperature measurement circuits, there is a "zero" and another "full" potentiometer to facilitate adjusting the correct display of the sensor at "zero" and "full". The reason why two potentiometers are not used in this circuit is that as long as the "zero degree" adjustment is accurate, the correct display of the entire working range can be guaranteed, including the issue of * display at full degree.


    So, how is "zero degree" handled in a circuit? It is directly subtracted from the "zero degree" number in the microcontroller program. Throughout the entire working range, the program will automatically subtract the "zero degree" value before using it as a valid value. Will the deviation of the power supply voltage cause changes in the sensor input, thereby affecting accuracy? After the power supply changes, it will inevitably cause a change in the current flowing through the sensor, which will also cause a change in the output voltage of the sensor. However, at the same time, the power supply of the microcontroller also synchronously receives this power supply change. When the A/D reference of the microcontroller uses the power supply voltage, it means that the measurement reference also changes synchronously in the same direction. Therefore, as long as the parameters are selected properly and the system power supply variation is within 20%, it will not affect the accuracy of the measurement. (Usually, microcontroller systems do not allow for significant changes in power supply, which is not only a requirement in temperature measurement circuits.)

 

    The signal output from the sensor preamplifier circuit is sent to the A/D conversion input port (PB0/AN0) of HT46R23 for various necessary processing by the microcontroller. Firstly, software nonlinear correction is performed by dividing the input signal into different segments according to different temperature values, and then multiplying them by different compensation coefficients according to their respective segments to make them as close as possible to the theoretical values. Only the numbers that have undergone nonlinear correction are sent for display, compared to the control values set by the user, and so on.

The nonlinear compensation coefficients for each segment are shown in the following table (only the data for the main segments are listed, not all table contents):

Sensing voltage


Sensor Voltage

mV/℃

Internal AD Indicates

Correction coefficient

124.3781

Power supply resistance=3K92±1%,  Power supply voltage=5.000V±1%

124.8450

0.4670

1.00

1.0000

147.7942

0.4683

50.14

0.9972

170.6414

0.4626

99.06

1.0095

192.9326

0.4570

146.80

1.0218

214.6802

0.4515

193.36

1.0343

235.8961

0.4461

238.79

1.0469

256.5918

0.4407

283.11

1.0597

276.7898

0.4355

326.36

1.0724

296.4779

0.4302

368.52

1.0854

315.6891

0.4251

409.65

1.0985

334.4220

0.4201

449.76

1.1117

 

          


    Another feature of this circuit is that users can set any three out of limit control values within the working range. When the measured display value is greater than the set value, the corresponding control port will output a high level. By using this high-level signal and then connecting an external transistor to drive the relay circuit, automatic control can be achieved. At the same time that a control port outputs a high level, the LED connected in series with it will light up simultaneously to remind the user which set value is outputting the control signal. The 24C02 in the circuit is an electrical memory that can reliably store the control values set by the user, even if power is lost, data will not be lost.

There are also three buttons in the circuit diagram, which are the "Set", "Add Number", and "Reduce Number" operation buttons, used by the user to set the limit value. The usage method is as follows:

    

    Press the setting button once, and the screen will display "1-", indicating that you have entered * limit value settings. After three seconds, the screen will automatically jump to the display "* *" and flash (* * * represents the original limit value stored in the electric memory). Then, press the plus (or minus) button, and the * digit number on the screen will be added (or subtracted) by one. If you hold down the button for more than three seconds without releasing it, the first two digits on the screen will be quickly added (or subtracted). After adjusting the number on the screen to the desired number, the exceeding value is set.


    Next, press the setting button again and the screen will display "2-", indicating that the second limit setting has been entered. After three seconds, the screen will automatically jump to display "* *" and flash, The next operation is exactly the same as the operation of * exceeding the limit value. The setting of the third limit is exactly the same as the two above. After setting three out of limit values, you must also press the set button once to exit the set state and return to normal working state. If you forget the last press to exit, the program will wait for 10 seconds and automatically return to normal working mode.

Simple debugging method:


    You can use a 100 Ω resistor to simulate the resistance value of PT100 at 0 ℃, connect the sensor input terminal, and check if the display is=000. If it is not correct, you can adjust the potentiometer to achieve this; Then use a 281 Ω resistor to simulate the resistance value of the PT100 sensor at 500 ℃, and the display should be within 500 words ± 1 word; *, Using a 194 Ω resistor instead of the 250 ℃ sensor resistor input should display 250 ± 1 words. If there are no issues with the above debugging, the real PT100 sensor can be connected and put into use. (Real sensors also have errors, you can fine tune the pre amplifier potentiometer to correct it.)


    In practical work, the power supply voltage of the circuit is required to be 5V ± 5%. If the measured display value is greater than a certain limit value, the corresponding control port will immediately output a high level. If there is an open circuit fault in the sensor, the display will show "HHH". If the sensor and its leads are short circuited, the display will immediately show "LLL". In order to prevent adverse consequences caused by an open circuit or short circuit in the sensor, all three control output ports will be closed first.









Contact Us


POSH MARITIME LIMITED

Address:

L22 Floor, Qiantan Taikoo Village, 500 Dongyu Road, Shanghai
Phone:+86-18751760607 (Whatsapp/Wechat)
Email:sales@poshmaritime.com

Website: www.poshmaritime.com

Technical Support: CLOUD | Admin Login
seo seo