# General > IoT, IoE, and Maker Forum >  Thoughts - drainage ditch detection

## Merrion

I'm looking into an autonomous mobile unit for part of a farm/field data collection thing.  
What would be the best way of detecting that it is heading towards a ditch/drain?

Thoughts:-
1) A bicycle wheel on a boom out front - if the angle or the boom changes then there is an incline/decline ahead which could be a ditch
2) Ultrasound distance measuring unit mounted at an angle - if it stops detecting then the ground ahead is falling away by more than that angle.

any other ideas?

----------


## dclamp

So you are trying to detect which direction water is flowing down a pipe or drain?

Do you have photos or dimensions of the drain? Just to get a better understanding.

----------


## Merrion

No - I want my machine to be able to detect and therefore not fall into the ditch...think of it as a really slow moving quite large Roomba.

Ditch dimensions

I could also geo-fence it with a GPS sensor I suppose.... 

(Basically I have bought three Arduino based kits and am looking for something to do with the nephew to see if this stuff is of interest to him)

----------


## dclamp

Ah that makes more sense. I would recommend some type of ultrasonic Distance Sensor or perhaps an IR Distance sensor. Either one of them you can program so when the distance becomes too great, to stop and go another direction. GPS might work but depending on the connection, the distance can be off by a few meters. 

http://www.amazon.com/SunFounder-Ult...asonic+arduino

http://www.amazon.com/GP2Y0A21YK0F-S...istance+sensor

----------


## szlamany

If the pipe is grounded you can just use a thin metal rod - divining rod style.

I've had the CALL-BEFORE-YOU-DIG people do that to find both the electric and water lines in my yard.

----------


## Merrion

Unfortunately most agricultural drainage is plastic (HDPE) - and the ground is too wet for any differential there.  I think a two factor thing of (a) using ultrasonic sensors and (b) designing survivability into the device will be needed.

I will consult with the designer - his current designs look a bit like armadillos anyway.

----------

