BrewManiacEx 0.3

Disclaimer:

There are more and more functions, but I can’t test all functions because I don’t have all the hardware setup. Neither can they be tested in one single brew. Therefore, please verify before put it into real use.

What’s new

  • Post Boil Hop(HopStand)
  • Customized audio
  • Multi-button in Web interface
  • New setting options
    • button feedback, buzz on button pressed, or not
    • pump priming cycle, on time, off time.
  • Iodine test.
    • There are two options after Iodine Test. Go to Mash Out or Extend the mashing rest.
  • Export/import settings in web interface
  • Dual heater support by compile option. config.h@39
    #define SecondaryHeaterSupport true

Others

  • Sparge heater is no longer  by default supported.
  • revise setting temperature of web interface. Correct setting temperature will be displayed in manual mode.
  • code revision.

Known issues:

  • The sound doesn’t paly on mobile Safari.
  • If the audio file is larger than 120k, it might not work.
  • Sometimes, Chrome don’t play the audio unless reloading the page.

Post Boil Hop(HopStand)

Check this post.


Customized audio

Currently, it works on Safari and Chrome, not tested on other platform. It doesn’t work on mobile Safari of iOS because it doesn’t allow downloading and playing audio without users’ action.

Two files are involve: sounds.json and the audio file. All segments of sound is put in a audio file, preferred to m4a(AAC) format, and specified by the sounds.json file.

sounds.json should be put in the root of the file system of ESP8266. If it is missing or in wrong format, all the sound effect will be replaced by simple buzzing.

The format of sounds.json is like this:

{"src":"sounds.m4a",
"seg":{
"open":{"s":0,"t":2.2,"r":1},
"tr":{"s":2.3,"t":1.5,"r":1},
"addhop":{"s":4,"t":1.2,"r":3},
"addmalt":{"s":5.5,"t":1.4,"r":1},
"boil":{"s":7.1,"t":1.2,"r":1},
"boilend":{"s":8.6,"t":1.2,"r":1},
"bye":{"s":10,"t":2,"r":1},
"chill":{"s":12,"t":1.2,"r":3},
"cool":{"s":13.5,"t":1.2,"r":2},
"iodine":{"s":15,"t":2,"r":3},
"maltin":{"s":17,"t":1.4,"r":3},
"mashout":{"s":18.5,"t":1.4,"r":1},
"nmash":{"s":20,"t":2,"r":1},
"removemalt":{"s":22,"t":1.6,"r":3},
"whirlpool":{"s":24,"t":1.3,"r":2},
"disc":{"s":25.5,"t":1.6,"r":2}}
}

“src” specifies the source of the audio file. It doesn’t have to be on the controller. It can be a HTTP URL, and you can put it anywhere that can be assess by your browser. (If your audio file is larger than 150k, you might need to put it anywhere else instead of the controller.)

“seg” sepcifies the voices:

  • “s”: start of the audio, by seconds
  • “t”: duration of the audio, by seconds. Use 0 if not used.
  • “r”: times of repeat.

The meaning of the tags:

 

tag When Example
open Successfully connecgted BrewManiac, at your service
tr Setting temperature reached. Temperature reached.
addhop reminder of adding hop Time to add hop
addmalt reminder of adding malt Time to add malt
boil Boiling phase starts start boiling
boilend Finish boiling boiling finished
bye brew finished. brew finished. goodbye.
chill reminder of chilling for hopstand start chilling
cool start of cooling stage time to cool
iodine reminder of iodine test Time for iodine test
maltin temperature reaches mash-in temperature ready to doughing-in
mashout start of mashout start mash out
nmash proceed to next mash steop continue to next mash step
removemalt reminder of removing malt Time to remove malt
whirlpool reminder of whirlpool starts time to whirlpool
disc connection disconnected Controller disconnected

 

Guideline/tips of audio files

  • Keep the file as small as possible. It’s not concert recording, so use lowest sampling rate as possible.
  • If your audio file are larger than 150k, putting it on the controller might not work. (This might be issues of ESPAsyncWebServer/ESPAsyncTcp. Keep it as a known issue.)
  • There is a lag of playing audio on Safari. Around 200~250ms silence before(including) and after(not including) the audio segment is necessary to make it work better on Safari. For example, if the audio segment is 1 seconds and will be appended at time 15 seconds, you should insert a silence of 0.2 second before the real audio, and another 0.2 second of silence after the audio segment. Then, mark the segment start at 15 second with 1.2 duration.
  • OSX has text to speech built-in. You can type something like this to create a audio segment.
    >say -v "Samantha" "Hello, I am Siri."

    To output the audio to a file, add “-o” option, like “-o siri”.

  • oceanaudio is very good for creating the audio file. You can use it to
    • merge the audio segments
    • insert/delete silence space between segments
    • re-sample the audio to make it smaller
    • check the start and duration of the audio segment.

