Quozl’s Temperature Sensor Project using PIC12C509


Just a handful of components builds an 8-pin microcontroller based circuit for temperature logging via a serial port; small, fast, and acceptably accurate.

Temperature Sensor


  • provides real-time data to your computer via serial port,
  • interfaces up to four DS1820 temperature sensors,
  • absolute accuracy near 0.5 degrees celcius (as per DS1820 specifications),
  • relative accuracy near 0.01 degrees celcius,
  • speaks in Centigrade or Fahrenheit (selectable by header pins),
  • powered by your computer’s serial port, no extra supply to organise,
  • data format easily processed, no special programs required,
  • minimal parts count reduces cost,
  • built-in serial number for circuit identification,
  • special versions available for exotic requirements; high speed, low speed, additional sensors, long distance or pedantic serial bus.
  • spare inputs can be used as single-bit digital inputs, (feature removed from final version but can be re-inserted),


A few ideas of how this circuit can be used:

  • simple weather reports for web pages,
  • computer power supply temperature warnings,
  • redundant critical systems monitoring,
  • house temperature monitoring,
  • complex home automation tasks (start fan if warmer outside during winter),
  • refrigerator testing,
  • brewing temperature regulation,
  • fish tank heater verification,
  • microclimate logging (ground versus air temperature),
  • daylight sensing (LDR on digital input),
  • primitive locking (using serial number),
  • remote monitoring of emu fat in a freezer truck,


The electronics kit maker Kitsrushas released a PCB and kit of this design. Other kit sellers also sell the kit. Here is a summary:



CountryOrganisationItem NumberGPL ComplianceDate Checked
AustraliaOzitronicsK145Complete13th June 2003
United States of AmericaCarl’s Electronics IncCK110Partial13th June 2003
Kingston, Ontario, CanadaQKitsQK145Complete13th June 2003
Hong KongKitsrusK145Complete13th June 2003
Denmarkeekit.dk0104-K145Partial29th November 2004

(If you also sell this kit, and you would like to be added to the list, please write to me, including your country, organisation name, links to your web site and to the kit page. There is no reciprocal link condition. You may be asked to provide a link to this page, but that is for compliance with the software license.)


Theory of Operation
The program in the microcontroller knows two protocols; the one wire bus used by the DS1820 temperature sensor, and the serial protocol expected by your computer. Once power is applied, the program fetches data from the sensors and sends it to the serial port, repeatedly.


The data from the DS1820 arrives in a format peculiar to the sensor. The program calculates the temperature from the data and translates it into human readable ASCII digits. No special program is required on the computer.


Usage Instructions
Plug the circuit into the serial port of a computer. Persuade the computer to expect serial data at 2400 baud, 8 bits, no parity, one or two stop bits. Ask the computer to raise the DTR signal. (See below for software that will do this for you.) The microcontroller will start talking to the connected DS1820 sensors and the circuit should begin transmitting data to the computer. For example:


For more detail: Quozl’s Temperature Sensor Project using PIC12C509

Leave a Comment

= 5 + 6

Read previous post:
rLogic: Affordable, Tiny, Universal Logic

Watch signals propagate through basic digital circuits. Emulate any two-input logic gate using just one rLogic board and one jumper....

Scroll to top