Projects

Touching Tracks

Making Projects with Conductive Ink

Johann Wyss

Issue 40, November 2020

This article includes additional downloadable resources.
Please log in to access.

Log in

We put the Arduino compatible Touch Board and Electric Paint from Bare Conductive to the test with a fun sound effects generator project.

BUILD TIME: 2 HOURS
DIFFICULTY RATING: Intermediate

Conductive ink isn’t a new technology. A quick patent search shows back in the 1970s Texas instruments had a patent on a process for making conductive polymers. This conductive ink technology was, at the time, used for creating steep-sloped positive temperature coefficient resistors (this type of resistor’s resistance increases as the temperature increases). We are not sure if this is the first patent on such technology, but it was the earliest we found.

In either case, the technology used a very fine conductive powder such as copper, gold, or graphite. This fine powder was suspended in a binding solution which cured on exposure to air. The mixture could then be used to paint traces directly onto a surface.

Despite being around for many years and currently used in many industries such as flexible PCB manufacturing, it’s not something we had ever had the chance to get our hands on, until now. Thanks to our friends over at Altronics, they sent us a Bare Conductive experimentation package for us to take a look at.

The Broad Overview

The package we received from Altronics included a 10ml tube of the Bare Conductive Electric Paint along with a Bare Conductive Touch Board (Part no: Z6435). The board is based on the Arduino Leonardo and has large connectors that enable you to easily attach alligator clips to the PCB, which can then be used to connect to various circuits or devices.

This makes the device incredibly accessible for young people but also allows for interesting methods of making connections. You can use alligator clips as we mentioned previously, conductive thread, the conductive paint, or you could even just wrap the wire around the pads themselves.

With that said, the touch board isn’t designed only for young people. More knowledgeable people will love that the touch board is also a fully featured Arduino compatible Leonardo with the touch sense ability added via an MPR121 capacitive touch controller. This connects to the microcontroller via I2C. The board also has MIDI and MP3 capabilities via a VS1053 OGG Vorbis/MP3/AAC/WMA/MIDI audio decoder.

The added functionality uses a couple of pins of the ATmega32U4 but from the factory, the pins are broken out in the way shown here.

Analog pins A0 – A5 are completely free and usable as any normal Arduino board. The same can be said for Digital pins D10 - D13.

Digital pins D2, D3, and D4 are used by the capacitive touch IC for the I2C connection but these can still be used by other I²C devices. D4 on the other hand is dedicated to the touch capabilities.

Digital pins D5 - D9 are used for the MP3 / MIDI capabilities, however, as a nice touch (pardon the pun), Bare Conductive has added the ability to reclaim these pins by removing the solder bridge on the PCB jumpers.

This enables you to disable or enable the features you’re not intending on using in your project, and thus, freeing up pins for other things.

For example, if you don’t want the MIDI / MP3 functionality you essentially have an entire Arduino compatible Leonardo to work with, which has the added benefit of 12 capacitive touch buttons, all while only using 3 pins (one if you’re using other I2C devices as multiple devices can use the MOSI and MISO pins).

This brings us to the conductive paint which Bare Conductive calls Electric Paint. In engineering, a conductor is defined as a material which allows a charge to flow in one or more directions.

This could be a piece of common copper wire, a mercury ball as used in tilt switches, or even a Gallium doped Germanium crystal used in some diodes. All are considered conductors in an engineering sense, yet they are all very different in relation to a single important variable, their resistivity.

Resistivity is a property which characterises the extent a conductor will resist the flow of charge through it. Resistivity is proportional to resistance, and thus, a material with a high resistivity will have a high resistance. Therefore, our first thought when using this electric paint was to measure the resistance.

To do this we drew a 200mm long line, roughly 2mm thick and 0.5mm tall, using the electric paint onto a plain piece of paper and measured the resistance using a multimeter.

While the electric paint was still wet the trace had a resistance of 1.76MΩ, however, this resistance rapidly dropped as the solvent used to suspend the conductive powder evaporated or cured. After about 30 minutes, the resistance dropped to 197.4KΩ over the entire 200mm. Once left overnight to dry completely, the resistance dropped to 1.115KΩ over the 200mm and 600Ω over 100mm.

