[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PSUBS-MAILIST] Electronic help request
Hi Jon,
what is the input voltage range of the ADC?
If it's 0-5v, which when mapped to a 1-4v scale it
gives 819 useful discrete values (0-1v is not used).
Each step would represent 1.22 psi.
According to the PDF, the accuracy of the sensor
is +/-0.5% for the 1000psi range. Which give +/-
5psi error. Or +/- 4 step/discrete values read on
the ADC.
Unless it's a really high end ADC, you can probably
discount the least significant bit. I've found, even
when spending $100 on a ADC, if I want 12bit accuracy,
buy a 16bit converter.
I think what you are seeing would match what I would
expect.
I guess the read mystery is why the volt meter is
showing a stead reading and the ADC isn't. How
accurate is the volt meter? What type of ADC is in
the volt meter and does the right most digit really
count for anything? I tend to kill volt meters, so
I buy cheap ones and find the last digit is more
for show than use...
To really find out what is happen, I would look to
borrow an oscilloscope and see what is happening with
when hooked up to the Arduino and compare that to the
voltmeter.
Ultimately, I would just solve this in software (as best
as I could). Over sample the sensor voltage (take 100
or more samples per second) and average that. Since
the temp sensor are steady (and unlikely to change very
quickly), you could sample them once every few seconds
and use the CPU cycles for more pressure sensor readings.
How many times a second are you sampling? How many times
a second can you sample if you didn't do anything else?
There is another algorithm I use a lot in situations
likes this:
- Calculate the your normal wobble/wonder/variation. (call it "W")
- Keep the last "X" sample average (X = 100 or how ever many works)
- If the delta between the latest sample and average is less
than "W" then discard it as noise, otherwise update the average.
- Display the average.
I normally have to tweak this depending on what I am sampling,
how often and accurate I can sample it and what I am doing with
the results.
Hope that helps. I am mainly a software guy, probably fixing
my hardware mistakes with software...
Your project looks great!
Cheers!
Ian.
-----Original Message-----
>From: Jon Wallace <jonw@psubs.org>
>Sent: Oct 22, 2011 9:11 PM
>To: personal_submersibles@psubs.org
>Subject: [PSUBS-MAILIST] Electronic help request
>
>
>Hello folks,
>
>I'm looking for some electronic debugging help. I'm using an Arduino
>UNO board to interface some sensors with an LCD display. I currently
>have two LM34 temperature sensors and a 0-1000psia sensor attached to
>the board. The LM34 sensors are working fine but I'm having a problem
>with what I call "drift" with the ADC readings from the pressure
>sensor. I've created a video diary to help explain the problem and also
>show the hardware I'm using at http://www.youtube.com/watch?v=uDpafXob2ko
>
>Non-electronic types might be interested in viewing the video as well
>just to see the project.
>
>Arduino UNO
>16 digital outputs
>10bit ADC (1024 steps)
>6 analog inputs
>5vdc output
>3.3vdc output
>ground
>
>PSIA Pressure Sensor
>8-30vdc input voltage
>1-5vdc output voltage
>1v output at 0psi
>Data-Sheet at the following web address:
>http://www.ssitechnologies.com/PDF/Application%20Notes/PS_AN2_MediaSensor_P51_Product_Overview.pdf
>
>The UNO board runs at 5vdc and I have powered the LM34 sensors directly
>from the board. However the pressure sensor requires 8-30vdc so I have
>to power that with a separate supply and have been using a laptop AC/DC
>adapter that is putting out (steadily) 18.72vdc. Note that the
>following description applies to the pressure sensor sitting on a
>workbench with steady atmospheric pressure.
>
>I connected the output from the pressure sensor to an analog input of
>the board and observed a pretty large drift of about 10 steps. I
>measured the output of the pressure sensor with a volt-meter and it was
>rock-steady at 1.050 volts the entire time. I did some internet
>searching and came across this document
>http://www.maxim-ic.com/app-notes/index.mvp/id/3775 which in Figure 2
>seems to suggest that connecting ground from the sensor to the ADC. So
>I ran a wire from the sensor ground to the ground terminal on the UNO
>board which smoothed out the ADC drift quite a bit dropping it to about
>3 steps. The ADC will occasionally still produce a reading that is 8-10
>steps high but that is the exception now.
>
>Given that the pressure sensor is putting out a steady and unchanging
>1.05vdc I cannot account for the ADC drift I'm seeing. I also do not
>think the problem is with the ADC on the board because the LM34 sensors
>are being read steadily with no step drift at all.
>
>Is the drift caused by noise of some kind? Is it the external power
>supply? Something else?
>
>Any help appreciated.
>
>Jon
>
>
>
>
>************************************************************************
>************************************************************************
>************************************************************************
>The personal submersibles mailing list complies with the US Federal
>CAN-SPAM Act of 2003. Your email address appears in our database
>because either you, or someone you know, requested you receive messages
>from our organization.
>
>If you want to be removed from this mailing list simply click on the
>link below or send a blank email message to:
> removeme-personal_submersibles@psubs.org
>
>Removal of your email address from this mailing list occurs by an
>automated process and should be complete within five minutes of
>our server receiving your request.
>
>PSUBS.ORG
>PO Box 53
>Weare, NH 03281
>603-529-1100
>************************************************************************
>************************************************************************
>************************************************************************
>
************************************************************************
************************************************************************
************************************************************************
The personal submersibles mailing list complies with the US Federal
CAN-SPAM Act of 2003. Your email address appears in our database
because either you, or someone you know, requested you receive messages
from our organization.
If you want to be removed from this mailing list simply click on the
link below or send a blank email message to:
removeme-personal_submersibles@psubs.org
Removal of your email address from this mailing list occurs by an
automated process and should be complete within five minutes of
our server receiving your request.
PSUBS.ORG
PO Box 53
Weare, NH 03281
603-529-1100
************************************************************************
************************************************************************
************************************************************************