Is it safe to go caving yet? Modelling cave flood events in Yorkshishire

Hall2501

Member
aardgoose said:
It looks like they may have done the job for you already with the NIMROD data.

They have provided some reading routines in python among others for the data which looks like it includes modelled rain fall.

http://data.ceda.ac.uk/badc/ukmo-nimrod/software/python

One of the scripts produces a 'standard'  ASCII .asc raster file.

Yep when I tried using those scripts though they didn't appear to work. I half managed to get the Matlab one to work with a few tweaks but I couldn't produce anything of use.
 

Hall2501

Member
[size=14pt]Cave Logger Mk1[/size]

It's been great to see so many people taking an interest in the project and the time to offer useful advice/ideas  :bow:

Now I've had some time to consider how to make the cave flood event monitoring device.

I've designed a prototype and come up with a list of attributes I want it to have...

Cave logger attributes

A waterproof ultrasonic or water pressure-based water level logging device for flood event monitoring, ultrasonic sensor range 6m +/- 2cm, pressure sensor range 250m water depth +/- 1cm (depending on how waterproof the housing is), still I need to test the devices before I can comment on how accurate they really are.

Flexible: Many Arduino compatible sensors can be plugged into the logger, multiple sensors can be placed on a single logger.

Easily to assemble: To overcome the tedious and annoying process of wiring the cave logger together I've designed a printed circuit board, simply solder on the components and it's good to go.

Small: A small device footprint has many advantages, the device is less likely to be noticed by cavers who might try to open it out of curiosity, remove it after mistaking it for rubbish or be offended by its presence. It also means it's easier to carry in and out of the cave. The existing design is a 6" length of grey 2" PVC pipe capped at both ends with plastic welded PVC screw cap fittings.

Cheap: The logger and housing should cost less than ?50 to make, the other additional costs being sensors.

Logger + housing component list

Arduino pro mini: ?2.00
SD card module: ?0.60
RTC module: ?1.00
Display module: ?1.70
TTL adapter (PC interface): ?2.00
3.3V regulator: ?4.00
5V regulator: ?4.00
PCB: ?3.00
battery case: ?1.80
transistors and resistors: ?1.00
SD card: ?2.00
switch: ?0.10
power in: ?0.10
2" PVC pipe section: ?5.00
end cap adapters: ?8.40
screw caps: ?6.60
4xAA batteries: ?4
Total: ?48.30

By keeping costs low I should be able to afford more sensors and gather more data for the project, also means I'm not too heart broken if my devices die.
To save on shipping costs I bought multiple components in bulk, also ordered electronic components from china via snail mail.
The list doesn't include necessary tools and consumables such as glue, solder, soldering iron ect. 

Efficeient: the device almost completely shuts itself down between readings, using less than 1 mA of power when asleep, I can probably improve this further in the next design iteration. 

Simple: I'm sure there are many improvements I could make to the device to further improve its efficiency and lower it's cost but in the interest of saving time and my own sanity, I've opted for a more lego based approach where I exploit the efforts of other people. I have designed a device made up of a few cheap and readily available components. Libraries of code already exist and the Arduino IDE makes programming the device very easy. 

Rugged: the device housing will be constructed out of thick 10 bar pressure rated 2" PVC piping https://www.irrigationonline.co.uk/products/PVC-Imperial-Adaptor-Socket-to-Male-Fitting.html.
I'm hoping it will be able to withstand a decent amount of water pressure if submerged. I plan to have sensors sticking out of the housing like this (epoxy glue):

igp9283-potting.jpg



Current progress

I've finally finished designing the circuit design for the logger, I've sent it off to the PCB print press and it should arrive sometime next week.

The PCB preview is shown in the image below, component breakdown:

1. 3.3V buck regulator: I plan to use 4 AA batteries as these will fit nicely in a 2" PVC pipe, this step-down regulator turns 5-6V into 3.3V and should be more efficient than a linear regulator as power isn't wasted as heat, https://cdn-shop.adafruit.com/product-files/2745/P2745_Datasheet.pdf these regulators apparently have a quiescent current draw of 0.16 mA.

2. 5V buck regulator: Same thing again but for 5V, this is for powering an optional 5V ultrasonic sensor, the device will work without this voltage regulator

