Finally, our project is fully functional !
- Kris managed to resolve a bug between the webpage and the Raspberry (via the python script). This bug was blocking him for several days, and in the end it was a simple error in the request sent to the webpage…
- Matthieu managed to solve the communication problem between the Raspberry and the Arduino. It was the stupidest thing: when initiating the serial communication on the python script run by the Raspberry Pi, the Arduino resets itself. Since our communication tries started right after the python serial initialization, the Arduino was not ready to communicate, causing the data transmission to fail. A simple delay between the initialization and the first transmission solved the problem : the rest of the work was working flawlessly !
- With both communication solved, we were able to test the whole project. After some hard debugging, everything is working now : the setpoint can be changed from a potentiometer, from the touchscreen’s graphical interface, or from the webpage. And the current temperature can be read from the same devices too.
With our project working, we started to write the instructable, and to film the short video presentation. We still have a couple of days before the final deadline, everything should be fine !
the links for the Instructable:
NAd the video:
We managed to achieve a lot of things during this week.
- The whole hardware has been integrated into a wooden box, mostly to avoid any risks with the wires. Even if a PCB was made to reduce the amount of cables needed, there are still a lot of them.
- The PT100 temperature reading was already working, but the resolution was very poor: 2.5 °C. It was due to the fact that the voltage change was very low, too low for the analog input of the Arduino (0-5V for 1-1023 bit). To resolve this issue, an amplifier is used to multiply the voltage across the PT100 by 8. This way, the resolution went from 2.5 to less than 0.5 °C, which is just enough considering the goal of our project.
- The LCD screen part was (connected to the Arduino) completed. It allows to display the current temperature and the current setpoint, which can be changed via a potentiometer.
- With both the LCD screen and PT100 working, we were able to complete the Arduino part of the project. The whole system can be driven by it.
- The communication between the Raspberry-database-website-Arduino is still in progress, but it should be done next week!
Our project is nearly finished. We still need to make a final test, but it shouldn’t take too long !
We did a lot of work this week:
The temperature sensor is now operational : it is connected to the arduino on one of the analog input. After a conversion from bits to voltage to resistance , we can finally obtain the temperature of our brewery process.
After this, and using the previous work regarding the PWM generation, we successfully tested the whole regulation : the deep fryer was driven by the solid state relay, that was itself driven by the Arduino. Using a PID library, we were able to heat water at the desired temperature, even if the accuracy was not perfect. Depending on the time remaining, we may be able to correct this. After debugging the (stupid) errors, it worked perfectly !
A lot of work has also been done regarding the communication, mostly on the Raspberry. And it will still need some investigation, even if a basic communication is already working.
The Mysql database is also working, on a local server on the raspberry. As well as the webpage.
The graphical interface is also nearly complete: we just have to allocate the different variable to the correct application.
We still need to put everything together, which will require quite a lot of time. But we are very confident about the deadline.
Several key steps were achieved since the last time we wrote about our project:
Firstly, we checked if the gear we want to use is functional (aka the deep fryer to heat water at a specific temperature) . We also finished part of the circuitry board, that will contain most of the electrical components of the power managment
Secondly, we defined and tested the communication protocol that will be used between the Raspberry and the Arduino. Two functions are already working for the Arduino board, but the Raspberry’s side is yet to be done.
Thirdly, we managed to create a PWM output with a long period on the Arduino board: since we want to regulate a thermal process, which is slow by nature, there is no need to have a high frequency on the PWM output that will be used to control the resistance’s power. On top of that, we are using a Solid State relay to manage the Alternative current : this relay will cut the current only when it is at 0A (since we are on a 50Hz alternative current with a simple resistance, it will occur every 20ms). No need to have a PWM way faster than 50Hz, since it’s the fastest switch speed we will achieve in the end.
There is still a lot to be done, but we will get there, little by little !
This week, not a whole lot of progress : our components are delivered little by little, but we are still missing a couple of raspberries to be able to work on our own at home.
During the first hour of class, we had to present our project: there are a couple of points that are very similar to other projects of the class, meaning that we should try to work together.
After that, we tried to use the touchscreen we received : sadly, since the raspberries’s software from school aren’t up to date, it didn’t work as we planed.
Since we are going to program in Python, we started on learning a little bit more about this language. Kris also managed to install an Apache server. Matthieu worked on the communication between the Raspberry and the Arduino board: it was working, but not completely : this will need to investigate a little more.
Regarding what we plan to do next, we will continue to work on our separate part of the project: in a couple of hours, we should have advanced enough so that we can start to think how we cold put everything together. Thsi will certainly ba one of the most challenging part of our project !
This week, each of us started working on a different part of our project.
Mikail started by doing some research regarding PID regulation using an Arduino. There is already a library that allow to easily implement such a function; we will need to make some tests.
Jordan wanted to work on the graphical display; since we didn’t receive the touch screen yet, he managed to find some information regarding how to install the required driver. He also will have to choose a program to create a graphical interface.
Kris wanted to install an Apache server on the Raspberry Pi; sadly, since there are no Wi-Fi module on the Raspberry pi 2, he wasn’t able to do much during the lab. He will have to install all that’s required at home, with a decent internet connection.
Matthieu started to follow a python tutorial specifically made for Raspberry, since he doesn’t have any knowledge in this programming language. He still have to work on the communication between the Raspberry and the Arduino
Arthur made some research on how to program an app on a smartphone, and make it communicate with the Raspberry via Bluetooth
We were not able to achieve a lot of our goal: since we could not connect the Raspberry to the internet. Nevertheless, we know what we need to do, and when we receive our Raspberry boards, we will be able to work at home too!
This week, since we didn’t had a lab session, we focused our attention on planning for the tasks we will need to perform. We also checked the components of the deep fryer we bought for our project.
We were hoping that this apparel was using a temperature sensor of some sort, either a CTN or CTP. Sadly, it uses a bulb thermostat, which doesn’t provide an information regarding the temperature of the oil, that we could exploit with the Arduino board.
Knowing that, we finalized the list of components needed for the project. It includes a solid state relay, that will allow to modify the power dissipated by the resistor. We also will be using a PT100 borrowed from the electronics lab for the duration of our project.
Regarding the task planification, we divided the work as follow: since we are still at the beginning of the project, there is still a lot of research needed
Mikail will be working with the Arduino to see how we could regulate the temperature
Matthieu will work on the communication between the Raspberry and the Arduino
Arthur will check how we could use Bluetooth to communicate with the Raspberry from a Cellphone
Jordan will investigate the graphical interface that we will use on the touchscreen
Kris will study how we could create a local server on the Raspberry, to be able to put a database there.