Lab Notes: 15/08/18

Low-cost sampler board layout experiment

This week I reached a point where the prototype low-cost sample was functioning well on a breadboard, with power supplied by an Arduino. The moment I switched over to battery power and disconnected the Arduino, the circuit appeared to malfunction. After some exploratory testing, I discovered that the issue was caused by the prototype not having a connection to ground. This was previously being provided from my laptop power supply, via the USB socket the Arduino was connected to. One single connection from the GND rail of the prototype and the ground of my laptop USB socket was all that was needed to get the prototype operational again. Some more comments on grounding and surrounding issues can be found on the ‘Capacitive Sensing Library’ page. Although it’s a shame for a standalone, battery-operated device to have a requirement to be physically connected to ground, in the interest of time this is a compromise I’m willing to make. Particularly as the Makey Makey board has this very same requirement There are other ways to implement capacitive touch sensing without this requirement, smartphones are proof of this. However, there appears to be some complexity in the implementation.

Whilst tinkering with the prototype I noticed a couple of things which are worth mentioning.

  1. A failing battery can cause audio interference. The circuit is designed to be powered by a 9V battery. If the battery provides under 9V then audio interference might occur. As the circuit only allows me to listen to recorded audio via the onboard speaker, I was unable to determine if the interference is present when recording, on playback or both.
  2. A low pass filter is applied to the audio signal. The cutoff frequency is dependent on clock speed. This essentially means that I need to be mindful about the clock speed I configure the ISD1820 to default to as this has an effect on audio quality.

Additionality when running from battery, the PN2222 transistor being used to control loop functionality started to misbehave. Switching on Loop resulting in the loop LED being lit but did not result in the transistor switching. Adding a 220Ω resistor between the loop LED and the Base of the transistor resolved the issue.

I proceeded to draw the schematic in Eagle. I found a useful tutorial on the Sparkfun website which I would recommend to anyone new to Eagle. The image below shows the finished schematic. I moved on the to the second half of the Sparkfun tutorial which is concerned with board layouts. After switching to the board view I found components stacked on top of one another amongst a cluster of ‘air wires’. The main image above shows how far I managed to get, placing the copper traces on the board. I had hoped a single layer board would suffice for this design, however, it soon became evident that I needed to make use of at least two layers. Unfortunately, even with Eagle’s automatic routing capabilities, I was unable to create traces for every connection. I think my next (slightly drastic) step will be to start the schematic again from scratch but, rather than wait until the schematic is finished before I begin the board layout, I will lay the board at the same time. I’d like to also look into moving the ISD1820 into the schematic. It currently sits on a slightly hacked, prefabricated board. I feel that the interconnections between the two boards are adding complexity to the design. I had previously encountered noise when breadboarding the ISD1820. I think this was perhaps due to a failing battery so with a fresh battery it should work as expected.

Low-cost sampler schematic

Lab Notes: 09/08/18

Touch interface utilising copper tape on cardboard

So far in the lab this week I’ve been focusing on developing and testing capacitive touch circuits and corresponding code. I began this round of prototyping with the intention of simplifying the design by reducing the number of parameters available to be controlled to three; Record, Play Trigger and Play Gate. In the back of my mind, I felt it was a shame to reduce the features this far, but felt it was necessary due to lack of time available to me to finish the prototype. In past Access Music Workshops, I’d noticed that one of the first things participants (particularly young adults and children) like to do one they’ve recorded their voice is to change the playback speed. This parameter can be controlled through the use of a variable resistor which, I assume, in combination with a capacitor, determines the clock speed of the Voice Recorder chip. I’d found an example of how to change resistance through a touch interface on the Bastl website. The example uses a CD4040 IC, a requirement of this circuit is that the user presses two contact points. I decided to avoid this approach as I felt this may present a disabling barrier to some individuals with impaired motor control, for example, those with Cerebral Palsy. An idea struck me, a while ago a colleague and I had a discussion about Vactrol controls. I had heard of Vactrol’s before but wasn’t sure what they were. My colleague explained to me that they allow control of resistance through voltage. This is achieved through the use of an LED and an LDR. The amount of resistance of an LDR is determined by the amount of light it is exposed to, therefore by controlling the amount of light emitted by an LED directed towards it you can control resistance. I decided that using a series of discrete touch points would be a good way to control LED brightness. This decision increased the number of AVR microcontroller I/O pins required by the circuit. I, therefore, decided to use an ATMega328P-PU (as used in the Arduino Uno) rather than an ATTiny85. Whilst I was at it I also decided to reintroduce the Loop toggle switch. So, the device is now back up to it a full complement of parameters as listed below:

  • Record
  • Play Gate
  • Play Trigger
  • Loop
  • Playback/Record Speed

