Pressure sensor
Mike15
Posts: 109
·I am using the Motorolla MPX4115 and a MAX 187 ADC.·I have it wired as shown in the attachment, but when I run my program is 4095.
SCLK CON 6
CS CON 7
SerData_in CON 8
adc VAR Word
main:
GOSUB convert
GOSUB print
GOTO main
print:
DEBUG DEC adc, CR
RETURN
convert:
LOW CS
SHIFTIN Serdata_in,SCLK,MSBPOST,[noparse][[/noparse]adc\12]
HIGH CS
RETURN
·I did have a little trouble finding the data sheet for the MPX4115 And never found a pin out for the side port version but using the reference notch and the other pinout I gather this is what its should to be:
·· 1 - N/C
·· 2 - Vs
·· 3 - Gnd
·· 4 - Vout
·· 5·to 8 -·N/C
Any help would be extremly helpful
Thanks
SCLK CON 6
CS CON 7
SerData_in CON 8
adc VAR Word
main:
GOSUB convert
GOSUB print
GOTO main
print:
DEBUG DEC adc, CR
RETURN
convert:
LOW CS
SHIFTIN Serdata_in,SCLK,MSBPOST,[noparse][[/noparse]adc\12]
HIGH CS
RETURN
·I did have a little trouble finding the data sheet for the MPX4115 And never found a pin out for the side port version but using the reference notch and the other pinout I gather this is what its should to be:
·· 1 - N/C
·· 2 - Vs
·· 3 - Gnd
·· 4 - Vout
·· 5·to 8 -·N/C
Any help would be extremly helpful
Thanks
Comments
Also, attached below is the PDF I have for that pressure sensor, it lists data for a few different body types w/pinouits for the MPX4115.
I've got that pressure sensor/ADC/OPAMP setup at that link working in the past - however, I am also trying to get just the pressure sensor/adc working with the BS2 for my application with no luck. Please post any results ( good or bad ) that you come up with, as I would be very interested [noparse]:D[/noparse]
Alohas and hope that link helps!
Robert
Post Edited (Robert@HCC) : 4/9/2006 8:34:54 AM GMT
You need to either tie this to +5V or another regulated supply. Check the PDF on the
MAX IC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
http://www.vincenzov.net/datasheet/MAX187_M.PDF
Figure 3a on page 9
I just saw the REF connected to a cap in your diagram and it looked odd to me.
Usually a reference is provided externally.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Which would place mee at an elevation of about 1700ft. Checking the elevation of my location this would be correct.
So in short the voltage at Vout decreases with elevation?
Mixed results (mostly because of my limited but growing electronics knowledge), but usually fairly accurate for my location. According to the author, he gets better resolution with the OPAMP. I will be using the sensor much as you are - except I will be determining altitude of a payload ( CanSatellite) released from a rocket after a short freefall. I need altitude info so I will know when to release the parachute for the payload.
Ever heard of ARLISS?
If I have tinme later in the week, I may hook up my MPX4115 and MAX187 as you did and see if I get similar results. Will post data if I can.
Anyways, a bit of code attached - contains a calc to convert ADCIN data to pressure (offset is error correction ,contained in datasheet) , perhaps it may be useful.
Alohas,
Robert
P = (ADCin*/1991/10+7744)+offset
Have you tried something like this as a sanity check to make sure that your ADC is working properly?
Here is a link that covers some of the basics of Analog to Digiital conversion:
www.parallax.com/dl/docs/books/edu/baad.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/11/2006 1:50:58 AM GMT
Mike,
For the math, you need to find answers among the wiser here, my downfall is maths - the calc is from the website I posted above. Worked for me, so I just trust in the other guys work...err...working [noparse]:D[/noparse] P is pressure, adcin is the input to the ADC from the P.sensor and the offset is an error correction for the pressure sensor. The rest, I assume, is what is needed to convert the raw data to Kpa x100.
As for CanSat, http://home.honolulu.hawaii.edu/~robertal/Cansatpics/hcc_cansat_04_05/HCC_CanSat_04_05.htm ( HCC'S cansat project last semester) , http://www.arliss.org/ . http://www.aeropac.org/ , http://www.cansatcompetition.com/ are good places to start. there are quite a few sites out there, google CanSat. Its is a college level project usually. Basically, sensors, a microcontroller and RF modules are packed into a twelve oz soda can, a parachute is attached , and the "CanSatelite" is deployed from a rocket. A ground station computer recieves the data from the sensors via rf. For the ARLISS competition, the main requirement is to autonomously maneouver the cansat to a predetermined GPS location on the ground. First team within 50 meters of the target gets 6000.00usd! [noparse]:D[/noparse]
Since you are into rockets, take a good look at the aeropac site! some really awesome high-powered rocketry! They also provide the rockets for the ARLISS comp.,launching cansats 8000 -12000 feet up!
Mike, are you sure that's right? If you're using a 12 bit ADC, then your max reading would be 4095. And if that's your max, then it means you can't measure an altitude below 1700'...
I'm also working on an altimeter for a rocket project!