Introduction: L.E.B. Cup

Our project was the L.E.B. Cup (Light, Emitting, Beans). The goal of this project was to help you stop burning your tongue from hot coffee. To do this we attached LEDs to the outside of a travel mug. The LEDs changed color depending on the temperature of the liquid inside.

Step 1: Brainstorming

Each person in the group had to brainstorm three ideas for a total of nine. After some discussion we narrowed it down to Tanner's temperature telling coffee mug and Garrett's Oreo splitting. The temperature telling coffee cup won out in the end and became our project.

Step 2: Planning

After deciding on Tanner's coffee cup idea we had to plan out how we were gonna build our cup. Our initial plan consisted of building the cup in three separate parts and having a removable bottom to access the electrical components and the micro-controller. The wires would be concealed inside the bottom component are connected to the top of the cup through the handle of the cup.

Step 3: Materials

Our project required us to purchase quite a large amount of materials. Our original plan's materials included:

  • Adafruit Flora Microcontroller
  • Waterproof One-Wire Temperature Sensor
  • Neo-Pixel 16.8 Million Color RGB 60 LEDs/meter LED Strip
  • LI-Po Battery
  • Silicon Sealant

Materials that were not originally in our plan but we ended up needing more parts that included:

  • 4700 Ohm Resistor
  • On and Off Switch
  • Plastic Reusable Water Bottle
  • Silicon Cup

The total price of the materials in our project came to $104.06.

Step 4: Code

The code is not incredibly difficult but there are a couple libraries you need to download onto arduino. These are OneWire by arduino, Adafruit_NeoPixel by NeoPixel, and DallasTemperature by ardunio. After these libraries are installed just copy the code below, the values for when each light is triggered are simply greater than and less than statements. The light color is controlled by the RGB value at the end of each if statement.

// First we include the libraries

#include <DallasTemperature.h>

#include <OneWire.h>

#include <Adafruit_NeoPixel.h>


/ Data wire is plugged into pin 2 on the Arduino

#define ONE_WIRE_BUS 2

#define PIN 9


/ Setup a oneWire instance to communicate with any OneWire devices

// (not just Maxim/Dallas temperature ICs)

OneWire oneWire(ONE_WIRE_BUS);


/ Pass our oneWire reference to Dallas Temperature.

DallasTemperature sensors(&oneWire);


Adafruit_NeoPixel strip = Adafruit_NeoPixel(15, PIN, NEO_GRB + NEO_KHZ800);

void setup(void)


// start serial port


Serial.println("Dallas Temperature IC Control Library Demo");

// Start up the library





void loop(void)


// call sensors.requestTemperatures() to issue a global temperature

// request to all devices on the bus


Serial.print(" Requesting temperatures...");

sensors.requestTemperatures(); // Send the command to get temperature readings



Serial.print("Temperature is: ");

Serial.print(sensors.getTempFByIndex(0)); // Why "byIndex"?

// You can have more than one DS18B20 on the same bus.

// 0 refers to the first IC on the wire

// Some example procedures showing how to display to the pixels:

if ((sensors.getTempFByIndex(0)) < 98){

colorWipe(strip.Color(0, 0, 255), 500); // Blue


else if (98 <(sensors.getTempFByIndex(0))< 115 ){

colorWipe(strip.Color(153, 51, 255), 500); // Purple


else if (115 <(sensors.getTempFByIndex(0))< 130 ){

colorWipe(strip.Color(0, 255, 0), 500); // Green


else if (130 <(sensors.getTempFByIndex(0))< 145 ){

colorWipe(strip.Color(255, 255, 0), 500); // Yellow


else if ((sensors.getTempFByIndex(0))> 145){

colorWipe(strip.Color(255, 0, 0), 500); //Red




void colorWipe(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i

strip.setPixelColor(i, c);;




Step 5: Wiring

The wiring for this project is pretty simply.


Input -> Pin 2

Power -> VBatt

Gnd -> Gnd

Now to get the thermometer to work you need to add a 4.7k ohm resistor connecting the input and the power.

For the LED strip

Input -> Pin 2

Power -> 3.3v

Gnd -> Gnd

You will have one wire which goes unused for this step that is fine.

The battery plugs straight into the board all you need to do is break the power cable and add a switch.

Step 6: CAD Design

We ended up not being able to use the cad design for this project, but if we had the cup would be much sleeker. Out cad consisted of three parts; a handle, the base housing, and the liquid storage. The goal was to put the electronics in the base and run the wires for the LED's through the handle so that they would be concealed. However this did not work so we had to change our plans.

Step 7: Fabrication: Step 1

We did not end up using our CAD designs instead we placed a hard plastic cup inside another slightly larger silicon cup. When pushed together they sealed tightly and the electronics in the base where safe from any liquids, the thermometer could come into direct contact with the liquid, and the cup was not to hot to hold. In order for the thermometer to come into contact with the liquid you must first melt a hole with a diameter of .5 cm in the bottom of the hard plastic cup. After the hole is melted push the thermometer through the bottom of the cup so the silver part is where the liquid will be poured, then using the silicon paste seal the base of the thermometer so that no liquid will drip into the housing below.

Step 8: Fabrication: Step 2

While the silicon is drying begin soldering together the board and the led strip. You will need about 4-5 inches of wire from the board to the LED's. After this is complete and the thermometer seal has dried, solder the thermometer to the board remember to attach the power and input together with the resistor.

Step 9: Fabrication: Step 3

The nest step is adding the battery to the board. First cut a rectangle about an inch up from the bottom of the cup this should be 1x1.5 inches. Now cut the power wire on the battery and run the two ends through this hole from the inside, while the wires are sticking out of the hole solder the two ends to the switch and push the switch into the hole. The switch should fit in the hole but not go all the way through.

Step 10: Fabrication: Final Step

The last step of the fabrication is to plug the battery into the board and place the board and battery in the bottom of the silicon cup then with the LED strip and its wires hanging out of the cup push the hard plastic cup into the silicon cup. It should push down about three inches and stop. Next wrap the LED strip around the top of the silicon cup so it is flush with both cups, then glue the LED to ONLY the silicon cup. This ensures that you can still remove the hard plastic cup and get to the components without damaging the design. Now, turn it on!