# Chilled Drinkibot

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/047/916/medium800/temperature_PB020235_2k.jpg?1509684725)

On a hot day, what's better than a nice cold beverage? Nothing, that's what! Here's a fun way to make made-to-order chilled drinks without using ice (which can dilute things), the Chilled Drinkibot!

The Chilled Drinkibot is a thermoelectric cooler that uses a Peltier cooler, a large heat sink and fan, and a small pump to chill and then deliver your beverage to your waiting glass. It uses a Trinket M0 running CircuitPython to control things, and a temperature gauge to display your final chill value.

https://youtu.be/NOPRsvilm2I

## Parts and Materials

In addition to the parts listed below, you'll also need a small conductive cup, preferably copper or something silver plated, and material to mount the components. This can be a plastic project box, 3D printed PLA, laser cut acrylic, or anything you like, really! Just so long as we can keep the electronics up above the liquid, and the Peltier cooler fan elevated for airflow.

### Part: Adafruit Trinket M0
quantity: 1
for use with CircuitPython &amp;amp;amp;amp; Arduino IDE
[Adafruit Trinket M0](https://www.adafruit.com/product/3500)

### Part: Peltier Thermo-Electric Cooler 
quantity: 1
Module+Heatsink Assembly - 12V 5A
[Peltier Thermo-Electric Cooler ](https://www.adafruit.com/product/1335)

### Part: Panel Temperature Meter
quantity: 1
-30 to +70 °C
[Panel Temperature Meter](https://www.adafruit.com/product/576)

### Part: Peristaltic Liquid Pump 
quantity: 1
with Silicone Tubing
[Peristaltic Liquid Pump ](https://www.adafruit.com/product/1150)

### Part: Illuminated Toggle Switch
quantity: 1
with Cover - White / Clear
[Illuminated Toggle Switch](https://www.adafruit.com/product/3308)

### Part: Rugged Metal Pushbutton with White LED Ring
quantity: 1
16mm White Momentary
[Rugged Metal Pushbutton with White LED Ring](https://www.adafruit.com/product/558)

### Part: 12V 5A switching power supply
quantity: 1
12V 5A switching power supply
[12V 5A switching power supply](https://www.adafruit.com/product/352)

### Part: Female DC Power adapter
quantity: 1
2.1mm jack to screw terminal block
[Female DC Power adapter](https://www.adafruit.com/product/368)

### Part: 5V 2.4A Switching Power Supply
quantity: 1
with 20AWG MicroUSB Cable
[5V 2.4A Switching Power Supply](https://www.adafruit.com/product/1995)

### Part: N-channel power MOSFET
quantity: 2
30V / 60A
[N-channel power MOSFET](https://www.adafruit.com/product/355)

### Part: Heat Sink Thermal Tape
quantity: 1
3M 8810 - 80mm x 80mm
[Heat Sink Thermal Tape](https://www.adafruit.com/product/1468)

### Part: Adafruit Perma-Proto Half-sized Breadboard PCB
quantity: 1
Adafruit Perma-Proto Half-sized Breadboard PCB
[Adafruit Perma-Proto Half-sized Breadboard PCB](https://www.adafruit.com/product/1609)

### Part: Black Nylon Screw and Stand-off Set – M2.5 Thread
quantity: 1
Black Nylon Screw and Stand-off Set – M2.5 Thread
[Black Nylon Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)

### Part: USB cable - A/MicroB - 3ft
quantity: 1
USB cable - A/MicroB - 3ft
[USB cable - A/MicroB - 3ft](https://www.adafruit.com/product/592)

### Part: 1N4001 Diode
quantity: 1
10 pack
[1N4001 Diode](https://www.adafruit.com/product/755)

### Part: Adafruit Parts Pal
quantity: 1
Adafruit Parts Pal
[Adafruit Parts Pal](https://www.adafruit.com/product/2975)

Primary: 

You can watch the live build in these two episodes of John Park's Workshop Live.

https://youtu.be/zn5ZdfYp7nM

https://youtu.be/0U283AQ7qFQ

# Chilled Drinkibot

## Build the Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/047/868/medium800/temperature_IMG_5806.jpg?1509644595)

How does thermoelectric cooling work?&nbsp;Here's a helpful&nbsp;answer from [Wikipedia](https://en.wikipedia.org/wiki/Thermoelectric_cooling):

> Thermoelectric cooling&nbsp;uses the&nbsp;[Peltier effect](https://en.wikipedia.org/wiki/Peltier_effect "Peltier effect")&nbsp;to create a&nbsp;[heat](https://en.wikipedia.org/wiki/Heat "Heat")&nbsp;flux between the junction of two different types of materials. A Peltier cooler...&nbsp;is a solid-state active&nbsp;[heat pump](https://en.wikipedia.org/wiki/Heat_pump "Heat pump")&nbsp;which transfers heat from one side of the device to the other, with consumption of&nbsp;[electrical energy](https://en.wikipedia.org/wiki/Electrical_energy "Electrical energy"), depending on the direction of the current.
> 
> The device has two sides, and when a&nbsp;[DC](https://en.wikipedia.org/wiki/Direct_Current "Direct Current")&nbsp;electric current flows through the device, it brings heat from one side to the other, so that one side gets cooler while the other gets hotter. The "hot" side is attached to a heat sink so that it remains at ambient temperature, while the cool side goes below room temperature.

You can find Peltier&nbsp;devices being used in devices such as portable camping coolers and computer CPU coolers.

The key considerations for&nbsp;our drink chiller are being able to power the cooler and fan assembly for a pre-determined timing interval, and then&nbsp;doing the same with the pump.

I chose to use a Trinket M0 microcontroller so that we can use a button to initiate the cooling and pumping cycles, easily tune the timings, and so on. Since the Trinket M0 can't power such beefy 12V devices on its own, we'll use a pair of power MOSFET transistor circuits instead. You can think of them as solid state switches that can take a tiny signal from the microcontroller to unleash much higher power from a secondary source, in our case a regulated 12V 5A power supply!

![](https://cdn-learn.adafruit.com/assets/assets/000/047/865/medium800/temperature_drinkChillerCircuit.png?1509637186)

Following the circuit diagram, solder all of your parts to the board as shown. You will need to solder the Trinket M0 to header pins as well to connect them.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/866/medium800/temperature_IMG_5611.jpg?1509644267)

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/047/867/medium800/temperature_IMG_5616.jpg?1509644305)

Info: 

## Connections

Depending on how you plan to mount/enclose the parts, you may need to either use removable interconnects between some parts, or wait to solder wires to the board until the parts are mounted.&nbsp;

These include the Peltier and fan wiring, the pump wiring, and the button wiring.

Or, you may wire them all up for testing now, just know that you'll need to desolder/resolder later if your enclosure requires it.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/869/medium800/temperature_IMG_5807.jpg?1509644660)

With everything wired, we can now program the Trinket M0 using CircuitPython!

# Chilled Drinkibot

## Program the Trinket M0 w/ CircuitPython

This is the flow of our project, which informs the flow of our code:

1. Power on the system, light power switch LED
2. Pour beverage into the chilling vessel
3. Press button to begin chilling process, light up button LED
4. When chilling is finished, pump liquid from chilling vessel into drinking glass
5. Turn off button LED

If you're new to Trinket M0 and CircuitPython, [check out this guide for getting started](../../../../adafruit-trinket-m0-circuitpython-arduino/circuitpython-pwm?view=all#circuitpython)! Once you're ready, and have the latest CircuitPython installed on your board, you can proceed.

Copy the code below, and paste it into your favorite text editor.

You can adjust the code for different chilling and pumping times by changing the values of `chillTime` in minutes and `pumpTime` in seconds.

You can see that we turn on and off the button's integrated LED which is connected to pin D2 at the start and finish of the cycle, respectively. What about the power LEDs on the board and the toggle switch? Those bypass the Trinket M0 and run directly off of the 12V supply to indicate that it is live.

Next, save&nbsp;the file as **code.py** on your&nbsp;Trinket M0, which shows up on your computer as the CIRCUITPY USB drive.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Chilled_Drinkibot/code.py

Next,&nbsp;with the chiller assembly and pump connected, you can test out your system, and then finalize assembly!

# Chilled Drinkibot

## Build the Drinkibot

## Thermal Tape

Clean the bottom of your chilling vessel, and the top of the Peltier. Then, cut a section of thermal tape to size, peel off it's protective film from&nbsp;one&nbsp;side, and stick it to the Peltier. Then, peel the other side and press the chilling vessel down onto it firmly for about twenty seconds for good adhesion.

This will greatly improve the thermal conductivity of the vessel!

![temperature_IMG_5644.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/870/medium640/temperature_IMG_5644.jpg?1509644773)

![temperature_IMG_5647.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/871/medium640/temperature_IMG_5647.jpg?1509644786)

![temperature_IMG_5649.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/873/medium640/temperature_IMG_5649.jpg?1509644806)

Here you can see the frost building up on the exposed Peltier cooler as the liquid inside the vessel has be chilled from 22° C / 71.6° F&nbsp; down to 3.7° C / 38.7° F&nbsp;!&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/047/874/medium800/temperature_IMG_5755.jpg?1509644998)

You can see from the photo of my workbench, that I've&nbsp;got a temporary setup in place while testing, but now it's time to neaten things up! You can build your own case/stand to elevate and enclose the electronics and make the button, switch and meter more accessible.

I designed a simple stand for this, which can be cut from wood or plastic on a CNC mill or laser cutter, or 3D printed. Download the file attached below to make your own!

[drinkChiller_crv.svg](https://cdn-learn.adafruit.com/assets/assets/000/078/175/original/drinkChiller_crv.svg?1562961276)
Here are the same curves extruded into&nbsp;3mm thick&nbsp;models for 3D printing.

[chilledDrinkibot.zip](https://cdn-learn.adafruit.com/assets/assets/000/047/895/original/chilledDrinkibot.zip?1509671079)
In case you'd like to edit the file, here's a zip archive containing a .step file.

[drinkChiller01.stp.zip](https://cdn-learn.adafruit.com/assets/assets/000/059/358/original/drinkChiller01.stp.zip?1534529910)
After measuring and designing the stand, I made a quick prototype cut from cardboard on a laser cutter.

This is very helpful in figuring out if things work before doing so from&nbsp;more expensive materials, or making a slow 3D print.

You can see here that I had mis-measured the panel meter size, so I adjusted that before continuing.

![temperature_IMG_5812.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/875/medium640/temperature_IMG_5812.jpg?1509647265)

![temperature_IMG_5812.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/876/medium640/temperature_IMG_5812.jpg?1509647290)

![temperature_IMG_5816.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/877/medium640/temperature_IMG_5816.jpg?1509647302)

![temperature_IMG_5813.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/878/medium640/temperature_IMG_5813.jpg?1509647312)

![temperature_IMG_5815.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/879/medium640/temperature_IMG_5815.jpg?1509647323)

## Panels

Once you've made your parts, go ahead and press fit them together. It may take a bit of trimming from a hobby knife to get an exact fit for 3D printed parts, but laser cut parts should fit together right off the machine. If you've laser cut the parts from acrylic, you can use some acrylic cement to fix them together.

![temperature_render1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/932/medium640/temperature_render1.jpg?1509725460)

![temperature_render2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/933/medium640/temperature_render2.jpg?1509725474)

## Assembly

Next, assemble the components to the stand. Start by removing the screws from the underside of the chiller assembly, and then screw them back in through the bottom of the stand to affix it. You may choose to remove the grill or leave it in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/918/medium800/temperature_IMG_5902.jpg?1509719218)

## Panel Meter

Push the panel mount temperature meter through the square hole, and then re-connect its two wire connectors.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/919/medium800/temperature_IMG_5904.jpg?1509719286)

## PCB

Mount the PCB using four screws and two standoffs. Place&nbsp;each standoff on the back of the panel, then screw short screws in from the front to hold them in place.&nbsp;

Set the PCB over the standoffs, and screw them down with two more short screws.

![temperature_IMG_5909.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/925/medium640/temperature_IMG_5909.jpg?1509719686)

![temperature_IMG_5910.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/926/medium640/temperature_IMG_5910.jpg?1509719696)

## Heat Sinks

You can optionally add extra heat sinks to the MOSFETs, although the cool well without them.

This may be helpful if you have very high ambient temperature, however, or run the Chilled Drinkibot for extended periods of time!

![temperature_IMG_5911.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/922/medium640/temperature_IMG_5911.jpg?1509719530)

![temperature_IMG_5912.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/923/medium640/temperature_IMG_5912.jpg?1509719539)

![temperature_IMG_5913.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/924/medium640/temperature_IMG_5913.jpg?1509719547)

## Switch & Button

Feed the switch and button through the holes at the top of the stand. You can then solder the button wires to the board, or connect with cold splices or interconnects if you chose to do that.

![temperature_IMG_5903crop.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/930/medium640/temperature_IMG_5903crop.jpg?1509725193)

![temperature_IMG_5826.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/931/medium640/temperature_IMG_5826.jpg?1509725228)

## Pump

Slide&nbsp;the pump into it's place from the front, and then screw in a set of 2.5mm screws and nuts (or standoffs for convenience) to hold it in place.

Then, solder or connect it's wires to the board.

![temperature_IMG_5907.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/928/medium640/temperature_IMG_5907.jpg?1509724934)

![temperature_IMG_5908.jpg](https://cdn-learn.adafruit.com/assets/assets/000/047/929/medium640/temperature_IMG_5908.jpg?1509724942)

Lastly, feed the Peltier cooler and fan wiring in and connect them to their wiring on the PCB. Here, I did so using splice taps, but you can use removable interconnects or simply solder them together (be sure to protect with heat shrink tubing in this case.

![](https://cdn-learn.adafruit.com/assets/assets/000/047/909/medium800/temperature_PB020238_2k.jpg?1509683103)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/910/medium800/temperature_PB020239_2k.jpg?1509683106)

## Usage

With everything in place and connected to the board, you're ready to chill a beverage! Place the temperature probe into the chilling vessel, as well as the input pump tube, which you can cut to size. In the orientation shown here, the bottom tube is the input.

Then, pour an ounce or two of drink into the chilling vessel, and place the output tube into a drinking glass.

Plug the Trinket M0 into USB power, and then flip the 12V switch.

When you're ready, press the button on the front of the drink chiller, and watch the magic! After a few minutes, the drink will be cold, and the pump will transport it into your waiting glass. Enjoy!

![](https://cdn-learn.adafruit.com/assets/assets/000/047/911/medium800/temperature_IMG_5858.jpg?1509683178)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/912/medium800/temperature_IMG_5859.jpg?1509683194)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/913/medium800/temperature_IMG_5866.jpg?1509683210)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/914/medium800/temperature_IMG_5871.jpg?1509683230)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/905/medium800/temperature_PB020230_2k.jpg?1509683092)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/906/medium800/temperature_PB020231_2k.jpg?1509683095)

![](https://cdn-learn.adafruit.com/assets/assets/000/047/915/medium800/temperature_frosty.png?1509683457)


## Featured Products

### Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE

[Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE](https://www.adafruit.com/product/3500)
The&nbsp;Adafruit Trinket M0 may be small, but do not be fooled by its size! It's a tiny microcontroller board, built around the Atmel ATSAMD21, a little chip with _a lot_ of power. We wanted to design a microcontroller board that was small enough to fit into any project, and low...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3500)
[Related Guides to the Product](https://learn.adafruit.com/products/3500/guides)
### Peltier Thermo-Electric Cooler Module+Heatsink Assembly - 12V 5A

[Peltier Thermo-Electric Cooler Module+Heatsink Assembly - 12V 5A](https://www.adafruit.com/product/1335)
This is for people who just want to get cold fast. The 12V Peltier module is mounted onto a 12V heatsink and fan assembly with thermal paste and an aluminum clamp. Simply connect to 12V 5A+ power supply and you will see frost appear on the aluminum plate within a minute. This assembly comes...

In Stock
[Buy Now](https://www.adafruit.com/product/1335)
[Related Guides to the Product](https://learn.adafruit.com/products/1335/guides)
### Panel Temperature Meter / -30 to +70 °C

[Panel Temperature Meter / -30 to +70 °C](https://www.adafruit.com/product/576)
Put a temperature meter anywhere with this very handy display. This panel meter displays the temperature of the attached waterproof 1% thermistor in °C. It does require a DC voltage to run, at 4.5-30VDC. It has reverse polarity protection in case you swap the power leads by accident.<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/576)
[Related Guides to the Product](https://learn.adafruit.com/products/576/guides)
### Peristaltic Liquid Pump with Silicone Tubing - 12V DC Power

[Peristaltic Liquid Pump with Silicone Tubing - 12V DC Power](https://www.adafruit.com/product/1150)
Move fluid safely from here to there with this very nice little pump. Unlike most liquid pumps, [this is a peristaltic type - the pump squishes the silicone tubing that contains the liquid instead of impelling it directly](http://en.wikipedia.org/wiki/Peristaltic_pump). The upshot?...

In Stock
[Buy Now](https://www.adafruit.com/product/1150)
[Related Guides to the Product](https://learn.adafruit.com/products/1150/guides)
### Illuminated Toggle Switch with Cover - White / Clear

[Illuminated Toggle Switch with Cover - White / Clear](https://www.adafruit.com/product/3308)
Fire up your engines&nbsp;because these are the hot-rods of toggle switches! Equipped with an aerodynamic clear protective casing, and a diffused white LED at the tip of the switch, this **Clear/White LED Toggle Switch** &nbsp;is sure&nbsp;to add some flair (and flare!) to your...

In Stock
[Buy Now](https://www.adafruit.com/product/3308)
[Related Guides to the Product](https://learn.adafruit.com/products/3308/guides)
### Rugged Metal Pushbutton with White LED Ring

[Rugged Metal Pushbutton with White LED Ring](https://www.adafruit.com/product/558)
These chrome-plated metal buttons are rugged&nbsp;and look real good while doing it! Simply drill a 16mm hole into any material up to 1/2" thick and you can fit these in place, there's even a rubber gasket to keep water out of the enclosure. On the front of the button is a flat metal...

In Stock
[Buy Now](https://www.adafruit.com/product/558)
[Related Guides to the Product](https://learn.adafruit.com/products/558/guides)
### 12V 5A switching power supply

[12V 5A switching power supply](https://www.adafruit.com/product/352)
This is a beefy switching supply, for when you need a lot of power! It can supply 12V DC up to 5 Amps, running from 110V or 220V power (the plug it comes with is for US/Canada/Japan but you can use any plug adapter for your country, or just replace the cable with a standard 'figure-8'...

In Stock
[Buy Now](https://www.adafruit.com/product/352)
[Related Guides to the Product](https://learn.adafruit.com/products/352/guides)
### Female DC Power adapter - 2.1mm jack to screw terminal block

[Female DC Power adapter - 2.1mm jack to screw terminal block](https://www.adafruit.com/product/368)
If you need to connect a DC power wall wart to a board that doesn't have a DC jack - this adapter will come in very handy! There is a 2.1mm DC jack on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/368)
[Related Guides to the Product](https://learn.adafruit.com/products/368/guides)

## Related Guides

- [Adafruit Trinket M0](https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino.md)
- [USB Foot Switch Controller in CircuitPython](https://learn.adafruit.com/usb-foot-switch-circuit-python.md)
- [Mini Pinball Table with Gemma M0](https://learn.adafruit.com/mini-pinball-table-with-gemma-m0.md)
- [LED Matrix Wall Arcade for Pico-8](https://learn.adafruit.com/led-matrix-wall-arcade.md)
- [Trinket / Gemma Mini-Theremin](https://learn.adafruit.com/trinket-gemma-mini-theramin-music-maker.md)
- [MIDI Laser Harp with Time of Flight Distance Sensors](https://learn.adafruit.com/midi-laser-harp-time-of-flight-sensors.md)
- [How to Make Animated Graphics for Hologram Displays](https://learn.adafruit.com/how-to-make-animated-graphics-for-hologram-displays.md)
- [Screaming Cauldron](https://learn.adafruit.com/screaming-cauldron.md)
- [Raspberry Pi Pico and LED Arcade Button MIDI Controller](https://learn.adafruit.com/raspberry-pi-pico-led-arcade-button-midi-controller-fighter.md)
- [Level Shifting 3.3V microcontrollers and NeoPixels](https://learn.adafruit.com/neopixel-levelshifter.md)
- [PyPortal Air Quality Display](https://learn.adafruit.com/pyportal-air-quality-display.md)
- [Spinning Disc Step Sequencer](https://learn.adafruit.com/spinning-disc-step-sequencer.md)
- [NeoKey Emoji Keyboard](https://learn.adafruit.com/neokey-emoji-keyboard.md)
- [MicroPython Hardware: Analog I/O](https://learn.adafruit.com/micropython-hardware-analog-i-o.md)
- [CircuitPython with Jupyter Notebooks](https://learn.adafruit.com/circuitpython-with-jupyter-notebooks.md)
- [LED Matrix Scoreboard](https://learn.adafruit.com/led-matrix-scoreboard.md)
