Intro: Heated Water Circulator (HWC)
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).
My name is Ahmet Erkan Uman and in my first instructable, I will walk you through this awesome heated water circulator project.
Heating and keeping that heat at a constant level could be used for different purposes. You could make your own yogurt maker (which needs a constant temperature around 45 °C for 7-10 hours  ) or you can heat your reactors (or chambers) up and keep them at desired temperature ranges. An HWC read the temperature of water inside of its container and according to a desired set point, it can turn on or off the heating element. A submersible pump can circulate your water through its PVC tube and it can be hooked up to anything that you would like to heat. In my design, a thermocouple temperature sensor is reading the temperature of the water and send its reading to an Arduino Uno, which is then converted to Celsius or Fahrenheit degrees. If the reading is below than a desired set point, then the Arduino will send a signal to one of its pins (which is the pin that hooked up to a relay and eventually to the heating element by sending 5V of electricity) and this will allow the heating element to be turned on. An I2C LCD display will also show the current temperature of the water inside of the container and the state of the heating element (on or off). There is also a 2V LED pin connected to one of the pins on the Arduino to indicate that heating element is on/off. A servo motor is also included to show the temperature of the water mechanically.
Heres what you'll need:
1 Container for keeping the water (I happened to find it in my lab, you might need to buy it from a local store or home depot. You need to also make the lid for the container from wood because if you use a plastic lid, the heating element will melt it. You will also need to apply a waterproof paint or spray on the bottom part of your lid because when the water is too hot, it will evaporate and moisture will penetrate into your wood lid and cause damage gradually).
Step 1: Setting Up All the Components Together and to Your Arduino Uno
Connect all the jumper cables and your components as shown in the pictures and fritzing schematic (pdf file is to see the Fritzing schematic better), (you can download the Fritzing software from this link. It is explained in the pictures as short as possible but I will summarize it here:
Relays can be thought as valves. By turning them on or off, we close a loop or open a loop so that we can have the power go the direction we want.
- We will be using the pins 3, 4, 5, 6, 9, 10, 11, 12, 13, 2 ground pins, 3.3V pin, 5V pin, SCL and SLA pins on Arduino Uno.
- Pin 3 is for the LED light and it will be indicating if the heating element is on or off. (The longer side of the LED light is positive and the shorter one is negative. The Arduino Uno provides 5V current to its pins but LED light can only work typically with 2V so we connect a resistor to drop the 5V to 2V. 220 ohm resistor would work in this case so we connect an 220 ohm resistor to LED's longer side.)
- Pins 4, 5, and 6 are for the Max6675 temperature sensor.
- Pin 9 is for the servo motor. (servo motor has 3 wires total, 2 of them are VCC and GND, and the other one is for data acquisition)
- Pins 10, 11, 12, 13 are for the 4-channel relay board.(4-channel relay board has 6 pins total, 4 of them are for relay connection, and 2 of them are for VCC and GND. We will be using only 1 of the relays, I thought I might be using the relay for something else so I used a 4-channel one, normally 1-channel relay is sufficient for this project)
- 3.3V is for the Max6675 temperature sensor power. (Max6675 temperature sensor has only VCC and GND normally but to be able to produce the data that can be understood by Arduino, we need a module, and that module is also included in this project. Module has 5 pins, 3 of them are for data acquisition. 2 of them for VCC and GND)
- SCL and SLA pins are for the I2C LCD display and will be connected accordingly. (An I2C bus LCD display is basically a display using I2C connection. Normally LCD display has 16 pins and to be able to connect only LCD display to the Arduino, we would at least connect 10 of these pins, which means that it requires a lot of pins. Instead of doing that, we use an I2C bus converter and this converter is connected to 16 pins of the LCD and as output, it only has 4 pins to be hooked up to the Arduino. Therefore, instead of using 10 pins, we only use 4 pins to connect our LCD, and we are saving 6 pins for other connections.)
Step 2: Downloading and Using the Arduino Software
If you are new to Arduino, you can get great help from these videos. You will learn how to download and install the Arduino software and some examples about how to do some simple tasks. If you just want to download the software here is the link.
For more introduction videos about programming please watch these videos.
Step 3: Setting Up the Arduino Code and Uploading to Your Arduino Uno
I wrote the following code and used it for this project. There are 4 different libraries included in the code (2 for I2C LCD display, 1 for Max6675 Temperature sensor, and 1 for servo motor). Libraries are basically some combined Arduino codes which can be imported or exported as separate files. All you need to do is to find the library for you component, download it to your computer and copy the files that you downloaded into your Arduino file folder (it is under this folder for windows users: C:\Program Files (x86)\Arduino\libraries or C:\Program Files\Arduino\libraries or whatever your partition name: \Program Files\Arduino\libraries). When you download your library, you will see that they consist of two files: one file extension is “.cpp” and the other one is “.h”. You have to put them together in a folder and copy into your Arduino library as discussed above. One of the library for I2C bus connection for LCD and servo motor library are already included in the Arduino software. You can include them in your code by two ways:
1. You can follow this direction: Click "Sketch" on the top ribbon, then "include library", then choose which library you would like to include. You can also see at the far end of the list that the libraries that you downloaded and put in the library folder in your Arduino file location. I also included an image showing this. (I added the 2 libraries required for this project)
2. You can basically write the code instead of doing the first part. Be careful here because you will need to write exact same name that you created your library folder. Example of writing the include code for libraries:
Please watch my Arduino code discussion for what is going on with the code. I am explaining all the functions in my video.
Step 4: 3D Printing of the Enclosure
I designed an enclosure for my components and a small safety box to close the open part of the heating element in Autodesk inventor. By the way, you can install and use the Autodesk Inventor for 3 years for free if you are a student and have a student email address. You will need to create an account in Autodesk website and then you can install the software you want. Here is the link.
The enclosure was easy to design in Inventor. I used project geometry feature for some parts and used caliper for some other components and put the right holes for their screws. I almost only used extrude geometry for making the holes or cutting the holes.
I included my enclosure as STL file. STL file is a file that you can export from Autodesk Inventor and many other design software once you designed your model. This file type can be used to 3D print in Makerbot software.
Eventually, you will mount your Arduino, 4-channel relay board, solid state relay, switch, servo motor, 2V LED, I2C LCD display. There is also a part in which you can mount your 9V battery. To be able to get the cables in and out, there are 7 holes on the enclosure. You might need to sandpaper the holes to get the components in. I used these sanding sticks for that. You will also need M2-0.4 Metric Coarse Threads to mount your lid and components along with a screwdriver.
Step 5: Conclusion
Lastly, remembering what this guy is doing and capable of:
When I turn on the switch, the process will be like:
First, the temperature sensor will read the temperature of the water in the container and this temperature reading will be shown on the LCD and servo motor will position accordingly (Servo motors have 180 degrees rotation. In my Arduino sketch, by using the map function (please watch my sketch discussion video for more info), I converted the 0-60 Celsius degrees to 0-180 (counter clockwise) degrees angle. So, when the temperature of the water is 30 Celsius for example, the servo motor propeller will position at 90 degrees. When the temperature is 45 Celsius, it will show 135 and so forth. I actually wrote a short code to calibrate my servo motor position and to find its "0" and "180" degrees positions). In this case if the temperature is above the setpoint, the heating element will be off, and on LCD, a command will be written like heating element is off.
Second, if the temperature of the water in the container is below the setpoint, then the Arduino will turn on the power at pin 10 and this will allow the heating element to be turned on. And on LCD, the command will be changed to heating element is on. And this will continue until the desired set point is reached.
The submersible pump is to circulate that water, in this case it is only circulating the water back into the container and it will be running continuously as long as the adapter is connected to outlet.
Here is a video that is showing the project in action after all components are mounted.
I would like to thank the following people:
Onur Ozcan for helping me with the circuit, explaining and answering my questions.
Dr. Schlaf for being an Awesome instructor.
And the A for Awesome TAs especially Eric Tridas and Laurel Smith.