LCD thermometer

 

 

 

 

1.             Introduction

 

 

This LCD thermometer works on AAA batteries and uses the Microchip MCP9800 as a sensor.

This circuit is based around the PIC16LF1937 microcontroller. This chip is actually a small computer contained in a single chip, including RAM memory,EEPROM, I/O ports, CPU and so on. When you buy this chip, it comes empty with no program on it. You have to compile the source code and download the resultingmachine code into it, using a PC and a small programmer attached to the PC and the chip. To get yourself familiar with this stuff, I suggest you first read this link: Getting started with microcontrollers.

 

Back to top

 

2.             Description

 

The LCD display used in this design is the Varitronix VI-302 (Digikey ordernbr: 153-1022-ND), which is a static (non-multiplexed) 3.5 digits 7-segment transflective display. It is driven by the PIC16LF1937 microcontroller which has a built-in LCD driver.

 

The design is based on Microchipís F1 evaluation board.

 

 

Back to top

 

 

3.             Usage

 

 

Usage is very simple. There are no buttons (the switch in the schematics is currently not used). Just insert the batteries and the LCD shows the temperature in degrees Celsius.

 

 

Back to top

 

4.             Schematic diagram

 

 

 

List of components

 

Link to Eagle circuit

 

 

Back to top

 

5.             Explanation of the schematic diagram

 

(Refer to the schematic diagram).

 

The diagram is really simple. One common line and a lot of segment lines are connected to the LCD display. The digital temperature sensor is connected to the clock and data lines of the PICís I2C bus.

A common 32768 Hz crystal is connected to the PICís oscillator pins, this is used as the timer1 oscillator.

 

Back to top

 

 

6.             The printed circuit board

 

The pcb is designed for smd components.

It is double sided and designed with Eagle (from Cadsoft).

The LCD display, the only non-SMD component, has long pins and therefore can be mounted on top of the microcontroller, thus saving space.

 

 

 

 

 

 

 

 

PDF file (top, mirrored) to print on a transparent: Print-layout

PDF file (bottom) to print on a transparent: Print-layout

 

Link to Eagle file brd file containing the PCB..

 

 

 

 

 

Back to top

 

 

7.             The final device

 

 

Below a picture of the final device.

 

The device shown has itís temp sensor mounted outside the device, connected with a wire, to monitor fridge temperature.

 

 

Back to top

 

 

 

 

8.             Programming

 

 

The software is written in C (Hi-tech C supporting Microchip). It uses power saving techniques such as Sleep() and wake up from sleep after timer1 overflow.

 

For programming you need the Microchip MPLAB IDE and a PICkit3 compatible programmer. You also need the Hi-tech C compiler (the lite version, free to download, will do).

 

Zip file containing all source code, header files and project files: Link to MPLAB project. The project file to open is called LCD_demo.mcp, the workspace file is LCD_demo.mcw.

 

Connection to a PIC programmer.

Pad 1-2-3-4-5 must be (temporary) wired to a PICkit3 programmer (1=+, 2=-, 3=data, 4=clock, 5=VPP)..

 

It is advisable to remove both jumpers during programming so that the LCD does not receive the programming voltages.

Back to top

 

 

 

 

Home††††† †††††††††††††††††††Back to Electronic Projects