0
\$\begingroup\$

I have two pressure sensors (MPL3115A2) with each connected to a Particle Photon, the sensors are placed next to each other at the same level.

In barometric mode, one sensor reads 95043 Pa, while the other read 95405 Pa. This translates to a difference is 362 Pa.

In altimeter mode, one sensor reads 1742 ft, while the other sensor at the same level reads 1658 ft. This translates to a difference of 84 ft.

I also observed that these differences (pressure & altitude) keep varying over time. I'd appreciate if anyone with experience on these or similar sensors could shed some light on this variance in measurement.

I am trying to use these sensors to get the altitude of the construction elevator in realtime, any suggestions on accurately measuring the elevator height would also be appreciated.

\$\endgroup\$
  • 1
    \$\begingroup\$ The datasheet does specify a "Pressure Absolute Accuracy" spec of 0.4kPa (400Pa), so what you're seeing doesn't seem unreasonable. \$\endgroup\$ – brhans Jan 23 '16 at 14:07
  • \$\begingroup\$ Did you tare the both sensors at reference altitude? \$\endgroup\$ – Marko Buršič Jan 23 '16 at 14:08
  • \$\begingroup\$ Hi, again. I thought you might have trouble with that. Looking at the video, is there no way to count floors by photo-sensor or rungs on the elevator track? There are thousands of industrial diffuse photo-sensors on the market. See Balluff for an introduction to the topic. \$\endgroup\$ – Transistor Jan 23 '16 at 14:10
  • \$\begingroup\$ Another option is to monitor a mark (or several) on the elevator cable drum with a pair of sensors and make an incremental rotary encoder. This is very simple and reliable. \$\endgroup\$ – Transistor Jan 23 '16 at 14:18
  • \$\begingroup\$ @brhans Alright, well spotted. \$\endgroup\$ – user18197 Jan 25 '16 at 6:32
1
\$\begingroup\$

... any suggestions on accurately measuring the elevator height would also be appreciated.

As per my comment, another option is to monitor a mark (or several) on the elevator cable drum with a pair of sensors and make an incremental rotary encoder. This is very simple and reliable.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. 2-bit rotary encoder waveforms.

The program logic is very simple.

  • Track the current state of 'A'. If the state changes to 'high' then:
  • Look at input 'B'. If 'B' is low then count up. If 'B' is high then count down.

You'll probably need to debounce the inputs to prevent spurious triggering.

Encoder

Figure 2. Elevator encoder. A and B photo-sensors looking at reflective tape or high-contrast markings on winding drum.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Note that this is a half resolution method for handling a quad encoder. Higher resolution calls for counting on both A and B transitions \$\endgroup\$ – Scott Seidman Jan 25 '16 at 12:10
  • \$\begingroup\$ Thanks, Scott. OP is only interested in what floor the elevator is at. With a few pulses per floor all should be OK although a lookup table may be required as it's unlikely to be an integer number of pulses per floor. I didn't double up on the pulses because I reckoned the encoder marks would not be nice equal-angle marks as it has to be attached to the drum on an industrial elevator. A couple of strips of reflective tape might be as good as it gets. I'll add a sketch shortly. \$\endgroup\$ – Transistor Jan 25 '16 at 12:53
  • \$\begingroup\$ Added encoder sketch. \$\endgroup\$ – Transistor Jan 26 '16 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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