3. PC interface: port for a USB serial TTL adapter to interface the device with a PC for programming the Arduino.

4. Arduino pro mini: a cheap low power microcontroller

5. LED: pins for optional LED output, can be programmed to let the user know the status of the logger, blinking = recording, constantly on = powered but in an error state. Programmed to turn off after a set period to save power.

6. OLED display: useful if setting up an ultrasonic based water level sensor, this displays the time/date and data read from the sensor, the display automatically shuts off after a set period to save power.

7/8. I2C ports: up to two I2C devices can be attached directly to the board, more if you want to wire them on.

9. Realtime clock (RTC) module: a very accurate temperature regulated realtime clock module for timestamping data.

10. Transistors and resistors: these are so all of the modules can be turned off when the Arduino is in sleep mode to save power.

11. SD card module: allows data to be saved to an SD card.

12. Switch: an optional on/off switch can be placed here.

13. power pins/screws: leads to a battery pack with 4 AA batteries, I was originally going to use a 3.7V lithium-ion cell but decided it'd be safer to use AA's.

I've made the PCB Gerber files and Arduino code available on GitHub, I used the free PCB software EasyEDA for the circuit board design and ordered the boards from JCBPCB:
https://github.com/blhall195/cave_logger

PCB layout
50587142958_655430caf7_c.jpg


Circuit design

50587153953_7588d07952_h.jpg
 

Chocolate fireguard

Active member
You have obviously put in a lot of thought and work on this - it looks good.

I still struggle with the idea that nowadays stuff that does such impressive things can cost the same as a short length of pipe, a couple of end fittings and a few batteries!
 

mikem

Well-known member
The data logger needs to be positioned in a free flowing section of streamway (preferably of relatively even width) to give easily interpreted results. If it's above a sump then the rise in level will not be directly proportional to the amount of rain that has fallen. However, a stream creates much greater pressures than a pool, so sump may be better for testing.
 

Hall2501

Member
mikem said:
The data logger needs to be positioned in a free-flowing section of streamway (preferably of relatively even width) to give easily interpreted results. If it's above a sump then the rise in level will not be directly proportional to the amount of rain that has fallen. However, a stream creates much greater pressures than a pool, so sump may be better for testing.

That's a good point, I didn't consider that the movement of water might affect the pressure readings. I suppose I should do some experiments to work out how much of an effect this has, I've been talking with Nick Bairstow about the possibility of placing them in sections of a cave which become completely flooded, I'm thinking the water might be more static in a completely submerged cave passage.

 

Hall2501

Member
Today the PVC pipe and fittings arrived, I plan to use another pipe cut in half length ways just big enough to fit into this pipe, and mount my electronics on that to stop them rattling around.

50597624448_9dcfe9161d_h.jpg

50598488692_51e225ff55_h.jpg
 

Bob Mehew

Well-known member
blhall195 said:
mikem said:
The data logger needs to be positioned in a free-flowing section of streamway (preferably of relatively even width) to give easily interpreted results. If it's above a sump then the rise in level will not be directly proportional to the amount of rain that has fallen. However, a stream creates much greater pressures than a pool, so sump may be better for testing.
That's a good point, I didn't consider that the movement of water might affect the pressure readings. I suppose I should do some experiments to work out how much of an effect this has, I've been talking with Nick Bairstow about the possibility of placing them in sections of a cave which become completely flooded, I'm thinking the water might be more static in a completely submerged cave passage.
I don't think there is any easy link between water level in cave and rain fall because there will be several modes of the water getting to the sensor (percolation as well as direct stream flow).  And if stream flow is made up of several streams, then it will get even more complex. 

The pressure effect due to stream flow could be checked by a simple experiment of dragging the sensor through water at different speeds.  It won't be static unless you go for a sump pool with small inlet and outlet.
 

Chocolate fireguard

Active member
blhall195 said:
mikem said:
The data logger needs to be positioned in a free-flowing section of streamway (preferably of relatively even width) to give easily interpreted results. If it's above a sump then the rise in level will not be directly proportional to the amount of rain that has fallen. However, a stream creates much greater pressures than a pool, so sump may be better for testing.

