YouTuber and engineer extraordinaire Ben Krasnow had dreams of the perfect chocolate chip cookie. The problem standing between him and cookie perfection was the amount of variables involved in the cooking making process. A small change in the amount of flour, brown sugar, or butter can completely change the texture and taste of the finished product.
To experiment with tweaking the amount of each ingredient, Ben made a machine which dispenses all of the ingredients. Each ingredient can be rotated over a container and the exact amount dispensed. The machine calculates the amount of each ingredient by looking at the readings coming from the weighing scale the container is placed on. From an electronics point of view, this is a nice project to look at because we have motors rotating the dolly to particular positions, various motorized dispensing mechanisms on each of the ingredient containers and a weighing scale sending data back to a computer.
Take a look at this GIF of the machine in action so you have an idea of how it works:
Parts List:
- Motor (for rotating dolly)
- Position Encoder (for rotating dolly to particular position)
- Motors (for dispensing mechanisms, used in different ways depending on ingredient)
- Solenoid Valves (for dispensing liquid ingredients)
- Weighing Scale (to figure out how much ingredient has been dispensed)
- Microcontroller (for talking with computer and driving motors)
- Computer (for setting ingredient amounts)
Building It:
First off, we’ll need a microcontroller to act as a middle man between the computer program and the motors. The computer program could send commands to the microcontroller over serial like “dispense 30mg butter” and the micro will rotate the dolly to the butter ingredient and start dispensing whilst keeping an eye on the weighing scale and stop when it increases by 30mg.
To keep things quick and simple, let’s use a development board that has a USB to serial converter chip on it. Most of them do, Arduino, Teensy, Texas Instruments Launchpad, etc.
Parts from Tindie:
The microcontroller can’t supply enough current to drive the motors directly so we’ll need a driver board that can handle a few hundred milli-amps at 5V. This 16 channel darlington transistor driver board fits the bill quite nicely, it’s capable of delivering 500mA per output. If more current is needed for a particular motor, multiple outputs can be paralleled together. It’s a nice and simple board too, connect up the GPIO pins from your dev board to the input side and the wires to the motors on the output side. Set a digital pin high and the motor starts rotating. There is also the possibility of adding in PWM for speed control if needed. This board will handle all of the valves and motors in the machine.
Now that we can control the motors we need some system of position encoding for the dolly. This will let the microcontroller rotate the dolly by a set number of degrees to the requested ingredient over the container. One way of doing this is to use a motor with a built in rotary encoder. The rotary encoder outputs a certain number of pulses per revolution of the motor shaft. By counting the pulses you can accurately determine the position of whatever it is you are moving. If you wanted to save money and use a cheap DC geared motor, you can make a position encoder using an infrared reflective sensor like the RPR220 breakout board sold by Seeed Studio and some tape. Simply position the IR sensor 1-2cm above the rotating dolly, place a piece of black tape on the dolly corresponding to each ingredient. You can then again effectively count the pulses coming from your IR sensor, with each piece of black tape representing an ingredient. The most difficult part of this project is making the ingredient dispensing mechanisms. You have flour, egg, brown sugar etc. All have different consistencies and will need a different kind of dispensing mechanism.
A quick google search shows that the temperature profile of the oven also has a significant effect on the cookies outcome. A study titled “Influence of cookies composition on temperature profiles and qualitative parameters during baking” carried out by the Faculty of Food Technology in Croatia explores this topic in detail. The paper has graphs, mathematical equations of even a couple Latin words thrown in so you know it’s the real deal. The point of all this is, if you want a temperature controlled oven, there are plenty of reflow controllers that can be fitted to an ordinary toaster oven. In fact, we featured one only a few days ago called the Toast-R-Reflow Power Board and Controller. It can save several different temperature profiles so you could experiment and save whichever one works best.
That’s the control hardware and it greatly simplifies the part of actually automating the machine, but you do have a lot of building ahead of you.
Parts from Other Suppliers:
Ben used a mixture of traditional baking gear and lab equipment for the dispensers themselves. For instance, the melted butter is being dispensed from a glass plunger actuated by a linear actuator, while the flour uses a traditional flower sifter with an added motor to turn the crank. All of this gear falls into the “other supplies” category below.
Parts from the Parts Bin:
Finally, the turntable and support structure are made from basic stock materials you might already have in your shop. It’s a matter of mounting the dispensers on any of the vertical rods extending from the table. With all this in mind let’s estimate how much of this project can be sourced from each different category.
Build it with Tindie Score:
Here is a breakdown of how much of this machine you could build using Tindie:
- Tindie : 15%
- Other suppliers: 70%
- Parts Bin: 15%
Ben pulled off an incredible build that can iterate very precisely toward the best possible cookie recipe by mixing one cookie at a time. The dispensers make up the bulk of the materials and will need to be ordered from specialized suppliers. But the experience of planning, building, and tuning such a mechanism will certainly up your game for the next project!