Serial thermometer using
transistor as a temperature sensor and MCP3201. Included
Visual Basic 6 code
and a circuit diagram.
The MCP3201 is a micro-power
12 bit analogue to digital converter. The supply
to the circuit is via the 12V at pin 7 that is switched to logic
high by the software (RTS enabled).
The communication to the PC is bit banging the Hardware Controls (not RS232 protocol), the DTR is used for clocking the ADC and the CTS is used for data input.
NPN transistor with the collector and the base linked makes linear temperature
sensor, the junction voltage changes at 2.25mV/centigrade
with a negative coefficient. For quicker response use a small package
CALIBRATION: The calibration of the sensor and
other components in the circuit is done in the VB application. When you start the VB application for the first time it creates a text file 'cal.txt' in the same folder. The file has 2 numbers that represent the sensor readings at 0 and 100 Centigrade. Because the voltages of different sensors vary it needs recording the voltages of the sensor in use. Record the voltages this way:
Cool the sensor to temperature near zero, ice mixed with water
is 0 centigrade.
2. Click the 0 °C button, the application will update the file 'cal.txt' with a new value of the sensor reading.
3. Use boiling water to heat the sensor to 100 centigrade
4. Click the 100 °C button to update 'cal.txt' file with the new value.
You can read more about serial interface in http://www.beyondlogic.org/spp/serial.htm
Data sheet for the MCP3201 can be downloaded from here
VB6 code download. You are free to use the circuit diagram and the VB software with no limitations.
See also Technical Tips
Pin 2 is the analogue input. Input voltage range of +Vref (about 1 V) is equal to digital 4096.
Pin 1 is the +Vref =1V . 10K and 2K7 metal film resistors will give better temperature stability.
Pin 8 is the 5 V supply to the IC. LP2950 is a Low Dropout 5V regulator, you can use either LP2950ACZ-5 or TS2950CT-5 or LM2931Z-5 or equivalent.
Pin 6 is the serial data out of the ADC, BC237 and BC327 are a level shift from 0-5V to -8 to +8V which is the voltage required for the serial connector.
Pin 7 is the clock for reading the data and pin 5 is the Chip Select.
The 22K resistors are for lowering the 12V out of the serial port to 5V level of the ADC.
MTS102 could be hard to find, but any NPN transistor, TO92 or smaller
package will give good response.