Pages: [1]   Go Down
Author Topic: MPX4250AP Sensor  (Read 607 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm new on Arduino world. I'm from Portugal and I work on TI Systems.
It is one amazing microprocessor!

One of my hobbies is my car, at this moment I will do some turbo changes, and I need one pressure sensor to control intake pressure.

I bought one MPX4250AP pressure sensor, and Arduino UNO, with help of some forums and other projects I created the code.
At this moment I can read the pressure, but there is some problem. The pressure it is not constant, exists some break down.

Example print from serial port.

1.02
1.15
1.38
1.39
1.10
1.10
1.11

1.39
1.38

On bold there is the low readings from the sensor. But at this time the intake pressure it is about '1.38'.

MPX4250AP Connection to Arduino:

Vs - 5V
VOut - Analog 5
GND - GND

I use one 10nF capacitor between Analog5 and Ground.

In the Freescale MPX4250AP technical data, exists another capacitors I need them to stabilize the values?
http://www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf

Thanks for help and keep the good work.

Regards
Logged

Offline Offline
Sr. Member
****
Karma: 4
Posts: 329
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it would help if you could post the code as well so they can see where the problem could be.
use the CODE tags -->
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mean analog read is fluctuating?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

At this moment I don't have the code with me. I will post today here.

I don't test print the "analog read", but I think it is fluctuating.
The calculation for Bar is fluctuating.

Thanks in advance for help.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My code.
I added the capacitors as MPX4250AP technical data says, I test but same problem.

Code:
int SensorPort = 5; // Set MAP sensor input on Analog port 5
double SensorValue = 0; //Save Sensor input Voltage
float ResultkPa = 0; // Save Result in kPa
float ResultBar = 0; // Save Result in Bar

void setup()
{
  Serial.begin(115200); // Open serial port
  Serial.println("Powered By sSantos - v0.1");
  delay(2000);
}

void loop()
{
     SensorValue = analogRead(SensorPort);
     ResultkPa = (SensorValue*(.00488)/(.022)+20);
     ResultBar = (ResultkPa * 0.01) - 1.0172; //multiply (1 kPa x 0.01 bar) and deduct atmospheric pressure
     Serial.println(ResultBar);
  
ResultkPa = 0;
ResultBar = 0;
SensorValue = 0;
delay(300);
}

Result in Bars

1.33
1.30
1.03
1.40
1.04
1.33
1.06
1.35
1.39
1.21
1.36
1.10
1.33
1.15
1.40

At this moment I do the test with Arduino Uno connected to USB PC port, could be the problem?
It is necessary a external power supply?

Thanks

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There will be some fluctuation on the analogRead.  Have you tried smoothing example?  http://arduino.cc/en/Tutorial/Smoothing#.UxNeZfmSyIg
Logged

Offline Offline
Sr. Member
****
Karma: 4
Posts: 329
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There will be some fluctuation on the analogRead. 
...
...
is this a characteristic of the sensor itself, or the Arduino reading (ADC ?)

i've also had very jumpy analogRead() from a MMA7361 and smoothed it out with a moving average.
the numbers given by the OP look like a big drop out though, if there were a much bigger sample, say 100+ readings, then it would be easier to tell if it's an anomaly or not.

i just copy & paste the Serial.println() output to a spreadsheet and plot a quick chart to see the volatility.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I tried some changes.
I use LM2940ct 5v to power the MPX2450AP direct but I have Same problem.

The problem is the Arduino fluctuation, I will test print directly to LCD. Can change something?

Thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm from Portugal also, and i'm trying to do a display to show some sensors in the car, including turbo boost.

Did you manage to solve the problem ? The sensor was reading the information correctly, or it was generating random values ?

Thanks
Logged

Pages: [1]   Go Up
Jump to: