Home        Store        Docs        Blog

Bar30 Pressure Sensor values stuck with a sudden change in depth


(Craig D) #1

Hello,
So we’re using a 30bar pressure sensor to measure changes in the depth of water in a tank. We’re using the 2" acrylic tube enclosure with one end cap with no holes and the second end cap with two holes: one for a cable thruster for an Arduino Nano and the other for the pressure sensor.

The Arduino Nano, reads from the pressure sensor, which is supplied with 3.3V through a LLC. The code we’re using is the default example given on the bluerobotics site. The sensor gives reasonably accurate values in air and water. However the catch is that when the enclosure is dropped into the water at even a marginally fast rate i.e. 0.5 m/s or greater it gets stuck. i.e. we get one constant unchanging value for depth. Normally we would expect the value to fluctuate marginally given the high sensitivity of the sensor. In contrast, if we lower the enclosure really slowly the readings respond well and show the new depth (with a little fluctuation)

How would you recommend we troubleshoot this?

Best
Craig


(Jacob) #2

Can you please provide pictures of the electronics and how everything is connected?


(Craig D) #3

Hi Jacob,
attaching a couple of pictures below… and also a basic schematic if it helps…

the setup is a little messy because the waterproofing wasn’t perfect initially, hence we had to use tape and glue gun in a lot of places
you can see the pressure sensor and cable thruster at the top
barely visible in the middle of the enclosure is an arduino nano which takes readings from the pressure sensor and a modbus (Max 485 IC) which converts those readings from I2C to RS 485. Below that are weights to make the enclosure sink.
the cable is 4 core, 2 for power and 2 for data transmission (see A and B in schematic) by RS 485 protocol.

at the moment we’re trying troubleshooting by trying to read the raw data (D1 and D2) from the sensor on terminal, can’t get the Read ADC command to run correctly though

Hope this helps
Best
Craig


(Jacob) #4

If your arduino nano is running @16MHz/5V then you need to connect a level shifter between the arduino and the sensor. If you connect the sensor directly to the arduino, the sensor will be damaged.

Also note that these sensors are very sensitive to loose wires/continuity problems. You should solder or crimp as many connections as you can. The impact of the water might be exposing this problem.


(Craig D) #5

So the nano is running at 16 Mhz/3.3 V… hence the sensor is also getting 3.3 V
we made sure the connectors are properly soldered and used heat shrinks where necessary, so we don’t think loose connections are the problem.
Water did enter the enclosure initially but we put all the electronics in rice to absorb the moisture. After that it again gave good results again… the current problem is limited to the scenario I described, wherein lowering the enclosure into water at a faster pace causes the readings to get stuck.
At this point a full power reset is required after which it gives readings again.


(Jacob) #6

This is not likely (it is outside of the specifications for the microcontroller). If you are flashing the board with the 16MHz option and seeing serial communications, then the board is operating at 5V.

The behavior you describe is strange. My only suggestions for probable causes are loose wiring or compromised electronics. Does the same thing happen when you hit it against a table? Does the sensor recover if you call init() again?