Need help with pressure sensor

joepekoe:
Regarding the 0 reading, I was trying to anticipate how I could account for the sensor not being connected to the analog input. I want to be able to remove the sensor and when it is removed from the circuit the LCD should just display "0". However, it looks like when nothing is connected to the analgo input but you read it anyway, you get random numbers back. Somehow I would have to sense that the sensor is not connected and output "0" with an lcd.print or something. I'd be interested in a better solution.

The 100K resistor I suggested should force the output to 0 when you disconnect the sensor. 10K would be better, but check that it doesn't affect the reading when the sensor is connected.

@drobnjak: I did try a capacitor but I've been told that at 10uf it was too large. I've got to get a .1uf or .01uf and try again.

@dc42: Thanks, I'll try that.

I won't be able to continue testing until 10/28 and will post results when I get back to the project. Thanks for all the help so far.

However, it looks like when nothing is connected to the analgo input but you read it anyway, you get random numbers back.

This is how electronics works, all electronics. It is caused by the input being high impedance and acting like an antenna and picking up interference.
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

Somehow I would have to sense that the sensor is not connected

There is no way to sense this condition.
All you can do is make the input pull up or down when the sensor is disconnected, the simplest way is to use a resistor, but this might load your sensor and give you a lower reading (but it might not).

Well, I've done a lot of testing. I stripped everything off the board except for the pressure sensor itself and have used both USB and 12 volt car battery for supply. The supply source makes no difference.

  1. Tried reference of 3.3v but it made no difference. The ADC values were obviously higher, but the fluctuations remained within a three to four step span.

  2. Tried .1uF, .01uF, and .001uF ceramic capacitor between sensor output and sensor ground but this made no difference, the fluctuations remain. Not sure if I need a resistor or not in combination with the capacitor. Can anyone clarify?

  3. Observed that multi-meter is showing 1.050vdc from sensor output but Arduino is showing lower voltages. I don't know how accurate this is but I simply multiplied the ADC step by the calculated step voltage. The step numbers produced by the ADC are 209, 210, 211.
    5/1024 = .0048828125
    step 210 = 1.025390625v
    step 211 = 1.0302734375v

What are the chances the ADC is bad on this board. I suppose I could purchase another board and see if I got the same results.

I think it's unlikely that the ADC is bad. Your readings are only about 2% out compared with the DMM. Do you know how accurate the DMM is supposed to be? Did you take those readings with the board powered from USB or the battery? What reading does your DMM give for the Arduino +5v rail under the same conditions?

Your DMM may be averaging the voltage over a significant amount of time (i.e. 100ms or more). You might want to have your software do the same to reduce the fluctuations.

DC42: I'm getting 5.04v on 5v pin and 3.62v on 3.3v pin

joepekoe:
DC42: I'm getting 5.04v on 5v pin and 3.62v on 3.3v pin

Your 5v supply is around 1% high, so you should expect your ADC readings to be about 1% low:

(210/1024) * 5.04 = 1.034
(211/1024) * 5.04 = 1.038

which is closer to the 1.050 reading on your DMM.

That 3.62v reading looks odd, I think it should be a lot closer to 3.3v than that.