Analog Input help...
#1
Posted 08 November 2010 - 08:26 PM
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#2
Posted 08 November 2010 - 09:19 PM
Hello,
I want to use the analog input pins but I don't know how it works ! I'm a newbie in electronics....some documentation on Netduino analog input ?
Thanks,
Paolo
Hello! I plan on making a tutorial on that this weekend. If you need help right away, I'll be glad to help you. What kind of analog sensor are you using? A link if you have one, would be helpful.
#3
Posted 08 November 2010 - 09:21 PM
Hello! I plan on making a tutorial on that this weekend. If you need help right away, I'll be glad to help you. What kind of analog sensor are you using? A link if you have one, would be helpful.
I'm using temperature sensor LM335Z (http://www.national....f/LM/LM335.html) but I don't know how connect it to Netduino.
Thanks,
Paolo
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#4
Posted 08 November 2010 - 09:34 PM
I'm using temperature sensor LM335Z (http://www.national....f/LM/LM335.html) but I don't know how connect it to Netduino.
Thanks,
Paolo
So I looked around and it looks like you are using this: http://www.sparkfun....roducts_id=9438 . am I correct?
Also how quickly do you need this? Because I can order one and use it for my video tutorial on Friday. I myself have to mess around a little until I understand how to use it, and without one of those on me it is hard to know how to use it.
#5
Posted 08 November 2010 - 10:03 PM
So I looked around and it looks like you are using this: http://www.sparkfun....roducts_id=9438 . am I correct?
Also how quickly do you need this? Because I can order one and use it for my video tutorial on Friday. I myself have to mess around a little until I understand how to use it, and without one of those on me it is hard to know how to use it.
Yes you are correct !
But can you give me some general information on Netduino analog input...how it works, what is aref...etc etc...
Thanks,
Paolo
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#6
Posted 08 November 2010 - 10:14 PM
Here's a link to some sample code:
analog sample code
In that code, there's a line:
AP0.SetRange(0, 1023);
This is the default, so it effectively doesn't do anything at all; but, if you do:
AP0.SetRange(0, 3300);
...your readings will match roughly with the actual voltage in millivolts. So, if you put 1.6v on the input, you'll get a reading around 1600 instead of 512.
Hopefully this makes sense?
#7
Posted 08 November 2010 - 10:55 PM
#8
Posted 08 November 2010 - 11:19 PM
#9
Posted 08 November 2010 - 11:32 PM
Oz: Are you sure that diagram is right? It doesn't quite make sense to me. Maybe talk me through it? Why isn't aref tied to the 3.3v line?
I had it before, and it was quite the head scratcher... but if your sensor is getting X voltage after the 3V3 goes through a resistor... wouldn't you want the aref to recognize X voltage as the max? I may be wrong on that, but it makes sense [to me at least]
#10
Posted 08 November 2010 - 11:39 PM
#11
Posted 08 November 2010 - 11:45 PM
I don't think it works that way, but I really don't know. Why do you have the analog input tied to the adj pin?
You know what... I think I'll take back my schematic... I completely messed that up. I was in a hurry to help, but that didn't do any good. Maybe I'll get one of those soon and figure it out, maybe post a tutorial.
#12
Posted 09 November 2010 - 05:13 PM
You know what... I think I'll take back my schematic... I completely messed that up. I was in a hurry to help, but that didn't do any good. Maybe I'll get one of those soon and figure it out, maybe post a tutorial.
I have connected pin + to a 2,2 K Resistor and then to +5V. The pin - to ground.
With a multimetere, I read abouta 4,88 V on pin +. This voltage isn't too big for Netduino analog input ?
Thanks,
Paolo
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#13
Posted 09 November 2010 - 06:04 PM
#14
Posted 09 November 2010 - 06:07 PM
The analog input only supports 3.3v -- but if I'm reading this right, a reading of 4.88v equates to 488K, which is 419F, which is 215C ... so unless your house is on fire, something else is wrong.
Where am I wrong ? I have connected wrong the pins ?
Paolo.
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#15
Posted 09 November 2010 - 06:15 PM
If your room is 72 degrees F, which is 295 degrees K, you should have a reading of about 2.95V, I think.
When you're measuring with the multimeter, is the netduino involved in the circuit at all? I would start with the netduino out of the picture entirely a focus on getting the right readings on a multimeter, then focus on getting them well below 3.3V to be safe for the analog inputs.
#16
Posted 09 November 2010 - 06:29 PM
I'm sorry, I don't know. According to this picture:
If your room is 72 degrees F, which is 295 degrees K, you should have a reading of about 2.95V, I think.
When you're measuring with the multimeter, is the netduino involved in the circuit at all? I would start with the netduino out of the picture entirely a focus on getting the right readings on a multimeter, then focus on getting them well below 3.3V to be safe for the analog inputs.
I use 5V Netduion board to put V+...
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#17
Posted 09 November 2010 - 06:32 PM
#18
Posted 09 November 2010 - 07:01 PM
Yeah, I don't know then -- using the 5v should be fine. Can you post a picture or a diagram or something? I wish I had one of those sensors to try it out myself.
I have some difficults to post a diagram but following the connections :
LM335 - pin+ --> Resistor 2,2K --> 5 V Netduino board
|
|-------------------> Analog Input Netduino board
LM335 - pin- --> Ground Netduino board
Thanks,
Paolo
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
#19
Posted 09 November 2010 - 07:31 PM
Is that about what you're doing, with the multimeter/analog input hooked up after the resistor?
#20
Posted 09 November 2010 - 07:50 PM
ok i think I got this right -- i believe the right most pin is the - and the center pin is the +:
Is that about what you're doing, with the multimeter/analog input hooked up after the resistor?
Yes the circuit is right...I put the multimeter on LM335 middle pin like the schema you have posted in the previous post.
Paolo.
Paolo Patierno
Microsoft MVP on Windows Embedded & IoT
Azure Advisor
Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
Blog : Embedded101
?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users