This additional functionality is not without its complications. Vactrols are somewhat hard to come by. I did, however, find an interesting thread on Muff Wiggler discussing the DIY fabrication of Vactrol’s using a 3D printer. Unfortunately, the design of this DIY Vactrol doesn’t appear to have been shared as of yet. I’m confident I should be able to create a similar Vactrol housing myself, from scratch. In order to implement control of the loop feature I’m going to need to take another loop at transistors, at least, that’s the avenue I plan to explore first.

The main image above shows part of the circuit on a breadboard along with an interface fashioned from a sheet of cardboard and copper tape. My experiments have demonstrated that the, somewhat thick, traces of the copper tape which run back to the crocodile clips can be insulated with masking tape or sticky back plastic which will allow only circuit parts of the interface to respond to touch.

The code utilises Paul Badger’s ‘Capacitive Sensor’ library for the Arduino platform. Each sensor requires a send and receive pin. Seemingly the send pins can be shared although this can lead to interference between the sensors. My design has 9 touch sensors which work well when split across 3 send pins. I found whilst prototyping that certain combinations of pins can be problematic, resulting in the sketch running extremely slowly when uploaded to the Arduino board. Some trial and error rectified this.

The prototype is progressing nicely. One thing that I’m mindful of is that I should probably spend some time writing out some user stories for the device. I have an idea of the functionality I would like the device to provide plus reasons why that functionality would be useful but this is all in my head. The project would benefit from me formalising these user stories by getting them down on paper.

Lab Notes: 26/07/18

ISD1820 Voice Recorder Module

Recently I returned to the ISD1820 Voice Recorder Module schematic I’ve been in the process of designing. I decided to test the circuit on a breadboard, results were mixed. I found it was quite straightforward to add an L78L05 voltage regulator to the design as shown below:

Screen Shot 2018-07-26 at 15.26.42

The L78L05 datasheet suggests placing capacitors between both the input and output pins and ground, presumably for decoupling the power rails and subsequently reducing high-frequency noise that might be harmful to ICs. A more detailed explanation of capacitor applications can be found at the Sparkfun website.

Screen Shot 2018-07-26 at 15.28.18

Image source:

Unfortunately, the rest of my circuit proved problematic. I had attempted to implement a PN2907A PNP transistor to automatically switch between mic and line inputs when a mono jack is connected to the audio input socket. This failed in a rather pleasing manner! All that I was able to record was high frequency distorted noise that wouldn’t be out of place in some of the techno tracks I listened to when I was younger. Still, I was hoping for a nice clean signal for this particular project, which I certainly wasn’t achieving. I decided to strip the circuit back and review and test each part piece by piece. A review of how PNP transistors work proved useful. I discovered that diagrams representing the configuration of the collector, base and emitter can sometimes be inconsistent in their layout. In the examples below you can see the emitter being shown as the top pin on the first diagram and the bottom pin on the second. Perhaps a minor point, although, it still led me to some confusion.


Image source:

Screen Shot 2018-07-26 at 09.35.32

Image source:

Further difficulties were encountered in recording audio with a simplified version of the circuit. In fact, the circuit I tested was the one I originally followed successfully from the Bastl site. The audio was very distorted when being played back. The ISD1820 I was using originally came from a kit purchased from a Maker Faire. As such it came on a small PCB, complete with buttons for each function (i.e. Play and Record) and a speaker. The Voice Recording Module was working absolutely fine on this PCB. I began to wonder the benefits of designing a new board from scratch, particularly as the PCB provided includes pins for all of the parameters I hoped to control.

