Circuit sculpture uses soldered brass rods as components in electronic circuits.

This project shows you the tools and techniques you need to get started through a simple touch-reactive heart that uses an Adafruit GEMMA M0 and CircuitPython.

While this project is deliberately simple, the things you can create with Circuit Sculpture are limited only by your imagination & patience. For more inspiration, consider taking a look at some of Mohit Bhoite's works.

Are you new to using CircuitPython? No worries, there is a full getting started guide here.

Parts & Supplies

Please be sure you get two CR2032 Lithium batteries for the battery pack.

In addition to the parts shown below, you'll need some double-sided foam tape and hot glue for assembly.

The brass rod is available at many hardware stores. This project is designed to use just one 1' brass rod, leaving you with extras for experimentation.

The Adafruit Gemma M0 is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the...
$9.95
In Stock
These are the best diagonal cutters, large super-comfortable grip to use and have strong nippers for perfect trimming of wires and leads. I've used my pair every day for years.
$7.25
In Stock
You re-work hard all day, so treat yourself with the BEST portable Adjustable Soldering Iron we carry!  OK, "Best" may be subjective, but it's also...
$19.95
In Stock
If you want to make a kit you'll need some solder. This 0.1lb / 50g spool is a good amount, not too much (like 1 lb spools) and not too little (like those little 'pocket...
$17.50
In Stock
This tiny coin cell battery holder is ideal for small portable or wearable projects. It holds two 20mm coin cells (2032 are the most popular size) in series to generate 6V nominal. (If...
$1.95
In Stock
This silicone mat is made of 4mm thick rubber and can take just about anything you throw at it. It's stable, strong, non-slip, non-conductive and heat-resistant surface for your...
$9.95
In Stock
The classic 'third hand tool,' as seen on every desk! We have one next to our Panavise jr, they complement each other well. This...
$6.00
In Stock
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...
$2.95
In Stock
2 x CR2032 Lithium Coin Cell Battery
This non-rechargeable coin cell is CR2032 sized: 20mm diameter, 3.2mm thick
1 x Brass Rod
K&S #8160 Solid Brass Rod, .032" (0.81mm) diameter, 12" long, 5 pack
As CircuitPython development continues and and there are new releases, Adafruit will stop supporting older releases. If you are running earlier versions of CircuitPython, you need to update to the latest. Generally Adafruit will support the last two major versions.

Some of the CircuitPython compatible boards come with CircuitPython installed. Others are CircuitPython-ready, but need to have it installed. As well, you may want to update the version of CircuitPython already installed on your board. The steps are the same for installing and updating. This section will cover how to install or update CircuitPython on your board.

You only have to install CircuitPython ONCE. After that you are free to code all you like without going through this process again until it's time to upgrade!

Download the latest version!

The first thing you'll want to do is download the most recent version of CircuitPython.

If you're already running CircuitPython, make sure you're running the latest version! If you're unsure, you can follow the steps below to ensure you have the latest version installed.

Always back up your code before installing or updating CircuitPython!

ALWAYS BACKUP YOUR CODE BEFORE INSTALLING OR UPDATING CIRCUITPYTHON. Most of the time, nothing will be removed from your board during the update, but it can happen. If you already have code on your board, be sure to back it up to your computer before following the steps below.

Download the latest software for your board by clicking the green button below to go to CircuitPython.org.

Next, you'll want to plug in your board using a known-good USB data cable. Make sure the USB cable is a data cable! There are some that work only for charging and can lead to a lot of frustration.

Windows 7 and 8.1 Drivers

If you're using Windows 7 or 8.1, you need to install a driver before plugging in your board.

If you're using Windows 7 or 8.1, check out the Windows 7 and 8.1 Drivers page for details.

It is recommended that you upgrade to Windows 10 if possible.

Start the UF2 Bootloader

Nearly all CircuitPython boards ship with a bootloader called UF2 (USB Flashing Format) that makes installing and updating CircuitPython a quick and easy process. The bootloader is the mode your board needs to be in for the CircuitPython .uf2 file you downloaded to work. If the file you downloaded that matches the board name ends in uf2 then you want to continue with this section. However, if the file ends in .bin, you have to do a more complex installation - go to this page for details.

For most boards:

Find the reset button on your board. It's a small, black button, and on most of the boards, it will be the only button available. It is typically labeled RESET or RST on the board. (On Circuit Playground Express and Bluefruit, it's the smaller button located in the center of the board.)

Tap this button twice to enter the bootloader. If it doesn't work on the first try, don't be discouraged. The rhythm of the taps needs to be correct and sometimes it takes a few tries. If you have a Circuit Playground Express, and it's fresh-out-of-the-bag try pressing the button once.

For RP2040 boards:

