[Menu]>[Circuits Gallery]>[Room temperature controller]


Operation check of temperature controller

Operation of an operational amplifier

The output of a temperature sensor changes at a 10mV/°C rate on the basis of 2°C. Therefore, the output voltage of 30°C is 280mV. Since this voltage is low, accuracy sufficient by the A/D converter of PIC is not acquired. Therefore, it is amplifying by the operational amplifier.

An operational amplifier can adjust the gain (the degree of amplification) of amplifier by changing the resistance of feedback. The circuit of a typical operational amplifier is shown in the left figure. There are two kinds of amplification circuits. They are Inverting Amplifier and Noninverting Amplifier. In case of Inverting Amplifier, the gain is decided by the ratio of Ri and Rf, but the phase of input and output is reversed. In case of Noninverting Amplifier, the gain is the value which added 1 to the ratio of Ri and Rf, and the phase of input and output is same.
In the first design, an Inverting Amplifier was adopted in consideration of the accuracy of the gain. It is because the gain calculation of Noninverting Amplifier seemed to be complicated. Since the phase of the output became reverse, one more inverting amplifier with gain 1 was added. It was a more complicated circuit. Furthermore, the power supply of plus and minus was required.
Finally, Noninverting Amplifier is adopted. An exact gain value is unnecessary in this circuit.
LM358 which operates only with a plus power supply is used for the simplification of a power supply circuit.

Offset of an operational amplifier

Offset voltage is important when amplifying very small voltage. Offset voltage is the output voltage when setting the input of an operational amplifier to 0V. This is based on the characteristic error of the transistor inside an operational amplifier. In LM358, there is no terminal for offset adjustment. There is the method of connecting the resistor of the same value as Ri to the plus terminal side in adjusting offset voltage simple. When adjusting offset voltage strictly, bias is given to an input using the voltage of plus and minus.
In LM358 used this time, offset voltage was about 6mV. 5V are divided into 255 levels( 8 bits ) by the A/D converter of PIC. Therefore, the voltage of one level is about 20mV. It means the resolvability ability of an A/D converter of this equipment is 20mV. Since the offset voltage of 6mV does not influence operation so offset is not corrected this time. Resolvability ability is 5mV when 10 bits of an A/D converter are used. In this case, a certain consideration is required.
"R not needed due to temperature independent IIN" is written to the data sheet of LM358. Therefore, the resistor for offset voltage reduction is not put on this circuit.


The maximum measurement temperature

+5V is used for the power supply of the operational amplifier in this circuit. In LM358 used this time, the maximum of output voltage was 3.7V. It seems that this value changes somewhat with ICs.
By the A/D converter of PIC, the power supply voltage of PIC(Actual measurement: 5.00V) is divided by 10 bits(1024 levels), and input voltage is changed into digital one. In actual software processing, 8 bits of higher ranks are used and the digital information of 255 levels is used. Therefore, the voltage per bit is 5V/255=0.0196078V. The temperature display was decided to be 0.25°C per bit. This is the following reasons. The number which can be expressed with 6 bits is 64, and it is suitable for the temperature range to measure. Therefore, 6 bits of higher ranks made it correspond with °C, and 2 bits of low ranks made it 0.25°C per bit. If the input of an A/D converter is set to 5V, it is measurable to 66°C. However, since the maximum output voltage of an operational amplifier is 3.7V, the measurable maximum temperature is about 49°C. It is 3.7V/0.0196078V x 0.25=47. In case of 0V, the temperature is 2°C. So 49°C is displayed as the temperature. When the input of the operational amplifier was set to +5V after the completion of proofreading with a thermometer, 49°C was displayed. If measurable to 49°C, it is convenient for this usage.