Introduction: PICAXE Pitcher Perfect Thermometer

Sometimes, silly seems to work.  I was finishing the software for a digital thermometer with all of the pieces on the workbench and it occurred to me that I had not even given any consideration to an enclosure.  This is unusual for me since I generally order a project box, plastic or aluminum, when I order parts.  Maybe my friends are correct and it is just Mr. Old Age creeping up on me, but as long as I can remember to unplug my soldering iron, I'm not going to dwell on the issue!

I continued with coding.  Yesterday I found myself in Wal-Mart and I was looking for a cutting board in the kitchenware section (to use for a base of a Morse Code Key.)  And there it was, the perfect enclosure for the perfect price, under $2.  So, sit back boys and girls and lets build the pitcher perfect kitchen thermometer... build it for a gift, build it for your mother, or build it for yourself and be the envy of your neighbors.

Step 1: Getting It All Together

This is a PICAXE microcontroller, uC, project which means the code is written in PICAXE Basic.  There are several places on the Internet to acquire the parts, but the places listed below are the suppliers I used and have used repeatedly without issue.  Consistently good service is one of the things I think about and I put this before being thrifty to extremes.  For example, I have been waiting for a few parts from mainland China... since July!  (I do believe there really are slow boats...)  On the other hand, I ordered some parts Monday from and received them today, two days later.  Do what you need to do to stay within your budget, but even if you have to buy everything, you are in the sub-$20 range (of course, you may have to pay a little more because of minimum quantities and shipping but you will have some parts left-over for another project.)

Bill Of Materials:
Item                   Long Description                  Suggested Source                                       Note

* If you purchase your PICAXE chip from it will come with one 22K and one 10K resistor.  If you purchase the serial port protoboard, it will come with one 22K and one 10K resistor, an IC socket, and the small bypass capacitor.  If you purchase the USB protoboard and programmer, it too will come with the 22K and 10K resistor.  Please note that if you intend on using the USB programmer you will still need to purchase the AXE021 protoboard or you will have to utilize some other protoboard for circuit construction and inclusion in the project or purchase something like this:

If you do not wish enclose the project as shown, then only one of the protoboard is required.  I used one of these:

** You will need to use a solder pencil and some solder-wicking braid or vacuum sucker to remove a solder pad on the LCD as described in the LCD description on eBay: "...remove the solder from J3 then it is 4800 8N1"  The PICAXE code requires this modification!  I have, using modified code, used both a SparkFun 9600 Baud and a Scott Edwards 9600 Baud display, both 2-line x 16-characters.

Step 2: Electronic Construction

Once all of the parts have been gathered and cataloged, I would suggest building the PICAXE circuit before moving on to the more mechanical fitting of the display, etc.

PICAXE chips come "blank" without a program; therefore they must be programmed with the Pitcher Perfect Thermometer code.  This requires a free programming tool from the manufacturer in the UK.  You will need to download and install the program on your PC.  Here is the link for Windows users:

Using either the USB or the Serial programming protoboard, load the basic code into the editor, select the correct communication port, and program the PICAXE.  The editor will provide you a status of the programming and identify any errors encountered.  If you get into trouble, search for PICAXE projects on Instructables... there are many that go into great detail about the programming setup and requirements.

Once the PICAXE is programmed, disconnect the power.  You will want to connect the 7805 (or 78L05) on the protoboard.  If using the larger 7805, you can solder short, solid wires to the IC and use those wires for insertion into the protoboard.  A 78L05 should fit somewhere in the empty area of the protoboard.  Essentially, the "input" will got to the 6V positive of the lantern battery, the output will go to the PICAXE board for +5V and the GND connection will be common to the PICAXE and to the battery negative "-" terminal.  If you got a screw-down battery, the connections will be easy, if you got a spring-contact battery, you will need to solder the wires to the springs.  No switch is uses since this is an always-on circuit, but you can add a switch if you like in the wiring between the battery + terminal and the input to the 7805/78L05.  Here is how it is all connected:  EXCEPT in our case, we will NOT use the 100nf capacitor between pin 1 and pin 2 and we are using a larger electrolytic capacitor because it is readily available at Radio Shack but feel free to use almost any value of electrolytic between 10uF and 500uF provided the voltage is rated at greater than 10V.

The temperature "sensing" component is the 10K thermistor.  The 5% precision 10K resistor and the 10K thermistor form a voltage-divider and the junction of these two devices is connected to the PICAXE physical PIN #3 (count from the top-left down and from the bottom-right up.)  One end of the thermistor is grounded and one end of the resistor is at +5V.  PIN #3 is known to the software as port C.4 and this input port is configured in the PICAXE as an analog to digital converter.  What will happen is that the PICAXE will generate a binary number for every change in the voltage on the junction of the resistor and thermistor.  As the temperature gets hotter, the resistance value of the thermistor becomes lower (voltage drop becomes smaller, that is the voltage is smaller and closer to Ground or 0V.)  The internal analog to digital converter provides a numerically lower number the higher the temperature.  In thermistor language, the thermistor is said to have negative temperature coefficient (NTC).