Multi-button in Web interface

multibutton

On iOS, you can just press the buttons simultaneously, and release at the same time. (Not tested on Android devices.)

Using mouse to press two or more buttons on laptops or desktops is trickier:

  1. Click (and hold) anywhere on the rectangle area around the buttons, but not on the buttons.
  2. Drag through the buttons. The buttons will be hiligh-lighted.
  3. Release the mouse on one of the button.
  4. Releasing the mouse outside the buttons will have no effect. Moving outside the rectangle area during dragging will also cancel the action.

23 thoughts on “BrewManiacEx 0.3

  1. It has been finished a few weeks ago, and I release it after doing a real brew.

  2. Hi Vito, just finished building a setup yesterday and will try to hook it up to my grainfather tonight to do a test of the functionality.

    I’ve started thinking though, as i also have the alembic pot still accessory for the grainfather to see whether this could be adapted for distilling as well. Often distillation is run twice, with the first run basically running a “stripping run” at full blast, initial cleaning and volume reduction. This could be done manually quite easy with the current software i believe.

    But for the 2nd (and usually final) run, all the collected output from a few “stripping runs” is run, normally at full blast until the vapor temperature reaches a certain point (there’s an opening in the pipe coming from the dome for a thermometer to measure the vaportemp, which can be calculated to the abv% of the distillate)

    Depending the the abv or vapor temp one would like to slow things down a bit not ‘blend’ the various fractions too much (giving a better/higher yield).

    I only had a quick look at the code base and it is quite large, so any pointers as to where to start look more in depth would be awesome.

    You could drop me an email and perhaps i’ll be able to find some time to understand the code and see where these features could fit in. Or if you feel interested i could provide a typical flow chart and possibilities.

    Regards,
    Andreas

  3. This is what I understand, correct me if I am wrong.
    The controller heats the liquid until the temperature at the pipe reaches a set value.
    Then, the heating power should be lowered.

    The concept is simple, or I misunderstand. However, the “lower heating” is not a clear description.
    I don’t really know how it could be done except lowering the setting temperature.
    It is easier to control the temperature of liquid than “lowering” the heating. Yes, PWM can be done, and you can set the output to a lower value, like 50%.
    What if the temperature drops to 60 Celsius?

  4. You’re not wrong Vito, a secondary distillation is where one separates out methanol and other dangerous volatiles(foreshots), this evaporates first (lower boiling point), then comes the ‘heads’ which is a mix of foreshots and ethanol (smeared together), and then comes the hearts (‘good alcohol), although one can generally mix in a bit of the other fractions for flavour/aroma. (last one is referred to as tails, which tends to be bitter in flavour)

    depending on the amount of liquid in the boiler, a distiller typically discards x amounts of ml, which are foreshots. but at this point, to make the separation between the different fractions more distinguished, one would at the start of the output pwm to a certain % pwm, and once the stage reaches a different temperature in the vapor, the boiler would change to a different % pwm.

    Now these are not always the same, you might want to separate differently if you are to distill a smoky whiskey vs a clean whiskey, or if you are distilling a fruit brandy etc.

    But this is what would lend to automating, just like mashing profiles, one could have distilling profiles

    Example pseudo code
    Start of heater ->
    If temperature => 55degrees C //part of automation/recipe, although 55 is a good start to turn on cooling water
    Display(“turn on cooling water”)
    sleepUntil(WaitForUserAcknowledge();); //turn off heater as this is important
    set pwm(50%) // part of automation/recipe
    Display(“Remember to discard foreshots (x ml) //where x is also part of the automation/recipe

    if temperature => 83degrees C //start of hearts fraction, part of automation/recipe
    Display(“start collecting hearts”)
    set pwm(70%) // part of automation/recipe
    if temperature => 90degree C //Start of tails fraction, part of automation/recipe
    Display(“start collecting tails”)
    set pwm(100%) // part of automation/recipe
    If temperature => 98degree C //Then the amount of ethanol left in the boiler is very small so the water/power effort isn’t perhaps worth the trouble. (this could be part of automation/recipe)
    set pwm(0%)
    Display(“Distillation is done”)

    The actual functionality and control is not very complex at the most basic, but getting into another persons code is a bit tricky, which was why i wanted to pull it by you to see what you think

  5. Are the temperatures liquid temperature?

    The process seems simpler than beer brewing. However, in beer brewing, the controller controls only temperatures.
    PWM is used only after boiling temperature reaches. Off course it’s not difficult to change the code from PID to PWM.
    The problem is that 50% heating power might gets different results in the winter and summer.
    If you distill outdoors in chilling weather, the temperature might even drops. I think that can be handled by correct temperatures.

    heaterControl() in BrewManiac.ino(it will be rename to BrewManiac.cpp in next release, mainly for PlatformIO.) is the code you need
    to look at. It is where PID and/or PWM is applied.

    I have seen some distiller, and none of them has pump. Therefore, the pump control might be used for “chilling” by either pumping cold water or turning on the solenoid that controls the flow of cold water. That would make the process more automatic.

    The procedure is simple. I would suggest you don’t mess with manual or automatic mode, buy you can reference automatic mode. ( I am sorry that the part of code is the worst code I ever had, because I was not familiar with Arduino and avoided using C++ for memory issue.)

    BTW, a few months ago, a friend asked me about distilling. Is that you?

  6. Hey Vito, no, all the temperatures are read from the vapour (sensor in the copper dome condenser). So it’s not very interesting to control the actual temperature in the boiler, only the speed of heating.

    I had a look at heatingControl() and i think perhaps its more straightforward to add a distillingControl() that could be chosen initial at startup instead of manual and auto. I’ll have a look at how the various variables are named and how multiple sensors are handled. But first i need to try out and brew a beer (or a few) with the stock version to see wether it works properly or not. If i get time over to start coding, i’ll try to do so in a way that it could be merged to your codebase and if not enabled through config.h (or similar) the extra code won’t be affecting the default running code.

    And no, i don’t think i was that friend who asked about distilling. It’s illegal in most countries 😉

  7. In version 0.3, the sparge heating function is NOT available by default.
    You have to turn on the compile options.

    However, that won’t result in connection failure. There might be some other problems.

  8. Vito, where turn compile option?
    If I upload your bin-file BrewManiacEx.multisensor.023.bin, not work temperature sensor, temperature always 100.75C.

  9. Vito, thanks!
    I find parameters and change, compile, upload – not work. Temp always 100.75.

    I’m return to simplesensor.
    Best regards.

  10. hi Andreas,

    Surprise for you.
    I implement a quick and simple distilling function. You can check this branch
    https://github.com/vitotai/BrewManiacEsp8266/tree/distilling

    There is a Distill Recipe submenu in setup.
    To start distilling, press the “UP” key in idle(start screen.) I did’t change the label display.

    I might not keep maintaining this work. There are already too many options.

  11. Hi Vito, I had this problem when I was update firmware of my controller using system update by Chrome.
    Error:Server not Report Size.
    Do you know what I can do to solve this? I searched but did’n find the .bin of version 0.3 on github reporitory, just 0.2.3 version.
    Tks!

  12. I forgot to add the binaries. Now they are on GitHub. Please check again.

    The web server starts to discarding the content-length field a few months ago.
    The on-line update relies on the content-length, so it doesn’t work for now.
    BTW,
    I found that updating of HTML/Javscript sometimes doesn’t work either.

    The web hosting service is so cheap that they don’t provide easy access customer service.
    Before I move it to other hosting, just download the binary and update manually.

  13. Hello Vito, What IDE version do you recommend to use? I’m dealing with some upload issues (fatal error: avr/interrupt.h: No such file or directory).

  14. Woah, you’re a machine Vito 🙂

    I’ll clone the branch and diff to the 0.3 tag to see what’s been added and if needed i’ll try to refine, and perhaps have a fork available for those looking to add distilling features 🙂

    I’ll try out the tag with some water!

    /Andreas

  15. It might be easier to search the following options
    SupportDistilling
    PwmHeatingSupport

    Arduino IDE is used for old 0.3, and the new branch is using PlatformIO.

  16. Wow… it’s so smooth with PlatformIO. Just FYI, #define EnableMultiSensor is missing in the distilling branch – I guess it’s specific for distilling.

  17. Check the manual for detail:
    https://github.com/vitotai/BrewManiacEsp8266/blob/master/docs/BrewManiacExManual_0.3.pdf

    In a nutshell, you can specify which(or both) heater to use during different stages: pre-mash, mashing, boiling, post-boil.

    For general SINGLE kettle e-BIAB, you can use secondary heater to help heating mashing water and boiling. In which, you will set BOTH heaters on during Pre-Mash and Boiling stage, and only one heater during mashing and post-boil.
    For 3-kettle HERMS system, check my other post http://vito.tw/?p=710

    You will need an additional SSR to control the heater. It is controlled by D8 by default.You might need to avoid overloading the power, though.

Leave a Reply

Your email address will not be published. Required fields are marked *