Distillation Monitor (UBCO Capstone)
My final design capstone project for my last year of studies at UBC Okanagan was one of the more intensive undertakings that I have had.
Goals
Our given goal for this project was to improve safety by providing a level of certainty around methanol content in alchohol produced by small batch distillation. While being introduced to the project we were told (and found through later research) that many small batch distillers use very basic but risky methods such as tasting the distillate, a blue flame test, or just throwing away the first cup, to try and ensure that methanol content is within safe limits. There are some obvious drawbacks to these methods (lack of accuracy, methanol consumption risk, fire risks) but they are used because the methods that large scale operations use are prohibitively expensive for the average small batch distiller. Careful control of methanol content is required because methanol is toxic even in relatively small quantities.
Some requirements/goals for the project were also given: low cost, modular, and Arduino based for the goals. Additionally, we were given some materials (such as a Still Spirits T500 Distilling System, some filament, a lab space to work in, and a cart to keep all the project materials on) and a budget for prototyping.
In British Columbia you are not allowed to distill alchohol for consumption without a license, so we used isopropyl alchohol as a substitute because it has similar enough properties to ethanol (as far as this project is concerned).
Outcomes
Attempting to accomplish these goals, we designed two systems that work in tandem: one to control the temperature of the still during runtime, and one to measure various phenomena relating to the distillate to try and differentiate between the different outputs.
Temperature control is performed by the temperature controller system using a custom PCB that houses a Raspberry Pi Pico 2 and some connectors for external devices. Control is achieved by varying the flow of water through the cooling loop of the still using a motorized ball valve. What actually has to happen to the flow rate is determined by the system using three temperature sensors at different points throughout the cooling loop.
Methanol detection is achieved by the methanol detection system by comparing multiple different orthoganol data points measured from the alchohol during runtime. In our current implementation, these data points consist of: temperature, capacitance, conductance, and mass. Using these measurements, the system determines which output is present (based on prior calibration) while the still is being run.
Temperature Controller
My biggest contribution was in the temperature controller. We decided very early on a microcontroller platform (the Raspberry Pi Pico 2), temperature sensors (DS18B20), and using a motorized ball valve, as all of these were available for quite a low cost. Because of this, we were quite quick to get a system that we could use to open and close the valve in response to temperature, and therefore we get a run going early on.
This first run gave us a ton of insight into some of the challenges we would face. First, even with some basic PI tuning, when the temperature dipped too low, the valve would fully close which caused the temperature readings to be incorrect because the water was not flowing and so we had to rely on heat conduction through the water which was much slower than the actual rise of temperature. Unfortunately, the valve we picked did not have position feedback (as we selected a cheap one based on the low cost constraint), so we could not know when the valve was closed with just the valve itself. To fix this, we added a cheap flow sensor after the valve to close the feedback loop. This worked significantly better, and was the approach we stayed with for the remainder of the project.
There were several other small tweaks we made based on this first (and subsequent few) runs: switching to braided tubing on the hot end to ensure the tube didnt collapse, using marine heat shrink for the temperature sensor connection to the Ts as some of them were not water tight, and adding teflon tape to many of the threaded connections, just to name a few.
All of the prototyping was first done on a breadboard to validate functionality before being soldered onto a protoboard primarily to allow for more robust mounting. Once the design was hardware-complete, I decided to make a PCB to provide a better hardware experience, should this temperature controller be used in the future.
Methanol Detection
Much of the development of the methanol detection was handled by my other group members, but I did iterate on some of the work that they performed.
Our design uses a 3D printed p-trap to hold a consistent level of liquid against the capacitive and conductive sensors of an off-the-shelf MTCH9010 evaluation board. This board uses these sensors to acquire a digital value that correlates with the capacitance/conductance which can then be used to help discern between the different alchohols.
All of the p-traps printed for this project were printed in PETG using an FDM 3D printer and were either coated with parylene or sealed using methylene chloride to ensure they were watertight. In the end, we found that the parylene coating was the preferred option, as the methylene chloride treated p-traps did eventually leak due to the methanol deteriorating the PETG.
The first few iterations of this design were made by another team member, but eventually I did end up iterating on the design to make some major design changes.
Here you can see PT5, which was were the design ended up before I did anything to it, and was the first iteration of the p-trap that was actually used in a real run (all of the other iterations had necessary changes suggested by Dr. Foulds). This design had a couple major shortcomings that we found out from its run:
- The input tube being horizontal meant that the liquid in the input tube had to rise up significantly before reaching the level of the output
- There wasn’t a great fit on the slots for the sensors
- The output tube was a bit too small
- 3D printed barbed connections dont seal perfectly, even with teflon tape, so the input being under a small amount of pressure meant that it would leak throughout the whole run. Based on these findings, I iterated on the design, making PT6:
PT6 overhauled the design by switching to an internal channel style design. This design uses a channel that is printed inside of the print to bring the distillate down and under the sensors before rising up to the drain port. This allows the distillate to evenly contact the sensors once the liquid level is high enough before evenly draining out.
Additionally, the input tube was switched from a horizontal barb to a vertical hole with a slight taper at the top. This design allows for the input tube to simply have some tape wrapped around it before shoving it into the hole, where there is a friction fit. The vertical alignment ensures that there is minimal liquid inside the tube before it drains out. With some tweaking, a fit that does not require tape for sealing could likely be achieved as well.
Some small tweaks such as changing the drainage tube from 1/4" to 3/8", adding a mounting flange, optimizing the horizontal holes for 3D printing by making them “raindrop” shaped, and adding an arrow to indicate which side is the input were also made.