Hi everyone. I came up with an idea last night that I want to explore. I want to build a device that triggers a pin when at a spefic depth for a specific pierod of time. For example, if underwater more than 10 feet for more than 10 seconds, trigger alarm. Seems pretty easy on coding side. But I cannot find a sensor that is reasonably priced, nor do I know which sensor to use.
I was thinking of a waterproof housing with a sensor mounted on the side.
Does the whole device need to be submerged, or just the sensor? I suppose that some sort of pressure sensor would be the most reliable way to measure depth, but if you can stand to have some moving parts you could also measure the distance to a float at the surface. For example you could just arrange for the float to pull a string to operate a simple switch. The switch could be under water, or at the surface, whichever was more convenient.
In that case I would have thought an absolute pressure switch or sensor would be the most appropriate type, although you may prefer to look for cheaper options.
Look at an FSR400 pressure sensitive resistor. Mount it on a base with a small bladder on top, the depth is proportional to pressure (force per area) on the sensor.
The rest of the circuit is a simple voltage divider and if you need timing for short durations a 555 timer chip would add an event trigger.