Sensors

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 Figure 1.

Figure 1. 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.

T=βlnADC1024-ADC+βTamb-Tzero
β=4250

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

T0=273K
Tamb=298K(T0+25K)

The temperature in Fahrenheit can be found using the equation below.

C=F-321.8

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 Known Issues.

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

Figure 2. Light sensor

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 Figure 3. 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.

Figure 3. Voltage readings

Note: Do not apply voltages above maximum 10V