Shop OBEX P1 Docs P2 Docs Learn Events
Temp, Pressure, and Humidity sensors with MCP3204 — Parallax Forums

Temp, Pressure, and Humidity sensors with MCP3204

kmacken2kmacken2 Posts: 15
edited 2011-04-04 03:32 in Accessories
Hey,

We have three different sensors that are all going to be connected to a MCP3204 a/d. We have a working program that is reading the count values and printing in terminal. Now we're doing basic testing and trying to see how the counts change depending on changing temp, pressure, and humidity.

So far, we've tested the temperature and pressure and here are some questions

1. Temperature - at nominal conditions (not trying to heat or cool the sensor) the count values are fluctuating a lot (2700 to 3500 range). Then we heat and cool the sensor by either holding and then placing near the window, and we don't see a change in value that parallels the change - so it fluctuates in the same range and it does go up or down if we heat or cool.

2. Pressure - at nominal conditions, the count value is fluctuating from 0 to 10. It seems to change if we try to change the pressure (just blowing into the inlet).

What is causing these fluctuations?

Any advice would be great! New to programming, so sorry in advance for incorrect terminology or questions.

Katie

Comments

  • LeonLeon Posts: 7,620
    edited 2011-03-31 20:33
    Check the ADC with a pot, to make sure that it's working properly.
  • kwinnkwinn Posts: 8,697
    edited 2011-03-31 22:00
    As Leon says, the first thing to do is to verify the adc is working by measuring a voltage at the low, mid, and high end of the adc range. Then make sure the sensors are working by measuring the output signal from them at the low, mid, and high end of their ranges. Once that is done you can compare the sensor output ranges to the adc range. Not much point in trying to measure a signal that changes a few millivolts from 0 to full scale with an adc meant for a 0 to 5V range.
  • kmacken2kmacken2 Posts: 15
    edited 2011-04-01 00:44
    kwinn wrote: »
    As Leon says, the first thing to do is to verify the adc is working by measuring a voltage at the low, mid, and high end of the adc range. Then make sure the sensors are working by measuring the output signal from them at the low, mid, and high end of their ranges. Once that is done you can compare the sensor output ranges to the adc range. Not much point in trying to measure a signal that changes a few millivolts from 0 to full scale with an adc meant for a 0 to 5V range.

    Just to clarify, low/mid/high range of the voltage?
  • LeonLeon Posts: 7,620
    edited 2011-04-01 01:10
    The ADC supply voltage.
  • kwinnkwinn Posts: 8,697
    edited 2011-04-02 00:02
    kmacken2 wrote: »
    Just to clarify, low/mid/high range of the voltage?

    Sorry, did not mean to be so cryptic. By this I mean that if your adc measures a range from 0 to 2.56 then check the reading from the adc with voltages around 0.05V, 1.28V, and 2.50V. Use a calibrated voltmeter for comparison if possible, and avoid going to the absolute minimum (0V) and maximum (2.56V) to avoid problems caused by under/over range inputs.
  • kmacken2kmacken2 Posts: 15
    edited 2011-04-03 20:19
    Hey,

    I was just about to test the voltages, but I ran the program again the result was

    ch 0 : 4095
    ch 1 : 4095
    ch 2 : 4095
    ch 3 : 4095

    Nothing is plugged into any of the channels and it's reading maximum count (it's a 12bit resolution, so 2^12 = 4096). Did I break it?
  • LeonLeon Posts: 7,620
    edited 2011-04-04 03:32
    Connect a pot to them as I suggested earlier so that you can vary the inputs. It does look as though there is a problem; you should be getting noise on the inputs if they are floating.
Sign In or Register to comment.