This means if we were to, for example, attach a 12V supply to this line with the cathode at one end and the anode at the other, a current of about 10mA would flow through this trace. More to the point, if we were to attach the multimeter cathode probe to the cathode end of the trace we could use the anode probe of the multimeter to measure the voltage at any point along this trace and we will see that the voltage is linearly proportional to the position of the probes along the trace.

Just like a linear potentiometer, at the halfway point the voltage will be 50% of the supply, 6V in our case.

Note: High resistance will also lead to the traces dissipating power and can result in the traces themselves heating up. In some extreme cases where current demands are high this could potentially cause fire as power = resistance * current squared.

This isn't of course likely in this use case as we are dealing with low voltage and low current circuits. However, this highlights a limitation using the electric paint and indeed many types of conductive paints in general. The high resistance makes it difficult or, more to the point, impractical to use for many circuits. The traces themselves will cause significant voltage drop proportional to current. The higher the current, the higher the voltage drop.

This makes it impractical for most complex circuits and power distribution tasks. But it is still a useful technology in some cases. Let’s say, for example, you wanted to build an LED circuit with a 5V supply connected using a conductive filament.

The LED has a forward voltage of 2V and a forward current of 20mA which means you will need to drop 3V across the resistor. Since the forward current is 20mA we know we need a current of 20mA thus, we can calculate the resistance required using ohms law.

R = V/I = 3/0.02 = 150Ω

We could use the traces themselves as resistors, and since we know when applied in this way that a 100mm length is equal to 600Ω of resistance, we can calculate the length of trace needed to power the LED at the desired current.

150Ω is precisely 1/4 of 600Ω thus, since the relationship between length and resistance is linear, the length of the trace should be precisely 1/4 of 100mm or 25mm. Therefore. to create this value resistor, all you need to do is use a trace 25mm long. You can calculate the length for any desired resistance using the equation.

L = Rreq / (600 / 100)

Where:

L = Length of trace you will need.
Rreq = Resistance you require.
600/100 = Resistance per millimeter.

Of course, this isn’t incredibly precise as variations in width and height of the trace will also change the resistance, as resistivity is quantitatively equal to the resistance multiplied by the cross-sectional area of the conductor, divided by the length of the conductor.

Resistivity = (R x A) / L

Where:
R = Resistance.
A = Cross-sectional area of the conductor.
L = Length of the conductor.

Therefore, it seems as if Bare Conductive has found an optimal use case for the conductive ink as a capacitive touch sensor. In this type of sensor, only tiny currents are travelling through the conductor, and as such, the high resistance is much less of an issue. There are other potential uses, of course.

For example, a distance sensor which we suspect would still rely on capacitive coupling. Some more novel uses could include shorting jumpers on a PCB or even repairing small conductive traces on a PCB, etc. For this project/experiment we will look a bit more into using the conductive ink as a touch sensor using the Touch Board.

The Build:

Parts Required:Jaycar
1 x Arduino ATmega32U4 Touch BoardCE05663
1 x Electric Paint PenCE05659
1 x Micro USB LeadFIT0265
1 x 3.5mm Plug to Plug Aux LeadADA2698

You will also need headphones, a portable speaker or HiFi system to hear the audio.

Note: Our Touch Board from Altronics was supplied with a 128MB microSD card installed. Documentation on the supplier’s website suggests this may not usually be the case if you are purchasing from an alternate supplier.

Our first play with the touch board will be a general first impression out-of-the-box experience. We will use the touch board and make a simple piano to demonstrate its capacitive touch capabilities.

We are using the board as it was shipped, using the installed Arduino software which plays an audio track when any of the capacitive touch buttons are touched. If your touch board has been used previously or it does not come with the Touch_MP3 Arduino Sketch, you will need to install it. We will provide a copy of the Touch_MP3 program we used in this experiment, which was written by Stefan Dzisiewski-Smith, Peter Krige, and Pascal Loose for Bare Conductive, available for download on our website. This code was provided by Bare Conductive and provided under a creative commons license.

