How to make your own water cooling system
Story
In this tutorial I will show you how to make cooling system for your aquarium by yourself. All you need is basic knowledge in electronics, programming and a little bit of time.
Step 1: Idea for Project
So the idea about this project came shortly after I have bought my aquarium because of the problem with water temperature.
The main problem was that the light which was built-in started to heat the water in the aquarium, built-in light is classic neon light 15W T8. I needed to adjust the aquarium, so that the water temperautre will remain inside the wanted range (24°C, 75.2°F)
After some research I came up with the final shape of this project. I will use temperature probe which will be submerged into water. Probe will be submerged about 10 cm into water, because hot water stays at the top and cold water stays at the bottom. If we would submerged the probe too deep into water we would be measuring the temperature of cold water and not the temperature of hot water as we want. Microcontroller will be used for data processing and activation control (controlling fans via relay module).
The fans will blow cold air into aquarium and with that they will mix the air and cool the surface of the water.
Step 2: Materials
Step 3: Temperature Sensor
Gravity: Waterproof DS18B20 Sensor Kit
Used for measuring water temperature.
The DS18B20 temperature sensor provides 9 to 12-bit (configurable) temperature readings over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor.
Compatible with 3.0-5.5V systems.
Temperature range: -55℃~125℃
Precision: 0.5℃
More about this sensor can be seen here: DFRobot
Step 4: Power Supply
For supplying this project I used AC/DC converter 15W 220V-12V. Its max.output current is 1.25A. It can be bought on ebay or other online stores for about 15$ or less.
12V is used for powering the fans, which are used for water cooling. But because Bluno nano needs 5V supply not 12V, I needed to add DC-DC Automatic Step Up-down Power Module. Max.current of this module is 600mA, which is more than enough for supplying Bluno Nano and three fans.
DC-DC Automatic Step Up-down Power Module
-Input Voltage: 3~15V DC
-Output Voltage: 5V DC
-The Maximum Output Peak Current: 600mA
Step 5: Assembly
After I got all the components, it was time to assemble everything together.
First I started with wiring AC/DC converter. It is supplied with 230V AC, between the phase line of supply and converter I added 2A fuse for circuit protection. (first picture)
After that I added DC-DC step up-down module. It is connected directly to 12V output from AC/DC converter, so with that we get 5V DC supply which is used for powering Bluno Nano (directly connected to 5V and GND)
From AC/DC converter 12V DC output there is a wire connected to the relay terminal, from that terminal wire goes directly to 12V fans. Relay is powered from DC-DC step module (5V DC).
Temperature sensor is supplied from Bluno Nano.
Data wire from sensor terminal goes to digital pin 2 on Bluno Nano.
Wire from digital pin 3 on Bluno Nano goes to control pin on relay module.
Fans are located at the back of aquarium as can be seen on the picture.
Step 6: Program
Program is very simple, basic use of the ON/OFF regulation with the hysteresis. In this program hysteresis is 0.5°C, because the temperature of such a volume (54 liters) of water is changing quite slow.
Max temperature is 25°C and lowest is 24.5°C. When the value of max temp. is reached, fans are turned ON and they start mixing air and cooling water. When the value of lowest temp. is reached, fans are turned OFF.
Code
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2
#define rele 3
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float temp = 0.0, high = 25.0, low = 24.5;
vent = 0;
void setup(void)
{
Serial.begin(9600);
sensors.begin();
pinMode(rele, OUTPUT);
digitalWrite(rele,LOW);
}
void loop(void)
{
if (Serial.available() > 0) {
}
sensors.requestTemperatures();
temp = sensors.getTempCByIndex(0);
if (avt) {
if (temp > high) {
digitalWrite(rele, HIGH);
vent = 1;
}
if (temp < low) {
digitalWrite(rele, LOW);
vent = 0;
}
}
else {
if (vent) {
digitalWrite(rele, HIGH);
}
else {
digitalWrite(rele, LOW);
}
}
Serial.print(temp);
Serial.print(" ");
Serial.print(high);
Serial.print(" ");
Serial.print(low);
Serial.print(" ");
Serial.println(vent);
delay(2000);
}