With deadlines looming, I’ve decided to simplify the overall design. I’m keen for the finished device to be used in a workshop by people interested in music but who may not necessarily have a technical background. It would be fantastic if the workshop participants were able to be actively involved in the design of the devices they are using. For this reason, I’ve decided to concentrate on capacitive touch control of the Voice Recorder Module parameters, this way there is potential for users to design their own interface using either copper tape or conductive paint.

My intention when starting this project was for all sensors to be controlled and processed by ATTiny85 microcontrollers. I’ve had some success with this, with different sensors and controls. It should be fairly straightforward to implement a touch switch using an ATTiny85. The main area that might be a challenge is that of calibration to ensure that false triggers aren’t encountered.

Soniphorm Part 3: 09/07/18

CNC Milling Machine

There was a certain amount of satisfaction seeing the pickups fit nicely into their case. After some discussion as a group we proceeded under Ed’s guidance to modify the design further in Fusion 360. A bench was added for the pick along with reinforcements for the two end boxes. Ed took the reigns and transformed the design further quite considerably. Rails we added to the base of the device for additional support. It was decided that this was needed to support the device when the strings were tightened. A long bench was added across the device, along with a bridge for the strings at ether end.

Barry, keen to explore the musical capabilities of the device, managed to power up one of the prototypes. Using an exploratory approach akin to circuit bending Barry found an interesting feedback effect. Barry tried a few different potentiometers, salvaged from a box of scrap components, for controlling the feedback amount. These potentiometers were of various values and from different manufacturers. What was particularly interesting was that they all had different sonic qualities. Barry chose a favourite and then this was factored into the design.

Ed suggested creating a tremolo effect through the use of an LDR. This was coupled with a spinning disc, also laser cut MDF, which blocked out light at certain intervals as it rotates. The motor was controlled by a Teensy microcontroller. Ed introduced me to the new touchRead() library available for Teensy. A clear example is described on the little-scale blog. The touch pads themselves were etched from a copper circuit board and mounted on top of one of the side boxes of the device.

To complete the digital fabrication picture, Ed talked us through using a CNC machine to mill a piece of solid wood which would be used to support the tuning pegs of the strings. A drawing was made in Autocad of the basic shape. Ed then used Corel Draw and printer driver CAM software to determine drill paths, set the number of passes and the depth of each cut.

Unfortunately, despite working into the early hours of the morning, we didn’t manage to finish building the instrument. We were able to take all of the parts home with us however. Now it’s just a case of putting aside some time to complete the build. All in all it was a very enjoyable week, and I certainly learnt some skills which will help me with my research.

Soniphorm Part 2: 05/07/18

DIY coil pickup attached to drill for winding

Using China based PCB manufacturer allpcbs, Ed previously fabcricated a couple of circuits, circuits which he typically finds useful in his designs. The first circuitboard was the Soundsniffer, which forms the basis of a preamplifier kit Ed sells via his website. The second circuitboard was a Mosfet motor driver. We utilised both circuits in our design with the addition of a pre-fabricated amplifier circuitboard for driving an 8 ohm speaker. This speaker was attached to one end of a spring, achieved by creating a small puncture in the driver, followed by pushing through a large diode which was then fixed in place using superglue.

The Soundsniffer has inputs for piezo, mic and coil pickups. A piezo was attached to end of the spring opposite to the speaker driver. It was decided that the device would feature strings so we therefore added a pair of pickups. The pickups themselves were Ed’s own design. A small fabricated PCB formed the basis of each, this attached to a bobbin fabricated using an SLA based Formlabs 3D print. Four neodymium magnets were used in each pickup (two on either side). I was particularly impressed by how strong these small magnets were.

Once the PCB, bobbin and magnets had been attached to one another we wound copper wire around each bobbin. With the help of an electric hand drill this didn’t take very long at all, perhaps around 3-5 minutes. Once wound, we were able to snap the copper wire and solder either end to the PCB, together with a cable which attached to both pickups being used. This pair of pickups was then submerged in a mixture of 80 percent paraffin, 20 percent beeswax. They were submerged for around 10 minutes. This process was used to ensure that the coiled wire did not vibrate when the instrument was being played.