For our play with this board, we will use the piano template which the guys over at Bare Conductive also made available for public use.

To get started, print out the piano key template, which you can download from the resource section of our website.

With the template printed out, fill in the keys with the electric paint, being sure to apply as even coverage as possible. We found the best way was to hold the tube completely vertical with the tip pressed against the paper. We gently squeezed the tube whilst moving it around the outline so that the ink was pressed into the paper. Once the outline was completed, we then proceeded to fill the key in using the same technique.

Once complete, put the paper aside out of the way of children and pets. We’re sure you don’t want a conductive footprint trail to lead directly to a non-apologetic kitty or toddler. This ink is very hard to remove from some surfaces, especially porous (or even “pawous”) surfaces or carpet.

Note: You’re not obligated to use the electric paint as keys. If you want to avoid using it all together you could use alligator clips to connect the Touch board contacts to various different conductive items around your house from fruit to kitchen utensils. This could be a fun way to teach younger children about conductivity. Plus, a Banana piano sounds like a good deal of fun.

Once the keys had dried, we placed the touch board on top of the pads and squeezed a little of the conductive ink into connection holes onto the pad below. We also added a little of the electric paint onto the side of the PCB and to the trace below to help ensure a good electrical connection, and help to reduce the chances of the PCB moving.

Let this sit for a little while to completely dry. In the meantime, we can set up the microSD card so that we can have the touch board play a sound when it detects a key has been pressed. Our unit came with a 128MB microSD card installed. On the main directory of the card there were 12 MP3 audio tracks. These audio tracks gave an introduction to the touch board and how it was used. You may want to back these tracks up somewhere safe on your computer as we will need to replace these tracks with our own MP3 audio, and if you don’t back them up, you may lose them forever.

With the existing Audio tracks safely backed up, we can go about replacing them on the microSD card. If you’re musically talented you could easily use your mobile phone or another recording device to record you playing 12 different notes on your instrument, and then convert each note into an MP3, which could be then mapped to a key. However, if like us you don’t have any musical equipment and more embarrassingly zero talent in using one, you may want to consider alternate means of getting recorded sounds.

We downloaded a set of 19 synthesised piano notes, created by a user named GH05TY, from the following website: https://archive.org/details/SynthesizedPianoNotes/Piano17.mp3

We downloaded the MP3 versions, and as such, they could be copied to the microSD card without needing to convert them. We do, however, need to change the name of the files. The code loaded onto the Arduino from the factory requires the tracks to be named as follows.

Once you have changed the name of your desired notes, you can simply copy them to the microSD card and insert it in your touch board.

Now, we know what some of you may be thinking, “yay, a piano that plays piano sounds” but the keys / buttons and the sounds played can be whatever you like.

You could also have the capacitive touch button connected to whatever you like (provided it has a level of conductivity) and likewise you can have it respond by playing any MP3 of your choice.

You could, for example, create a sound effect soundboard, which you can use for creative endeavours such as podcasts or home movies, etc. To do this, you can use websites such as www.freesound.org and www.freesoundeffects.com to find and download sound effects. In fact, you can use any audio in an MP3 file, provided it fits on your microSD card.

For example, you could record your own sounds on your mobile phone or by using voice recorder software on your PC, etc. If your desired audio track is not in MP3 format you will need to use an online audio converter such as www.online-audio-converter.com to change the format into MP3.

Once you have the desired MP3 tracks saved to the microSD card, put the card into the slot on the touch board.

Before we can play any sounds, we obviously need to connect the board to some headphones, an amplifier, or in our case, a portable speaker via the 3.5mm audio jack.

Note: If you’re going to buy a portable speaker for this project, make sure it has a 3.5mm input jack. They seem to be getting harder to find as manufacturers push for waterproof designs that are only Bluetooth.

Connect the touch board to your audio player using a 3.5mm plug-to-plug AUX lead, apply power to the USB input, and set the onboard power switch to the on position.

IMPORTANT: Don’t touch the board, especially the touch pads, for a second or two after applying power. During this time, the touch board is calibrating the sensor. If you’re touching any of the pads during this stage, that button will not work as it will not detect the changes in capacitance.

