Fr ee as in Free Beer Or, the foundations of civilization Gr eg - - PowerPoint PPT Presentation

fr ee as in free beer
SMART_READER_LITE
LIVE PREVIEW

Fr ee as in Free Beer Or, the foundations of civilization Gr eg - - PowerPoint PPT Presentation

Fr ee as in Free Beer Or, the foundations of civilization Gr eg gr oggy Lehey grog@FreeBSD.org grog@NetBSD.org Melbour ne, 24 May 2008 Fr ee as in Free Beer 1 Greg Lehey, 24 May 2008 Have a beer! Beer has been around for


slide-1
SLIDE 1

Fr ee as in Free Beer

Fr ee as in Free Beer 1 Greg Lehey, 24 May 2008

Or, the foundations of civilization

Gr eg “gr

  • ggy” Lehey

grog@FreeBSD.org grog@NetBSD.org Melbour ne, 24 May 2008

slide-2
SLIDE 2

Have a beer!

Fr ee as in Free Beer 2 Greg Lehey, 24 May 2008

  • Beer has been around for ever.
  • Earliest records in Sumeria at the dawn of civiliza-

tion.

  • Made from the same ingredients as bread.
  • How was it discovered?
slide-3
SLIDE 3

Ancient diets

Fr ee as in Free Beer 3 Greg Lehey, 24 May 2008

  • Ancient man was nomadic.
  • He hunted, ate grass, roots and leaves.
  • The best part of the grass is the seed.
  • Seeds are hard.
  • Primitive man had difficulties to soften them for eat-

ing.

  • Milling won.
  • Boiling was another option (gruel).
slide-4
SLIDE 4

How beer was discovered

Fr ee as in Free Beer 4 Greg Lehey, 24 May 2008

  • Warm, moist grain sprouts.
  • Warmer moist sprouted grain converts starch into

sugar.

  • Watery sugar solutions tend to ferment.
  • Fer

mented watery sugar solutions make you feel good.

  • Still much harder to make than wine.
slide-5
SLIDE 5

Making wine (simplified)

Fr ee as in Free Beer 5 Greg Lehey, 24 May 2008

  • Pick grapes (by hand).
  • Place in a watertight vessel.
  • Wait. Natural yeasts crack the skin and ferment the

juice.

slide-6
SLIDE 6

Making beer (simplified)

Fr ee as in Free Beer 6 Greg Lehey, 24 May 2008

  • Harvest grass using tools such as knives.
  • Thrash grass to separate the grain.
  • Moisten grain and allow germination to start.
  • Dry grain again.
  • Crush grain.
  • Warm grain in water for some time.
  • Wait.
slide-7
SLIDE 7

Making beer: implications

Fr ee as in Free Beer 7 Greg Lehey, 24 May 2008

  • Making beer is complicated.
  • It takes time.
  • Dif

ficult to do while moving from place to place.

  • Made people settle down, notably in Sumeria.
  • The foundation of civilization.
slide-8
SLIDE 8

Making beer: expert opinion

Fr ee as in Free Beer 8 Greg Lehey, 24 May 2008

  • In March 2006, I met Dr. Robert Launay, professor of

anthr

  • pology at Northwestern University (Illinois,

USA).

  • His opinion was gentle.
  • “Bullshit!”
  • It seems that nomadic people made beer too.
  • I’m sure it made them stay in one

place longer.

slide-9
SLIDE 9

Making beer (modern version)

Fr ee as in Free Beer 9 Greg Lehey, 24 May 2008

  • Most beer is made from barley.
  • A lot of wheat, maize and rice is also used.
  • Some beers use other grains, such as oats, millet and

rye.

  • All grains consist mainly of starch.
  • Hops ar

e used in small quantities to add aroma and bitterness.

slide-10
SLIDE 10

Malting and mashing

Fr ee as in Free Beer 10 Greg Lehey, 24 May 2008

  • Allow grain to germinate, releasing enzymes, no-

tably α-amylase and β-amylase.

  • Dry grain at temperatures between 40° and 100°.

The resultant grain is called malt.

  • Crush malt to allow access to the starch.
  • Mash at temperatures between 40° and

78°, converting the starch to sugar (maltose). The resulting liquid is called wort.

  • Boil the wort with hops, to make more

resistant to bacterial infection and to add flavour.

slide-11
SLIDE 11

Uncrushed malt

Fr ee as in Free Beer 11 Greg Lehey, 24 May 2008

slide-12
SLIDE 12

Crushed malt

Fr ee as in Free Beer 12 Greg Lehey, 24 May 2008

