Powering from AREF issue - (DS18B20)

Hi,

I would like to notify fellow tinkers about using AREF to power your components. Things has changed from Arduino 0010 to 0011 related to AREF, not documented (at least have not found).

Background: I started a basic project, temperature sensing with DS18B20. I powered it from AREF with a resistor (parasite mode). First, I used an old install of Arduino IDE, version 0010. Later, after upgrading to the latest IDE (0022 currently) and modifying/uploading my sketch, my sensor stopped working.
Reason: After comparing source code of 0010 and 0011, I found a significant difference in cores/arduino/wiring.c, 3 lines has removed:
// set a2d reference to AVCC (5 volts)
cbi(ADMUX, REFS1);
sbi(ADMUX, REFS0);
(present in 0010, removed from 0011).
This resulted in losing power -> DS18B20 stopped working.
Conclusion: Do not use AREF, if you need only 5V, connect to "Power 5V" pin directly.

I would think that using the internal AREF as a power supply is dodgy practice anyway.


Rob

The Aref pin is designed as an input only, not a source of output current. It's purpose is to supply a reference voltage for the A/D convertor if one then enables the external reference. It was never designed to be a current source for external components.

From the 328p datasheet:

Note that VREF is a high impedance source, and only a capacitive load should be connected in a system.

Lefty