Overview

In this project we’ll show you how to build a coffee cup lamp using an Adafruit Circuit Playground Express and Microsoft Makecode.

 

We'll design our lamp out of a paper cup and use capacitive touch to change the colors of the LEDs!

 

You can build your own capacitive touch pads using conductive tape.

 

So get ready to go on an adventure and learn how to craft your own paper cup lamp!

Program your Circuit Playground Express using code blocks in Microsoft Makecode.

 

Drag and drop to create interactive lights that change colors by using the sensors and inputs on-board the circuit playground.

 

Get inspired to make paper crafts of your favorite characters and build a scene straight out the tree fort!

Prerequisite Guides

 

There's resources in these guides that go beyond what's covered in this tutorial. MakeCode guide is all about setting up your Circuit Playground Express board.

 

TheCircuit Playground Express introduction guide walks you through all of the pinouts, sensors and everything you need to know.

 

Circuit Playground Express

PRODUCT ID: 3333
Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
$24.95
IN STOCK

3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

PRODUCT ID: 727
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about...
$1.95
OUT OF STOCK

You'll need conductive tape, you can use either copper foil or conductive nylon tape:

Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll

PRODUCT ID: 1128
Copper tape can be an interesting addition to your toolbox. The tape itself is made of thin pure copper so its extremely flexible and can take on nearly any shape. You can easily...
$5.95
IN STOCK

OR

Conductive Nylon Fabric Tape - 5mm Wide x 10 meters long

PRODUCT ID: 3961
With our fun assortment of conductive materials, 
$2.95
IN STOCK
1 x Foam Tape
Foam Tape
1 x Paper Coffee Cup with Lid (12oz)
Paper Coffee Cup with Lid (12oz)
1 x Scissors
Scissors

MakeCode for Circuit Playground Express

MakeCode is this programming editor that runs in the Google Chrome web browser. It’s has an intuitive interface that’s both block based and text editor.

It works with Adafruit's Circuit Playground Express so you can make interactive projects with the on-board sensors and components. You can drag & drop blocks to make interactive programs using lights and sounds without having to solder or learning a new syntax.

You can alternatively upload code directly to the Circuit Playground Express with WebUSB, see the steps to do so here.

Setup Circuit Playground Express for MakeCode

To get started, we'll need to head over to the Adafruit MakeCode website and follow the steps below.

  1. Plug in your Circuit Playground Express with a USB Cable
  2. Press the RESET button. Green light means you're ready to MakeCode
  3. Download the UF2 file and drop it onto CPLAYBOOT.

Upload and Test Code

 

Once you have your CPX setup with the MakeCode UF2, try testing it out by uploading the code to the board.

 

Click the link below to open up the program in MakeCode. Click on the pink edit icon near the top of the title to open the code.

 

This will create a project in MakeCode and allow you to edit, modify and upload the code to the board.

Circuit Diagram

Circuit Diagram

This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference.

Power Pack

The 3xAAA battery pack can supply ~4.5V which is suffice to power the Circuit Playground Express. The battery plugs directs into the JST connector. You can also power from USB if you don't mind plugging it into a computer or wall adapter

Copper Tape

We'll use copper tape to extend the touch pads to the outside of the cup. The following connections are setup for the program in MakeCode.

  • The pads marked A4, A5 and A6 can connect to the copper tape

Assemble

Cut out Frame

 

First we'll print out our design files for the cup frame and our characters. We'll use the bigger trapezoid for our background.

 

We'll use the smaller trapezoid to trace an out line our coffee cup and then cut that out to create the framing on the cup. 

 

Now we'll secure the bigger trapezoid cutout to the inside of the cup with two small pieces of tape. Adhere the tape to the top area as shown.

 

The tree fort foreground will slide between the cup and the trapezoid piece.

 

 

Cut out design

 

Use scissors to cut out the characters to use in our scene! We can fit about three characters on a standard 12oz cup. 

 

We can also use a vinyl cutter to help cut out finer details in characters and scenes. The svg file includes silhouettes for each cutout print.   

 

circuit_playground_tabs-.jpg

circuit_playground_tabs-glued.jpg

circuit_playground_tabs-glued-back.jpg

3D Effect

The 3d pop out effects are created by adhering small strips of paper to the back of our characters. The ends are then attached to the foreground!

Add bends to the ends and then adhere with a glue stick or tape. 

Lid 

 

Now we can move on to securing the Circuit Playground Express to the Lid. 

 

Orient the USB port to the opposite side of the opening on the lid.

 

Thread the JST connector on the battery pack, through the sipping hole on the lid. Connect it to the Circuit Playground Express.

 

Use double stick foam tape to attach to the bottom side of the Circuit Playground Express. 

Copper Traces 

 

Build your own traces and route your connections so they’re on the outside of the lid.

 

Peel the backing off the copper tape and the press down flat on the lids contour. 

 

Press to conform to the contours of the lid around to the sides of the lid. 

USB port

 

Next we can add a cut out for the USB port. We'll align our usb cable and then mark and cut away material until the usb cable fits flat inside the lid.

Complete scene

 

We'll light up the cup and finish our scene by gluing our characters to our tree fort foreground! We should be able to fit two to three characters per lamp!

 

Experiment with all of the different sensors and animations to completely customize your lamp! 

This guide was first published on Jan 07, 2019. It was last updated on Jan 07, 2019.