Adc Mpx4115a - 40x1

cherub66696

New Member
Was just wondering if anyone can help?
I just need an easy way to convert the output voltage from the MPX4115A given by readadc from the 40X1, to a simple pressure and altitude value for a weather balloon data logger.

Thank you
 

premelec

Senior Member
It helps if you tell us what that voltage signal is in min / max range and what resolution of reading you need - otherwise what's the problem? see manual for READADC, READADC10 and which pins work on your PICAXE.
 

cherub66696

New Member
voltage of board is 5V, read out is (when using debug) is 210 normally, not much if any variation. 8 bit res is fine, using adc0 out of the 8 on picaxe, read manuals, not really helping.

thanks
 

hippy

Ex-Staff (retired)
From the MPX4115A datasheet, "Vout = Vs * (.009*P-.095) ± Error", and for reading an ADC, "Nadc = Vadc*255/Vpsu", so given the reading from a READADC (Nadc) where Vadc is from Vout of the sensor, you can re-arrange the equation to get what P is. Vs and Vpsu are known by design ( possibly the same, 5V likely ).

Ultimately you will have something like "P = K * Nadc + C"

Given the equation appears to be linear you could just take two readings, Nadc1 and Nadc2, at known pressures, P1 and P2, and from those determine what values of K and C fit as a first step. I recall that was done using 'simultaneous equations' when I was at school.

From there you can plug P into an equation which gives altitude from that.

It's not clear exactly what you are asking for - A "how to" ( above paragraphs ), how to re-arrange the equations, or how to write the PICAXE Basic commands which will implement those equations.
 
Last edited:

MartinM57

Moderator
The normal data logger solution is to store the raw values (ie the READADC values) in the datalogger itself and use the external software that reads the values do all the unit conversions...:
- quicker on the datalogger side
- easier on the datalogger side
- maximum precision retained etc etc
 

MFB

Senior Member
cherub66696. It was surprising to read that you are based in the UK and building a logger for a weather balloon. Although such ‘near space’ activities are well established in North America (see www.parallax.com/Resources/ApplicationsContests/Science/NearSpace/tabid/567/Default.aspx) I had assumed that UK airspace was too busy for this type of amateur research. Please could you supply links to any groups/projects in the UK that I might be able to get involved with?
 

lanternfish

Senior Member
voltage of board is 5V, read out is (when using debug) is 210 normally, not much if any variation. 8 bit res is fine, using adc0 out of the 8 on picaxe, read manuals, not really helping.

thanks
re #3. You won't get much variation of readout unless the pressure changes. Make a simple pressure chamber and experiment with that. Heaps of helpful info on the interweb. Just google. Cheers
 

cherub66696

New Member
cherub66696. It was surprising to read that you are based in the UK and building a logger for a weather balloon. Although such ‘near space’ activities are well established in North America (see www.parallax.com/Resources/ApplicationsContests/Science/NearSpace/tabid/567/Default.aspx) I had assumed that UK airspace was too busy for this type of amateur research. Please could you supply links to any groups/projects in the UK that I might be able to get involved with?
its for my university dissertation, the pressure reading is part of the whole project, its an autonomous robot that will trace heat signatures such as cars or heat vents (idea of volcanic activity), while data logging the atmosphere and taking air samples.
 

spong

New Member
cherub66696. It was surprising to read that you are based in the UK and building a logger for a weather balloon. Although such ‘near space’ activities are well established in North America (see www.parallax.com/Resources/ApplicationsContests/Science/NearSpace/tabid/567/Default.aspx) I had assumed that UK airspace was too busy for this type of amateur research. Please could you supply links to any groups/projects in the UK that I might be able to get involved with?
http://www.pegasushabproject.org.uk/wiki/doku.php#what_is_the_pegasus_high_altitude_balloon_project
 
Top