Go Down

Topic: Aref & Analog reference question (Read 726 times) previous topic - next topic

irethedo

I have an older Arduino Deucilmila connected to a Spark-fun razor accel/gyro that operates on 3.3v

In order to get the correct resolution of this device, I read somewhere that if I connect the 3.3v supply on the
arduino to the Aref pin and set the Analog Reference to External in the setup function of my code, that the
scaling factor for this device will be correct.

The problem is that when i connect the 3.3v pin to the Aref pin, the USB is no longer recognized by my PC.

I get the impression that this is not the correct configuration for this...

Can anyone suggest the correct way of setting the analog inputs on the older Arduino Deucilmila to
accommodate the 3.3v range of the Spark-fun Razor?

Thanks


johnwasser

Could you be running a sketch that uses analogRead() without setting the reference to EXTERNAL?  That would cause a short between the 3.3v and 5v power supplies.  See this warning on the Analog Read page:

Warning

If you're using an external reference on the AREF pin, you must set the analog reference to EXTERNAL before calling analogRead(). Otherwise, you will short together the active reference voltage (internally generated) and the AREF pin, possibly damaging the microcontroller on your Arduino board.

Alternatively, you can connect the external reference voltage to the AREF pin through a 5K resistor, allowing you to switch between external and internal reference voltages. Note that the resistor will alter the voltage that gets used as the reference because there is an internal 32K resistor on the AREF pin. The two act as a voltage divider, so, for example, 2.5V applied through the resistor will yield 2.5 * 32 / (32 + 5) = ~2.2V at the AREF pin.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

irethedo

Thanks for the info.

Yes, the code that was loaded into the arduino when I added a jumper between the 3.3v line and the Aref lines did not contain the external analog reference command. I did disconnect the jumper and  it was fine and since then added that external analog reference command to the code and loaded it onto my Arduino.

So, now it should be good to go and I should be able to connect the jumper again as long as I keep that command in my code. Amazing!

THANKS AGAIN!

Go Up