You'll want to find two buttons on the RP2040 boards: reset and BOOTSEL/BOOT. The two buttons are the same size - small black buttons. Reset is typically labeled RESET or RST on the board. The boot button is labeled BOOTSEL or BOOT on the board.

To enter the bootloader on an RP2040 board, you must hold down the boot select button, and while continuing to hold it, press and release the reset button. Continue to hold the boot select button until the bootloader drive appears.

Bootloader Mode

Once successful, the RGB status LED(s) on the board will flash red and then stay green. A new drive will show up on your computer.

For most boards:

The drive will be called boardnameBOOT where boardname is a reference to your specific board. For example, a basic Feather will have FEATHERBOOT and a Trinket will have TRINKETBOOT etc.

For RP2040 boards:

The drive will be called RPI-RP2 on all RP2040 boards.

Going forward, the bootloader drive will be referred to as the boot drive.

The board is now in bootloader mode! This is what you need to install or update CircuitPython.

Install CircuitPython

Now find the file you downloaded. Drag that file to the boot drive on your computer.

The lights should flash again, boot will disappear and a new drive will show up on your computer called CIRCUITPY.

Congratulations! You've successfully installed or updated CircuitPython!

What's the difference between CIRCUITPY and boardnameBOOT or RPI-RP2?

When you plug a CircuitPython board into your computer, your computer will see the board's flash memory as a USB flash drive where files can be stored. When you have successfully installed CircuitPython, you'll see the CIRCUITPY drive. When you double-tap the reset button on most boards, you'll see the boardnameBOOT drive, or when hold boot select and tap reset for RP2040 boards, you'll see RPI-RP2. You can drag files to the boot drives and CIRCUITPY, but only CIRCUITPY will run your CircuitPython code.

Normally, when you drag a file to a mounted USB drive, the file copies to the drive and then is able to be seen in your file explorer. However, when you drag the CircuitPython UF2 file to the boot drive, it seems to disappear, and the drive disconnects. This is normal! The UF2 is essentially an installer file, and does not simply sit on the drive, but installs CircuitPython if the board is in bootloader mode (i.e. the boot drive).

You will be able to copy other files to the boot drive but they will not run or be accessible to CircuitPython. So make sure that once you're done installing CircuitPython, that you're dragging to and editing files on the CIRCUITPY drive!

Bootloader Drive Names

This list is not exhaustive, but should give you an idea what to look for in a bootloader drive name.

  • Feather RP2040 = RPI-RP2
  • QT Py RP2040 = RPI-RP2
  • ItsyBitsy RP2040 = RPI-RP2
  • Trinket M0 = TRINKETBOOT
  • Gemma M0 = GEMMABOOT
  • Circuit Playground Express = CPLAYBOOT
  • ItsyBitsy M0 Express = ITSYBOOT
  • ItsyBitsy M4 Express = ITSYM4BOOT
  • Feather M0 Express = FEATHERBOOT
  • Feather M4 Express = FEATHERBOOT
  • Metro M0 Express = METROBOOT
  • Metro M4 Express = METROM4BOOT
  • Grand Central M4 Express = GCM4BOOT
  • NeoTrelis M4 Express = TRELM4BOOT 

Mu is a simple code editor that works with the Adafruit CircuitPython boards. It's written in Python and works on Windows, MacOS, Linux and Raspberry Pi. The serial console is built right in so you get immediate feedback from your board's serial output!

Mu is our recommended editor - please use it (unless you are an experienced coder with a favorite editor already!).

Download and Install Mu

Download Mu from https://codewith.mu.

Click the Download link for downloads and installation instructions.

Click Start Here to find a wealth of other information, including extensive tutorials and and how-to's.

 

Windows users: due to the nature of MSI installers, please remove old versions of Mu before installing the latest version.

Starting Up Mu

The first time you start Mu, you will be prompted to select your 'mode' - you can always change your mind later. For now please select CircuitPython!

The current mode is displayed in the lower right corner of the window, next to the "gear" icon. If the mode says "Microbit" or something else, click the Mode button in the upper left, and then choose "CircuitPython" in the dialog box that appears.

Mu attempts to auto-detect your board on startup, so if you do not have a CircuitPython board plugged in with a CIRCUITPY drive available, Mu will inform you where it will store any code you save until you plug in a board.

To avoid this warning, plug in a board and ensure that the CIRCUITPY drive is mounted before starting Mu.

Using Mu

You can now explore Mu! The three main sections of the window are labeled below; the button bar, the text editor, and the serial console / REPL.

Now you're ready to code! Let's keep going...

Installing the CircuitPython Library Bundle

We're constantly updating and improving our libraries which provide functionality to CircuitPython. You can find example code in the guides for your board that depends on external libraries. Some of these libraries may be available from Adafruit, some may be written by community members.

Either way, as you start to explore CircuitPython, you'll want to know how to get libraries on board.

