I’m going to be doing another workshop on using the Teensy to work with digital audio. Come along and build and program circuits, and make some NOISE. It’s at the Sonics 2020 festival in Hastings. I’ve been involved in the festival for the last few years, it’s great, and I really recommend checking it out. Lots of lovely pubs in the old town part of Hastings too! Sign up here.
Thanks to everyone who came to my ‘Digital Audio with Microcontrollers Workshop’ last weekend. I hope everyone had as much fun as I did! The first workshop sold out pretty quickly, so we ended up running another one back to back. A pretty exhausting day, but definitely a rewarding one. I was pleasantly surprised how far the groups got in 3 hours. Everyone got the Teensy to make sounds, and some people created some amazing noise-scapes! For anyone interested in what we covered, the workshop is on GitHub here. Thanks to Brighton Digital Festival and Platf9rm for making it happen!
I’m going to be running a workshop on Saturday October 12th for Brighton Digital Festival. See here for tickets. It will be an introduction to creating and processing digital audio using microcontrollers. The workshop will centre around the Teensy, which if you read this site, you’ll know I’m quite keen on! Teensy is a development board similar to Arduino. You will ‘bread board’ (a method of quickly prototyping circuits without soldering) your own circuit, which will utilise the Teensy along with buttons, leds, and potentiometers, which you’ll patch together to create a circuit. You’ll learn how to use the Teensy’s audio library and visual design tool, to connect together audio effects, and download the result onto your circuit, allowing you to experiment with sculpting and distorting sound.
The workshop will not require any specialist knowledge. There will be some programming and connecting of components, but you will be taught everything you need to know.
You must bring :
Laptop (capable of running Arduino IDE, it runs on Linux, macOS and Windows and doesn’t require a particularly powerful machine)
I’m really excited to be featured as part of the ‘Hackoustic: Presents’ nights at Iklectik in London on September the 21st. I’ll be doing a small talk about my DIY instruments followed by a performance, and will then give any interested members of the audience a chance to try out the instruments for themselves.
If you’ve been paying attention to this site, you’ll have seen I’ve been working on a eurorack looper for sometime. The first version of this is now done. You can find the source code here.
What is it?
A looper module in the eurorack format inspired by the MLR app which ran with the monome. It records audio to an SD card, so is not limited by RAM constraints. It supports unlimited overdubs, only limited by headroom (e.g. if you layer over too many overdubs, the audio will begin to digitally clip). Once the loop is recorded, you can switch from Record Mode to Play Mode. This allows you to ‘cut’ the loop using the 8 buttons. Each button will jump to a section of the loop, essentially dividing the loop into 8 equal size segments.
How does it work?
The version shown in this video uses Version 2.0 of my Teensy 3.5 based audio board. This uses the in-built ADC and DAC to process audio. The audio is recorded to SD card. As SD cards are rather slow, especially when writing, I need to use 2 circular buffers. One for reading audio, and one for writing. SD cards are slightly unpredictable in terms of read and write speed (e.g. writing the same size block can take varying amounts of time each time you do it), I had to experiment to get buffer sizes that worked. These may need to change when using other SD cards.
I achieve overdub by keeping 2 copies of the audio loop, whilst one is being played, the other is being written to. At the end of the loop, the files are swapped (read file becomes write file and visa versa), and the loop starts again. When the Record button is pressed again, to engage overdub, the incoming signal is added to the recorded signal, and written to the write file.
I designed a separate PCB to deal with the 8 LED buttons. This communicates with the Teensy via I2c. The code is here. It uses a technique borrowed from the Le Strum by 64pixels which uses a shift register to scan the buttons and turn the LEDs on and off. Take a look at this schematic to see how it’s setup. Essentially a single bit at a time is shifted all the way through the 8 bit shift register. Each output of the shift register is connected to the LED and the switch of one of the buttons. So the single ‘bit’ will visit each of the buttons in turn. For each button we can read the value of the switch (is it pressed or not), and decide whether to turn on the LED or not (this is done by turning on the transistor). This is done very quickly, so you can give the impression a button is continuously lit, even though it is actually flashing on and off very fast.
What’s next?
I’m already working on Version 2 of this looper. I’ve split the buttons out onto a separate module which I plan to mount horizontally in the 1U section of my eurorack case, to save space in the 6U section. Features of the upcoming version 2 are.
Separate audio codec (WM8731) for improved sound quality,
CV control of the module, will allow for gates to control loop position, as well as controlling some of the functions mapped to the dials.
Option pedal input so you can record without having to press the button.
The newest version of the Cutlassiezer eurorack board is entirely SMD. This was to allow it to be as compact as possible. The component count has grown with each iteration. The concept is it’s a flexible back board that can support multiple ‘break-out’ front boards. So far, I’ve only made one front board, which breaks out, audio in, and audio out, 6 pots, and 6 CV inputs. Most of the SMD components on this board are 0805 size, which is totally doable to solder by hand, the audio codec is 0.5mm pitch which is trickier, but possible, a microscope is handy though. I wanted to be able to assembly a bunch of these, both for myself and to give to friends. Doing these all by hand would be time consuming, so I wanted to find a quicker option. I’m very lucky to have access to a friend’s workshop with a reflow oven and a laser cutter. If you don’t have access to such well-kitted out and generous friend, then check out your local hackspace, they’re likely they have both.
I wanted to try out using a reflow oven. A reflow oven is basically similar to a standard oven but has a well controlled ‘thermal profile’ which regulates the heat, so the temperature ramps up and down in a controlled manner, as ICs can be damaged if heat up or cooled down too quickly.
The reflow process is essentially:
Make a stencil to allow you to apply solder paste only to the areas of the board where the pads on the PCB are. Solder paste is just ground up solder mixed with flux.
Align the stencil over the PCB so the holes match in the stencil match the pads exactly. Normally you’d have some sort of frame to make alignment straightforward, but I did mine by eye and a rudimentary gig made of other PCBs (see below).
Smooth the solder paste over the stencil onto the PCB so a very thin layer of PCB sits on each pad. This is similar to applying paint to a screen print.
Painstakingly place each component on the board with tweezers.
‘Cook’ in the re-flow oven. This will melt the solder paste, and when finished you should be left with a beautiful and professionally finished board.
The Stencil
Generally you would use an aluminium stencil, they have to be very thin (sub 1mm), so need to be strong enough to withstand multiple uses. You can often get these machined by the PCB labs you have your board made at. As I was just experimenting I was happy with something relatively disposable. I cut my stencil out of Mylar sheet using a laser cutter. I exported only the pad positions from Eagle as a PDF, and set the laser cutter to ‘etch’ these out of the sheet. I used etching to avoid that added thickness of the laser that would result when cutting.
Results
I made 2 boards. The whole process (including cutting the stencil), took less time than soldering a single board by hand, and the process was fun. On one of the boards the audio codec had some bridged contacts, presumably because I hadn’t aligned it well enough, but this was reasonably easily solved with a hot air gun (to re-align the chip), and a soldering iron with desolder braid.
Nothing is more motivating than an imminent deadline, and my gig in Berlin served as a good end point to get my new case finished, and a brand new module into it.
The case was built out of a Habitat trunk, see more details here. I’m pretty pleased with how it turned out. It’s nice and light, and hopefully pretty sturdy. It survived the flight back from Berlin anyway.
The new module is actually just a re-working of the GlitchDelay, but it’s using the new PCB I’ve designed. Which uses Teensy 3.5 (again) coupled with an external WM8731 codec (for reduced noise), and has 6 buffered CV inputs. It’s all SMD to keep the size down. The idea is that I’ll be able to produce different front panels, for different module functionality, but keep the back panel the same. I laser cut a panel on ply-wood for the first time. The contrast between the etched and non-etched material is much higher than with the acrylic, which I like.
Next on the agenda is to modify the case to squeeze a row of 1U modules in. Ideally I can just use this case, with external noise boxes/instruments when playing out live.
Just back from visiting Berlin. Went to Superbooth, met some lovely people, played the Koma Elektronik afterparty, and generally had a wonderful time. As you can see in the photo below, I finished my eurorack case off. I’ll add more details about the new modules soon. Airport security were slightly baffled by the objects in my suitcase. I was a little concerned when I got taken to an interview booth, but only some minor swabbing of case and clothes transpired.
Berlin is quickly raising up my favourite city rankings, and must be close to toppling New York from the top spot. I love the fact that you never struggle to find somewhere cool, unusual, and interesting to eat, drink or hangout. Thanks Berlin, I miss you already x
Happy Easter! I’ve spent my time off crafting a DIY case to house the modules I’ve been building. As I’ve been trying to perform using only DIY instruments and effects I’ve built myself, then as Jedi must craft their own lightsaber, it seems fitting I should create my own case. Actually, I already have my Chilli Box case, but I’ve rather outgrown it, size-wise.
The case is based around a Habitat trunk which I got in the sale. I used aluminium rails from Mouser, which I set M2.5 nuts into. I cut these down to the correct length with a hacksaw. These were then mounted onto an aluminium mounting frame from Thonk. The frame went together ok, although, getting the supplied bolts to cut a thread into the aluminium rail was a bit tricky, and I managed to rather chew up the head on one of the bolts. Hopefully I don’t need to get that out again!
The trunk case has a lip all the way around so I ‘plugged’ this by screwing a block of wood on each side, flush with the lip, that I could then mount the frame into.
The power supply was just a cheap Chinese board from eBay (TPS5430), that I added a couple of extra filtering capacitors to, and then used Vero board to mount header to for the ribbon cabled to connect to. The filtering caps were 100uF and 10uF, chosen more due to what was on hand than by any form of science.
Still need to mount and test it with all my modules, let’s see what new and exciting problems that brings..
For the past few months (yes, it’s a slow process), I’ve been working on a new version of my Teensy based eurorack boards. Whereas my previous boards have used either the Teensy’s built-in ADC and DAC, or the PJRC audio shield, this one uses a separate chip, known as an audio codec, called the WM8731, to perform these duties. The benefits are increased audio quality over the built in ADC/DAC, without the need of the more expensive, and physically large, audio shield. It’s been a bit more challenging than I expected. The first PCB prototype I had made had a number of issues with it. Some were just careless mistakes, others originated from a lack of understanding of the WM8731, and how it uses I2C and I2S protocols. My first board is a mess of soldered on wires and extra resistors to fix issues. It was a useful learning experience, and allowed me to fix the errors and produce a new PCB. Today though, I finally got everything working.
The main difficulty was that debugging digital chips is hard. If you don’t set everything up correctly it just doesn’t work. Then you’re left scratching your head trying to get to the root of the issue. Is it the circuit that’s wrong? The soldering? The code? Did I burn out the chip when soldering? This meant the whole process took a long time. Also, the chip is SMALL. It’s 0.5mm pitch which is quite tricky to solder by hand. This is my first fully SMD board, so I’m a bit of a novice with SMD. Most of the other components where fine, but this one was a real pain. I tried ‘drag soldering’ which people say is ‘easy’, but I found I just bridged all the legs together. So I opted for slowly and painstakingly soldering each leg, accompanied with copious swearing!
I’ll post more details on this as I develop it. First job is to port my current effects to this board, and incorporate 6 CV inputs. Finally, I’ll be able to make use of one of the main advantages of modular!