Pages

Thursday, June 21, 2012

AVR uartConfig - an atmega eeprom config library

Last release here: http://davidegironi.blogspot.it/2013/03/avr-uartconfig-atmega-and-arduino.html


With AVR uartConfig you can config your atmega eeprom using uart
communication
.

Using any rs232 usb adapter or port connected to your atmega, you can easly setup your eeprom device.


AVR uartConfig is a set of tools running on Windows, Linux and Mac, made up or:
* a avrgcc firmware library
* a command line utility
* a gui tool

This lib was check on atmega8 with windows 7, mac lion, and ubuntu linux 10.
To setup this library please read the README file provided with code.



Code


Notes
  • read risk disclaimer
  • excuse my bad english

Monday, June 11, 2012

NTCtemp: a simple AVR library to read temperature from ntc thermistor

updated version here: http://davidegironi.blogspot.it/2012/12/reading-temperature-on-avr-atmega-using.html

NTCtemp is a simple AVR library to read temperature from ntc thermistor connected to an atmega micro.



The library implements the Steinhart-Hart Thermistor Equation or the Beta Model Equation to convert adc value read from analog input to temperature (Celsius).
There are plenty of articles around here speaking about the theory behind those equations, it's not the purpose of this post to teach you this, i just want to provide you a simple library.

Code was tested on an atmega8 connected with a cheap ebay ntc sensor.
I've compared results with a digital thermometer. Temperatures are almost the same, i.e. +/-0.5 Celsius from 20 to 90 Celsius.
Code is release under GPL3 license.


A sample circuit to interface with a thermistor and filter noise is provided.
On the left upper side there is an rc filter, which remove high freq noise. On the right side the thermistor wiring. For further informations and as references please look at http://arduino.cc/playground/ComponentLib/Thermistor4 or RLC Filter Design for ADC Interface Applications (Texas Instruments).


A digital iir filter is implemented to remove unwanted reading errors. As reference please look at "Guillem Planissi tutorial: Measurement and filtering of temperatures with NTC", you should find this tutorial here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=61128



Code


Notes
  • read risk disclaimer
  • excuse my bad english