# Cup o' Sound

## Overview

http://youtu.be/N9aF7Wgt8Zc

Bring the productive bustle of ambient coffee shop sounds with you anywhere by building a white noise machine in a cup! This project uses the Adafruit Audio FX Board to play a 30 minute audio file on repeat. The circuit is battery powered with the help of a lipoly backpack, which also allows for convenient recharging over USB and the easy addition of a power switch. A speaker rests inside the lip of the cup, driven by a class D audio amplifier using a 10K potentiometer for volume control.

The Cup o’ Sound requires no programming and is excellent for practicing your through-hole and free-wire soldering skills. The result is a satisfyingly compact handful of portable sound that can be reused in many contexts or rewired to act as a speaker alone.

![](https://cdn-learn.adafruit.com/assets/assets/000/023/294/medium800/adafruit_products_adafruit-coffee-cup-white-noise-14.jpg?1424234406)

Before you begin, familiarize yourself with the following guides:

- [Adafruit Guide to Excellent Soldering](../../../adafruit-guide-excellent-soldering)
- [Adafruit Audio FX Sound Board](../../../adafruit-audio-fx-sound-board)
- [Adafruit Pro Trinket LiPoly/LiIon Backpack](../../../adafruit-pro-trinket-lipoly-slash-liion-backpack)

![](https://cdn-learn.adafruit.com/assets/assets/000/023/278/medium800/adafruit_products_adafruit-coffee-cup-white-noise-00.jpg?1424233142)

For this project, you will need:

- [16MB Audio FX Board](http://www.adafruit.com/product/2220)
- [half-size Perma-Proto board](http://www.adafruit.com/product/1609)
- [Adafruit Lipoly Backpack](http://www.adafruit.com/product/2124)
- [Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302](http://www.adafruit.com/product/2130)
- [lipoly battery](http://www.adafruit.com/product/258)
- [speaker](http://www.adafruit.com/product/1313)
- [illuminated&nbsp;on/off button](http://www.adafruit.com/product/1478)
- [10K potentiometer](http://www.adafruit.com/product/562)\*
- [knob](http://www.adafruit.com/product/2057)
- [button quick-connect wires](http://www.adafruit.com/product/1478)&nbsp;(optional but handy)
- [stranded wire in various colors](https://www.adafruit.com/product/1970)
- paper coffee cup with lid
- pliers and soldering tools
- [panavise](https://www.adafruit.com/product/151)
- [heat shrink tubing](https://www.adafruit.com/product/1649)
- craft or utility knife
- awl
- pencil

![](https://cdn-learn.adafruit.com/assets/assets/000/023/293/medium800/adafruit_products_adafruit-coffee-cup-white-noise-closed.jpg?1424234340)

\*Yes, we realize this is a linear taper pot. If you've got a logarithmic one, feel free to use that!

# Cup o' Sound

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/023/305/medium800/adafruit_products_diagram.jpg?1424239525)

Click to enlarge.

The lipoly backpack sits atop the audio FX board with the provided headers. Other connections as follows:

- **trigger pin 2 -\> GND**
- **potentiometer first leg -\> GND**
- **potentiometer second leg -\> audio board R**
- **potentiometer third leg -\> amp A+**
- **amp A- -\> GND**
- **amp Vin -\> 5V**
- **amp GND -\> GND**
- **switch leads to lipoly backpack (after cutting connecting trace)**
- **switch LED + -\> 220 ohm resistor -\> 5V**
- **switch LED - -\> GND**
- **amp outputs to speaker**

# Cup o' Sound

## Load Sound and Prepare Components

First thing's first-- load some sound on your Audio FX Board! We've formatted a mono OGG file containing close to 30 minutes of coffee shop white noise:

[Download 15.7MB cafe audio file](http://blog.adafruit.com/wp-content/uploads/2015/02/T02HOLDL.ogg)
Follow the [Audio FX Board guide](../../../../adafruit-audio-fx-sound-board)&nbsp;to transfer the sample file (or a file you make)&nbsp;to your device.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/023/280/medium800/adafruit_products_adafruit-coffee-cup-white-noise-08.jpg?1424233357)

Next it's time to breadboard the circuit. We highly recommend grabbing two audio boards and saving one for breadboard prototyping. It saves a lot of time and frustration to work out a circuit on a solderless breadboard before soldering your components together. Ask us how we know!

Solder the headers and screw terminals onto your amp, and solder wires onto your speaker:

![](https://cdn-learn.adafruit.com/assets/assets/000/023/289/medium800/adafruit_products_adafruit-coffee-cup-white-noise-11.jpg?1424234038)

On the lipoly backpack, cut the trace connecting the switch pads, and solder two quick-connect wires in place. While you're there, add a solder bridge to convert the charger to 500mA where marked.

![adafruit_products_adafruit-coffee-cup-white-noise-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/281/medium640/adafruit_products_adafruit-coffee-cup-white-noise-01.jpg?1424233472)

![adafruit_products_adafruit-coffee-cup-white-noise-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/283/medium640/adafruit_products_adafruit-coffee-cup-white-noise-02.jpg?1424233508)

![](https://cdn-learn.adafruit.com/assets/assets/000/023/279/medium800/adafruit_products_adafruit-coffee-cup-white-noise-03.jpg?1424233209)

Since the switch has to be installed from the outside of the cup, it'll be hard to connect wires to it inside the cup. That's where these arcade button quick-connects come in handy! See how they tightly grip the pins without any soldering? Cool. Take a good look now, since we can't quite get our camera lens inside the cup to see them later:

![](https://cdn-learn.adafruit.com/assets/assets/000/023/285/medium800/adafruit_products_adafruit-coffee-cup-white-noise-09.jpg?1424233543)

![](https://cdn-learn.adafruit.com/assets/assets/000/023/287/medium800/adafruit_products_adafruit-coffee-cup-white-noise-04.jpg?1424233633)

Solder the lipoly backpack to the audio board with the included long headers. Trim the rest of your headers and solder them in place on the audio board. See how the lipoly backpack headers come up short on the underside? You may want to insert the headers from underneath the audio board if you want them to be the same depth as the others (for inserting into a solderless breadboard). This was the second board we assembled for this project, and in prep for the final circuit the header depth descrepency wasn't a problem.

![](https://cdn-learn.adafruit.com/assets/assets/000/023/288/medium800/adafruit_products_adafruit-coffee-cup-white-noise-05.jpg?1424233683)

After prototyping, remove the potentiometer from the solderless breadboard and solder on three wires (with heat shrink tubing) to prepare for installing in the coffee cup.

![adafruit_products_adafruit-coffee-cup-white-noise-12.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/290/medium640/adafruit_products_adafruit-coffee-cup-white-noise-12.jpg?1424234164)

![adafruit_products_adafruit-coffee-cup-white-noise-13.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/291/medium640/adafruit_products_adafruit-coffee-cup-white-noise-13.jpg?1424234187)

# Cup o' Sound

## Solder Circuit and Assemble

![](https://cdn-learn.adafruit.com/assets/assets/000/023/282/medium800/adafruit_products_adafruit-coffee-cup-white-noise-06.jpg?1424233482)

Position the audio board with the USB port at the edge of the Perma-Proto. Solder the leads in place:

![](https://cdn-learn.adafruit.com/assets/assets/000/023/284/medium800/adafruit_products_adafruit-coffee-cup-white-noise-07.jpg?1424233515)

Next add the amp as shown, and solder up the rest of the components according to the circuit diagram. Remember to use quick-connect wires for the LED inside the pushbutton.

![](https://cdn-learn.adafruit.com/assets/assets/000/023/286/medium800/adafruit_products_adafruit-coffee-cup-white-noise-10.jpg?1424233562)

Mark and cut a hole for the on/off switch at the base of the cup. Remove the switch's screw-ring and&nbsp;install the switch, reattaching the screw-ring on the inside.

![adafruit_products_adafruit-coffee-cup-white-noise-15.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/292/medium640/adafruit_products_adafruit-coffee-cup-white-noise-15.jpg?1424234397)

![adafruit_products_adafruit-coffee-cup-white-noise-17.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/295/medium640/adafruit_products_adafruit-coffee-cup-white-noise-17.jpg?1424234465)

![adafruit_products_adafruit-coffee-cup-white-noise-16.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/296/medium640/adafruit_products_adafruit-coffee-cup-white-noise-16.jpg?1424234485)

Likewise make a hole for the volume adjustment knob at the side of the cup. The potentiometer attaches from the inside with a washer and nut on the outside, and the knob slips over from the outside.

![adafruit_products_adafruit-coffee-cup-white-noise-18.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/297/medium640/adafruit_products_adafruit-coffee-cup-white-noise-18.jpg?1424234526)

![adafruit_products_adafruit-coffee-cup-white-noise-19.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/298/medium640/adafruit_products_adafruit-coffee-cup-white-noise-19.jpg?1424234583)

![adafruit_products_adafruit-coffee-cup-white-noise-20.jpg](https://cdn-learn.adafruit.com/assets/assets/000/023/299/medium640/adafruit_products_adafruit-coffee-cup-white-noise-20.jpg?1424234614)

![](https://cdn-learn.adafruit.com/assets/assets/000/023/301/medium800/adafruit_products_adafruit-coffee-cup-white-noise-21.jpg?1424234645)

Use a pair of pliers to bend the flanges on the speaker to achieve a good fit inside the coffee cup.

![](https://cdn-learn.adafruit.com/assets/assets/000/023/300/medium800/adafruit_products_adafruit-coffee-cup-white-noise-14.jpg?1424234629)

Attach the quick connect wires to the power switch and click it on! Be sure your circuit is working properly before packing it all up inside the cup:

![](https://cdn-learn.adafruit.com/assets/assets/000/023/302/medium800/adafruit_products_adafruit-coffee-cup-white-noise-22.jpg?1424234676)

# Cup o' Sound

## Use it!

![](https://cdn-learn.adafruit.com/assets/assets/000/023/303/medium800/adafruit_products_adafruit-coffee-cup-white-noise.jpg?1424234722)

Enjoy your new ambient bliss. Power up and get cracking on your novel, or code up that new hot app!

![](https://cdn-learn.adafruit.com/assets/assets/000/023/304/medium800/adafruit_products_adafruit-coffee-cup-white-noise-recharge-over-usb.jpg?1424234743)

You can optionally cut a hole in the base of the cup for USB recharging. Battery life will vary based&nbsp;on audio content and volume.


## Featured Products

### Adafruit Audio FX Sound Board - WAV/OGG Trigger with 16MB Flash

[Adafruit Audio FX Sound Board - WAV/OGG Trigger with 16MB Flash](https://www.adafruit.com/product/2220)
Would you like to add audio/sound effects to your next project, without an Arduino+Shield? Or maybe you don't even know how to use microcontrollers, you just want to make a sound play whenever you press a button. What about something that has to be small...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2220)
[Related Guides to the Product](https://learn.adafruit.com/products/2220/guides)
### Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2 or 3 boards together to make a charging system, this little PCB sits on top of the PCB and allows a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2124)
[Related Guides to the Product](https://learn.adafruit.com/products/2124/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
### Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302

[Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302](https://www.adafruit.com/product/2130)
This super small mono amplifier is surprisingly powerful - able to deliver up to 2.5 Watts into 4-8 ohm impedance speakers. Inside the miniature chip is a class D controller, able to run from 2.0V-5.5VDC. Since the amp is a class D, its very efficient (over 90% efficient when driving an...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2130)
[Related Guides to the Product](https://learn.adafruit.com/products/2130/guides)
### Speaker - 3" Diameter - 8 Ohm 1 Watt

[Speaker - 3" Diameter - 8 Ohm 1 Watt](https://www.adafruit.com/product/1313)
Listen up! This 3" diameter speaker cone is the perfect addition to any audio project where you need an 8 ohm impedance and 1W or less of power. We particularly like this cone as it has 4 handy mounting tabs 60mm apart.  
  
Works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1313)
[Related Guides to the Product](https://learn.adafruit.com/products/1313/guides)
### Panel Mount 10K potentiometer (Breadboard Friendly)

[Panel Mount 10K potentiometer (Breadboard Friendly)](https://www.adafruit.com/product/562)
This potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 10K ohm potentiometer, with a grippy shaft. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are 0.2" apart...

In Stock
[Buy Now](https://www.adafruit.com/product/562)
[Related Guides to the Product](https://learn.adafruit.com/products/562/guides)
### Slim Metal Potentiometer Knob - 10mm Diameter x 15mm - T18

[Slim Metal Potentiometer Knob - 10mm Diameter x 15mm - T18](https://www.adafruit.com/product/2057)
This slim and modern potentiometer is small and compact, yet looks good and has a nice feel. We hand-selected the best knobs for your project in different sizes and varieties. &nbsp;This one is the...

In Stock
[Buy Now](https://www.adafruit.com/product/2057)
[Related Guides to the Product](https://learn.adafruit.com/products/2057/guides)
### 16mm Illuminated Pushbutton - White Latching On/Off Switch

[16mm Illuminated Pushbutton - White Latching On/Off Switch](https://www.adafruit.com/product/1478)
A switch is a switch, and an LED is an LED, but this LED illuminated button is a lovely combination of both! It's a medium sized button, large enough to press easily but not too big that it gets in the way of your project panel. It has a built in LED that can be controlled separately from...

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

## Related Guides

- [Adafruit PAM8302 - Mono 2.5W Class D Audio Amplifier](https://learn.adafruit.com/adafruit-pam8302-mono-2-5w-class-d-audio-amplifier.md)
- [CircuitPython Sound Box](https://learn.adafruit.com/circuitpython-sound-box.md)
- [MIDI Solenoid Drum Kit](https://learn.adafruit.com/midi-solenoid-drum-kit.md)
- [Adafruit Audio FX Sound Board](https://learn.adafruit.com/adafruit-audio-fx-sound-board.md)
- [NeoPixel Infinity Mirror Coaster](https://learn.adafruit.com/infinity-mirror-coaster.md)
- [Fog Machine with Motion Sensor and Adafruit IO](https://learn.adafruit.com/fog-machine-remote-trigger.md)
- [RGB Matrix Slot Machine](https://learn.adafruit.com/rgb-matrix-slot-machine.md)
- [Personalized NextBus ESP8266 Transit Clock](https://learn.adafruit.com/personalized-esp8266-transit-clock.md)
- [Audio Prank Gift Box](https://learn.adafruit.com/shake-up-a-gift-box.md)
- [Raspberry Pi Pipboy 3000](https://learn.adafruit.com/raspberry-pi-pipboy-3000.md)
- [Pocket Galaxy](https://learn.adafruit.com/pocket-galaxy.md)
- [Introducing ItsyBitsy 32u4](https://learn.adafruit.com/introducting-itsy-bitsy-32u4.md)
- [Zelda: Breath of the Wild – 3D Printed Guardian Sword with NeoPixel LEDs](https://learn.adafruit.com/breath-of-the-wild-guardian-sword-led-3d-printed.md)
- [Magic Wand](https://learn.adafruit.com/magic-wand.md)
- [Han Solo Blaster Cosplay](https://learn.adafruit.com/han-solo-blaster-cosplay.md)
