Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Brewing Eisbock
with Raspberry PI, Windows 10 IoT and
Microsoft Azure
Gunnar Peipman
Community guy and speaker from Estonia
Agenda
• What is eisbock?
• Freezing beer
• Bringing in IoT
• Reading sensors
• Azure IoT Hub
• Stream Analytics
• Data vi...
Support materials
http://bit.ly/beeriot
What is eisbock?
The Legend of Eisbock
n a w i n t er y day , a br ew er y lad had been i n st r uct ed by t he br ew m ast er t o r oll t ...
Beer
Kulmbacher
Eisbock
Aventinus
Weizen-
Eisbock
Holzfass-
gereifter
Eisbock
Mauritius
Eisbock
Edition 2014
Alc. vol. 9.2...
Freezing beer
Newton’s Law of Cooling
𝑑𝑇
𝑑𝑡
= −𝑘 𝑇 − 𝑇𝑎
The rate of change of the temperature of an
object is proportional to the differ...
Newton’s Law of Cooling
After some math:
𝑇 𝑡 = 𝑇𝑎 + 𝑇0 − 𝑇𝑎 𝑒−𝑘𝑡
where
Ta – ambient temperature
T0 – initial beer temperat...
Newton’s Law of Cooling
• Finding k – measure temperature after 30
minutes again and solve equation for k
(you know t and ...
Newton’s Law of Cooling
• The lower the ambient
temperature the faster is
cooling
• The lower the ambient
temperature the ...
Cooling chart
-10
-5
0
5
10
15
20
BeerTemp AmbientTemp
Problems
• 20l of beer cools down slowly
• I don’t want to open the bucket to avoid
contamination of beer
• I don’t want t...
Solution
Bringing in IoT
What we need?
Raspberry Pi DS18B20
DS2482-100 MS-DIP/SO10 4.7 kΩ resistor
Connecting parts together
Credits: Tomáš Greňo
Windows 10 IoT background task
Read
temperatures
Find cooling
rate
Find theoretical
temperature
Find freezing
estimate
Sen...
Reading sensors
• Use Rinsen.OneWire library
• Use built-in support for DS18B20
• It takes ~1s to read one sensor
• Minimu...
Demo
Reading sensors
Azure IoT Hub
IoT Hub vs Event Hub
Area Iot Hub Event Hubs
Communication patterns device-to-cloud and
cloud-to-device
messaging
Only ena...
Messaging
• device-to-cloud
messages sent to Azure IoT Hub by devices
• cloud-to-device
message sent to device(s) by some ...
Policies
Defines set of permissions for connections that
use given policy
Policy Permissions
iothubowner registry write, s...
Packages
Free S1 Standard S2 Standard
8k messages/unit/day 400k messages/unit/day 6M messages/unit/day
Device to cloud Dev...
Demo
Sending and receiving messages from Azure IoT Hub
Stream Analytics
Input
sources
Query
Output
sources
Component Purpose
Input Event Hub, IoT Hub, Blob Storage,
Query Transf...
Stream Analytics
Demo
Stream analytics in action
Power BI
• Online service for visualizing
enterprise data
• Free accounts available
• Push-data supported by
Stream Analyt...
Demo
5 min data visualization
Excel
• Familiar to many people
• Works with remote data
• Easy to build „live“ sheets
• Powerful data analysis
• Powerful...
Excel
Demo
Excel: 5 minute dashboard for sensors data
Universal Windows Application
• Target Windows 10 devices
• Use Universal Windows
Platform (UWP)
• Use same code for
• mob...
Technical side
• Visual Studio: Universal Windows App
• Communications:
• AMQPNetLite, AzureSbLite
• Web API and Web API c...
Demo
Visualizing sensors data using UWA
On-going work
• Build better support system for measurements
• Adding new temperature measurements
• Solving abv/abw measu...
Thank you!
Brewing Eisbock with Raspberry PI and Windows 10 IoT
Upcoming SlideShare
Loading in …5
×

Brewing Eisbock with Raspberry PI and Windows 10 IoT

25,084 views

Published on

This presentation focuses on real-life IoT system that supports brewing eisbock beer. Sample device is built on Raspberry PI and Windows 10 IoT. It includes also temperature sensors to measure beer and ambient temperature. There is Windows 10 Universal Application that allows to control the process and read metrics from Raspberry PI. Data from Raspberry PI will be later visualized using charts. The presentation goes through all steps of building such solution.

Published in: Software
  • Be the first to comment

Brewing Eisbock with Raspberry PI and Windows 10 IoT

  1. 1. Brewing Eisbock with Raspberry PI, Windows 10 IoT and Microsoft Azure
  2. 2. Gunnar Peipman Community guy and speaker from Estonia
  3. 3. Agenda • What is eisbock? • Freezing beer • Bringing in IoT • Reading sensors • Azure IoT Hub • Stream Analytics • Data visualization: Power BI, Excel, UWA
  4. 4. Support materials http://bit.ly/beeriot
  5. 5. What is eisbock?
  6. 6. The Legend of Eisbock n a w i n t er y day , a br ew er y lad had been i n st r uct ed by t he br ew m ast er t o r oll t he casks of fi n i shed Bockbi er fr om t he br ew er y y ar d back i n t o t he cellar an d t hen close shop. But aft er a lon g day of t oi l i n fr on t of t he m ash t un t he lad w as just t oo t i r ed i n t he ev en i n g t o car r y out hi s m ast er 's or der s. I n st ead, he fi gur ed t hat t her e w ould be n o har m i n leav i n g t hem out si de un t il m or n i n g. That n i ght , how ev er , t ur n ed out t o be bi t t er cold, an d t he beer i n si de t he casks fr oze soli d. The i r at e br ew m ast er , ben t on m et i n g out sev er e pun i shm en t , or der ed t he hapless lad t o cr ack open t he i cy casks an d dr i n k t he aw ful br ow n i sh st uff. The fr i ght en ed lad, of cour se, di d as he w as t old, t aki n g m er e t en t at i v e si ps at fi r st , but t hen i m bi bi n g w i t h ev er i n cr easi n g gust o. I n t he cen t er of each cask -si ze lum p of i ce w as t he m ost deli ci ous, m alt y -sw eet , an d heav y beer i m agi n able. Pun i shm en t , i n deed! The lad w as t he fi r st hum an ev er t o t ast e...Ei sbock; an d bei n g a ki n d an d gen er ous sor t , he let t he ot her s shar e i n hi s "pun i shm en t .„ H appen ed i n R ei chelbr äu br ew y ar d i n t he ci t y of K ulm bach, at ar oun d 1890. O
  7. 7. Beer Kulmbacher Eisbock Aventinus Weizen- Eisbock Holzfass- gereifter Eisbock Mauritius Eisbock Edition 2014 Alc. vol. 9.2% 12% 12% 10.9% Ratebeer 98/100 99/100 91/100 85/100
  8. 8. Freezing beer
  9. 9. Newton’s Law of Cooling 𝑑𝑇 𝑑𝑡 = −𝑘 𝑇 − 𝑇𝑎 The rate of change of the temperature of an object is proportional to the difference between its own temperature and the ambient temperature
  10. 10. Newton’s Law of Cooling After some math: 𝑇 𝑡 = 𝑇𝑎 + 𝑇0 − 𝑇𝑎 𝑒−𝑘𝑡 where Ta – ambient temperature T0 – initial beer temperature k- cooling rate t - time
  11. 11. 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
  12. 12. Newton’s Law of Cooling • The lower the ambient temperature the faster is cooling • The lower the ambient temperature the faster is cooling
  13. 13. Cooling chart -10 -5 0 5 10 15 20 BeerTemp AmbientTemp
  14. 14. 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
  15. 15. Solution
  16. 16. Bringing in IoT
  17. 17. What we need? Raspberry Pi DS18B20 DS2482-100 MS-DIP/SO10 4.7 kΩ resistor
  18. 18. Connecting parts together Credits: Tomáš Greňo
  19. 19. Windows 10 IoT background task Read temperatures Find cooling rate Find theoretical temperature Find freezing estimate Send data to Azure IoT Hub
  20. 20. 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
  21. 21. Demo Reading sensors
  22. 22. Azure IoT Hub
  23. 23. IoT Hub vs Event Hub Area 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/1 Azure IoT Protocol Gateway AMQP AMQP 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.
  24. 24. 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
  25. 25. Policies Defines 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
  26. 26. Packages Free 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$
  27. 27. Demo Sending and receiving messages from Azure IoT Hub
  28. 28. Stream Analytics Input 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
  29. 29. Stream Analytics
  30. 30. Demo Stream analytics in action
  31. 31. 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
  32. 32. Demo 5 min data visualization
  33. 33. 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
  34. 34. Excel
  35. 35. Demo Excel: 5 minute dashboard for sensors data
  36. 36. 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
  37. 37. 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
  38. 38. Demo Visualizing sensors data using UWA
  39. 39. 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
  40. 40. Thank you!

×