PIC Projects
TFT Clock and Thermometer
WiFi, Ethernet
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
LCD TFT Egg Timer
LCD TFT Oscilloscope
SD Talking Clock
SD Sound Recorder,
    FAT32 wav Player
LED Thermometer
LED Egg Timer
LCD Egg Timer

Frequency Counters
100KHz For PC
1MHz For PC
8 Digits LED 50 MHz
Scope Screen Display
LCD Module 10MHz
6MHz for Android
USB PIC18F2550
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Counter
USB Meter
USB Oscilloscope
USB Input-Output
USB 16x2 LCD

COM & LPT Ports
MCP3201 on LPT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to LPT
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
LCD Display on LPT
Serial Thermostat

Water Softener
HP Stream 7 docking
3.7V to 5V
Solar Charger

Infrared Decoder
PIC Music

Code Lock
Code Lock with LCD
HOME MOBILE Technical Tips

USB THERMOMETER for digital sensor see USB DS18B20

Revised on 20/06/2015
USB thermometer using diodes as a temperature sensor. Included VS2005 C# code, PIC ASM code, PIC C code and a circuit diagram. The PIC microcontroller has 10 bit analogue to digital converter. The circuit is powered by the USB. The interface to the PC is HID class.
Diode make linear temperature sensor, the junction voltage changes at about 2.32mV/centigrade. The sensor is 4 diodes 1N4148 in series.
CALIBRATION: The calibration of the sensor and other components in the circuit is done in the PC application. When you start the application for the first time it creates a file 'cal.dat' in the same folder. The file has the actual temp entered by the user. Type the actual temp from another thermometer that you know reads correctly and press 'Calibrate'.
HID class (human interface device) is a class of devices like the mouse and the keyboard, the data transfer rate is limited to 64KB/S.
C# code is modified Microchip code from the USB framework, Microchip Solutions v2012-04-03.
The source code is derived from freeware from these sources: http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html
Code was written on MPLAB 8x and compiled with C18 ver 3.30. PIC18F2550 was programmed using Velleman K8076.
Software includes PIC code and C# code. You are free to use the circuit diagram and the C# with no limitations.

The C# application is a combined digital and analogue thermometer.

Circuit Description
See also Technical Tips

Pin 3 is the analogue input. Input voltage range is +Vref minus -Vref.
Pin 4 is the -Vref, Pin 5 is the +Vref, at 2.5V .
LM385 2.5 is a precision zener, equivalent can be used.
Pin 14 is 3.3V internal supply for the USB transceiver.
Pins 15,16 are the data lines to the USB connector on the PC.
Pin 20 is the PC 5V powering the PIC. It is limited to 100mA by the PC. 0.47uF is for decoupling.
For USB wiring info: http://www.interfacebus.com/Design_Connector_USB.html

4 of 1N4148 diodes in series. When soldered with the diodes body next to each other you get small size sensor.


Comments and questions

Copy the number from the picture It stops net-robots from adding comments.

27.03.2016 - 17:06
Name: mustafa askary
Comment: Great Projects!

24.07.2014 - 00:40
Name: kanishka
Comment: great great great... you are great person.wish u all the best

21.06.2014 - 17:23
Name: pic12f675
Comment: good. thanks

17.04.2013 - 07:08
Name: Ugur
Comment: thanks

28.03.2013 - 23:42
Name: king
Comment: awsem motty rocks

31.12.2012 - 17:57
Name: mnati
Comment: many thanks

31.12.2012 - 17:57
Name: mnati

27.12.2011 - 13:02
Name: Moty
Comment: Hi Lutz, Yes, the cal.txt has the calibration details of the sensor. The circuit uses the 5V supply as reference voltage too, so to get the same readings you need identical 5V in both computers. 1% error in the supply voltage will give about 2% error in temperature readings. For the sake of simplicity I sacrificed accuracy. The only way to overcome that is to add an accurate voltage reference to the circuit.

26.12.2011 - 21:33
Name: Lutz
Comment: Upss, read first then write I just have seen that Cal.Data ist stored to CAL.TXT Therefore I guess it will work fine to transfer this data. regards Lutz

26.12.2011 - 21:27
Name: Lutz
Comment: Hello Moty, I build this Thermometer aswell, works fine !! My question is about calibartion. I like to do the calibration at my work, were we do have a climate cabinet. So doing calibration then will store the offset some where on that Work-PC. Is it possiable than to tranfer cal. data to my home PC ?? Were are the calibration is written to ?? regards Lutz
13.04.2010 - 01:37
Name: Spaducci
Comment: Great thing!