A case for the pickups was fabricated using Fusion 360. We worked through the design together, each on our separate computers. After a couple of iterations we were able to create a case which consisted of a base and lid, the two snapped together and stayed attached through friction. I was amazed at the accuracy and precision of the Formlabs 3D printer. I have some experience using filament based 3D printers, which are comparatively very cost affective but not close in terms of print accuracy.

Soniphorm Part 1: 04/07/18

An MDF laser cut enclosure for a spring reverb unit.

I recently returned from a week long digital fabrication course at the Soniphorm Workshop in Gweedore, Donegal. Soniphorm is a project of Ed Devane and encompasses his work as a designer and maker or experimental musical devices and art installations.

The course saw us looking at common digital fabrication techniques with Ed providing insight into particular ways of working which he has found helpful. I got the impression that there wasn’t a fixed plan for the workshop, rather that Ed was wanting to work collaboratively with us, exploring various digital fabrication techniques when the opportunity presented itself.

The first day involved us all getting to grips with Fusion 360. Ed stated that Autocad was perhaps an easier tool to use for 2D drawing, however he decided it was best to focus on Fusion as it was useful to be able to create both 2D and 3D designs within the same environment. We began by designing a small box. We intended to fabricate the box from 3mm MDF, using the laser cutting machine. There were six sides to the box, assembled using finger joints. I had created similar enclosures in the past using a parametric web-based tool. These boxes were fabricated at Belfast’s Fablab from 3mm plywood. I have to say that I prefer this material, not just aesthetically but also due to the fact that it appears to be more robust. I also remember reading in ‘Green Living in the Urban Jungle’ that MDF releases toxic fumes at room temperature which has always put me off using it. Still, nontheless it was still interesting to explore its use as a material for fabrication.

I was pleasantly surprised at how straightforward it was to create fingerjoints in Fusion 360, mainly due to the pattern tool. is a fantastic tool, however, it’s apparent that Fusion 360 will provide a lot more flexibility in designing enclosures in the future.

Prior to sending our first design iterations to the laser cutter they were imported into Autocad. The ‘overkill’ tool was used to ensure that the laser didn’t cut more times than necessary. Seemingly the final design was opened in CorelDRAW prior to being sent to the laser cutter.

Once fabricated we discussed what the box might be used for, then subsequently added a speaker mount. Ed talked us through transforming the box further so that it formed one end of an open spring reverb unit. More pieces were cut, including the base of the device. Ed showed us a joinery technique which used bamboo skewers (as you might purchase from a supermarket) as dowels for attaching various MDF panels together. The dowels were tapped into their corresponding holes using a mallet and then cut to size with a crosscut saw – a tool I hadn’t come across before.

Lab Notes: 18/06/18

Schematic of a sliding potentiometer module

After doing a fair amount of breadboarding during the last few lab sessions, I decided to stop and try to sketch out what it is exactly I’m trying to achieve in the design. Due to the fact that it can take a few attempts to get a circuit design correct, I decided to mock it up digitally in Eagle rather than sketch it out by hand. This proved to be a good opportunity for me to recap on a Sparkfun Eagle tutorial I followed part way through last week. I was surprised by how much I had forgotten since last week which served as a reminder of the importance of regular practice in the use of any tool. After some trial and error I managed to draw out a simplified schematic design which allows a modular approach in regard to the interface controls. My intention is that the user will be able to choose the type of controls they would like to use for controlling the parameters of the ISD1820. The user will be able to pretty much design the interface themselves in a quick and convenient manner. In order to achieve this I’ve deployed several ATTiny85 IC’s in the design, a side affect of this is that the BOM cost is starting to grow quite significantly. Perhaps once I’ve gained a bit more knowledge of electronics I’ll be able to design a lower cost alternative.

I found that some common components were not included in the Eagle default library. There is however a fantastic online resource of free Eagle libraries from which proved to be quite useful. So far I’ve created designs for four modular controls, which are listed below along with links to the online resources the designs are based upon.

As each of the modular controls is dependent on an ATTiny85, an important next step is to develop and test the code which will run on each device. In addition to this I also need to implement a an L78L05 voltage regulator which will allow me to power the circuit from a 9V battery – and investigate ways in which the mic input can be cut when a mono jack is connected to the input.