Sam Jacoby

Drawing the Electric Synth

Posted . [Last updated . ]

This is a compendium of resources assembled for a workshop over the weekend of April 6 and 7 at SparkFun Electronics in Boulder, Colorado.

Workshop Description

We’ll explore conductive inks and other materials to create unique, interactive musical instruments. Learn the basics of embedded microcontroller programming and circuit design, while crafting miniature synthesizers using a combination of electronics, programming, and art materials. For those interested, we can delve into the mysteries of FM sound generation and work on creating structed, pictorial representations of sound. No experience necessary—but you’ve got to love crafts, drawing, sound, and learning new ways of making electronics.

Contents

Surveys

For our ongoing research at High-Low Tech and my own thesis, there is a pre-and-post workshop survey that should be filled out. There’ll be paper copies available, but filling it out online is quicker and easier!

If you’ve happened to stumble on this survey and won’t be attending the workshop, make my life a little easier and don’t fill it out! Note: these links are now dead, ‘cus, uh, its over.

Schedule (theoretically)

9:00 Surveys!
9:15 Introductions (me, mostly)
9:30 How-to-make a Paper Speaker
10:20 Break
10:30 Making circuits with Conductive Ink
11:30 A brief introduction to the ATTiny + TinyProgrammer (this might be ambitious)
12:00 Lunch & Arduino-debugging
1:00 Programming Blink. It’s a miracle!
1:15 Programming TinySynth
1:30 Code overview
1:45 Make some Synths!
2:10 Break
4:45 Fill out post-workshop survey

Paper Speakers

I’ve written up the basics, gleaned from many-a-resource, here:

Hannah Perner-Wilson is a one-person armada. She has done a variety of gorgeous pieces:

Marcelo Coelho put together some particularly striking, insprirational examples, if a bit more involved than what we’ll be making.

jckarich has a number of gorgeous projects (some done right at home, in the MIT Media Lab):

 Templates

I put together a simple template, that guides you on how to make the design shown here, Speakers Paperish. It’s just a rough guideline, but can give you some ideas.

 TinyProgrammer

The TinyProgrammer is a sweet little tool that vastly simplifies the programming of Atmel’s ATTiny45/85 microcontrollers. The ATTiny can do just about everything an Arduino can do (Atmel makes the ATmega168/32U4), but are much cheaper, smaller, and more easily embedded. If you want to make twenty of something, it’s a lot easier to get your hands on 20 ATTinys (they’re $.95 on SparkFun) than 20 Arduinos. David Mellis designed this one. Or actually, he designed one, and SparkFun redesigned it to make it way better.

To get started with it on your computer, you’ll need (a) to have the Arduino IDE installed (get it here if you haven’t already) and (b) have ATTiny installed (it doesn’t come with the normal download). While the ATTiny is an Atmel chip (like the chips that power the Arduino), Arduino doesn’t come with support for the ATTiny family out-of-the-box, so you’ll have to follow the tutorial below to add ATTiny Support. Hopefully this’ll change at some point.

TinySynth

The TinySynth is a program loaded onto an ATTiny45/85 that uses an eight-bit microcontroller to make sounds. We’ll need:

  • TinyProgrammer
  • ATTiny45/85
  • Coin Cell
  • Paper Speaker
  • Conductive Ink

Getting up and playing with the Tiny is simple enough. Most of the default Arduino sketches work with the ATTiny outt’ve of the box. Some things will have to be tweaked, though, as the default Arduino pins don’t necessarily map to anything useful on the Tiny—pin 13, which by default is connected to an LED on an Arduino board doesn’t go anywhere on a Tiny:

Arduino-compatible pinout for Tiny45 (image courtesy of David Mellis).

The program that we’ll be loading onto our Tiny’s is a basic sound generation library I’ve written. You can peruse the source over on GitHub, and down a .zip of the necessary files here: zip archive.

To use, unzip the folder and open the “tinysynth.ino” file (you need to have Arduino installed).

TinySynth has been preconfigured to have two touch-sensitive capacitive sensors and two LEDs, as well as a speaker output. See below:

IMG_4275

TOUCH1 triggers LED1, TOUCH2 triggers LED2

The RESET pin is only used while the chip is being programmed. We could disable it, but it means that you’d need some special hardware to ever program the chip again. POWER and GND, naturally enough, are connected to the positive and negative terminals of your power supply—in our case, a coin-cell battery or what-have-you.

