Author Topic: Simple Depth Sensor Design  (Read 1094 times)

0 Members and 1 Guest are viewing this topic.

Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Simple Depth Sensor Design
« on: January 05, 2022, 10:26:06 am »
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 a chance GPS 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.

Screen-Shot-2022-01-05-at-12-23-56-PM" border="0

You can see a spreadsheet of this estimation here: https://docs.google.com/spreadsheets/d/1DVbopse7c5WMYWjPUatB9RwQcQBXFnzpfCyu8732sfk/edit?usp=sharing

I 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.ipynb

Heres a view link in case the above interactive link doesn't work: https://datalore.jetbrains.com/notebook/MHT5dIMlNrS6bigDKp0ahP/zqBUkd9C96g0GWiV2JrKga/

Screen-Shot-2022-01-05-at-12-23-07-PM" border="0
Screen-Shot-2022-01-05-at-12-23-26-PM" border="0

What do you all think? Anybody have a better idea or method for capturing this?
« Last Edit: January 05, 2022, 10:29:15 am by waymond91 »
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2377
  • Country: gb
Re: Simple Depth Sensor Design
« Reply #1 on: January 05, 2022, 11:28:00 am »
There are small digital (pre-calibrated) pressure sensors that are commonly used in dive watches, such as MS5840 and others.
« Last Edit: January 05, 2022, 11:32:29 am by voltsandjolts »
 
The following users thanked this post: waymond91

Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Re: Simple Depth Sensor Design
« Reply #2 on: January 05, 2022, 11:47:47 am »
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?
 

Offline Martin Miranda

  • Regular Contributor
  • *
  • Posts: 147
  • Country: ph
  • ~~Work: Electronics~~, ~~Hobby: Electronics~~
Re: Simple Depth Sensor Design
« Reply #3 on: January 05, 2022, 12:00:53 pm »
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.
beach, sun and the island i call home.
https://www.youtube.com/channel/UCOspWWciGGyF5NwmeVT_mWA
 
The following users thanked this post: waymond91

Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Re: Simple Depth Sensor Design
« Reply #4 on: January 05, 2022, 12:23:31 pm »
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/
Screen-Shot-2022-01-05-at-2-19-00-PM" border="0
Screen-Shot-2022-01-05-at-2-19-26-PM" border="0
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?
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2496
  • Country: gb
  • Recovering Electrical Engineer
Re: Simple Depth Sensor Design
« Reply #5 on: January 05, 2022, 12:33:02 pm »
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 sensor https://www.mouser.co.uk/datasheet/2/418/8/ENG_DS_MS54XX_B4-1134913.pdf

To 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/
 
The following users thanked this post: waymond91

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2377
  • Country: gb
Re: Simple Depth Sensor Design
« Reply #6 on: January 05, 2022, 12:39:03 pm »
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?
 
The following users thanked this post: waymond91

Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Re: Simple Depth Sensor Design
« Reply #7 on: January 05, 2022, 12:49:19 pm »
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  :palm:
 

Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Re: Simple Depth Sensor Design
« Reply #8 on: January 05, 2022, 12:54:26 pm »
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...
 

Offline mycroft

  • Regular Contributor
  • *
  • Posts: 70
  • Country: br
Re: Simple Depth Sensor Design
« Reply #9 on: January 05, 2022, 01:26:21 pm »
 
The following users thanked this post: waymond91


Offline waymond91Topic starter

  • Regular Contributor
  • *
  • Posts: 93
  • Country: us
Re: Simple Depth Sensor Design
« Reply #11 on: January 06, 2022, 10:02:56 pm »
For anybody who's interested, this is the design I'm going with, with the intention of potting the circuit.
Screen-Shot-2022-01-06-at-11-55-37-PM" border="0
Screen-Shot-2022-01-06-at-11-55-45-PM" border="0
Screen-Shot-2022-01-06-at-11-56-01-PM" border="0
Screen-Shot-2022-01-06-at-11-57-59-PM" border="0
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?
« Last Edit: January 06, 2022, 10:05:30 pm by waymond91 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf