Improving Arduino sensor range



Adding a fixed resistor ½ the value of a variable resistance sensor improves Arduino performance.


Whenever you connect a 2-lead variable resistor (VR) sensor (like a photo cell or bend sensor) to an Arduino, you add a resistor to it. I did this with my knitted stretch sensor. It creates a circuit known as a voltage divider, which controls the voltage level, based on the relative resistance of the resistor to the sensor. This is important because the voltage level is what AnalogRead "reads" in Arduino.

I wondered what value would give the best performance for my knitted sensors. So I used the equation below to calculate the output range of voltage dividers, based on the ratio between R1 and R2, given that R2 is my knitted sensor and R1 is the (unchanging) resistor. I graphed the outputs for each VR value at 0%, 25%, 50%, 75%, and 100% of its maximum range.

Felting Yarn

I first knitted with Yeoman Felting Wool last summer, when Yeoman donated a large box of yarn to the eTextiles Summer Camp. It's easier to hand-felt than other wool yarns I've tried, so I ordered a half dozen colors and started to play. It's fun to make detailed colorful designs, and perfect for holiday gifts. But there are a few pitfalls in creating your design. Read on for info about:
  • holes between colors
  • uneven felting due to pattern and color
  • felting technique
Holes

The designs pictured are "single motif": the pattern does not repeat and the contrast yarn stitches are wider than 5 stitches in a row. This results in long "floats" of yarn on the back side. Normally you'd "wrap" the edge needles while you knit to avoid big gaps caused by the edge stitches "laddering." Instructions for this are often included in machine manuals under "how to knit single motif". 
The edge needles are not wrapped in this piece. This resulted in laddering: large gaps and sagging stitches at the edge of each color. This is particularly visible around the brown in the middle.

ATTiny84 & the Tiny Programmer

I like programming my ATTinys with the Tiny Programmer. (How can you not love a tool the size of a stick of gum?) But I couldn't find info for mapping the pin connections for the ATTiny84. So I did a little research. Here are the connections:

ATTiny84  --->   Tiny Programmer

  • 1  ---> +
  • 14 ---> -- (minus sign)
  • 4  ---> (unlabeled)
  • 7  ---> 0
  • 8  ---> 1
  • 9  ---> 2

Works great. 

Why Knitted Circuits?

(a knitted circuit board, ready for soldering.)

The short answer is, I can't sew.

The long answer....

E-textile platforms are based on designing materials to fit textile fabrication methods, resulting in conductive thread and components mounted on PCBs designed especially for sewing (for example, the Flora platform).  Perfect for experienced sewers interested in soft wearables.

However, the conductive threads often used for e-textiles can be unstable as conductors. Silver-plated thread oxidizes over time and becomes non-conductive, something I discovered after buying a large spool and leaving it out for months. (If you have some, store it in an airtight bag.) Stainless steel thread does not have this problem, but it does have higher resistance.

Creating solid connections with the thread presents another challenge.  It requires hand-sewing skill, stitching the thread through the component lead multiple times, knotting tightly, and adding glue for security. The whole process makes me want to reach for my soldering iron.

But... the conductive thread widely available in the US is not solderable. Conductive threads made with polyester or nylon wilt or melt under heat. Solderable conductive thread is available in Europe, made with Kevlar. The minimum purchase, a kilogram, starts around 60 euro, from the company, Karl Grimm & Co. With shipping, you can expect to pay over $100. One of the creators of the phenomenal e-textiles resource, How to Get What You Want, Hannah Perner-Wilson, sells small spools of the Karl-Grimm conductive thread reasonably-priced on Etsy, but it's still not cheap enough for me to create artistic-experiments-with-abandon.

Additionally, conductive thread introduces resistance to the circuit-- it just doesn't conduct as well as the copper wire used in conventional circuits. Arduino-based circuits can compensate for this, but I'd like to build circuits using conventional components, as well.  So I'm investigating how to apply textile techniques to conventional electronic materials. After much research, I've developed a tool-box of methods around my favorite skills of soldering and machine knitting. I'm documenting my methods here, as they evolve.

