The AVR Butterfly has two on-board sensors which makes it possible to measure both temperature and light. In addition is has a voltage-divider that is used to measure voltages from 0 to 5V.

Temperature sensor

The temperature sensor can be found at the back side of the AVR Butterfly. See Temperature sensor.


An NTC (Negative Temperature Coefficient)-thermistor is used to measure the temperature. An NTC-thermistor is characterised by the fact that when the temperature goes down the resistance goes up. Using a voltage divider and reading the voltage over the thermistor through the ADC-channels on the ATmega169, the temperature in can be calculated. Equation for calculating the temperature in Celsius is shown in Equation 1, “Temperature Equation”



ADC = Value in the ATmega169 ADC Data Register ADCL and ADCH



The temperature in Fahrenheit can be found from Equation 5, “Fahrenheit VS Celsius”


The AVR Butterfly is capable of measuring the temperature from -10°C/+14°F to +60°C/140°F with an accuracy of 1°C.

Light sensor

Note that the LDR is not mounted on AVR Butterflies produced after 2006-07-01. Read more about this in the section called “Known Issues”.

The light sensor is located at the front of the AVR Butterfly, over the LCD. See figure below.


An LDR (Light Dependent Resistor) is used to measure the light. An LDR is characterised by the fact that when the light decreases the resistance goes up. Using a voltage divider and reading the voltage over the LDR through the ADC-channels on the ATmega169, the light can be calculated.

Voltage reader

The AVR Butterfly is capable of reading voltages from 0V to 5V. The input must be connected to the pins shown in Voltage readings. Using a voltage divider and reading the voltage over the resistors through the ADC-channels on the ATmega169, the applied voltage can be calculated. The accuracy is about 0,1V.


Note

Do not apply voltages above maximum 10V