I have to start off by apologizing about asking what has got to be a stupid newbee question.
I am acquiring two Nano's (one with a pins and ATmega328) for bread boarding and a second older design (I think) without pins ATmega168 for my actual target device. The concept is to build a device that reports temperature of up to 8 locations back to my server (Dell Latitude D630) using LM34CZ temperature sensors (+/- 0.8 F) via the USB port.
The problem that I have is a good source for the analog reference voltage. I have noted on several sites that the internal 1.1 voltage ref is known to be variable by up to 10%. The 5 Volt supplied to the board from USB may vary from 4.5 to 5.5 volts and be within USB specs. I have spent the day searching various Arduino sites and boards looking for where someone else has already addressed this problem. I would have thought that a good analogue ref voltage circuit would have been among the "basic" projects. Alas I have come up empty. I sure it has been done ... I have just not found it.
My concept is to use a 32K ohm resistor from pin 3V3 and the pin AREF. I figure that and the internal 32K ohm resistor will give me a range between 0 and 165 degrees F (if the temperature goes over that I have a bigger problem): 3.3 * 32 / (32 + 32) = ~1.65V
So here are the questions:
0) What is wrong with my idea --- it seems too simple to be valid.
How well regulated is the 3.3 volts from the FTDI chip on the NANO?
Has somebody got a better/simpler/cheaper/more reliable method?
One other thought:
Would it be possible to use a PWM output with a resistor and cap filter to produce any desired reference voltage desired ....
oh we are back to needing a good source voltage to begin with. Darn !
Still that would allow one to adjust the reference voltage in software (and store a suitable prameter in the flash memory).
It would also not depend on the FTDI chip.
I am beginning to like that idea ... that means there must be something wrong with it as well.
Yes, I will be plugged into the USB port of the server (laptop).
That is how I am planning to communicate the reading back to the laptop.
Regards the on board voltage regulation ...
I have been looking for a definitive reference for that.
As far as I can tell the Nano chooses the highest of the 3 possible power sources: (USB, Regulated 5 Volts, Unregulated Power.
It has a voltage regulator on the underside of the board but I can not tell from the pictures what chip is used.
Found it on the schematic: UA78M05
According to TI the output range is 4.75 to 5.25 volts (but typically better than that).
That is a possible error of 5% or in the case of the application about 4 degrees F.
lewtwo:
I have noted on several sites that the internal 1.1 voltage ref is known to be variable by up to 10%.
The spec says that, but measuring mine I got 1.085V which isn't too far off. I'm not sure how much it drifts, but you could measure it and then compensate.
1.1 Volts is a tad low. I live in the desert formally known as Houston, Texas.
Temps outside get up above 105 degrees and I want a bit of a margin.
Really looking for 1.2 to 1.5 Volts.
Precision chip: Yep --- been thinking about that as as well.
I just figured that somebody had already done it and that I am wasting my time (again) trying to reinvent the wheel ... perhaps not.
I think that I found what may turn out to be the most practical solution:
"LM2596 Buck DC-DC Adjustable Step Down Power Supply" on Amazon.
--- Input Voltage: DC 4V-35V
--- Output Voltage: DC 1.23V-30V
Two each for $5.93 (US) delivered. Has extremely good reviews but they caution that input needs to be sufficiently higher than output.
Still I think coming up with a standard accurate reference voltage circuit has its merits.
I plan to play around with the PWM/Filter solution a bit.
I like the idea of being able to make an adjustment in software remotely.
That is not what is ment by a precise voltage referance. You will find a DC to DC converter has too much ripple on it, as would a PWM adjustable soloution.
Grumpy_Mike:
That is not what is ment by a precise voltage referance. You will find a DC to DC converter has too much ripple on it, as would a PWM adjustable soloution.
I wondered about that " ... that means there must be something wrong with it as well."
Go on the Newark, or mouser site and type in precision refrence voltage to see the sort of things you can get. Most are arround 3.3V and just require an external R and C.
LT1004-1.2 (2-terminal bandgap reference diode) in a TO-92 package is what I was looking at earlier today.
part number: LT1004CZ-1.2 or LT1004IZ-1.2
Guaranteed ±4mV Initial Accuracy LT1004-1.2
1.231 min, 1.235 Typ, 1.239 Max Volts
Should only require a resistor in line with the supply voltage.
Problem is I am not certain how to determine the value of the resistor.
I am guessing the resistor is determined by the current draw. If that is the case the question becomes how much current is needed for the ref pin. Not much I would assume but there is a 32K ohm resistor in line with the Ref pin. Can I use that and the target voltage (1.235) to calculate current draw? The Arduino docs also recommend a 5K Ohm resistor between the ref volt supply and the ref pin. In the OP I stated I had a stupid question ... maybe I should have said a bunch.
The two simple battery circuits in the TI docs show:
1.5 Volt Battery supply and a 3K resistor
9 Volt battery supply and a 510K resistor
I am guessing that for a 5 Volt supply the resistor would need to be about 920 ohms.
The prefered "low noise" circuit I found (in the TI data sheet) calls for two resistors and a cap.
The TI circuit diagram has 100uA (current ?) through a resistor, a 22 ohm resistor and a 50 uF cap and a supply voltage of at least 5 volts.
Now about that first resistor ????
Is it safe to assume that the second resistor and the cap are just making up a filter to apply to the 1.2 volt output ?
In that case the first resistor should be the same as the one required for the 5 volt battery circuit: 920 ohms, yes ?
We are starting to build up quite a bit of resistance between the supply and the pin (920+22+5K+32K= ~38K).
Is this going to be a problem ?
Having considered all this the thought occurred to me: "Somebody has already done this and ..."
By the way, what is the difference between the terms:
1.2V reference
Micropower Reference (at 1.2 Volts)
Low Noise Reference (at 1.2 Volts --- OK, that one I figured out ... remove noise from the incoming power).
The AREF input resistance is typically 32k, so at 1.235V it will draw around 1.235/32 mA = 40uA. You want around 100uA through the regulator, so that's 140uA total. Best allow a little more because the AREF input resistance could be lower, so let's say 160uA. The resistor you need to +5V for this current is (5 - 1.235)/0.16 = 23.5K. So I suggest you use 22K.
The noise is quoted on the datasheet as 60uV typical. That's 60 parts in 1235000, or 1 part in 20600. The resolution of the ADC is only 1 part in 1024. So the noise filter isn't necessary.
For best results, dedicate one of the ground pins of your Arduino as analog ground. Connect only the ground sides of the voltage reference and the LM34s to this pin. Use a different ground pin or pins to connect everything else that needs to be connected to ground.