Once it has powered up, and with the speaker connected and powered, you should be able to touch the electric paint pads and have the unit play the corresponding audio track that matches (shown in the table earlier).

Troubleshooting

There are a few things that can potentially go wrong to stop the project working. The first is no audio playing, which happened to us and was due to having the incorrect file names. You need to ensure that the file name is identical to the names written in the table shown earlier. They should be written as TRACKXXX where the word track is capitalised, and the value XXX uses three digits per number from 000 to 012.

Another issue we encountered was the touch board not detecting buttons. The touch board has a small red LED next to the power switch. This LED illuminates anytime a touch has been detected. We noticed there were a number of times when this LED was not illuminating when we touched pads, and that the code did not respond to our touches. We found that there were two likely causes for this. Firstly, not giving the touch board sufficient time on boot up to calibrate the sensor, and secondly, the electric paint traces and/or pads had small breakages. These breaks in the paint could have been caused by folding the paper slightly.

As such, if you are having issues where an electric paint pad is not responding to touch your very first step should be to power cycle the touch board by using the onboard slide switch. As mentioned earlier, it is imperative that you do not touch the electric paint traces and pads or the capacitive touch pads on the touch board as you cycle the power. Doing so may prevent that pad from working on the next boot because the touch sensor on boot up goes through a calibration stage, if you’re touching a pad at this point you will alter this calibration preventing detection later.

If that does not solve your problem, then you likely have a connection problem somewhere in your electric paint traces and/or pads. To check this, touch the pads on the touch board and not the electric paint. If the red LED illuminates for each touch, then you know that the break is somewhere in the electric paint traces or pad.

To find the location of the break we would touch various points on the trace, starting as close to the touch board as possible. If the board is not responding to a touch very close to the board, you know that the connection fault is likely right at the point the touch board and electric paint make contact. This can be caused by flexing between the board and the surface the electric paint is applied too. This can happen when attaching the USB cable, actuating the slide switch or even moving the device. To prevent this, we suggest that you firmly hold the touch board when applying the USB cable and take steps to prevent unnecessary movement. If you have a break in your trace at this point you can easily rectify the fault by adding some more electric paint between the touch board and the electric paint trace. Once this dries, repeat the test on that trace and pad.

If the break is further down the electric paint trace, the break is likely caused by the flexing of the surface you have applied the paint to. We used a sheet of A4 printer paper, which naturally is very flexible. This, combined with movement during the prototyping and photography stages, meant that our traces were put under more stress than usual and caused fractures in the electric paint trace. To avoid this, we would recommend that for permanent use, you use a rigid surface to apply the electric paint. With that said, you can repair the trace by just adding a bit more electric paint to the area of the trace with the fracture and letting it dry.

Where to from here?

This was just the first hands-on look at the touch board with a fun piano-key project to demonstrate its touch capabilities with the electric paint. A better, more powerful, option would be to use the touch board as a MIDI device controller. This would enable you to swap instruments much more easily and can interface with MIDI programs such as Ableton Live.

The board can also be used for other applications too. You could connect it to a computer so it emulates a USB mouse or keyboard. You could trigger software that uses either serial or keyboard strokes.

There are many projects on the www.bareconductive.com website that you could get inspiration from. Keep in mind also that you can solder headers onto the touch board so you can add shields on top. Using the Arduino IDE, you could code all sorts of programs based on different inputs and outputs.

Another Bare Conductive product in the Altronics range to experiment with using the Electric Paint is the Pi Cap (Part no. Z6430) which plugs onto a Raspberry Pi. Possibly use it to create a bench lighting controller. The Pi Cap and Raspberry Pi could be mounted remotely, and traces and pads could be made with a combination of the electric paint and traditional wiring. The electric paint could be applied directly to the workbench, allowing you to turn on specific lights and even adjust brightness, etc without needing to mount traditional switches. The lights could be made using RGB LED strips, and thus, you could even use touch buttons to activate colours, etc.

Johann Wyss

Johann Wyss

DIYODE Staff Technical Writer