Go Down

Topic: Arduino nano aref 1.1v quick questions (Read 242 times) previous topic - next topic



inside arduino nano ,

  pinMode(A0, INPUT);

 1.1v to "aref" to pull up through a 1k resistor on a temperature sensor with variable resistance from ~800ohms to 15ohms.

My question is: how to select proper constant resistance value in this case =?

Normally I would select a resistance perhaps in between the two ends of sensor values.
However in this case, 15ohms is not alot of resistance through this sensor when things get hot. I see that 1.1volts/250ohms = 4.4mA? Did I even do that right? I am new to all of this. Isn't that a bit much current to let this circuit pull for hours on end in a hot environment? I would feel safer in the 1mA range but am I just being over cautious? Also it would be nice to reduce the overall current draw anyway possible just in general practice? Something seems inefficient

240sx LS walk


The reference voltage can not power sensors, it's for internal use only.


Nov 14, 2019, 06:12 am Last Edit: Nov 14, 2019, 06:13 am by kingtal0n
so why is there an external port, what is the external Aref go to?

What will happen if I keep using it like this? Seems to work fine.

In any case. If I don't use this for a pull up, I will have to use 3v as a pull up instead. That would be three times the current. So then what can i to read the sensor resistance from voltage?
240sx LS walk


For a variable resistor you use Vcc for the voltage divider and for the internal reference (default). Or some lower voltage for the divider and external reference (into AREF), which then applies to all analog inputs.

If you want lower power waste, why don't you use a more resistive sensor?


This is the 1/8" NPT general sensor I need. There are thousands of them its very cheap and it fits. Just need to make it work and I can use many of them.

I don't know what you are saying about VCC, my input is 5v VCC to the arduino. I don't want to mess with external ref because of all the warning about using it.

What do you mean use VCC for divider and for the internal reference? How does that look.
240sx LS walk


Vcc is the default internal reference.


I have this one:

INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168

It says in the manual,
"Configures the reference voltage used for analog input"

doesn't that imply using the analog input pins which are also connected to the aref pin at 1.1volts?

I am not using external reference, not doing like this:
After changing the analog reference, the first few readings from analogRead() may not be accurate.
it means all the analog pins, I think
240sx LS walk


The reference is used by the ADC. The analog inputs are multiplexed, share that single ADC.


sorry I have no idea what you are saying. The manual clearly says analog inputs with reference to 1.1v aref, so why can't I use it for my sensor the way I am doing? How is it supposed to be used instead with analog inputs?
240sx LS walk


Start by measuring the Aref pin, is it 1.1?  If so it appears you have it set up correctly, if not disregard the rest of this note.  The name Aref says it is the Analog Reference, you cannot use it to power anything but can you? You can use an op amp as a buffer, connect he + input to the Aref pin, the - Pin to the op Amp output. However if your load is a few more then a few mills then add a NPN transistor with the collector connected to Vin, the emitter connected to your load and the - input of the op amp connected to the emitter of the NPN.  It is best to use a rail to rail op amp for this you need to get the output to about 1.7 volts.
Good Luck & Have Fun!


Nov 16, 2019, 02:57 am Last Edit: Nov 16, 2019, 02:58 am by kingtal0n
Start by measuring the Aref pin, is it 1.1?  If so it appears you have it set up correctly,
yes aref is 1.1v coming out of the arduino, I don't see any max current rating in the manual.

right now it works, sure , I am measuring 500ohms (2.2mA?) with multi meter and arduino nano input A0 pin to serial, easily converts to *F for my display.

I just worry when i put this sensor into boiling water 220~*F resistance will drop to some 50 to 30ohms constantly which would be
1.1V/30ohms = 36 milliamps! It's too much current, so, op amp and transistor is one option.
How about I try pull up resistor to the analog input instead(20k?), but through the aforementioned op amp and transistor, I'm not sure if that will improve resolution

240sx LS walk


Nov 16, 2019, 07:38 am Last Edit: Nov 16, 2019, 08:19 am by JCA34F
With 1k Ω in series with 15Ω the current from AREF would be 1.1V / 1015Ω = 1.08mA. May be OK?
Only 15 ADC counts @ 15Ω, lousy resolution. 450Ω would be about 0.76mA, 0.341V and 317 counts, lousy linearity.  :)
Unconventional, but if it works? Connect your voltmeter to AREF and watch the voltage as you warm the sensor up, if it starts falling, abandon.   


Nov 16, 2019, 09:37 am Last Edit: Nov 16, 2019, 09:40 am by Wawa
I would use the 3.3volt pin to power the sensor and Aref.

1) Switch Aref to EXTERNAL in setup (you could fry the Aref pin if you forget this)
2) Connect the Aref pin to the 3.3volt pin.
3) Power the resistor also from the 3.3volt pin.

The resistor should be about 330ohm if you want a reasonable resolution at high temps.
That shouldn't draw more than 10mA (with hot thermistor), and that's ok for the 3.3volt pin of a Nano (<=30mA).
The challenge: Finding the Steinhart-Hart values for that thermistor, to convert thermistor value to temp.
Good luck.

Go Up