Simple Depth Sensor Design - Page 1
Forum section: electronics / projects

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 10:26:06 am
content: Hello All!I am working on a little project and I wanted to run one of the core concepts past the community here.I do a lot of spearfishing and snorkeling, and I’d love to have a way to track and log my dives.This little board would mount on the straps behind your mask, as the back of your head is always out of the water while you are at the surface - thus maintaining at least achanceGPS signal.More to the point, I’d want to add a pressure sensor so I could review depth data after my sessions.However, there is scant information about how to build a depth/pressure gauge for a simple dive computer online.I’M NOT USING THIS FOR SCUBA DIVING, I JUST WANT TO CAPTURE SOME DECENT DEPTH DATA.I thought maybe some people here might have experience with pressure sensors, and maybe even designing dive computers.Does anybody have a good idea how to “directly” measure the water pressure?What I’ve come up with is more roundabout, but perhaps more simple.My plan is just to include a simple MEMs pressure sensor (BMP390/BMP280 etc) on the board, and then try to design an enclosure that will flex and compress when under pressure.I’ve tried to come up with some approximate figures to estimate how much the enclosure would have to compress in order of for the sensor to detect a depth change, and I think I have some reasonable figures - assuming I’m reading these pressure data sheets right.You can see a spreadsheet of this estimation here:https://docs.google.com/spreadsheets/d/1DVbopse7c5WMYWjPUatB9RwQcQBXFnzpfCyu8732sfk/edit?usp=sharingI also tried to estimate the provided signal quality of the pressure sensors different mode in an iPython notebook. In the simulation I treated RMS noise as the standard deviation of the noise of the sensor output. Importantly, I don’t know how to treat the relative accuracy of the sensor. Normally it seems most sensor give noise density per root hertz, but I guess since the pressure sensors are essentially DC signals they are specified this way? Any insight would be welcome!You can view the notebook here:https://mybinder.org/v2/gh/ipython/ipython-in-depth/b2f9442aa52118dec44ccb0ee749ea63ac578bba?filepath=binder%2FIndex.ipynbHeres a view link in case the above interactive link doesn't work:https://datalore.jetbrains.com/notebook/MHT5dIMlNrS6bigDKp0ahP/zqBUkd9C96g0GWiV2JrKga/What do you all think? Anybody have a better idea or method for capturing this?

author: voltsandjolts
author_rank: Unknown
timestamp: January 05, 2022, 11:28:00 am
content: There are small digital (pre-calibrated) pressure sensors that are commonly used in dive watches, such asMS5840andothers.

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 11:47:47 am
content: Ok these look pretty sweet. My only confusion is how to seal outside of the housing?Just an o-ring and a bulkhead of sorts?

author: Martin Miranda
author_rank: Regular Contributor
timestamp: January 05, 2022, 12:00:53 pm
content: the easy way is pot the electronics, then silicone oil fill the inside. (oil is a good dialectic rf could be influenced.) and separate the rf on different chamber.but i would search for diving computer teardowns just to see how they implement pressure proffing.

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 12:23:31 pm
content: Ok after poking around with the other sensors I found two really great out-of-the-box solutions:https://bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-pcb-r1/https://bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-r1/As you can see, one is a bare pcb, and the other is the same sensor with the water proof housing.It seems as though the sensor is exposed to directly to the water through the port.Would it be wise to just fill and external sensor port (with wires to the inside) with epoxy (or some such thing) and leave the tip of the sensor un-potted?

author: Terry Bites
author_rank: Super Contributor
timestamp: January 05, 2022, 12:33:02 pm
content: http://chrisgreenley.com/projects/dive-comp-teardown-versa-pro/If you compress air in the mian enclosure you'll get some big temeperature errors: (PV=nRT). So you need to use an open to water diaphragm . Or buy a wateproof sensorhttps://www.mouser.co.uk/datasheet/2/418/8/ENG_DS_MS54XX_B4-1134913.pdfTo save power you only need to make a quick measurment say 10mS every 5 seconds. You want to go straight to digital with something like an ADS1131 and use its power down to enable brief measurements.Then add a small MC platform. ?Arduino nano with TF data logger shield. It would be nice to have bluetooth to read your logger without having to unseal the box.http://www.geothread.net/arduino-making-a-simple-bluetooth-data-logger/

author: voltsandjolts
author_rank: Unknown
timestamp: January 05, 2022, 12:39:03 pm
content: The MS5837 has a built-in ADC.Also, it's housing is shaped to suit o-ring fitment, as described at the end of datasheet (see attached image).An o-ring seal is shown in the pictures at the above linked teardown.Some dive computers are oil filled, others are air filled which would be less hassle to manufacture but perhaps more prone to seal leaks?

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 12:49:19 pm
content: Wow this is a huge help! Reviewing...Does anybody have opinions about o-rings vs potting?I have never truly spec'd an o-ring, but I read a small manual on it.I've expoxied lots of stuff though

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 12:54:26 pm
content: My gut says for prototyping to pot everything and if there ever is a nice injection molded case made then you can go with o-rings...I'm hoping that you can MJF or SLA print wateproof enclosures, but that's also pretty untested...

author: mycroft
author_rank: Regular Contributor
timestamp: January 05, 2022, 01:26:21 pm
content: Take a look athttps://thecavepearlproject.org/2016/09/21/field-report-2016-07-09-i2c-pressure-sensors-work-on-20m-cables/. The entire site is very interesting!

author: waymond91
author_rank: Regular Contributor
timestamp: January 05, 2022, 03:53:26 pm
content: Looks like the pressure sensor have an application note for o-ring mounting:https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Specification+Or+Standard%7FApplication_Note_MS5837_O-Ring_mount%7FA%7Fpdf%7FEnglish%7FENG_SS_Application_Note_MS5837_O-Ring_mount_A.pdf%7FCAT-BLPS0017

author: waymond91
author_rank: Regular Contributor
timestamp: January 06, 2022, 10:02:56 pm
content: For anybody who's interested, this is the design I'm going with, with the intention of potting the circuit.The only thing worth noting is that the sensor can not generate an interrupts, so I'm adding a small microntroller (attiny85) to periodically pull the sensor, and then if thresholds are crossed an interrupt is generated.Is there a better chip than the attiny85 for this? Its nice small and simple, but it resources are a bit tight. Does anybody else have a low-power, simple go-to MCU for stuff like this?Preferably even with 12kB-70kB of memory I can use to buffer the data.Seems like a specific ask, but its 2022 they got chips for everything these days, right?