Today I made a little HMI for my stove assistant.
For me getting the electronics working is always more exciting than getting all the things together to have a reasonable product. The HMI is one part of this.
I decided to make a browser based HMI because then it is accessible on all computers and smartphones and the implementation has to be done only once.
The user guidance will be similar to what I stated in my first post. The user will start the assistant and then decide what to cook. There will be serveral meals in the database of the assistant. Then the assistant monitors the cooking process and advices the user when to turn the heat up and down. He will also get information how long the process will take and how much time is left. Additinally the user can view the temperature profile afterwards.
Unfortunatelly it turned out that some parts of my project were not realizeable. At least not now and most of them due to time restrictions.
So my assistant will now only support one cooking process at a time. Additionally the lid of the pot hast to be open all the time because until now I am not able to make any assumptions what's happening in the pot when the lid is on. Then I only support simple cooking processes where only one temperature has to be met and kept for a certain time.
But here is how I realize this so far. For me it was very important that the user is able to view his cooktop all the time in realtime. So I set up a video streaming. I decided to use mjpg (Motion-jpeg) since it is supported by nearly all browser and no additional software or codec has to be installed. The images for the stream are coming from my program which I already used in the previous blog posts. The programm saves a jpg-image with camera and temperature overlay to the file system once every second. To prevent the SD card from destruction I use the RAM disk for this. On the Raspberry Pi this can be found under /dev/shm.
This image is read by the tool mjpg-streamer (https://github.com/jacksonliam/mjpg-streamer ) which generates the mjpg-stream. This stream can be included into any webpage and will be displayed by most web browsers.
On the HMI of the stove assistant this should give the user a simple and fast overview over his cocktop.
The HMI is heavily based on the apache webserver and PHP 7. All data is stored in a mysql database. Some data processing is done with php on the raspberry pi. But some other functions like drawing the temperature profile graph or the control of the cooking process that are implemented via java script on the device of the user.
The image and temperature capture programm also determines the temperature in the pot and saves it to the file system every second. There I also use the RAM disk. Another tool reads this value every second and writes it to the mysql database if a cooking process is running. All the further data processing is done with the data in the mysql database.
Walk through the process
Now I will walk you through all the steps of the cooking process.
First the user opens the webpage of the stove assistant in his webbrowser.
Then he clicks on "start cooking" and comes to the menu with all the meals. At the moment there is only one meal to cook: eggs, but I think this is ok for easter time. The process data is: Temperature: 60 degrees celsius (because of the problems with the temperature measurement by the grid-eye sensor); 300 seconds duration.
After another click the process starts. At the beginning the temperature is very low and the assistant advices to heat up and that it is in the heating up process. Also the temperature profile graph starts to be drawn.
After a few minutes the cooking temperature is reached and the timer starts to count down.
Another few minutes later the timer is at 0 and the eggs are ready cooked. It is also stated on the screen of the stove assistant. Additionally the user can also view the temperature profile. There the bend at about 60 degrees celsius where the timer started is very interesting.
I will try to improve the HMI and hopefully get more meals and more complicated cooking processes in my stove assistant.