A Most Perplexing Analog Input Problem
#1
Posted 23 September 2010 - 10:44 PM
#2
Posted 23 September 2010 - 11:47 PM
http://g33k.blogspot...naloginput.html
#3
Posted 24 September 2010 - 09:48 AM
Do you have AREF pin connected to 3.3V? This is a very common thing everyone missed (myself included).
http://g33k.blogspot...naloginput.html
Thanks for the response. As I mentioned in my original post, I do have AREF connected to 3.3V. In researching the forums on using the analog inputs I did come across a number of postings in which this was discussed. I also found a post which suggested grounding all unused analog input terminals. I tried this too but it made no difference.
Paul
#4
Posted 24 September 2010 - 09:51 AM
#5
Posted 24 September 2010 - 10:05 AM
Hi Paul,
Can you snap a photo for us?
Also, I assume that you have wired your sensor to the Netduino's ground as well...
Chris
I did wire the sensor to the Netduino's ground too. However, I am using jumper wires so it occurs to me that I should make sure they are actually getting pushed far enough into the headers to make proper contact - perhaps the fact that the meter ready I am getting is steady and the results I am seeing on the display jump around a lot should have been a hint about the soundness of my wire connections.
Beyond all that, a genuine Newbie question: I assume the "Analog In" pins are the ones numbered 0 - 5 under the label "Analog In" on the board and that "Pins.GPIO_PIN_A0" refers to the "Analog In" pin marked 0.
I'll recheck the integrity of all my connections tonight and retry it.
Thanks,
Paul
#6
Posted 24 September 2010 - 12:10 PM
Take a seat, I'll be right with you.
#7
Posted 24 September 2010 - 01:32 PM
#8
Posted 24 September 2010 - 02:33 PM
urm 70 is about right for the analog in.
3.3/1023 * 68 = 219mV
3.3/1023 * 70 = 225mV
3.3/1023 * 72 = 232mV
3.3/1023 * 240 = 774mV
Slight margin of error...
The value you are reading on the input is not voltage, it's a digital representation of the vRef.
0=0v, 1023=3.3V
The last example, if you saw 240 in the .Read() you would actually have a voltage of 774mV
Crispin,
Thank you, both for your original Distance class and for explaining how I was misinterpreting what I was seeing on the analog input pin. I now realize that I am seeing the digital representation of the vRef when reading the analog input pin rather than the actual voltage I was seeing on the digital multimeter. The computation which you use I now realize is based on the fact that the Netduino is using a 10 bit ADC.
I'm guessing the fluctuations I am seeing in my readings are due to electrical noise - I soldered a female header onto the Maxbotix but the connections themselves are just jumper wires pushed into headers.
Again, thanks for your help.
Paul
#9
Posted 24 September 2010 - 06:10 PM
Take a seat, I'll be right with you.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users