# 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.

β=4250

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

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. 