For input week, we made a list of possible sensors that we could attempt: turbidity (phototransistor), pH (difference in voltage), temperature, and electrical conductivity (following the alcoholic beverages example?). I recently found this great tutorial for a DIY turbidity meter that could help me with the turbidity meter while Patricia works on the pH meter. For output week, we could look at creating a user interface that displays information from the sensors, ideally via bluetooth. For machine design, we could look into different types of motors and how we could use them to mimic the movements of a fish, particularly the tail.
We will consider casting the body in silicone (Oomoo), where the bottom is solid, but there are pockets of air in the top to keep the fish upright. Similar to Jin's project, we will leave a cavity for electronics and seal the fish with glue. One key challenge will be to position the sensors so that they can test the water quality but also not become damaged from contact with water.
Input devices: This week I built a rudimentary turbiditimeter that would estimate water turbidity based on the amount of light sensed/scattered between an LED and phototransistor. I tried out my turbidimeter in some clear and murky water and learned a few quick lessons.
For starters, when I dunk both the LED and phototransistor in the water at the same time, the readings on the GUI go off the charts. I proceeded to keep the phototransistor out of the water moving forward, which means I'll also want to keep the phototransistor behind some sort of clear window (eye?) on our fish.
I also found, as Jiri predicted, that the phototransistor couldn't really detect a difference between the clear and murky water. To decrease the brightness on the LED, I replaced the LED's 1k resistor with a 10k resistor.
Output devices: This week I made an OLED board to display readings from the turbidimeter.
Networking: This week I made two radio boards to transmit readings from the turbiditimeter and receive readings to the OLED. For some reason, I thought it would be pretty straightforward to get all my boards to talk to each other. That was ludicrous, especially since I understand nothing about c programming.
I learned from Anthony and Alexandre that I first needed my radio transmitter to receive characters serially from my turbiditimeter. This involves the addition of a "get_char" function, which I borrowed from Neil's asynchronous serial bus c code.
I also learned that my transmitter radio was sending messages in hexadecimal. I found this Programming Basics: Hexadecimal video helpful in demystifying this otherwise terrifying looking language. I also borrowed some c code to convert decimal to hexadecimal and tried adding that to my turbiditimeter code to get everything in the same language. I also found this Hex to ASCII Text Converter helpful to have in my back pocket in the event I needed to convert everything to one language or another.
Machine week: This week I worked on controlling the servo motor that actuated our claw. Thanks to some fortuitous trialing and erring with Jung, I learned that the speed of the servo can be altered by redefining the loop count. This came in handy when I wanted to increase the speed at which our fish moves its tail. I also learned to interpret Neil's servo code and adjust the position of the servo arm. Finally, I also found a wealth of servo attachments on Thingiverse that we can use to actuate the fish tail.
User interfaces: This week I created a simple user interface that can read the turbidity measurement from my input device.
Wildcard week: This week I joined Ali's soft robotics group. I attempted to make a soft robot that resembled a fish when inflated (harder than it sounds) and increase or decrease in bouyancy by inflating or deflating.
Once I had my fish inflating, it simply became a matter of 1) properly orienting the fish in the water and 2) waterproofing the sensors. With some help from Ali and Anthony, I found some heavy washers and nuts to Sil-Poxy on the inside and outside of my fish. By placing these in/on the "belly" of the fish, the fish stayed right side up in the water (rather than flopping on its side) and sank to the bottom of the tank (so it could then be raised up pneumatically). Anthony also set me up with some 5-minute epoxy to smother my LED and phototransistor in so that they didn't short in the water.
After many, MANY long hours, my fish was able to raise and lower itself to different water depths, read the turbidity of the water at varying depths, and send those readings to a simple user interface on my computer.
While there is definitely more that could be done, including the wireless transmission, servo motor, and OLED ideas mentioned above, at this point, I'm not sure it's worth it to continue developing the idea. On one hand, there are countless water quality measurement tools that already exist, and adding another to the market seems superfluous. On the other hand, most water quality measurement tools require taking water samples at regular intervals to monitor water quality. The convenience of this fish is that it could continuously monitor water quality without constant sampling.
Silicone only
With weights and sensors
Fully functioning!