While we’re programming the chip, we can test some of its functions — but ultimately, we’re going to making fancy-pants circuits outt’ve of conductive ink. Below is a rough schematic of what the circuit looks like. The various symbols correspond to different components: batteries, LEDs, and so forth. Which is which? You decide!

IMG_4304

Your circuit doesn’t need to look like this at all. These are just the connections.

Applying silver ink can be difficult. Go slow. With attention and care, you can draw fine, well-controlled traces.

Preparing your microcontroller to work on a paper surface also requires some attention. Dave Mellis has put up some good, relevant guidlines here: Micocontroller Circuit with Copper Tape.

Electric Narratives

Painting with conductive silver ink.

Note: The conductive silver ink we’ll be using dries fairly slowly and was designed to be heat-dried at a specific temperature. A regular toaster oven will do the job. We’ve supplied some hot-air stations and heateriziers that should work just as well. When working with microcontrollers, as we are, you need to be sensitive to the resistance of each line, because the microcontroller expects a very specific range of voltages on its pins.

Here’s a complete example with a big ol’ gramophone cone sticking out. This uses a painted silver speaker (instead of a wound-wire speaker), which works, but without amplification, is very quiet!

Capactive touch button

Speakers need to be coiled in a single direction—so on the back of this sheet, there’s a straight line leaving the center.

Battery Holders

Integrating “hard” components, like batteries and microcontrollers, with “soft” materials, like paper and textiles, is always difficult. Here’s one way of creating battery a battery holder for a coin-cell battery, using the corner of a sheet of paper and a binder clip.

Fold over the corner of a sheet of paper. It should completely and easily cover the battery.

IMG_4311

Using conductive ink, paint over the fold as shown in the black rectangles below. Because conductive paint doesn’t crease well, it can sometimes be a good idea to replace those portions of your circuit with short lengths of copper tape (SparkFun. The configuration has to be relatively precise, because you don’t want to short the battery. Position it with the (+) side up.

IMG_4313

Fasten the folded over corner down over the battery with a binder clip.

IMG_4314

Adding Amplification with a MOSFET

Once you’ve made your circuit, you’ll probably notice that it’s not overwhelmingly loud. That’s because we’re driving the speaker with one of the pins of the microcontroller, which really isn’t great for that sort of thing. According to the datasheet, the ATTiny can source about 20 milliamps, which isn’t all that much. Using a MOSFET, we can drive a great deal more current through our speaker—and theoretically at least—make it louder.

Here’s my crude schematic of the mosfet that we’ll be using. It has a particularly low threshold-voltage, which means it works well with the low-voltage coin-cell batteries. It’s an N-channel MOSFET, which is very important, though why, I could not say.

IMG_4305

G: Gate, D: Drain, S: source

Figuring out just how the “FET”—as such things are sometimes called—is hooked up into the circuit is trickier than it should be, at least for me. We’re interested in the gate, drain, and source. The gate is what we’ll connect to our microcontroller. The source, we’ll connect straight to ground. And the drain, we’ll connect to one end of our speaker. The diagram below gives about half the answer.

IMG_4307

The missing piece, here, is what the other end of the speaker is connected to. If one side is connected to drain — the other side of your speaker should be connected to power. There are a variety of ingenious analogies that explain the way in which a MOSFET Works—controlling a valve, opening and closing a dam—but the more lucid ones escape me now. At any rate, suffice it to say, it allows the relative weak microcontroller signal to control a much more powerful flow of current directly from the battery. Which naturally enough, makes it a bit more of a ruckus.

Helpful Links & So Forth

Jie Qi has put up some useful information about making circuits using copper tape on the High-Low Tech website. There’s also good information about the orientation of surface-amount LEDs—which can be tricky to work with!

A really nice collection of elegant folded designs. Incorporating power into paper electronic projects has long been tricky, and these are some nice solutions. We’ve long-used a binder clip and a coin-cell battery, which works pretty well too.

This is not really that useful for our purposes here—a hundred-odd pages of technical specifications. But it’s interesting if you want to delve deeper into how people actually understand these things. And the pin diagram is on the second page.

It Happened

April 6 & 7 has come and gone, and people put together many lovely things. Here’s a handful:

Drawing the Electric Synth

Drawing the Electric Synth
Drawing the Electric Synth
Drawing the Electric Synth
Drawing the Electric Synth
Drawing the Electric Synth