Go Down

Topic: pro mini 5v + tmp36 (Read 759 times) previous topic - next topic

blah44

I have a few tmp36 temperature sensors that I like, work well and cheap. However they were not usably reliable until I connected up the AREF pin and compensated sensor reads for voltage variation.

Now I want to use these with a pro mini 5v, which as far as i can tell, does not even have an AREF pin. Am I missing something, or is there another way to make these sensors usable on my smaller arduinos? I would rather not have to move all of these units to unos, but I suppose that would be better than getting crummy readings.

Jack Christensen

The Pro Mini has an AREF pin, since it uses the same MCU as the Uno, just in a different package. It has a 100nF bypass capacitor connected to ground. But it's not brought out to a header pin.

What is the source of the voltage variation? Is the supply not regulated?
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

blah44

Honestly I am not sure where the variation comes from! I was complaining about the accuracy of the tmp36 before and someone kindly pointed me towards AREF, then the results were good enough.

It was a fairly simple little circuit, nothing more than an uno, photores, tmp36, and resistors to hold it all together.

Jack Christensen

I'm not understanding what you did with AREF to improve the results.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

blah44

#4
Mar 13, 2014, 02:57 pm Last Edit: Mar 13, 2014, 09:39 pm by blah44 Reason: 1
I am not sure! I got some advice here -
http://forum.arduino.cc/index.php?topic=219977.0

Long story short my readings seemed bogus, then someone had me add a connection from voltageIN to AREF, add some code to init from AREF, and all was well. One would assume my readings were no good because my sensor input voltage was low, and the additions resulted in calibration, but that is still a little bit of a guess

Jack Christensen

#5
Mar 14, 2014, 12:34 am Last Edit: Mar 14, 2014, 12:56 am by Jack Christensen Reason: 1
Sounds like the change was to make the analog reference 3.3V instead of 5V. While this will increase resolution a bit, it should have no effect on accuracy. I'd have to know more about the circuit, specifically how the Arduino (Uno?) was powered, to say much else.

PS: Changing the reference from 5V to 3.3V changes the resolution from 0.488°C to 0.322°C. That is, a difference of one in the value read from the ADC would correspond to those temperature increments.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

blah44

Well, I was using 5.0v in my calculations from the reader, and I was under the impression that I was getting more like 4.6v from the arduino 5v pin. It seemed like using that external AREF trick was a good way to compensate for that. I suppose I should have factored out the switch to 3.3v to see if I got better results with only one change or the other.

Jack Christensen


Well, I was using 5.0v in my calculations from the reader, and I was under the impression that I was getting more like 4.6v from the arduino 5v pin.


If the 5V pin was reading 4.6V that could account for the inaccuracy. Why were you under that impression? Did you actually measure the voltage at the 5V pin? (You should.) How was the Arduino powered, exactly?

Quote

It seemed like using that external AREF trick was a good way to compensate for that. I suppose I should have factored out the switch to 3.3v to see if I got better results with only one change or the other.


If indeed there was less than 5V present on the 5V pin, then using the 3.3V provided by the onboard regulator was responsible for the increased accuracy. The change to the code is required to reflect the fact that AREF is connected to 3.3V, so just doing one or the other would have made things worse, not better.

But, if there is a power problem (5V pin not reading 5V) I'd give that priority and get that fixed. Connecting AREF to 3.3V was in this case fixing the symptom, not the underlying problem.

And the Pro Mini has no 3.3V regulator on board so that fix is not available as an option.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up