0
\$\begingroup\$

I'm a novice programmer and I have recently purchased the SparkFun Pressure Sensor Breakout - MS5803-14BA and used it to take pressure readings quiet easily with the sample code provided and an arduino uno. However, I actually need to hook up two pressure sensors to the arduino and get two pressure readings for measuring the pressures inside a pressurised vessel. Does anybody know how I could extend the current example code provided to give two pressure readings?

\$\endgroup\$
0

2 Answers 2

1
\$\begingroup\$

For the hardware part, look at page 6 of the datasheet and move the resistor at the 0x76 label to the 0x77 position on one of the sensors.

Does anybody know how I could extend the current example code provided to give two pressure readings?

If you're using the library linked to from SparkFun, have a look at line #39 of the code:

MS5803 sensor(ADDRESS_HIGH);

This declares and initializes a sensor object for the "high" address 0x76 and makes it available via a variable named sensor.

Then you can operate the sensor like

sensor.getPressure(ADC_4096);

So all you'd have to do is to set up another sensor object like

MS5803 myOtherSensor(ADDRESS_LOW);

and use it like

myOtherSensor.getPressure(ADC_4096);

to query data from the other sensor (the one with 0x77 ("low" address)).

\$\endgroup\$
0
0
\$\begingroup\$

As you can see there are two address bits - 0X76 and 0X77.

If you want to read both the sensors just set the address jumper on one sensor. So you will get two different addresses from 2 different sensors.

Then just hook up the sensor and from 2 different sensors you will get different output.

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Note that you'll want to bridge only one of the two connections. So on one of the sensors you should remove the resistor ("0x76") and use it to connect the other pads ("0x77"). \$\endgroup\$
    – JimmyB
    Commented Apr 6, 2016 at 10:28
  • \$\begingroup\$ @chandan: You need to have your keyboard checked. It randomly capitalizes words and the . key always seems to double up when you press it. \$\endgroup\$
    – JRE
    Commented Apr 6, 2016 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.