slide-13
SLIDE 13

Crystal malt

Fr ee as in Free Beer 13 Greg Lehey, 24 May 2008

slide-14
SLIDE 14

Hops

Fr ee as in Free Beer 14 Greg Lehey, 24 May 2008

slide-15
SLIDE 15

How to make beer: mashing

Fr ee as in Free Beer 15 Greg Lehey, 24 May 2008

  • Add crushed malt to hot water. Mix.
  • Keep mash at specific temperatures for a certain pe-

riod of time (“rest”).

  • “Single infusion mash” for about 60 minutes at 67° is

good for most brews.

  • For better control of beer character, use step infu-

sion or decoction.

  • Rest times vary between 10 and 60

minutes.

slide-16
SLIDE 16

Mash rests (1)

Fr ee as in Free Beer 16 Greg Lehey, 24 May 2008

Rests between 35° and 55° can perfor m four differ ent

  • changes. None of these rests are very common.
  • Acid rest, between 35° and 53°, lowers pH (makes

mor e acid).

  • Debranching, between 35° and 45°, may help dis-

solve starches.

  • Between 35° and 45°, glucanase can

br eak down gums.

  • The ferulic acid rest at 43° produces

ferulic acid, which with appropriate yeast can produce wheat-beer specific flavours.

slide-17
SLIDE 17

Mash rests (2)

Fr ee as in Free Beer 17 Greg Lehey, 24 May 2008

  • Between 45° and 55°

peptidase pr

  • duces

Fr ee Amino Nitrogen and pr

  • tease br

eaks up proteins that cause haze but also promote head retention.

  • The β-amylase rest between 55° and 66° converts

straight parts of starch into maltose.

  • Between 68° and 72°,

α-amylase

br eaks down the branches in the starch into simpler sugars. Ther e is considerable interaction between the

α-amylase and β-amylase rests: the β-amylase converts some of the starch con-

verted by the α-amylase into sugar.

slide-18
SLIDE 18

How to make beer: fermentation

Fr ee as in Free Beer 18 Greg Lehey, 24 May 2008

  • After boiling, cool down to room temperature.
  • Saturate wort with oxygen to promote yeast growth.
  • Pitch with yeast to start fermentation.
  • Fer

ment at temperatures between 8° and 24°, de- pending on the yeast.

  • Fer

ment for between 5 and 14 days, depending on the yeast.

  • Stor

e at temperatures between 1° and 15° for between 2 weeks and 3 months before drinking.

slide-19
SLIDE 19

Kinds of yeast

Fr ee as in Free Beer 19 Greg Lehey, 24 May 2008

Thr ee main kinds of yeast in modern beers:

  • Top-fer

menting yeasts (sacchor

  • myces) are used for

ales and other British-style beers.

  • Usually ferment between 16° and 22°.
  • For

m scum on top of wort.

  • Complete primary fermentation in 3 to

4 days.

slide-20
SLIDE 20

Top-fer menting yeast

Fr ee as in Free Beer 20 Greg Lehey, 24 May 2008

slide-21
SLIDE 21

Top-fer menting yeast (2)

Fr ee as in Free Beer 21 Greg Lehey, 24 May 2008

slide-22
SLIDE 22

Bottom-fer menting yeast

Fr ee as in Free Beer 22 Greg Lehey, 24 May 2008

  • Bottom-fer

menting yeasts (sacchar

  • myces) are used

for German and Bohemian “lager” style beers.

  • They do not form a scum on the wort.
  • Generally ferment at lower temperatures, between

8° and 13°.

  • Dif

fer fr

  • m top-fer

menting yeast main- ly by strain.

  • Many yeasts have intermediate charac-

teristics.

slide-23
SLIDE 23

Belgian yeasts

Fr ee as in Free Beer 23 Greg Lehey, 24 May 2008

  • Many Belgian beers use other organisms for fermen-

tation, such as br ettanomyces.

  • Can ferment at temperatures up to 28°.
  • Consider

ed an infection in other styles.

slide-24
SLIDE 24

Fr ee beer?

Fr ee as in Free Beer 24 Greg Lehey, 24 May 2008

  • TANSTAAFB.
  • Yeast can really be free.
  • Count 1 kg malt for 5 litres of beer ($3).
  • 5 to 10 g hops for 5 litres of beer ($0.50).
  • It’s practicable to grow your own hops.
  • Prices in the order of $0.70 per litre,

$0.30 per stubby.

  • Kits are usually mor

e expensive.

slide-25
SLIDE 25

Computers and brewing

Fr ee as in Free Beer 25 Greg Lehey, 24 May 2008

  • Calculate beer composition.
  • Contr
  • l mash.
  • Contr
  • l fer

mentation.

slide-26
SLIDE 26

Composition parameters: ethanol

Fr ee as in Free Beer 26 Greg Lehey, 24 May 2008

  • Ethanol content, measured as percentage (abv, alco-

hol by volume).

  • 100 ml of 5% abv beer contains about 3.95g ethanol.
  • Range between 2.5% (USA) and 12% (Belgium).
  • Most beers have between 4.5% and 6%.
slide-27
SLIDE 27

Composition parameters: bitterness

Fr ee as in Free Beer 27 Greg Lehey, 24 May 2008

  • Bitter

ness, in Inter national Bitter ness Units (IBU).

  • Contributed by hops.
  • IBUs are the parts of hop alpha acid per million.
  • Range between 20 IBU (barely perceptible) to 80

IBU (India Pale Ale).

  • Typical range between 25 and 40 IBU.
slide-28
SLIDE 28

Composition parameters: colour

Fr ee as in Free Beer 28 Greg Lehey, 24 May 2008

  • Contributed by malt and other grains.
  • Warmer malting creates darker malts.
  • Slightly influenced by mash procedur

e.

  • Various units of measurement.
  • In Australia, measured in EBC (Eur
  • pean Br

ewery Commission) units.

  • Light-colour

ed beers range between 5 and 10 EBC.

  • British-style ales range from 20 to 30

EBC.

  • Dark beers can have over 100 EBC.
slide-29
SLIDE 29

Composition calculations

Fr ee as in Free Beer 29 Greg Lehey, 24 May 2008

  • Pr
  • Mash
  • Qbr

ew

  • Br

ewnix

  • Br

ewsta (made in Australia, so probably uses metric units).

slide-30
SLIDE 30

Mash temperature contr

  • l

Fr ee as in Free Beer 30 Greg Lehey, 24 May 2008

  • Very rewarding application.
  • Requir

es relatively complicated mash equipment.

  • Emile van de Logt has done one implementation.
slide-31
SLIDE 31

Mash temperature contr

  • l (2)

Fr ee as in Free Beer 31 Greg Lehey, 24 May 2008

slide-32
SLIDE 32

Fer mentation temperatur e contr

  • l

Fr ee as in Free Beer 32 Greg Lehey, 24 May 2008

  • Helps ensure corr

ect beer flavour.

  • Not as interesting as mash control.
  • Easy to implement.
  • Has been done in many forms.
slide-33
SLIDE 33

Fer mentation temperatur e contr

  • l

Fr ee as in Free Beer 33 Greg Lehey, 24 May 2008

  • Simplistic approach: put in a fridge.
  • Fridge thermostats are in the wrong range.
  • Exter

nal ther mostats work.

  • First attempt used a digital thermostat.
slide-34
SLIDE 34

Digital thermostat

Fr ee as in Free Beer 34 Greg Lehey, 24 May 2008

slide-35
SLIDE 35

Pr

  • blems

Fr ee as in Free Beer 35 Greg Lehey, 24 May 2008

  • Mains voltage inside fridge.
  • Exter

nal ther mostats work, but regulate the wrong temperatur e.

  • Beer temperature can deviate by up to 5°.
  • No “dead” range in the middle.
  • Ther

mostat always turns on either heater or cooler.

  • Not suited to moist environment.
slide-36
SLIDE 36

Wher e to measure?

Fr ee as in Free Beer 36 Greg Lehey, 24 May 2008

  • Wort temperature is not uniform.
  • Fer

mentation causes temperature rise.

  • Measuring in the middle gives too high a reading.
  • Measuring on the outside gives too low a reading.
  • Measuring in the wort is an infection risk.
  • Measuring in the wort reacts very

slowly, giving rise to overshoots.

  • Chose surface measurement.
slide-37
SLIDE 37

Computer-based solution

Fr ee as in Free Beer 37 Greg Lehey, 24 May 2008

  • Use digital temperature sensors to measure tempera-

tur e.

  • Use parallel port relay board to control cooler and

heater.

  • Use old computer (Intel 80486) as the basis.
  • Mor

e details in the paper.

slide-38
SLIDE 38

The challenges

Fr ee as in Free Beer 38 Greg Lehey, 24 May 2008

  • Mechanical problems.
  • How to mount the probe assembly?
  • How to mount the sensors?
  • What cables to use?
  • Gr
  • ggy is not a practical engineer.
  • Still not solved.
slide-39
SLIDE 39

Logger board

Fr ee as in Free Beer 39 Greg Lehey, 24 May 2008

slide-40
SLIDE 40

Relay board (1)

Fr ee as in Free Beer 40 Greg Lehey, 24 May 2008

slide-41
SLIDE 41

Relay board (2)

Fr ee as in Free Beer 41 Greg Lehey, 24 May 2008

slide-42
SLIDE 42

Temperatur e sensors

Fr ee as in Free Beer 42 Greg Lehey, 24 May 2008

slide-43
SLIDE 43

Temperatur e sensors (2)

Fr ee as in Free Beer 43 Greg Lehey, 24 May 2008

slide-44
SLIDE 44

Temperatur e sensors (3)

Fr ee as in Free Beer 44 Greg Lehey, 24 May 2008

slide-45
SLIDE 45

Complete assembly

Fr ee as in Free Beer 45 Greg Lehey, 24 May 2008

slide-46
SLIDE 46

The software

Fr ee as in Free Beer 46 Greg Lehey, 24 May 2008

  • Measur

es sur face temperatur e of fermenter.

  • Turns on heater (lamp) or cooler (fridge compres-

sor) as requir ed.

  • Can ramp temperatures at a constant rate.
slide-47
SLIDE 47

Installation

Fr ee as in Free Beer 47 Greg Lehey, 24 May 2008

  • The hard part is the hardware—see above.
  • Install from the Ports Collection (/usr/ports/misc/tem-

pcontr

  • l).
  • Alter

natively, get tarball at http://www.lemis.com/gr

  • g/brewing/tempcon-

tr

  • l-1.1.tar.gz, unpack the tarball, and Make in-

stall

slide-48
SLIDE 48

The config file

Fr ee as in Free Beer 48 Greg Lehey, 24 May 2008

  • Actions controlled by a configuration file.
  • Pr
  • gram can run without a config file.
  • Defaults are seldom what you need.
  • Specify at least temperature and name of brew (for

plots).

  • Pr
  • gram notes updates to config file

and reads automatically.

  • Pr
  • gram outputs log files.
  • Second log file is usable for plotting

graphs.

slide-49
SLIDE 49

Status display

Fr ee as in Free Beer 49 Greg Lehey, 24 May 2008

  • Pr
  • gram displays current status on screen.
  • Status display also available via network (telnet to

port 4135).

Time Brew Brew Base Ambient Goal Offset Room 63-a 63-b 12:24:46 19.25 18.81 19.03 20.37 19.00 0.03 16.75 Status: Idle

slide-50
SLIDE 50

Main log file

Fr ee as in Free Beer 50 Greg Lehey, 24 May 2008

14:37:49 18.62 15.50 18.62 15.50 19.00 -0.38 15.25 Status: Heating 14:45:04 19.06 17.43 19.06 14.81 19.00 0.06 15.43 Status: Idle 14:55:27 19.12 16.43 17.78 20.37 19.00 -1.22 15.75 Status: Heating 14:57:09 19.31 18.50 18.90 20.37 19.00 -0.10 15.93 Status: Idle cancelled cooler on wait 14:58:09 19.25 18.62 18.94 20.37 19.00 -0.06 16.00 Status: Heating 14:58:39 19.31 19.18 19.24 20.37 19.00 0.24 15.75 Status: Idle Heated for 00:01:42 15:15:42 19.62 18.12 18.87 20.37 19.00 -0.13 15.18 Status: Heating 15:16:13 19.56 18.31 18.93 20.37 19.00 -0.07 15.18 Status: Idle cancelled cooler on wait 17:09:56 19.75 18.50 19.12 20.37 19.00 0.12 16.06 Status: Cooling 17:10:34 19.62 18.50 19.06 20.37 19.00 0.06 15.87 Status: Idle 17:12:34 19.68 18.43 19.06 20.37 19.00 0.06 15.75 Status: Cooling 17:13:04 19.68 18.43 19.06 20.37 19.00 0.06 16.06 Status: Idle 18:43:52 19.50 18.25 18.88 20.37 19.00 -0.12 15.25 Status: Heating

slide-51
SLIDE 51

Graph log file

Fr ee as in Free Beer 51 Greg Lehey, 24 May 2008

1128750471 19.56 18.93 19.24 20.37 19.00 0.56 15.00 1 1128750531 19.62 18.93 19.28 20.37 19.00 0.62 14.93 1 1128750591 19.62 19.00 19.31 20.37 19.00 0.62 15.00 1 1128750651 19.68 19.00 19.34 20.37 19.00 0.68 15.06 1 1128750711 19.62 18.93 19.28 20.37 19.00 0.62 14.81 1 1128750771 19.68 18.87 19.28 20.37 19.00 0.68 15.25 1 1128750831 19.68 18.87 19.28 20.37 19.00 0.68 15.06 1 1128750891 19.68 18.81 19.24 20.37 19.00 0.68 15.12 1 1128750951 19.68 18.68 19.18 20.37 19.00 0.68 15.18 1 1128751011 19.68 18.68 19.18 20.37 19.00 0.68 15.00 1 1128751071 19.75 18.68 19.22 20.37 19.00 0.75 15.00 1 1128751131 19.75 18.62 19.19 20.37 19.00 0.75 15.43 1 1128751191 19.75 18.62 19.19 20.37 19.00 0.75 15.18 1 1128751251 19.75 18.62 19.19 20.37 19.00 0.75 15.12 1

slide-52
SLIDE 52

Temperatur e ramp control

Fr ee as in Free Beer 52 Greg Lehey, 24 May 2008

  • Temperatur

e can be changed at a constant speed.

  • Specify end temperature and time for ramping.
  • Issues remain with restarting during ramping.

starttemp 19 endtemp 12.5 20 October 2005 12:00

slide-53
SLIDE 53

Real config file

Fr ee as in Free Beer 53 Greg Lehey, 24 May 2008

# Fermentation starttemp 19 endtemp 12.5 20 October 2005 12:00 fermenter1label Brew-63-a fermenter1label1 Brew fermenter1label2 63-a fermenter2label Brew-63-b fermenter2label1 Brew fermenter2label2 63-b graphlogfile /var/log/brewing/brew-63.graphlog graphloginterval 60 dosyslog on loginterval 86400 logfile /var/log/brewing/brew-63.log # XXX End of stuff that normally needs changing

slide-54
SLIDE 54

Real config file (2)

Fr ee as in Free Beer 54 Greg Lehey, 24 May 2008

relayline /dev/ppi0 fermenterprobe 3 fermenter2probe 2 ambientprobe 4 roomtempprobe 1 minambienttemp -1 heaterholdoff 0.1 coolerholdoff 0.1 coolerovershoot -0.05 heaterovershoot 0 coolertoheaterdelay 3600 heatertocoolerdelay 3600 heateroffmin 60 logpagesize 22 maxcooltempdiff 20 cooleroffmin 120 probe2factor 0.5 displayfile /dev/tty monitor

slide-55
SLIDE 55

Initial temperature adjustments

Fr ee as in Free Beer 55 Greg Lehey, 24 May 2008

slide-56
SLIDE 56

Two fer mentations

Fr ee as in Free Beer 56 Greg Lehey, 24 May 2008

slide-57
SLIDE 57

Lager fermentation

Fr ee as in Free Beer 57 Greg Lehey, 24 May 2008

slide-58
SLIDE 58

Experience with the system

Fr ee as in Free Beer 58 Greg Lehey, 24 May 2008

  • Now in active service for nearly four years.
  • Reacts well to power failures.
  • Contact problems with the temperature sensors.
  • Temperatur

e logger then often produces junk.

  • Dif

ficult to get good contact with fermenter.

  • Don’t do this over NFS!
slide-59
SLIDE 59

Other implementations

Fr ee as in Free Beer 59 Greg Lehey, 24 May 2008

  • This is not the only temperature contr
  • l system.
  • Daniel O’Connor has a PIC solution.
slide-60
SLIDE 60

Futur e dir ections

Fr ee as in Free Beer 60 Greg Lehey, 24 May 2008

  • Write documentation.
  • Handle power failure during ramp operation.
  • Add UDP network interface.
  • Adapt to multiple fridges.
  • Adapt to mashing operation.
  • Adapt to other functionality, such as

house cooling and heating.

slide-61
SLIDE 61

The End

Fr ee as in Free Beer 61 Greg Lehey, 24 May 2008

  • Thanks for watching.
  • The latest version of the paper is at

http://www.lemis.com/gr

  • g/Papers/freebeer/paper.pdf.
  • The latest version of these slides are at

http://www.lemis.com/gr

  • g/Papers/freebeer/slides.pdf.
  • Daniel O’Connor’s solution described at

http://www.dons.net.au/˜darius/hgwebdir.cgi/beer mon/

  • Emile van de Logt’s mash temperature contr
  • l is

described at http://home.hccnet.nl/e.vd.logt/htm/har dware_uk.htm