Tuesday, July 10, 2018

pH and Pretty Pictures

I spent a couple of days working on some PC graphing software to draw sensor data directly on the GPS route maps that I have been creating so far. The result for the previous test at Cap-Brulé is pretty nice looking:


You can see that the water gets warmest where the stream empties into the ocean, which of course makes sense! Sometime when I get a chance (and the turbidity and pH sensors also online) it would be cool to do a grid pattern in this area.

I also hooked up the pH sensor and its circuit conditioning board (https://www.robotshop.com/ca/en/analog-ph-meter-pro.html) to AMOS, using an available +5V output to power it. The analog output of this thing is a bit more than my A to D chip can handle, which is running on 3.3 V power, and I accidentally fried the 4th channel of the A to D the first time I tried it out. Switching to channel 3 and using a resistor divider on the output solved the over-range issue. The documentation recommends calibrating it using known solutions and distilled water, but I just used tap water (assuming its pH to be 7) and vinegar (5% acetic acid by volume) which (according to Google) has a pH of about 2.4. It's probably OK for my prototyping purposes. I measured our pool water to have a pH of about 8, which might be a spec too high (again, according to Google).  I did try the sensor in our pool for an overnight test, but unfortunately something shutdown the program shortly after midnight. I couldn't find any record of a crash, and the Pi was still responsive and seemed to be behaving normally in the morning, so I'm not sure what happened there. I'm re-testing it in the pool tonight.

A while ago I had made a few attempts at 3D printing a waterproof enclosure for supporting one of the tiny little Raspberry Pi Camera boards. For various reasons all of these attempts failed, so I enlisted the help of the pros over at 3dhubs.com. They forwarded my 3D model to Rob's Print Service in Edmonton, and within minutes Rob was correcting my model (there were gaps in it and it definitely would not have been waterproof) and then a day or two later the part was finished. I just got it in the mail yesterday:

Today I threaded the PiCam ribbon cable through the neck and snapped the circuit board onto the mounting posts, and was relieved to see it snap onto the posts perfectly. I also made another large hole / potential leak source in AMOS and plopped the holder into place, tightening it with a large threaded nut that I printed earlier.


I also cut out a disk out of Plexiglas and screwed it onto the enclosure, with an o-ring sandwiched between.

Here are some pics that I took with the PiCam to test it out once it was in place:


Next step will be to try out some of the feature detection algorithms that I had previously tested out in the basement. Looking at the above pic, I guess reflections might be an issue in still water 😉




2 comments:

  1. I can't imagine that mom is happy with your ph assumptions.

    ReplyDelete