You can grab the latest Adafruit CircuitPython Bundle release by clicking the button below.

Once you've finished setting up your GEMMA M0 with CircuitPython, you can add the libraries to the lib folder of the GEMMA's CIRCUITPY drive which should appear when the board is plugged into your computer via a known good USB cable.

Copy this folder:

  • adafruit_bus_device

And these files:

  • adafruit_dotstar.mpy
  • adafruit_pypixelbuf.mpy

To the CIRCUITPY flash drive /lib directory (create the directory if it doesn't exist).

Then, you can click on the Download: Project Zip link in the window below to download the code file. Take code.py from this zip and put it in the main (root) directory of the CIRCUITPY drive.

import time
import adafruit_dotstar
from rainbowio import colorwheel
import board
import touchio

pixel = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=.1)

touch = touchio.TouchIn(board.D1)

hue = 0
while True:
    hue = hue + touch.value * 3
    if hue > 255:  # Wrap back around to red
        hue = hue - 255
    pixel[0] = colorwheel(hue)
    time.sleep(.05)

Review

Make sure you've followed these steps:

  • Loaded all the required library files and directories into the CIRCUITPY /lib directory
  • Copied code.py to the main (root) directory of the CIRCUITPY drive

Your GEMMA M0's CIRCUITPY drive should look like this after you load the libraries and code.py file.

The storage available in the GEMMA M0 is limited. If you're having trouble getting the files and folders to fit, check out these troubleshooting steps.

Press and hold a fingertip against the "D1" pad. The DotStar LED should cycle through a rainbow of colors while D1 is touched, and show a solid color when D1 is not touched. If it doesn't, make sure you copied the files and folders as shown above. If you're still stuck, you can use the CircuitPython REPL in Mu to troubleshoot the problem by viewing possible error messages.

When cutting the brass rod, wear eye protection and control both parts that will result from the cut.
When soldering the brass rod, all parts of the brass rod can be heated enough to burn. As always when soldering, exercise caution and do not handle any part that could be hot.

Mark the brass rod for cutting at 5", 10", and 11". (approximately 125mm, 250mm, 280mm)

Make the cuts at 5" and 10", giving two 5" segments.

Gently bend one end of the wire around a handy cylinder of about 1.5" diameter, like this glass spray bottle. Create a bend of about 270 degrees.

Repeat with the second piece, then gently modify the two curves until you can lay them next to each other and get a symmetrical heart shape.

There are lots of other ways to form the rod for your sculptures. You can apply sharp bends using pliers, use 3D printed or wood jigs to create complicated curves, etc.

Using your soldering iron, flow solder onto the spots where the rods need to be joined. The technique that works best for you will vary, but here the soldering was performed directly on a silicone soldering mat.

You can use painter's tape to position & hold the rods. Many people find that a Third Hand soldering assistant is also helpful for tasks like this.

Above all, give some time and patience to become comfortable with the techniques and find one that works for you!

Next, cut the remaining 2" piece in half, giving two 1" pieces. Place the GEMMA M0 in the center of the heart, then arrange the short rod pieces so that they touch the heart and reach the "D0" and "D1" pads on the GEMMA. Make everything symmetrical, then solder.

This photo shows the rods on the front of the GEMMA, but flipping the GEMMA over and soldering the rods to the back side of the pads gives a more pleasing result.

If the rods are slightly too long, place the excess on the GEMMA side and carefully trim the excess after soldering. Remember to hold the trimmed end in place so that it doesn't go flying when you cut!

If any of the solder joints are big and blobby, use sand paper to remove the excess material. If an excess of sticky and gummy soldering resin residue remains, remove it with isopropyl (rubbing) alcohol.

Put the batteries in the battery case, plug it in, and make sure that the GEMMA M0 powers up and runs the touch reactive program. If it doesn't light, first check both power switches (on the GEMMA itself, and on the battery pack) are turned ON. If it still doesn't turn on, double-check that the batteries are correctly installed. There are small "+" and "-" marks on the inside of the battery case.

To keep most of the battery cable out of the way, you can hot glue it to the back of the battery case.

Next, use a piece of double-sided foam-core sticky tape to fix the battery pack to the GEMMA M0.

Assembly complete! Just turn the device on at the battery pack when you want light, and off when you don't. If your hand is touching the wire when you turn it on, the touch sensor may not work properly. Simply press the reset button briefly while not touching the wire to reset and recalibrate the touch sensor.

What's next?

With these basic techniques you can design and build your own Circuit Sculptures. These sculptures can include other circuit elements like LEDs (plain, NeoPixel or DotStar), speakers/buzzers, or really anything that you could connect with wires. For more complex designs, advanced planning and measuring are key to getting the result you're looking for. What will you create?

This guide was first published on Mar 12, 2021. It was last updated on 2021-03-12 17:21:24 -0500.