This approach is not for everyone. I've taught a number of basic knitting machine workshops at Pumping Station: One, and some people love it, some people, not so much. Even if you can machine knit, machine-knitting wire is an advanced technique.  I don't recommend trying it until you're comfortable working with "difficult" yarns like cotton and silk. But once you do get the hang of it, knitting PCBs is soooo easy.....

Embedded Speakers



I've been working on a design for simple, efficient speakers that can easily be embedded in textiles. Pictured are two of my working prototypes. The one above is knitted, and uses hand-made paper. The one below is a no-frills version that I'll use to illustrate the design concept here.


[ETA 6/4/14  Here is a video of several speakers in action, taken at a speaker-making workshop I led in March.]


This speaker consists of four pieces of magnet wire, glued between two pieces of paper, positioned precisely over a magnet from a hard drive. The 4 pieces of wire are soldered together at both ends so that they carry audio signal from a small amplifier in parallel. The wires are placed just over the mid-section of the magnet. 

This creates an effective speaker because hard drive magnets are dipolar. The broad face of the magnet has both a north and south pole. (Most bar magnets have just one pole per side, and aren't as effective for a flat speaker design.) Additionally, hard drive magnets are extremely strong.

When the wire is placed directly over the boundary between the magnet's two poles (i.e. the red line on the paper rests on the red line on the magnet), it produces a clearly audible speaker.

How and Why It Works

Electric current running through a copper wire produces an electromagnetic field. If this wire is placed in a magnetic field, it experiences physical force.

The directions of the current, the magnetic field, and the physical force are all perpendicular to each other. A good way to remember this is Fleming’s left-hand rule, which uses your left hand as a mnemonic.

image: Jfmelero

The thumb, forefinger, and middle finger are held perpendicular to each other, forming an x, y, and z axis. The first finger is the magnetic field (B), flowing from north (knuckles) to south (the fingertip). The middle finger is the electric current (I) traveling from positive (the knuckles) to negative (the fingertip). The thumb is the physical force (F), the direction the wire moves.

You can see this principle at work in a conventional speaker:

image: Tony DiMauro

The coil of wire (“voice coil”) fits into a circular slot, the sides of which are a magnet.

The middle piece is the north pole, and the outer ring is the south. So the magnetic fields run perpendicular through the coil, with the result that it pushes out, in the direction of the cone. Very efficient!

Flattening the Speaker

A coil is great for speakers, but not particularly flat, as it sticks out perpendicular to the resonator.

So I started with a straight length of wire, glued between two pieces of paper. I centered it between the two very powerful poles on the face of the hard drive magnet. I attached a resonator, the paper, so the wire vibrates the resonator, which vibrates the air much better than a piece of wire. The result is an audible speaker. (The wire-between-two-magnetic-poles will look familiar to those who know the work of sound artist Alvin Lucier.)

However, one piece of wire doesn’t move the paper very much. To increase the volume, I attached several pieces of wire, glued parallel to each other across the paper. I also sent the current running through the wires in parallel (this is very important for increasing volume). Now all the wires vibrate the paper in sync.

My development of this design is on-going, and I am currently refining my knitting machine fabrication techniques. Stay tuned for more documentation.

References:

Hannah Perner-Wilson's Kobakant - resource for e-textiles

Karla Spiluttini and Piem Wirtz at V.2 - a previous knitted-speaker project

Jess Rowland -  foil-and-paper speakers using parallel wiring

Dr. Dominique Cheenne - my Columbia College colleague who suggested I look at planar speakers as an alternative model for embedded speakers

LaFolia Loudspeaker Project - a site for diy planar speakers

Magnepan - manufacturers of the first planar speaker, Magneplanar, invented in 1969 by Jim Winey

Capturing the Audience: A Primer for Sound Art in Public Spaces



[Update: This post was eventually revised and published in Leonardo Music Journal Issue 24 (2014).
Find it online here.]

I teach sound art at Columbia College Chicago.

When my students create sound art installations, they do it in visual art galleries or public spaces.  The first hurdle they must clear is capturing the audience's attention. Here are four rules I've devised to help them do so.

Rule #1: Don’t use headphones.

Headphones are for solitary listening. People often socialize while visiting a gallery, and you can’t socialize while wearing headphones.

Expecting a visitor to stand in front of an audio player with headphones, like they’re sampling a track at the record shop, is unrealistic. A few people will put on the headphones. Most won’t.

A number of artists have made brilliant sound work that uses headphones. (Janet Cardiff and Letitia Sonami spring to mind.) What these pieces frequently have in common is awareness and specificity of place. The headphones in these works allow the listener to engage their surroundings in a new and meaningful way, not possible otherwise. The sounds heard on the headphones would lose much of their impact (or would not be possible) if the headphones were moved to a different location.

If the sound art could be experienced on headphones anywhere, the work probably belongs on radio, web, or podcast.


Rule #2 Be a good neighbor, or face the consequences.

Sound cannot be contained in space. It bleeds, affecting everyone in earshot. As R. Murray Schafer has pointed out, humans do not have earlids. There are hard limits to humans’ tolerance of sound. When sound art tests those tolerances, there are consequences.

 I’m not suggesting that sound art must be “easy-listening”. But consider that, though the curator supports the work, the gallery assistants, security personnel, or building maintenance staff may not welcome it as the soundtrack of their workday. If a sound piece becomes intolerable to someone, they can and will take steps to silence it.

Koan for sound artists: If a tree falls in the forest, and someone unplugged the speakers, does it make a sound?

A few strategies for being neighborly

  • Quiet and/or localized sound: directional speakers (unfortunately, very expensive), low volume levels, or acoustic treatments
  • Interaction: requiring the audience to “play” a sound work
  • Motion detectors: These can be used to turn a work on and off. It saves electricity, minimizes wear, and can be added after the piece is complete. (Home Depot carries a plug-in motion-activated lamp controller for $24, which I’ve used for several installations.)

Rule #3: The gallery is not the theater.

 Students approaching sound installation art often have experience in theater venues (as musicians or filmmakers, for instance). It’s important they understand how the gallery (and the gallery audience) is different.

Theater:

•       Acoustics emphasize what is on stage. Sound reinforcement systems allow even the quietest sounds to be heard clearly throughout the space.

•       Low lighting helps the audience forget their environment and physical presence.

•       The audience is stationary, in chairs, and expects to stay seated for a length of time.

•       The experience starts and ends at the same time for everyone. The audience is passive and quiet for the duration.

•       All of the above directs our focus to the work being presented on stage.

•       Audience attention span = hours.

 

Gallery:

•       The hard, flat walls and floors reflect sounds throughout the space while making it difficult to hear any one sound.

•       The bright lighting increases visitors’ awareness of their environment.

•       The audience is standing or walking.

•       The experience starts and ends at different points in time for everyone.

•       The audience is active, moving, and often vocal.

•       Galleries must be configured to create (visual) focal points. Public spaces may not have focal points.

•       Audience attention span = seconds. (There are a number of surveys on the amount of time a gallery visitor spends looking at a work of visual art. While the results vary, all are measurable in seconds-- single digits, even-- and not minutes.)

Public spaces, of course, could be any combination of the above gallery or theater traits, or none of the above. Which brings us to Rule #4.

Rule #4 Survey the site before you create.

This borrows from architecture – survey the site, then design for it. When I’m creating a new installation, I observe the site as much as possible. I take notes, and consider questions like:

•       How long are people in the space?

•       What do they do while they are there?

•       Where do people focus their attention when they are there?

•       What are people using their ears for?

•       What are people using their eyes for?

•       What impact does the space have on people moving thru it?

•       What sounds are already present? What aesthetic impact do they have? 

•       What sounds are repeated?

•       What are the natural rhythms of the space? (These aren’t limited to the auditory. For instance, traffic lights at a crosswalk, and the pedestrian/vehicular movements that follow.)

•       Are the sounds signals?

•       How do people react to the sounds?

•       How do people interact with the sounds?

In my class, we don’t have a designated public place to install work, so we install guerilla-style: we park a portable amp in a public place, connect an mp3 player, and let it play for 15 minutes. We loiter anonymously, or from a distance, to watch the “audience”.

The locations are chosen by students ahead of time, who then survey their sites, and create for it. Success can be measured by audience reactions—a slow, dawning smile, a thoughtful pause. Oblivious passers-by indicate failure. The behavior of strangers is a powerful teacher.