Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Unexpected Analog Input Results


  • Please log in to reply
4 replies to this topic

#1 Mockster

Mockster

    New Member

  • Members
  • Pip
  • 4 posts

Posted 20 August 2012 - 07:48 PM

Hi Everyone, I'm building my first Weather Station data logger using a Netduino Plus. So far I have a TMP36 temperature sensor and a MPX4115A air pressure sensor connected to the Netduino. When I feed the sensors 3.3 volts both sensors respond with expected and what seems to be accurate results. However, when I feed both sensors 5 volts from the Netduino the analog input that the pressure sensor is connected to displays unexpected results. For example the Debug.Print statement of the raw GPIO_PIN_A1 is 1023 which is what I would expect if the sensor is outputing 5 volts. My multimeter shows that the output from the pressure sensor is only 4.12 volts. The pressure sensor seems to work better with the lower input voltage, but it's data sheet states that the sensor input voltage should be 5 volts (4.85v min and 5.35v max). Also, I get the same result when switching to another analog input (GPIO_PIN_A2). The analog input that the temperature sensor is connected to does not change with the switch to 5 volts and so there is no issue. Interestingly, when I connect the same two sensors to an Arduino Duemilanove and feed them 5 volts from the board, there is no issue. The 5 volt output voltage from both microcontrollers is nearly identical - 5.05v Netduino and 5.02v Arduino so I don't think the problem is with the sensor input voltage. And the fact that my multimeter shows nearly identical output voltage from the pressure sensor with 5 volts input would seem to reinforce this (4.12v Netduino and 4.09v Arduino). Here are two examples of what I'm seeing when feeding pressure sensor 5 volts from each micro: Netduino - raw sensor reading from analog input pin is 1023, measured sensor output is 4.12 volts Arduino - raw sensor reading from analog input pin is 835, measured sensor output is 4.09 volts Any ideas why the Netduino is converting the 4.12 volts into 1023? Thanks in advance.

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 20 August 2012 - 08:04 PM

Any ideas why the Netduino is converting the 4.12 volts into 1023? Thanks in advance.

Netduino analog input voltage has to be in range 0 - 3.3V, resp. 0 - Aref (Aref is connected internally to 3.3V on Rev.B boards). Anything above 3.3V reads as 1023. But you should not connect 5V to analog inputs, they are not 5V tolerant (unlike when configured as digital I/O), you'd probably need to use a voltage divider for that.

#3 Mockster

Mockster

    New Member

  • Members
  • Pip
  • 4 posts

Posted 20 August 2012 - 08:13 PM

Netduino analog input voltage has to be in range 0 - 3.3V, resp. 0 - Aref (Aref is connected internally to 3.3V on Rev.B boards). Anything above 3.3V reads as 1023. But you should not connect 5V to analog inputs, they are not 5V tolerant (unlike when configured as digital I/O), you'd probably need to use a voltage divider for that.


That explains it! Thank you. I obviously did not know that. That makes using sensors that output higher than 3.3 volts slightly more difficult. As you said, I guess I need to scale the voltage down using a voltage divider.

Thanks again!

#4 scardinale

scardinale

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationNew York, USA

Posted 27 August 2013 - 12:47 PM

What formula are you using to convert the Alalog output of the MPX4115A to a presure reading?



#5 Fahdil

Fahdil

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationJakarta, Indonesia

Posted 31 January 2014 - 05:36 AM

What formula are you using to convert the Alalog output of the MPX4115A to a presure reading?

 

it's explained on datasheet. or you can refer to sensitivity of the sensor to get millibar or pascal.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.