Go Down

Topic: notorious PID fermentation temperature control (Read 7174 times) previous topic - next topic

mboehm

Jul 31, 2014, 05:39 am Last Edit: Aug 06, 2014, 05:03 am by mboehm Reason: 1
**This is about the best sub-forum I could find for this post, but if there is a better one mods, move it please?**
This might be relevant to any researchers looking for fairly precise process temperature control (~+/- 0.1 deg C) and of course homebrewers:

Over the last couple months I have been coding my own open source temperature control program for the Arduino MEGA 2560.  I call it notorious PID.  It incorporates a 20x4 character LCD for display, a rotary encoder with pushbutton for user input, Dallas OneWire DS18B20 temperature sensors, and a unique control algorithm inspired largely by the work of Elco Jacobs on UberFridge and brewPI.  It also has data logging capabilities and supports end-user made CSV temperature programs (lists of steps: run at X temp for Y duration) via an SD card slot.  This makes it possible to create custom temperature profiles for different fermentations that include things like temperature ramping, diacetyl rests and cold crashing.  For a more complete description, check the README at my GitHub repository.

I've written a couple libraries that may be of use to other Arduino coders out there.  The dallas temperature library was creating a huge problem for the speed of my code with its hard coded delay so I've written my own wrapper class for DS18B20 OneWire temperature sensors.  I've also written some versatile templated functions to add EEPROM read/write functionality to my project.

Most of my work the last couple weeks has been focused on tweaking the control algorithms and determining various tuning parameters (unique to each chamber/fridge/freezer).  There are a few small bugs that do not affect overall performance that I have to clear up.  Until I do so, I've currently released it as prerelease v0.9.0 on GitHub.  Can anyone point me in the right direction for creating some images of my wiring layout?

notorious PID source via GitHub

Moderator edit: links corrected

Coding Badly

Can anyone point me in the right direction for creating some images of my wiring layout?


Paper, pencil, scanner.

Digital photograph (back-up, zoom, good side lighting)

Fritzing.

Eagle.

mboehm

#2
Aug 03, 2014, 11:56 pm Last Edit: Aug 06, 2014, 05:03 am by mboehm Reason: 1
I did some prelim work in Fritzing.  My first time using the application.  There were some limitations trying to get a totally accurate representation of my layout but I think I managed reasonably well.  Is this clear enough?


jremington

Fritzing diagrams are for beginners and very confusing (read: almost useless) when more than a few parts are involved. A good scan or photo of a paper and pencil schematic would be much better.

arduinoadrian

You can also use "Paint". Easy to learn and once you have drawn a few parts, copy, paste and rotate helps a lot.
Perseverance is 90% of the solution. The remaining 10% is more perseverance.

mboehm

#5
Aug 10, 2014, 08:46 pm Last Edit: Aug 10, 2014, 08:48 pm by mboehm Reason: 1
Thanks for the suggestions.  I will definitely reconsider Fritzing for the logical wiring schematic.  In the meantime I have added a list of physical connections in table form to give something easy to consult when wiring it up.  I also just completed a schematic for the power wiring.  I don't really think Fritzing was intended for this sort of thing but in this case, I think it communicates the wiring pretty effectively:

mboehm

#6
Aug 16, 2014, 04:09 pm Last Edit: Aug 16, 2014, 04:36 pm by mboehm Reason: 1
It's photo time!

The chamber is constructed of 2" thick solid foam insulation.  Cooling is provided by a diminutive 1.7 cu. Ft. dorm fridge obtained for free.  Heating is provided by a bit of aging flexwatt also obtained for nil.  There are a pair of 80mm CPU fans for air circulation.  I've seen similar builds elsewhere on homebrewtalk that were glued together for a more permanent installation.  I'll be moving at the end of the month and I built the chamber with this move in mind.  I installed a couple of hooks on the front and back and bungees hooking into these are what hold it all together.  The lid is hinged with a pair of hasps for locking it down.  Gorilla Glue is perfect for use on this kind of foam and with clamps gives a strong bond.  In one of the shots you can see a double wall of weather stripping along the inside lid of the chamber.  Intersecting faces of the walls also have this stripping to create a reasonably airtight seal.

The second fridge in the overall shot of the space is not part of the chamber (it houses my culture library).

The temperature controller is housed in a pair of cigar boxes purchased for cheap on eBay.  An ethernet cable with RJ45 connectors connects the two boxes.  Logic circuitry has been isolated as much as possible from high voltage power circuitry.  The LCD resides behind black vinyl masking on 1/8" acrylic that sits flush into the top of the box and also hides the LCD's mount screws.










Kinnishian

Just wanted to speak up, if you were considering eagle for the diagram, you may prefer a (imo) better program "kicad." It's an actual open-source free PCB making software, and personally I took to understanding the workflow much faster than I did to eagle. And, no limitations.

Fritzing will look prettier, but with Kicad you can go off and make a PCB board. I didn't think that was possible for fritzing, last I used it over a year ago.

hambone_z

Looks like you can fab with Fritzing.  http://fab.fritzing.org/fritzing-fab

filk

Very interesting stuff, Im gonna pop off and look at your dallas temp probe wrapper in a sec..  im embarking on a brew controller at the moment but adding a few more 1 wire ds18b20 probes to stretch over to the FV's wouldnt be a problem, tho im controlling them with stc100's with the + firmware update to include profiles.

being way behind you on my road i cant offer much help on the arduino side, nit that u seem to need it  just encouragement..

However i can urge you to seal up the seams of your box, as the cold air inside will flood out given the slightest opportunity, a fellow with a similar box tracked down the root of his fridge compressor running overtime down to a paper thin gap between insulating boards..   Cheers

Go Up