That's a good point, I didn't consider that the movement of water might affect the pressure readings. I suppose I should do some experiments to work out how much of an effect this has, I've been talking with Nick Bairstow about the possibility of placing them in sections of a cave which become completely flooded, I'm thinking the water might be more static in a completely submerged cave passage.
The dynamic pressure produced by a moving liquid is equal to the kinetic energy of unit volume of the liquid, i.e. of 1000kg in the case of water.
If the water were moving at 0.1m/s the pressure would be 0.5*1000*0.1*0.1 = 5N/m^2.
This is 0.00005 atmospheres, so the depth error would be trivial at 0.5mm.
The KE is proportional to the speed squared, so at 1m/s the error would be 50mm.
Is it possible that with 2 pressure sensors at right angles you could get information on the speed of the water as well as its depth? Over a short time the effect of turbulence might average out to give an accurate answer.
 

Hall2501

Member
Chocolate fireguard said:
blhall195 said:
mikem said:
The data logger needs to be positioned in a free-flowing section of streamway (preferably of relatively even width) to give easily interpreted results. If it's above a sump then the rise in level will not be directly proportional to the amount of rain that has fallen. However, a stream creates much greater pressures than a pool, so sump may be better for testing.

That's a good point, I didn't consider that the movement of water might affect the pressure readings. I suppose I should do some experiments to work out how much of an effect this has, I've been talking with Nick Bairstow about the possibility of placing them in sections of a cave which become completely flooded, I'm thinking the water might be more static in a completely submerged cave passage.
The dynamic pressure produced by a moving liquid is equal to the kinetic energy of unit volume of the liquid, i.e. of 1000kg in the case of water.
If the water were moving at 0.1m/s the pressure would be 0.5*1000*0.1*0.1 = 5N/m^2.
This is 0.00005 atmospheres, so the depth error would be trivial at 0.5mm.
The KE is proportional to the speed squared, so at 1m/s the error would be 50mm.
Is it possible that with 2 pressure sensors at right angles you could get information on the speed of the water as well as its depth? Over a short time the effect of turbulence might average out to give an accurate answer.

Could I get around the issue of turbulence by using a mini stilling well or something?
 

Bob Mehew

Well-known member
blhall195 said:
Could I get around the issue of turbulence by using a mini stilling well or something?
How about just fitting a blanking plate with a small hole over the front of the sensor housing so it can't see the direct stream.  You could check on the venturi effect by the wafting it through water.
 

Hall2501

Member
PCB arrived today  ;)

I now have a slightly more condensed and robust version of the logger.

Works much better than the breadboarded version, I can pick it up without it falling appart. I'm still waiting on a few of the components to arrive so not quite finished yet. I might redesign the PCB too after noticing a few ways it can be improved.

50614818407_53ed00f3fe_c.jpg


Did some back of the envelope maths to estimate the logger battery life when I change the sample rate and improve the sleep state current draw.

I'll probably take a sample every 5 minutes so it's probably worth looking at improving sleep current, currently looking at integrating one of these modules https://www.adafruit.com/product/3435 

into the device. It's not too expensive and basically completely shuts off the device between samples.

50614681951_38bbb2d261.jpg
 

mikem

Well-known member
EA are already doing predictions for some rivers, e.g. Trent:



https://www.ukriversguidebook.co.uk/forum/viewtopic.php?f=3&t=128160
 

Hall2501

Member
mikem said:
EA are already doing predictions for some rivers, e.g. Trent:

https://www.ukriversguidebook.co.uk/forum/viewtopic.php?f=3&t=128160

Good to see the kayakers share my pain.

New PCB design is complete, also made a logo.

50629955766_839123e3ea_b.jpg

 

Hall2501

Member
Finally gotten the rain radar data to work, here's a gif of a few days ago in the Dales. Each pixel represents 1km. Grid co-ordinates are in OSGB36 National Grid format.

The project funding was approved yesterday, so I should be able to have the first prototype ready for testing in a week or two. Plan to put out an update soon.

28d21f280c9f711dedb20aa49c0944ebae868004.gifv


 

Hall2501

Member
Sure, I'll make a GitHub repository for the project and share all my code. The issue would be accessing the data though as the met office haven't made their rain radar data public.

Sent from my AC2003 using Tapatalk

 
Top