# Desktop Dumpster Fire

## Overview

Having a bad day? With the press of a button and your small desktop storage container erupts into flames, creating a perfect visual representation of how life often feels, and a cathartic way to express oneself.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/481/medium800thumb/makecode_Dumpster_fire_CPX.2019-10-16_16_55_52.jpg?1571262255)

## How it Works

A servo motor opens the lid of the dumpster and a fan, powered by a DC motor, blows fake flames upwards. A Circuit Playground Express, programmed with MakeCode, controls the motors and illumination.

This project can be easily reprogrammed in MakeCode to take on different functions. A great beginner project, no soldering required!

## Parts
### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/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 made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### DC Toy / Hobby Motor - 130 Size

[DC Toy / Hobby Motor - 130 Size](https://www.adafruit.com/product/711)
These are standard '130 size' DC hobby motors. They come with a wider operating range than most toy motors: from 4.5 to 9VDC instead of 1.5-4.5V. This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino where you are more likely to have 5 or 9V...

Out of Stock
[Buy Now](https://www.adafruit.com/product/711)
[Related Guides to the Product](https://learn.adafruit.com/products/711/guides)
![DC Toy Hobby Motor ](https://cdn-shop.adafruit.com/640x480/711-06.jpg)

### DC Motor Plastic Mount - 130 Size / 20mm Diameter

[DC Motor Plastic Mount - 130 Size / 20mm Diameter](https://www.adafruit.com/product/3843)
We couldn't let the [DC Gearbox "TT" motors](https://www.adafruit.com/?q=DC%20gearbox) have all the fun! If you're using some sort of motor, there's a really good chance it's a low cost DC Motor in "130 Size". <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3843)
[Related Guides to the Product](https://learn.adafruit.com/products/3843/guides)
![DC Motor Plastic Mount with DC motor installed](https://cdn-shop.adafruit.com/640x480/3843-03.jpg)

### Sub-micro Servo - SG51R

[Sub-micro Servo - SG51R](https://www.adafruit.com/product/2201)
This is just about the cutest, tiniest little micro servo we could find, even smaller than the 9-gram micro servos we love so much. &nbsp;It can rotate approximately 180 degrees (90 in each direction) and works just like the standard kind you're used to but&nbsp;_much smaller_....

Out of Stock
[Buy Now](https://www.adafruit.com/product/2201)
[Related Guides to the Product](https://learn.adafruit.com/products/2201/guides)
![Sub-micro Servo with three pin cable ](https://cdn-shop.adafruit.com/640x480/2201-01.jpg)

### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

### 3-Bladed Trifoil Propeller Fan for DC Motor

[3-Bladed Trifoil Propeller Fan for DC Motor](https://www.adafruit.com/product/3896)
_Sprockets, wheels, and gears, oh my!_ We really like our DC hobby&nbsp;motors&nbsp;but unless you have a 3D printer it can be a challenge to get fun add-ons. That's why we've got this **3-Bladed Tri-foil Propeller** - it snaps on like a breeze (pun intended!)...

In Stock
[Buy Now](https://www.adafruit.com/product/3896)
[Related Guides to the Product](https://learn.adafruit.com/products/3896/guides)
![Small, blue, plastic, 3-bladed trefoil propeller fan.](https://cdn-shop.adafruit.com/640x480/3896-00.jpg)

### JST 2-pin Extension Cable with On/Off Switch - JST PH2

[JST 2-pin Extension Cable with On/Off Switch - JST PH2](https://www.adafruit.com/product/3064)
By popular request - we now have a way you can turn on-and-off Lithium Polymer batteries without unplugging them.

This **PH2 Female/Male&nbsp;JST 2-pin Extension Cable&nbsp;** comes with an in-line **Switch** - click once to turn on, click again to turn off....

In Stock
[Buy Now](https://www.adafruit.com/product/3064)
[Related Guides to the Product](https://learn.adafruit.com/products/3064/guides)
![Top view shot of JST 2-pin Extension Cable with On/Off Switch.](https://cdn-shop.adafruit.com/640x480/3064-02.jpg)

## Additional Materials

In addition to the electronics, for this project you will also need:

- Tissue paper
- Markers and/or highlighters (red/orange/yellow preferred)
- [Hot glue gun](https://www.amazon.com/dp/B006IY359K/ref=cm_sw_r_tw_dp_U_x_FYW0CbKBYQ6H1)
- Scissors
- Wooden skewers
- Access to a 3D printer

Read on to learn how to build your own!

# Desktop Dumpster Fire

## Circuit Diagram

The circuit for this project connects two motors, one DC and one servo, to the Circuit Playground Express board using alligator clips.

The DC motor will begin running as soon as power to the board is turned on. This motor can be connected to either the **Vout** or the **3.3V** pads on CPX board.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/680/medium800/makecode_CPX_servo_dc_bb.jpg?1571695794)

## Power Options

Circuit Playground Express can use a variety of power sources, anywhere between 3V-5V is safe. This compact&nbsp;[2000mAh lithium ion battery](https://www.adafruit.com/product/2011)&nbsp;is excellent for powering projects like this.&nbsp;

A set of&nbsp;[3 AAA batteries](https://www.adafruit.com/product/3520)&nbsp;also provides ample power, if that option is more convenient. If you're using a&nbsp;[AAAx3 battery pack](https://www.adafruit.com/product/727), check that the switch on the **&nbsp;** battery pack is set to "ON".

### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1304)
[Related Guides to the Product](https://learn.adafruit.com/products/1304/guides)
![Top view of Adafruit Micro Lipo - USB LiIon/LiPoly charger - v1 above a 2-pin JST cable.](https://cdn-shop.adafruit.com/640x480/1304-06.jpg)

### Lithium Ion Battery - 3.7V 2000mAh

[Lithium Ion Battery - 3.7V 2000mAh](https://www.adafruit.com/product/2011)
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 2000mAh. If you need a larger (or smaller!) battery,&nbsp;<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/2011)
[Related Guides to the Product](https://learn.adafruit.com/products/2011/guides)
![Lithium Ion Polymer Battery 3.7v 2000mAh with JST 2-PH connector](https://cdn-shop.adafruit.com/640x480/2011-05.jpg)

- OR -

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

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/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 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries and have an on-off switch. That makes...

In Stock
[Buy Now](https://www.adafruit.com/product/727)
[Related Guides to the Product](https://learn.adafruit.com/products/727/guides)
![Front angled shot of 3 x AAA battery holder with on-off switch and 2-pin JST PH connector.](https://cdn-shop.adafruit.com/640x480/727-07.jpg)

### Alkaline AAA batteries - 3 pack

[Alkaline AAA batteries - 3 pack](https://www.adafruit.com/product/3520)
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAA's. This is a pack of **3 AAA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

In Stock
[Buy Now](https://www.adafruit.com/product/3520)
[Related Guides to the Product](https://learn.adafruit.com/products/3520/guides)
![Angled shot of 3 PKcell AAA batteries. ](https://cdn-shop.adafruit.com/640x480/3520-00.jpg)

# Desktop Dumpster Fire

## MakeCode

## Getting Familiar

**Microsoft MakeCode for Adafruit is&nbsp;** a web-based code editor that provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users.

If you'd like to learn more about MakeCode,&nbsp;[this guide is a good place to start](https://learn.adafruit.com/makecode/downloading-and-flashing?embeds=allow).

![](https://cdn-learn.adafruit.com/assets/assets/000/082/484/medium800/makecode.jpg?1571264871)

## The Code

The code is shown below. For browser viewing, you may need to enable content. For example, in Chrome, click "Show Embedded Content" as the material is fed not from Adafruit but from Microsoft's MakeCode site.

To download the code, click the download link at the bottom of the window. To edit the code in MakeCode, click the box with arrow icon in the upper right corner of the window.

https://makecode.adafruit.com/78168-47057-60297-36326

## How to Upload Code

To upload code to Circuit Playground Express, follow these instructions:

1) Connect your Circuit Playground Express to your computer using a known, good data+power micro USB cable and press the small reset button in the center of the board. All the LEDs will flash&nbsp; **red&nbsp;** briefly **, then turn green.&nbsp;** Your computer should now show a removable drive called&nbsp; **CPLAYBOOT.&nbsp;**

2) Click the&nbsp; **Download** &nbsp;button in the code window below to download the **&nbsp;.UF2 file** &nbsp;to your computer.

3) Now **&nbsp;drag and drop the .UF2 file onto the CPLAYBOOT** &nbsp; **drive** &nbsp;in your computer's file explorer or finder.

Once the file is dragged onto&nbsp; **CPLAYBOOT,** &nbsp;the drive will automatically eject itself (your computer may give you a "failed to eject drive correctly" error, you can ignore this). The code is now on your Circuit Playground Express and ready to run!

Note: If you get a drive named&nbsp; **CIRCUITPY** , no worries! Press the reset button&nbsp; **twice** &nbsp;to get a flash drive named&nbsp; **CPLAYBOOT**. The project will not run if copied onto the&nbsp; **CIRCUITPY** &nbsp;drive as it is for CircuitPython.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/283/medium800thumb/makecode_CPX_bootloader_mode.jpg?1572464530)

## How does this work?

This code benefits from being very simple. In the `on start` loop, the servo is set to rotate as soon as power is turned on.

You will notice there is no instruction for closing the lid, that is accomplished by the weight of the lid -once power is turned off to the servo motor it no longer holds its position and the lid slowly falls back into place.

In the `forever` loop, you can see we tell the pixels to play an animation, adding a fiery effect to the flames.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/958/medium800/makecode_Screen_Shot_2019-10-25_at_5.12.41_PM.png?1572038294)

## Troubleshooting

**Problem:&nbsp;** My Circuit Playground Express doesn't show up as&nbsp; **CPLAYBOOT**

**Solutions:**

1. Be sure you have a Circuit Playground Express.&nbsp; The Circuit Playground Classic will not work with MakeCode.
2. If you get a drive named&nbsp; **CIRCUITPY** &nbsp;instead, press the reset button twice in succession to get to&nbsp; **CPLAYBOOT**.
3. Some USB cables are "charge-only" and won't pass data. Try using a different USB cable and try using a different USB port on your computer.&nbsp;&nbsp;
4. With the Circuit Playground Express plugged into your computer with a micro USB cable,&nbsp; **click the small reset button** &nbsp;in the center of the board. The lights should all turn green. If they don't, try&nbsp; **double-clicking** &nbsp;the reset button.

If things still aren't working, head over to the Intro to&nbsp;[Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express)&nbsp;guide for more suggestions.

# Desktop Dumpster Fire

## 3D Printing

The 3D files for this project can be downloaded by clicking the button below.

This design for this project is based on the [Dumpster model](https://www.thingiverse.com/thing:950602)&nbsp;created by&nbsp;[Simon Kangiser](https://www.thingiverse.com/Simonarri/about).

[Desktop Dumpster Fire 3D files](https://www.thingiverse.com/thing:3930040)
## Printing the Dumpster

The dumpster prints in five different files, which are assembled together after printing.

The three large parts -the bin, the lids, and the hinge, will take the longest to print. Everything is sized so that it should press-fit together snugly.

The wheels and bar are optional, as the wheels can be replaced with [little rubber bumper feet](https://www.adafruit.com/product/550), and the bar that hold the lids to the hinge can be replaced with a straightened out paper clip or something similar if you'd prefer not to print those parts.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/082/869/medium800thumb/makecode_IMG_8137.2019-10-23_15_22_45.jpg?1571860088)

![](https://cdn-learn.adafruit.com/assets/assets/000/082/960/medium800thumb/makecode_Lids.2019-10-25_15_39_51.jpg?1572038671)

![](https://cdn-learn.adafruit.com/assets/assets/000/083/282/medium800thumb/makecode_Hinge.2019-10-30_14_20_38.jpg?1572464003)

# Desktop Dumpster Fire

## Create Dumpster Fire

## Flames

Using thin tissue paper (so it will blow easily by the fan), create flame-like patterns using a combination of red, orange, and yellow markers and/or highlighters.

Cut an approximately 4-inch length of wooden skewer or dowel.

Glue flames to this section of skewer, leaving a short length of the skewer extending off to the right.

![makecode_IMG_8142.jpg](https://cdn-learn.adafruit.com/assets/assets/000/082/966/medium640/makecode_IMG_8142.jpg?1572040858)

![makecode_IMG_8144.jpg](https://cdn-learn.adafruit.com/assets/assets/000/082/967/medium640/makecode_IMG_8144.jpg?1572040874)

A short length of string (floss also works fine) can be used to yank the flames vertical when the dumpster lid opens.

Tie a knot in one end and, after passing the string through the center of the flames, use a dab of hot glue to affix the other end to the underside of the dumpster lid.

![makecode_IMG_8240.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/279/medium640/makecode_IMG_8240.jpg?1572461456)

## Lid-Opener

Attach a short extension made from a wooden skewer or something similar to the servo arm.

Press the servo arm onto the servo motor and check that its range of motion will allow the dumpster lid to open fully.

Use a thin strip of cardboard to keep the dumpster lid connected to the servo arm.

![makecode_IMG_8250.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/277/medium640/makecode_IMG_8250.jpg?1572460973)

![makecode_IMG_8244.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/278/medium640/makecode_IMG_8244.jpg?1572461055)

## Wind Power

You may need to shave down the ends of the propellor for it to spin freely inside the dumpster bin.

Place the motor inside the dumpster and stick it in place using a small piece of double sided foam tape or a dab of hot glue.

![makecode_IMG_7982.jpg](https://cdn-learn.adafruit.com/assets/assets/000/082/968/medium640/makecode_IMG_7982.jpg?1572040903)

Your wiring and electronics should fit neatly inside the dumpster, with the battery cable extending out the back.

![](https://cdn-learn.adafruit.com/assets/assets/000/082/482/medium800/makecode_IMG_7967.jpg?1571263364)

When the lid on the right is lowered, the flames should be positioned right above the fan.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/272/medium800/makecode_IMG_8242.jpg?1572456421)

Poke the pushbutton switch from the battery cable out from under the front of the dumpster to create an easy on-off switch for your dumpster fire.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/275/medium800thumb/makecode_IMG_8248.2019-10-30_14_19_09.jpg?1572459684)


## Featured Products

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/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 made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Sub-micro Servo - SG51R

[Sub-micro Servo - SG51R](https://www.adafruit.com/product/2201)
This is just about the cutest, tiniest little micro servo we could find, even smaller than the 9-gram micro servos we love so much. &nbsp;It can rotate approximately 180 degrees (90 in each direction) and works just like the standard kind you're used to but&nbsp;_much smaller_....

Out of Stock
[Buy Now](https://www.adafruit.com/product/2201)
[Related Guides to the Product](https://learn.adafruit.com/products/2201/guides)
### DC Toy / Hobby Motor - 130 Size

[DC Toy / Hobby Motor - 130 Size](https://www.adafruit.com/product/711)
These are standard '130 size' DC hobby motors. They come with a wider operating range than most toy motors: from 4.5 to 9VDC instead of 1.5-4.5V. This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino where you are more likely to have 5 or 9V...

Out of Stock
[Buy Now](https://www.adafruit.com/product/711)
[Related Guides to the Product](https://learn.adafruit.com/products/711/guides)
### 3-Bladed Trifoil Propeller Fan for DC Motor

[3-Bladed Trifoil Propeller Fan for DC Motor](https://www.adafruit.com/product/3896)
_Sprockets, wheels, and gears, oh my!_ We really like our DC hobby&nbsp;motors&nbsp;but unless you have a 3D printer it can be a challenge to get fun add-ons. That's why we've got this **3-Bladed Tri-foil Propeller** - it snaps on like a breeze (pun intended!)...

In Stock
[Buy Now](https://www.adafruit.com/product/3896)
[Related Guides to the Product](https://learn.adafruit.com/products/3896/guides)
### DC Motor Plastic Mount - 130 Size / 20mm Diameter

[DC Motor Plastic Mount - 130 Size / 20mm Diameter](https://www.adafruit.com/product/3843)
We couldn't let the [DC Gearbox "TT" motors](https://www.adafruit.com/?q=DC%20gearbox) have all the fun! If you're using some sort of motor, there's a really good chance it's a low cost DC Motor in "130 Size". <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3843)
[Related Guides to the Product](https://learn.adafruit.com/products/3843/guides)
### Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces

[Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces](https://www.adafruit.com/product/3448)
When working&nbsp;with unusual non-header-friendly surfaces, these handy cables will be your best friends! No longer will you have long, cumbersome strands of alligator clips. These compact jumper cables have a premium male header on one end and a grippy mini alligator clip on the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3448)
[Related Guides to the Product](https://learn.adafruit.com/products/3448/guides)
### JST 2-pin Extension Cable with On/Off Switch - JST PH2

[JST 2-pin Extension Cable with On/Off Switch - JST PH2](https://www.adafruit.com/product/3064)
By popular request - we now have a way you can turn on-and-off Lithium Polymer batteries without unplugging them.

This **PH2 Female/Male&nbsp;JST 2-pin Extension Cable&nbsp;** comes with an in-line **Switch** - click once to turn on, click again to turn off....

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

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Cosplay Floating LED Fireball with Motion Sensing](https://learn.adafruit.com/cosplay-fireball-prop-with-motion-sensing.md)
- [Professor Bubbleton’s Breathing Head in a Jar](https://learn.adafruit.com/professor-bubbleton-s-breathing-head-in-a-jar.md)
- [Glowing Interactive Crystal Staff ](https://learn.adafruit.com/glowing-interactive-crystal-staff.md)
- [Using Piezo Buzzers with CircuitPython & Arduino](https://learn.adafruit.com/using-piezo-buzzers-with-circuitpython-arduino.md)
- [Tilt Controlled Marble Maze](https://learn.adafruit.com/tilt-controlled-marble-maze.md)
- [Circuit Playground Musical Glove](https://learn.adafruit.com/cpx-musical-glove.md)
- [Mu Keyboard Shortcut Cheat Sheets](https://learn.adafruit.com/mu-keyboard-shortcut-cheat-sheets.md)
- [Crickit Powered Minerva Owl Robot](https://learn.adafruit.com/crickit-powered-owl-robot.md)
- [Wind Blowing Emoji Prop](https://learn.adafruit.com/wind-face-emoji.md)
- [Make It Sense](https://learn.adafruit.com/make-it-sense.md)
- [Circuit Playground Express Spooky Laughing Box](https://learn.adafruit.com/spooky-circuit-playground-express-mystery-box.md)
- [Archimedes' Boat](https://learn.adafruit.com/archimedes-boat.md)
- [Pushrod Garage](https://learn.adafruit.com/pushrod-garage.md)
- [Glowing Lotus Flower - Electronic Origami for Beginners](https://learn.adafruit.com/glowing-lotus-flower-electronic-origami-for-beginners.md)
- [CircuitPython Hardware: SD Cards](https://learn.adafruit.com/micropython-hardware-sd-cards.md)
