Brewing Eisbock with Raspberry PI and Windows 10 IoT
-
Upload
gunnar-peipman -
Category
Software
-
view
19.048 -
download
0
Transcript of Brewing Eisbock with Raspberry PI and Windows 10 IoT
![Page 1: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/1.jpg)
![Page 2: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/2.jpg)
Brewing Eisbockwith Raspberry PI, Windows 10 IoT and
Microsoft Azure
![Page 3: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/3.jpg)
Gunnar PeipmanCommunity guy and speaker from Estonia
![Page 4: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/4.jpg)
Agenda• What is eisbock?• Freezing beer• Bringing in IoT• Reading sensors• Azure IoT Hub• Stream Analytics• Data visualization: Power BI, Excel, UWA
![Page 6: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/6.jpg)
What is eisbock?
![Page 7: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/7.jpg)
The Legend of Eisbock
n a wintery day, a brewery lad had been instructed by the brewmaster to r oll the casks of fi nished Bockbier fr om the brewery yard back into the cellar and then close shop. But after a long day of toil in fr ont of the mash tun the lad was just too tir ed in the evening to car ry out his master 's orders. I nstead,
he fi gured that there would be no har m in leaving them outside unti l morning. That night, however , turned out to be bitter cold, and the beer inside the casks fr oze solid.
The irate brewmaster , bent on meting out severe punishment, ordered the hapless lad to crack open the icy casks and dr ink the awful brownish stuff. The fr ightened lad, of course, did as he was told, taking mere tentative sips at fi rst, but then imbibing with ever increasing gusto. I n the center of each cask-size lump of ice was the most delicious, malty -sweet, and heavy beer imaginable. P unishment, indeed! The lad was the fi rst human ever to taste...Eisbock; and being a kind and generous sor t, he let the others shar e in his "punishment.„
H appened in R eichelbräu brew yard in the city of K ulmbach, at around 1890.
O
![Page 8: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/8.jpg)
BeerKulmbacher
EisbockAventinus Weizen-Eisbock
Holzfass-gereifter Eisbock
Mauritius Eisbock
Edition 2014Alc. vol. 9.2% 12% 12% 10.9%Ratebeer 98/100 99/100 91/100 85/100
![Page 9: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/9.jpg)
Freezing beer
![Page 10: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/10.jpg)
Newton’s Law of CoolingThe rate of change of the temperature of an object is proportional to the difference
between its own temperature and the ambient temperature
![Page 11: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/11.jpg)
Newton’s Law of CoolingAfter some math:
𝑇 (𝑡 )=𝑇 𝑎+(𝑇 0−𝑇 𝑎 )𝑒−𝑘𝑡where Ta – ambient temperature T0 – initial beer temperature k- cooling rate t - time
![Page 12: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/12.jpg)
Newton’s Law of Cooling• Finding k – measure temperature after 30
minutes again and solve equation for k (you know t and T(30) both) • Finding t – solve equation for t using k
![Page 13: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/13.jpg)
Newton’s Law of Cooling• The lower the
ambient temperature the faster is cooling
• The lower the ambient temperature the faster is cooling
![Page 14: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/14.jpg)
Cooling chart
-10
-5
0
5
10
15
20
BeerTemp AmbientTemp
![Page 15: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/15.jpg)
Problems• 20l of beer cools down slowly• I don’t want to open the bucket to avoid
contamination of beer• I don’t want to check temperature after
every 30 minutes• I want to have data about cooling• I want to get notified when beer is
turning to sleet
![Page 16: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/16.jpg)
Solution
![Page 17: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/17.jpg)
Bringing in IoT
![Page 18: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/18.jpg)
What we need?Raspberry Pi DS18B20
DS2482-100 MS-DIP/SO10 4.7 kΩ resistor
![Page 19: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/19.jpg)
Connecting parts together
Credits: Tomáš Greňo
![Page 20: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/20.jpg)
Windows 10 IoT background task
Read temperatures
Find cooling rate
Find theoretical temperature
Find freezing estimate
Send data to Azure IoT Hub
![Page 21: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/21.jpg)
Reading sensors• Use Rinsen.OneWire library• Use built-in support for DS18B20• It takes ~1s to read one sensor• Minimum reading interval: number of
sensors + 2 seconds
![Page 22: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/22.jpg)
DemoReading sensors
![Page 23: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/23.jpg)
Azure IoT Hub
![Page 24: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/24.jpg)
IoT Hub vs Event HubArea Iot Hub Event Hubs
Communication patterns device-to-cloud and cloud-to-device messaging
Only enables event ingress
Device protocol support AMQP,AMQP over WebSockets, MQTT, HTTP/1Azure IoT Protocol Gateway
AMQPAMQP over WebSockets, HTTP/1
Scale Is optimized to support millions of simultaneously connected devices.
Up to 5,000 AMQP connections, as per Azure Service Bus quotas.
![Page 25: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/25.jpg)
Messaging• device-to-cloud
messages sent to Azure IoT Hub by devices • cloud-to-device
message sent to device(s) by some service or process, delivery feedback is supported
![Page 26: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/26.jpg)
PoliciesDefines set of permissions for connections that use given policy
Policy Permissions
iothubowner registry write, service connect, device connect
service service connect, device connext
device device connect
registryRead registry read
registryReadWrite registry write
![Page 27: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/27.jpg)
PackagesFree S1 Standard S2 Standard
8k messages/unit/day 400k messages/unit/day 6M messages/unit/day
Device to cloud Device to cloud Device to cloud
Cloud to device Cloud to device Cloud to device
1 unit 200 units maximum 200 units maximum
FREE 50$ 500$
![Page 28: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/28.jpg)
DemoSending and receiving messages from Azure IoT Hub
![Page 29: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/29.jpg)
Stream AnalyticsInput
sources Query Output sources
Component Purpose
Input Event Hub, IoT Hub, Blob Storage,
Query Transforms input to out during given time window
Output SQL database, Blob Storage, Event Hub, Power BI, Table Storage, Service Bus Queue, Service Bus Topic, Document DB
![Page 30: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/30.jpg)
Stream Analytics
![Page 31: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/31.jpg)
DemoStream analytics in action
![Page 32: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/32.jpg)
Power BI• Online service for
visualizing enterprise data• Free accounts available• Push-data supported by
Stream Analytics • Build impressive BI
dashboards and reports• Clients: web, desktop,
mobile
![Page 33: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/33.jpg)
Demo5 min data visualization
![Page 34: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/34.jpg)
Excel• Familiar to many people• Works with remote data• Easy to build „live“ sheets• Powerful data analysis• Powerful data visualization• Poor man’s Power BI
![Page 35: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/35.jpg)
Excel
![Page 36: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/36.jpg)
DemoExcel: 5 minute dashboard for sensors data
![Page 37: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/37.jpg)
Universal Windows Application• Target Windows 10 devices• Use Universal Windows
Platform (UWP)• Use same code for• mobile• desktop• IoT (screen solutions)
• Cooling process in your pocket
![Page 38: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/38.jpg)
Technical side• Visual Studio: Universal Windows App• Communications:• AMQPNetLite, AzureSbLite• Web API and Web API client
• Visual• WinRTXamlToolkit Chart• VisualStateManager
• Reading data• Background timer processes
![Page 39: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/39.jpg)
DemoVisualizing sensors data using UWA
![Page 40: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/40.jpg)
On-going work• Build better support system for
measurements• Adding new temperature measurements• Solving abv/abw measurements problems• Find a way to move to SaaS model
![Page 41: Brewing Eisbock with Raspberry PI and Windows 10 IoT](https://reader034.fdocuments.net/reader034/viewer/2022042706/589e7ca91a28ab300b8b66b3/html5/thumbnails/41.jpg)
Thank you!