 Hello everybody I'm Christian. I'm self-employed hardware and software developer and I'm also research scientist as a research company but I'm really happy to be here today to talk about my hobby project actually which is Combining brewing beer and brewing electronics. So I will present to you Bruce My setup for brewing beer with Zephyr Android and things board So here's a small overview of my presentation. So I will first start with why am I doing all this Then I will give you a small introduction into brewing beer I guess there are many hobby brewers among us, but still I will give a short overview of the process of brewing beer Then I will talk about the first steps. I made towards Creating this setup then also talk about why Zephyr and finally present the architecture of my setup So start with why so brewing beer or beer is one of the oldest cultural beverages around so beer humans already brew beer for thousands of years and now you might ask yourself Why am I showing this piece of papyrus? So this is actually Papyrus and the red and the reddit last week and the news in An online news portal Because the University of Graz actually discovered that this piece of paper was part of a book and Which make which makes it to the oldest known page of a hardcover book Why is this interesting? because this piece of paper Contains text about beer and it stated back to 300 PC Just for some clarification, this is actually some tax information for beer. So from the ancient Egypt's But still you see that brewing beer and drinking beer is already among us for quite some long time and And Why am I doing all this and this is actually the reason so I brought this bottle of home made safer pills So now imagine you're going to the embedded open source Conference to the embedded open source summit and you can bring your own homemade beer to the conference And you already see this sparkling eyes. I see already the sparkling eyes around you But this is actually pretty nice not only for the embedded open source summit, but also if you brew beer at home and you bring it to birthday parties or to weddings or whatever everyone is happy to try out some homemade beer How did it actually started so actually the beer brewing so my dad started brewing beer about 20 years ago My dad is teacher and he actually brewed beer in school with his students I need to tell you that I need to tell you that my dad teaches or my dad was actually teacher for the gastronomy and he taught about beverages and drinks and brewing beer is also part of it and this is the reason why they also Did some beer brewing back then and I actually didn't know this for quite some long time until he celebrated his 50s birthday And he made a batch of homemade beer and actually didn't know that he brews beer in school And this was then the time when I jumped in 15 years ago And ever since we started brewing beer. I always wanted to automate the process. So I'm Informatics guy always do automation of stuff So that's actually one of my motivations and brewing beer to also create my own setup Which actually does all the process So here's a small overview and on the processes that are actually necessary to brew beer So the brewing beer process is actually divided into those Those steps of your first start with the mashing process and I will get back to the mashing process Right in the next slide then after the mashing process you have the lottering process This is the process where you actually separate the grains from the liquid then you have the boiling process where you add in some hops for flavor and Finally you have the fermenting and the conditioning process. So those steps are actually necessary And then you have some optional Processes that are normally done in big breweries. So home brewers normally do not do the filtering and packaging stuff but as already said the most important processes are those five over there and The mashing process is actually the process which is Really interesting because this is the process where you extract the starch from the malt And dissolve it into the liquid because if you want to make beer you need some starchy liquid for the for the yeast in order to in order to Convert the starch into alcohol and CO2 and This is done by activating enzymes in the malt and those enzymes in the malt are Activated at different temperatures. So they are temperature dependent Which means that you need to hold certain temperatures for a defined period of time in order to give the enzymes the time To extract the starch from the malt and dissolve it into the water and You of course need to heat up all this stuff somehow and when we first started brewing beers, we did it all manually and we did it with a very Strange setup, but then at some point I actually chose to get one of those induction cookers which are very famous among beer brewers It's a 3.5 kilowatt induction cooker with a manual control knob And the reason is because it's actually pretty strong. So it had 3.5 kilowatts and we can make up to 50 liters of beer and It it's actually Works pretty fast. So as soon as you heat it up it gets heated up really fast And if you cool it down or if you switch it off, then it also cools down pretty fast And this is actually pretty nice to control the process So the induction cooker helps me to heat up the mesh And you can do it manually and many people do it actually manually But the problem is that doing it manually is a little bit hard because you take measurements every now and 10 and then you actually adjust the potentiometer and then you're too hot and then you're too cold and it's Tough process actually And this also affects the consistency because if at some point you're very Satisfied with With one of your recipes you want to repeat it all the time And in order to repeat it all the time. It's actually Nicer to do it automatically with a process that do it does it actually pretty in a stable manner So in order to do or to implement my own Control Brewing brewing setup. I said, okay, let's reverse engineer the induction cooker So I made this list. I said, okay. What do you need to do? I need to identify the control unit I need to identify the controller itself read out the flesh and then reverse engineer the flesh Sounds pretty easy So this is the inside of the induction cooker and Figuring out the control unit is actually not that hard. So you do not have too much chips on there. So it's the chance that you're actually choosing the right one is is is pretty high and after some Uh Some some closer look to the devices. I found out that this guy over there is actually the microcontroller who does all this stuff um What you do not see in this picture is actually the manual control knob over there because it's mounted on On the on the cooker itself and after some Reading out of this of this controller. I've figured out that this is some samsung s3 f 9 4 whatever microcontroller So the first steps are already done. So I figured out the the control unit I identified the control unit The identified the controller then the next steps are reading out the flesh and reverse engineer the flesh So I took the controller tried to read out the flesh I got only zeros because of course they're protecting their flesh Uh, so reverse engineering the flesh is also not possible anymore. So uh, my first attempt actually failed Um, then I took the datasheet of the controller. I did some measurements on on the board and uh, the next idea was actually to Reverse engineered a little bit differently So in actually what I actually wanted to do is to connect a logic analyzer to the controller and record the control unit um So I connected a logic analyzer Uh, and then uh, I wanted to control or record the control unit. I plugged in The induction cooker and it was gone Why because I didn't notice at this time, but the ground is somehow connected to earth And I killed the induction cooker So I had to get a new main PCB for the induction cooker because it was still motivated to do it So uh, recording the control unit wasn't possible anymore. So let's get back to this To this PCB to this uh, main board my next idea was actually to have a look about Have a look at this part. So this is actually the human machine interface or the human interface device Because we have this seven segment display over there and we have the manual control knob and they are connected to the main PCB Over there about this uh over this connection and I thought okay. Why not just reading out this stuff and doing it in this way This was actually done also pretty fast. So I figured out that I have the ground. I have five volts and I do have two pins over there where I get the The the the signal to switch it on and off and I get this analog signal for the power input to the to the device All right, so I started with all this knowledge and tried to make up a prototype with a Raspberry Pi So I tried to build up some uh, a basic setup. I used the breadboard. I used GPIOs to switch on and off The induction cooker and I tried to create some digital to analog converter to control the power But the problem was that with the breadboard and all the setup. It was really not practical. Um, so uh, this I was not really happy with this setup And then now I need to tell you a love story and it's not the love story when I fell fell in love with my wife It's the love story when I fell in love with sefer. So As I already told you so I'm now working as a research scientist in austria But back then I was also working as a research scientist at vienna university of technology and I was working on um smart farming projects in a big european project and we had a partner in austria chip company or a sensor manufacturer Who told us that they just recently bought another company and they had some nice chip and if we would like to Use this chip and I said of course send me samples. I'm always free for samples. I always want to try out different things uh, and this was actually called assembly and uh, it was programmable with an Arduino IDE and with the setup and loop control I Pretty fast got stuck with all the stuff. So I needed another way and I figured out that in this simply they actually used an nrf 51822 And then I tried to figure out a way on how to program it differently And that's the that's that was the time when I actually tried out sefer for the first time and then I developed with sefer and the thing when I actually fell in love with when uh, when I Got stuck with the bluetooth stack and I was online writing to some developers and slack Told them about my problem and within 24 hours I got a solution and that's why I was blown away and was like, oh, wow A wheel stick with this rts forever So, uh, the idea was to now take this simply stuff and put it into this pcb Um, so this is the ideal. So I come from The the human machine interface Get into and uh, designed board and get better afforded to The main pcb And then additionally because I also need to control the mesh The mashing process. I need a temperature probe. Uh, and I wanted to control the A temperature sensor as well. So this was the first prototype with the simply As I already told you it's based on an nrf chip. I had this rc network With an pwm making the dac And I added a type k thermocouple with this max 31855 chip in order to Read the temperatures and I also had some three volt to five volts Voltage level voltage converters Uh, so I set everything up. I had the electronics in the cooker Uh, I created some android app that actually controls the stuff Uh, I get I got to the power cord plugged in the induction cooker and it was gone Uh, what I didn't realize or what what I what I didn't think about is that the type k thermocouple has a metal uh shielding and the metal shielding actually was connected to To the induction cooker and it was connected to earth and everything blew up again And my father told me for the tense time. Why don't we just buy Ready to use beer brewing setup and that was already so deep into this and I already invested so much money That I couldn't get back anymore So I had to get up with a new setup and the new setup was actually with a remote temperature probe So I'm just having the control unit inside because this actually worked Okay, uh, and I just need to get the reading somehow So I created some remote temperature probe and uh the app or a pc whatever you're using Connects to the temperature probe and to the induction cooker and does all the process So the cooker hardware the new cooker hardware that are built up here So the new revision is based on an n r f 52 8 40 Uh, I added an operational amplifier for this digital to analog conversion stuff because I had problem with the old version I removed the thermocouple. I didn't want to connect it anymore to the to the housing of the uh cooker Uh, and this is actually the pc beat I finally came up with so I can connect it into the induction cooker I can also connect the manual knob so I can connect it also control it manually And we have bluetooth low energy with an pc or an app Then the temperature sensor was based on the simply because I had some more simply lying around I took this type k thermocouple stuff From the induction cooker controller to this remote sensor. So I put a max three one eight five five To this board. I added some battery manager some battery management because I'm now Not connected anymore. So I need battery and also to charge the battery somehow And this is actually I call it the snake This is actually the temperature probe. So there's the simply inside and the max three one eight five five With the thermocouple over there measuring the temperature So this was the setup it works pretty well, but if you're brewing beer you also need to somehow Move around the liquid because if you heat up just on the bottom over there It gets hot pretty fast down there, but not up there and in order to also Get some movement into the mesh Uh, I added some another controller. So this is actually a controller that controls 230 volts In order to switch on and switch off a pump as typical Beer brewing kids Are doing this So I have those three devices connected to my smartphone app The pump control I got a little bit away from from designing my own pcb's and soldering my own pcb's So I used and ready to use particle argon or xanon whatever was available at the time But basically it's still the nrf 52 840 It's connected to a solid state relay which switches on and off 230 volts and I also have an additional knock here 51 10 display because I had so much lying around at home. That's the only reason I actually do not need it for switching on and off the pump But I mean it's still nice if you see some icons over there Um, so this is the hardware I programmed the driver for the Nokia display Programmed anything else and you see the particle argon Here in the background And this is actually works also pretty nice so you can I think control up to 1.2 kilowatts with the solid state um So solid state relay, but the pump anyway just consumes 6 30 watts or 60 watts. So it's not that much All right, and this is my final setup And it works I didn't kill any any any other Induction cooker so far But what I still wanted to add is some possibility to also remotely Monitor all this stuff and because I was already using An android phone and already had set up a sink sport instance. I thought why not also creating a sink sport dashboard And I commit or send all the information with mqtt to a sink sport instance to also remotely monitor all This setup and of course all of the hardware that I'm using here in the induction cooker in the remote sensor And also in this 230 volts which Run the sefa operating system um The bruise android app. So it's a native android app written in java It connects to the cooker it connects to the sensor and connects to the pump And this is actually used to control the mashing process um It sends all the data with mqtt to sink sport And this is how it actually looks like So you have this smartphone app and you can actually Just add your own recipe. So this is the recipe for this beer. So it's a pills recipe So you can enter in your target temperatures. You can enter in your target times You just hit play it connects to the cooker it connects to the remote temperature And uh, it does all the mashing process automatically and This is also the the the chart from the beer I made over here So as you can see it works quite okay. I know that the Values for the pod controller are not yet optimized So there is room for improvement and this is actually the point where the automatic mashing process ends and where the Boiling process or the the lottering and boiling process keeps on going So you see the power of the induction cooker over the time You see the green line is the set point temperature. The blue line is the actual measure temperature and This actually works quite stable now. I'm still surprised. Uh, but anyway, I'm happy with it The question is why did I use this setup? Um because uh People could also say why i'm not connecting from the cooker hardware to the remote temperature to make everything in a more or less closed loop setup Well, that's actually a good point But this setup is actually an easy to understand iot setup and the reason why I did it this way is because the debugging of the android app is a little bit easier because every time I wrote a new firmware for The cooker hardware. I had to disassemble the cooker. I had to take it out because I didn't want to touch it with the 230 volt and all the And and and the earth and everything else. So I already killed enough induction cookers So I just wanted to state in the cooker and just Control it and that's actually it and with the android app I was then able to just write a new app update the app update the control process And this made it actually a little bit easier to Debug all this setup Uh the controlling directly from the cooker is possible. I already worked on it. It's still not implemented So I started implementing it But it's still not finished. But I hope that I can at some point also finish it because until now I always need to take my smartphone and Then the whole controlling process stops That's also not pretty nice. And if people try to call me It's also a little bit different difficult to talk to them while my smartphone is is doing the mashing process Uh, so I tried to do this To do all the controlling directly from the cooker to also add some over the air updates I think that would make a lot easier for me But until now I'm having this setup Um, here's a video of the whole process. So this is also the video I shot when brewing this beer and I have the last two bottles of dispatch with me Um, so if you want to try it first come first You can of course try it. So you see the uh the induction cooker in this video. You see the temperature sensor Um, then we also have this remote controlled switch with Where the pump is actually connected to and the smartphone and as you will see here This is actually so I also have some other modes in the smartphone app to actually adjust uh A constant temperature for example, but in this uh in this state We're using a profile mode. So I'm entering 55 degrees and I want to hold it for 15 minutes And then I can actually enter in all the information And you see you have 64 Degree Celsius for 40 minutes 72 for 20 minutes and 78 for 20 minutes. So this is a typical pills recipe And then in the background you also saw that already the induction cooker started doing some stuff on the seven segment display then as soon as the as the induction cooker got gets activated also the pump gets activated and Uh, that's it for now. And the next thing that I'm working on Is controlling the fermentation process because with controlling the fermentation process You actually also need to measure the temperature to keep the temperature Of the liquid at some predefined levels It's also nice to measure the original wort. So the amount of sugar and starch you have in your Liquid in order to know how much of the of the starch has already been Converted into alcohol by the yeast And I would like to control it with uh to also to control the fridge or a heater depending on uh, What what kind of beer you do you're using and I can already use this or do this with the 250 volt switch which then connects to Some temperature and original wort probe that already built but still was not enough time to to make it work also correctly And finally what I also would like to do is to automate the bottling process because after you did all the fermentation You need to fill it into those nice bottles and you also need to add some of A starchy liquid in order to give the yeast some more Starch in order to create all the co2 and the carbon dioxide to also develop a lot of flavor So now I need to check Okay, because I still have a lot some some more time I can show you what already implemented so far for the fermentation process So already created a board which is equipped with an imu Which measures actually the tilt so I'll have it in the next slide Because this tilt gives us the information about the original wort And this is actually used to track the fermentation and with this board I actually want to connect this board then to the pump and fridge control, which is the 230 volt control And this is actually the idea behind it. So if you have Liquid which very starchy liquid with a lot of starch and sugars in it You have a high original wort and then this device over here starts to swim on top and as soon as the fermentation process starts and The the starch is getting less and less it starts to tilt towards This position so, you know, you have a low original wort and you can actually use this information to know how much of the starch has already been fermented by the yeast This is the board already designed Where everything already works. I still need to combine everything together to also have it into a nice Uh setup with the control of the fridge and a heater, but there is actually just It's also an nrf 51 840 Connected with an imu to be honest. I currently don't know what imu i'm i'm using but it works I also have a temperature sensor inside and um This already did some some experimentation, but there is still some improvements That I need to do to also make the controlling of the process All right now i'm at the end of my presentation and If you would like to talk about this project if you would like to get to know this project Already started creating a documentation do not expect too much until now if you want to get some more information Put pressure on me. I will update the information as soon as possible So on bruce.here.zone you can find the documentation I made the hardware for the cooker And the thermocouple already available on github But you can find the links on this website They are sold a pet license. So everyone is free to use it and and build their own Set up and if you want to get in touch with me you can Get Get in touch with me on linkedin or github or write me an email put some pressure on me And I will hopefully release more of this information as soon as possible So that's it from for me. Uh, if you have any questions Now's the time to ask Uh, so the question was if I considered um using a step motor to control the knob Um to be honest, I didn't I don't know I From the beginning on I just wanted to take everything apart and make it somehow in in the hardware itself Uh, but this would be But this would be of course A maybe less expensive option So the question was if I already considered because filling in the water into the pot is still a manual process And you're right. Uh, and the question was if already considered, um Making this also automatically to fill in the water automatically. I'm not yet So there are still a lot of things that you need to do manually The mashing process is one of I think the most important one because you have to control the temperatures over A predefined period of time. So, uh, that's that's why I started with the With the mashing process and I'm still working on maybe if I have enough time I will do it also, but we're getting the water from a neighbor who has Who has his own? Well, and so we're not using tapped water, which also makes it not very practical So I could probably use a pump for example and then pump it into the pot, but that's Well, I already have a pump. Maybe I could just connect But but I did not consider it so far, but maybe if I have 15 more years There's still room for improvement Okay, so the question was if I already was thinking about not just Controlling the temperature with a temperature sensor, but controlling More or less all the mashing process with actually Reading the the amount of starch that has already been dissolved That's actually a pretty nice question. And I was talking about About this with some other people just A couple of weeks back the problem is I do not know how to Measure the The starch in the water during the the mashing process because this gets up to 80 degrees Celsius And I do not want to have this tilt sensor in this starch in this in this liquid Heating it up to 80 degrees Celsius So maybe there's another possibility to Get some sensors that actually measure They already dissolved starch. I didn't have enough time to to look up if there is something like this But this is actually a pretty nice question. And if I get a sensor, then it's probably worth trying Okay, so the first question was actually if I'm considering cu2 that actually Is Created during the fermentation process. So yes, I was already considering it and The thing is that I'm already planning to create some kind of a small Vibration motor so that the vibration motor more or less shakes off all the all the small bubbles that are Created during the fermentation process and then read the measurements So this would be one possibility because you're right if you have the cu2 coming from from the bottom it might change the measurements and the second question was The battery the battery life and I'm having a lithium-ion battery with 2600 milliamps inside because I also need it for the weight That's one reason why I chose it And and I think I could measure it for a couple of months So this is actually so I do not need to recharge it during the fermentation process and the fermentation process just takes one week So it takes about one week until one to two weeks Until the fermentation depending on the yeast you're using until all the starch from from the liquid has been converted into alcohol So there is enough Battery available for all this fermentation process What did what was Which sensor The ice spindle sensor Well, I started creating it from scratch because there is this ice spindle project and they are actually patented patented this process Well, actually it's I think that the first company was tilled to actually made this and ice spindle is also another open source project Based on wi-fi, but I built all this hardware from scratch and also soldered it myself but the drivers for all the for all the Sensors that i'm using I think they're already all pushed to the sefer project because Fun story the max 31855 so I wrote the driver for the sensor I opened up a pull request in I think it was in 2020 And it wasn't merged and at some point also Didn't follow up on the progress of it and just a couple of weeks back. I thought about okay. Let's check If there was already another person who implemented the driver for the sensor And then I saw that it was already implemented, but another person and thank you for that Took my code and actually pull created a new pull request and then it got merged. So the That the driver for the max 31855 is already in the sefer project and I think the other driver as well All right, so if there aren't any more questions, thank you very much for your attention and If somebody wants to try it as already said it's first come first serve those are the Last two bottles of the beer I made in the video Thank you