You can buy better ones than you can make,
unless you spend a lot of money making one.
I don't think they cost much, boats use them
cos gasses can build up below the water line.
John Iovines book on PICs shows the details of just such a project including code for the PIC and sensor description. As I recall the sensor isn't cheap.