User:Jeffreyricketts
Jeffrey Ricketts-Hagan Brad Sturgeon Salt Water Aquarium Research and Development: Emphasis on Raspberry Pi Abstract: To be able to automate the machinations of a Water Tank using Raspberry Pi and Arduino in order to create an environment that Sea urchins could thrive in. This was done to achieve a habitat that was self-sustaining, even if no one was present. Introduction: The salt water aquarium was constructed for the main purpose of housing sea urchins in order to harvest an enzyme they produce called Ovoperoxidase. Monmouth college currently has research in free-radicals. This tank was built to house Sea urchins that produce an enzyme called Ovoperoxidse, in which we can harvest and observe the free radical crosslinking. My focus was on using the Raspberry Pi, in conjunction with the Arduino, to maintain the water environment necessary for the Sea urchins to survive. This included setting up automative systems in order to record variables present while I was away such as; the temperature of the tank, the salinity of the water, the pH of the water and the water level of the tank. Procedure: Instrumentation:
On the left: Raspberry Pi 3, On the right: Arduino uno - Raspberry Pi - Power adapter (2.5 V) - USB keyboard - USB mouse - HDMI monitor - HDMI - Micro SD card (for OS and storage – 8gb minimum required) To set up the raspberry pi, follow: http://esr.monmsci.net/wiki/index.php/Raspberry_Pi To Install Arduino IDE Software on the Pi: - Open the terminal from the taskbar and write in the terminal window: Sudo apt-get update and sudo apt-get upgrade This is to update the Raspbian in order to integrate the Arduino IDE software. Then write into the terminal window: - Sudo apt-get install Arduino
A screen like this should pop-up
For the Temperature Sensor, what is needed: - A DS18B20 Temperature Sensor - A 4.7K Ohm Resistor (Colour Code: Yellow Purple Red Gold) - A Breadboard - 3 x Female to male jumper cables - 1 x Male to male jumper cables With your Raspberry Pi turned off, build the circuit as per this diagram. The DS18B20 is placed into the breadboard so that the flat side faces you. • The black jumper cable goes from GND, which is the third pin down on the right column to the first pin of the DS18B20. • The yellow jumper cable goes from the fourth pin down on the left column and is connected to the middle pin of the DS18B20. • The red jumper cable goes from the top left pin of the Raspberry Pi to the far right pin of the DS18B20. The Resistor connects the RIGHT pin to the MIDDLE pin. This is called a pull up resistor and is used to ensure that the middle pin is always on. In the diagram I had to use a spare red wire to show this connection. But in reality, using the resistor to make the connection, as per this photo is the best way.
To configure the code: Open the terminal window and write: - Sudo pip3 install w1thermsensor The DS18B20 uses a 1 wire serial interface, this is the middle pin of the sensor, that is connected to the Raspberry Pi via the yellow wire in the diagram. We need to tell our Raspberry Pi that we are using this pin and to do that we use the Raspberry Pi Configuration tool, found in the Preferences menu. When it opens, click on the Interfaces tab and then click on Enable for the 1-Wire interface, then hit OK. This will reboot the Raspberry Pi. To write the code for temperature, open the Python 3 Editor found in the Programming menu. Click File >> New to create a blank document. Then click File >> Save to call the project temperature-sensor.py To implement the code, we write in the python window: import time from w1thermsensor import W1ThermSensor sensor = W1ThermSensor()
While True: Temperature = sensor.get_temperature() Print(“The temperature is %s celsius” % temperature) Time.sleep(1)
Results:
Example code for temperature along with results, I was able to record the temperature of the tank.
Used Ball Float to simulate water level control for the tank.
Servo Water Valve, to control water flow
Discussion: I was able to set-up the mechanics for the temperature sensor, but I was not able to set-up one for the water-level sensor as of yet. The Arduino code for the ball floats and Servo water valves were working, however it seems they relied on power from an outlet. As of right now, a way to have the system rely on the Arduino Uno instead is underway. References: https://learn.adafruit.com/reef-pi-installation-and-configuration https://bigl.es/ds18b20-temperature-sensor-with-python-raspberry-pi/ Barrington, K. (2012, November 04). Sea Urchins in the Saltwater Tank. Retrieved from https://www.ratemyfishtank.com/blog/sea-urchins-in-the-saltwater-tank Kay, E. S., & Shapiro, B. M. (1987). Ovoperoxidase assembly into the sea urchin fertilization envelope and dityrosine crosslinking. Developmental Biology, 121(2), 325-334. Wong, J. L., & Wessel, G. M. (2008). Free-radical crosslinking of specific proteins alters the function of the egg extracellular matrix at fertilization. Development, 135(3), 431-440.