Text
Page: 1
mruby/c: IoT system for
๐ถ SAKE brewery ๐ถ
HASUMI Hitoshi @hasumikin
Monstar Lab
SWEST21 โจโจโจ ไธๅๆธฉๆณ ๆฐดๆ้คจ
Sep. 6, 2019
Page: 2
Me
HASUMI Hitoshi
@hasumikin
Matsue city,
a holy place of Ruby
Sake ๐ถ
Soba ๐
Coffee โ
Page: 8
ๆญๆฅ้
้
one of the best Japanese Sake brewery
Asahi-shuzo and I make an IoT system using mruby/c
Page: 9
Asahi-shuzo
ๆญ้
้ (Asahi-shuzo), Yamaguchi: ็บ็ฅญ(Dassai). fruity,
aromatic and sweet
ๆๆฅ้
้ (Asahi-shuzo), Niigata: ไน
ไฟ็ฐ(Kubota). clear,
dry and sharp
ๆๆฅ้
้ (Asahi-shuzo), Fukui: ๏ผ๏ผ๏ผ
ๆญๆฅ้
้ (Asahi-shuzo), Shimane: ๅๆญๆฅ(Juji-Asahi).
tasteful, mature with years and good for ใ็(warmed
style)
Page: 10
What is mruby/c?
Page: 11
What is mruby/c?
github.com/mrubyc/mrubyc
yet another implementation of mruby
`/c` symbolizes compact,
concurrent and capability
especially dedicated to
one-chip microcontroller
Page: 12
mruby and mruby/c
mruby
v1.0.0 in Jan 2014
for general embedded
software
RAM < 400KB
mruby/c
v1.0 in Jan 2017
for one-chip
microcontroller
RAM < 40KB
Page: 13
About my IoT project
IoT system for Asahi-shuzo
delivered to actual brew work in January 2018
devices post temperature of Sake materials in brewing,
surrounding temperature and humidity to server
data is displayed on smartphone app
Page: 14
About my IoT project
Page: 15
What is "taking temperature" ?
Page: 16
what is "taking temperature" ?
Page: 17
what is "taking temperature" ?
Page: 18
1st season (2017BY)
Page: 19
1st season (2017BY)
before mruby/c
Page: 20
1st season (2017BY)
Page: 21
1st season (2017BY) architecture
sensortags ->(BLE)-> gateway
gateway ->(WiFi)-> router
router ->(3G)-> internet
Page: 22
1st season (2017BY) architecture
sensortags ->(BLE)-> gateway
gateway ->(WiFi)-> router
router ->(3G)-> internet
Having a stack of multiple wirelesses is so hard
๐จ
Page: 23
1st season (2017BY) architecture
Page: 24
1st season (2017BY) architecture
่ถ
ใใใใชใๅฃ
Page: 25
1st season (2017BY) architecture
a thick wall
BLE couldn't through the wall
water everywhere
power suppply issue
number of instrument should be minimized
Page: 27
BY?
Brewing Year, from July to June
in Asahi-shuzo a BY work starts on November and
finishes on April (depends on year)
Page: 28
2nd season (2018BY)
Page: 29
2nd season (2018BY)
A N E W H O P E
Page: 30
2nd season (2018BY)
m r u b y / c
Page: 31
2nd season (2018BY) architecture
devices ->(3G)-> Internet
Page: 32
2nd season (2018BY) the device
Page: 33
2nd season (2018BY) architecture
Page: 34
2nd season (2018BY) architecture
Page: 35
2nd season (2018BY) mruby/c
mruby/c does everything
sensors - I2C, ADC
Fixnum, Float, Math
7seg LED display - transistor array
String, Mutex
3G communication module - UART
String, flow control
Page: 36
2nd season (2018BY)
what were difficult about mruby/c?
we can neither do step execution nor look into
appropriate memory address of mruby/c's variables
so many troubles in IoT
hard to find why the application doesn't work well
Page: 37
2nd season (2018BY)
what were difficult about mruby/c?
mruby/c was growing
bugs, lack of features, docs and examples
Page: 38
2nd season (2018BY)
so, was mruby/c bad?
Page: 39
2nd season (2018BY)
so, was mruby/c bad? - NO
IoT at work makes you hurry
you have to go back and forth between dark 10โ storage
cellar and humid 35โ manufacturing room
you have to amend your firmware with your small laptop in 10
minutes
you will thank Ruby's descriptiveness and agility
Page: 41
3rd season (2019BY)
Page: 44
Technology stack of IoT (1/2)
TCP/IP
cloud service
RDB and KVS
server programming
mobile programming
security
test
Page: 45
Technology stack of IoT (2/2)
high school physics electricity and transistor
microcontroller and peripherals like UART, I2C, ADC,
etc.
circuit and PCB artwork
soldering and wiring
3D CAD for housing
suppliers
firmware programming
Page: 46
Summary
mruby/c
mruby/c
mruby/c
mruby/c
Page: 47
Summary
mruby/c is a Ruby for microcontroller
mruby/c
mruby/c
mruby/c
Page: 48
Summary
mruby/c is a Ruby for microcontroller
mruby/c runs on Asahi-shuzo
mruby/c
mruby/c
Page: 49
Summary
mruby/c is a Ruby for microcontroller
mruby/c runs on Asahi-shuzo
mruby/c can be ensured by test
mruby/c
Page: 50
Summary
mruby/c is a Ruby for microcontroller
mruby/c runs on Asahi-shuzo
mruby/c can be ensured by test
mruby/c is ready