Archive

Posts Tagged ‘thermistor’

AVR Based Digital Thermometer with Nokia 3310 LCD and Thermistor

January 31st, 2009

Summary

This project shows the use of a simple thermistor to measure temperature and display the temperature graphically on a Nokia 3310 LCD. Thermistors are incredibly cheap (about 50 cents), and provide fraction of a degree accuracy. The Nokia 3310 Library originally written by CC Darmini was modified yet again, this time to use per pixel access while maintaining the ability to draw text.

Thermistor Project LCD Screenshot

Thermistor Project LCD Screenshot

Thermistor Up Close

Thermistor Up Close

Custom Development Board (but anything can be used)

Custom Development Board (but anything can be used)

Details

The temperature sensing is achieved with a thermistor. These are simple devices whose resistance changes based on temperature. There is an equation, the Steinhart and Hart equation, that allows us to calculate the resistance using constants provided in the datasheet. In our case, we’ve used the Vishay thermistor NTCLE100E3103JB0 because Sparkfun.com sells it. We make a simple resistor divider using a 10k resistor and read the resistance using an ADC pin on our AVR. The accuracy of the resistor is extremely important. Its value is used in our calculations. If you choose a similar resistor but without this exact value, be sure you change the code to reflect the resistor you are using.

Our good ole’ Nokia 3310 LCD is used again. We’ve modified CC Darmini’s LCD library again. Last time, we modified it to get per pixel access using a local pixel buffer. This time we realized that we needed to be able to modify the pixels just as we did before but don’t want to actually update the display until we are completely done. This is only a performance gain if you are writing a significant portion of the screen. The modified library already only wrote to the bytes that had be modified.

Lastly, the current temp is sent out over the serial port at 9600 for logging. The schematic does not reflect this because it is not necessary. We recommend the super simple FTDI breakout board to easily power and add serial over USB to any of your projects.

Schematic

Schematic - atmega8 with 3310 LCD and thermistor

Schematic - atmega8 with 3310 LCD and thermistor

Nokia 3310 LCD Pinout

Nokia 3310 LCD Pinout

Source Code and Firmware

avr-spiceduino-3310-thermistor.tar.gz
- or -
git clone https://code.google.com/p/avr-spiceduino-3310-thermistor/
- or -
visit in browser: https://code.google.com/p/avr-spiceduino-3310-thermistor/

.

.

AVR Projects , , , ,