Here is the big picture (or is that pitcher?)
  • Junction voltage at resistor-thermistor is converted to a binary number
  • The binary number is analyzed using a look-up table of temperatures stored in the uC EEPROM
  • The temperature is converted to an integer (whole) number and a decimal (digit) number as 2 variables
  • The variables are displayed on the LCD with a decimal between them to give the traditional "NN.N" format
  • Variables in software hold the high value and the low value since power-on as history
  • The process is repeated about 1 each second
My sincere thank-you to Peter Anderson for his original demonstration code and interpolation routines which are used in the software unchanged.  My contribution is around the display code and the code that allows calibration constants to be changed and stored without reprogramming the chip from the PC.

The circuit with LCD draws about 0.009A or 9 mA.  So, the 6V lantern battery should last a while before requiring changing.  If you wish and are so inclined, a nice addition would be a photocell on physical pin #5 (lower-right) which would drive a voltage to the port C.2 (also used for calibration) to disable the display when the light level were too dark to read same.  (Yes, you will need to do some coding to implement this functionality.)

I have mentioned calibration a couple of times.  When the PICAXE is programmed, a value that I derived as a "generally good" number is included in the code.  This number will give an approximate temperature or one that is in the ball-park.  If you like things to be absolutely perfect, below is how it is done... you will need a 10K variable resistor of the "linear" variety and a few jumper clips and wires. (Updated 20110923 to enhance calibration)
  1. Power off the PICAXE
  2. Add a jumper wire between physical pin #4 (port C.3) and connect the other end to ground / GND
  3. Connect one end of the 10K linear potentiometer to GND
  4. Connect the other end of the 10K potentiometer to +5V
  5. Connect the 10K potentiometer wiper (variable) to physical pin #5, port C.2 (another AD input)
  6. Power on the PICAXE
  7. Using another thermometer turn the potentiometer until the temperature on the LCD is correct
  8. If a value of "0" does not bring down the temperature enough, wait 5 seconds on "0"
  9. If a value of "255" does not bring up the temperature enough, wait 5 seconds on "255"
  10. Let the display stabilize for at least 10 seconds
  11. When the temperature reading is correct, pull the jumper wire off of pin #4
  12. When the jumper is removed, a new calibration is written into the PICAXE EEPROM
  13. Power off the circuit
  14. Return everything the way it was (remove jumper and potentiometer)
  15. Upon power-on, the new value will be utilized and the thermometer should be within 1/2 degree of accurate
  16. If the reading does not agree, repeat until accurate
Note on Steps 8/9:  Leaving the potentiometer at either extreme for 5 seconds will increase/drop the temperature reading by about 5 degrees after the 5 second period.  Move the potentiometer quickly away from the extremes and adjust as required.

Step 3: Physical Construction

OK, if you are prone to cutting yourself with sharp objects, you may wish to enlist the assistance of someone with strong, sturdy, steady hands.  The use of the utility knife to cut the plastic pitcher may create several hazards - a non-extensive list would include breaking of the utility knife blade, slipping of the blade, flying metal pieces of the blade, and so forth.  Therefore, exercise caution, wear eye protection, and wear safety gloves.  When cutting the plastic, many repeated, slight strokes of nominal pressure will gradually cut the plastic without undue pressure or stress on the blade.
  • Create a template from clear plastic - I used an old overhead projection sheet
  • Align the plastic on the pitcher and pin or tape
  • Score the plastic with the utility knife using a new blade
  • Go slowly and carefully and avoid over-run of the desired size
  • Check often using the real LCD
When the two rectangular openings are completed, the LCD will appear to not fit, but the plastic is curved.  Using light pressure from the front, force the plastic inward while holding the display on the inside and gently pressing.  The display will snap into place when the openings are of the proper size and releasing the pressure will cause the plastic to pull the display outward but it will be locked due to the edges of the opening catching under the lip of the display bezel.  See pictures.



Note:  A small number of pre-programmed PICAXE 08M2 are available for those individuals that do not wish to invest in the programming environment/hardware.  Please send an email to if you wish information.


About This Instructable




Bio: Ray Burne is my pseudonym, I sometimes write on various Blogs and Sites. Effective 12 June 2013, Ray has decided to no longer participate as ... More »
More by RayBurne:Minty Magic Morse - Arduino StylePICAXE Pitcher Perfect ThermometerA PICAXE Infrared "logging" Thermometer
Add instructable to: