# Temperature Regulation of a Liquid

1,023

13

2

Introduction

A friend who would like to make his own beer asked
us to develop a machine that could make a temperature regulation of a liquid, to realize one of the main step of the brewing process.

So, we decided to make this regulation with a deep fryer’s heating resistance. This machine is controlled either with a raspberry Pi connected to a touchscreen or a local control with buttons. The local control is only to set a temperature to reach, while the Raspberry Pi control offers the possibility to select a time while the temperature is maintained. The information collected by the Arduino (temperature, time elapsed) are stored on a database.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Bill of Materials

Controller

We have a Raspberry Pi 3 for the database and the touchscreen. For the actual regulation and sensors/actuators connection, we have an Arduino Uno.

Power

Our main actuator is the heating resistance controlled by a static relay. This static relay allows us to switch on and off an AC power source, with a low voltage DC signal: the low voltage DC signal comes from the Arduino, and the power source is the resistance. The modulation of power is made by changing the duty cycle of the low voltage DC signal: this modulation is made by the Arduino program.

Sensor

The sensor we use to check the temperature of the water is a PT100. It measures the temperature by a variation of its resistance. If we have 100 ohms between the pins of the PT100, it means that the temperature is 0°C. When the water heats, the resistance of the PT100 increases. This resistance is measured by one of the Analog input of the Arduino Uno, through a bridge voltage divider (a power amplifier is used to multiply the voltage across the PT100).

• Arduino Uno
• Raspberry Pi 3
• 7 inch Raspberry touchscreen
• Static relay
• Heating resistance
• Tank
• PT100 Sensor
• Power supply 2.5 A Output
• Potentiometer

## Step 2: Group All Materials

At first, all the materials we need were purchased. We bought most of the materials online. We decided to buy a deep fryer because the heating resistance and the tank can be used for our project. We thought the temperature sensor could be reused, but it was a mechanical one, that could not be connected to our hardware.

## Step 3: All Topics

As we have many separate topics to develop, we decided to divide the tasks between members of our group. These topics will be discussed below:

Website

The website was developed in HTML. Our database is displayed there . Furthermore, the parameters for our regulation loop can be sent to our machine from this website too. To communicate with the database, PHP language is used.

Database

This part was developed with MYSQL. We can view all the past recordings (the temperature and date of our regulation). In industry, it could be interpreted as production tracking. ID, Date and Temperature are the data in the table of our database.

Touchscreen

The touchscreen uses Python language. It is our main control tool, where we can put the parameters of our regulation. Those parameters are the temperature and the time that we want to maintain the liquid at this set temperature. The current liquid temperature is also displayed, as well as the time elapsed since the setpoint temperature is reached.

PCB

We decided to create a PCB (print circuit board). Lots of our electrical hardware parts are connected to it, allowing us to avoid unnecessary wires everywhere.

Communication A-RPI

The commands come from the Raspberry Pi: they need to be transmitted to the Arduino, so that they can be processed. To do so, we developed a communication protocol that uses the Serial port (USB cable) from both our devices. It is the Raspberry who initiate the communication: it requests the information about the state of the regulation, and also sends parameters value to the Arduino.

Manual command

We have a 16x2 LCD screen. This screen serves to display the current temperature and the setpoint selected. A potentiometer changes the value of our Set Point which can also be displayed on this screen.

Power system

This part is designed as a standard regulation loop. The regulator is assured by the Arduino Uno. We use the PID () library with the parameter of Kp, Ki and KD (even if for a thermal regulation, KD is not that useful) . The actuator is the static relay, which powers the resistance. The sensor is the PT100.

Our system works with the command of our static relay as a commanded switch, though a PWM signal with a very long period (5 seconds).

## Step 4: Connection

At last, we connected all of our work together to test our system as a whole, and so that the remaining bugs could be solved (and there were quite a lot of them…).

## Step 5: Conclusion

It was a really pleasant project: there were quite a lot of challenges caused by problem that we could not anticipate, since working with an Arduino and a Raspberry was a first for most of us. But in the end, we managed to fulfil our goals and finish our project in time.

## Recommendations

• ### Internet of Things Class

21,643 Enrolled