Category: Tech

  • Gloop – work in progress

    I thought I’d share how I’m getting on with Gloop, my experimental eurorack performance looper. This version is built using the Electrosmith Daisy Seed. It allows you to record loops (with overdub), and playback with 4 simultaneous play heads. Each play head can be at a different part of the loop, playing at a different speed/pitch, direction and volume. Each play head can also be playing a different area, or sub-loop of the main loop. This can allow you to trim the loop size, play different sections of the main loop with the different play heads or create granular style effects. There is a jitter parameter which controls how much the start of the loop randomly shifts each time the loop restarts.

    It’s essentially the culmination of many of my digital projects, combining what I learnt from making the AudioFreeze, GlitchDelay and my other Looper. Gloop has one big advantage over my other looper, (apart from having a screen) which is that the Daisy has a whopping 64MB of RAM, so I can record the loop directly into RAM, rather than having to worry about recording to SD card, and all of the buffering issues this presents. This allows me to go much further with the firmware, supporting multiple sophisticated play heads, which wouldn’t have been possible with the original version.

    I designed this to be played live, and I’ve used it as most, this year, at vary iterations and states of completion.

    I still want to spend some more time with the firmware, and have started working on some CV and trigger expander modules that connect via I2C. Also the ability to connect a pedal to start and stop the loop, rather than having to press the button. More about those soon. Who knows, maybe I’ll actually try and make Gloop available for sale at some point.

     

    An early prototype testing the OLED screen
  • Build a DaisyDrone!

    I’ve made the schematics and gerber files available for download on GitHub here!

    DaisyDrone is a drone synth, with 6 sliders, Inspired by @HAINBACH ‘s use of vintage oscillators and test equipment. This combines 18 sine waves. Each slider controls the gain of a set of 3 sine waves at slightly offset pitches centred around a frequency within the key shown in the display. The frequency of the sines increases from left to right. The magic comes from the way they are summed (controlled by the 3-way switch). Either averaged (boring!), or wavefolded with a sine wave or a triangle wave. The wave folding produces the rhythmic elements. An encoder is used to set the note of the base frequency, displayed in the 7 segment display.

    Here’s a little demo of it..

  • Cutlasses and R.Dyer live in the Lockdown Lounge

    Thanks to all of that ‘attended’ our performance last night. Combining a fairly involved audio setup with a 2 camera visual setup was quite tricky, and I was a little nervous about it all, but it all seemed to go down ok.

     

     

    Gear:

    Everything in this case is DIY (including the case itself). It all starts with the Befaco Instrument Interface, that’s the pre-amp for my guitar, and all the other instruments. After that, everything is going through an effects loop of guitar pedals (DOD volume pedal, Devi Ever Shoe Gazer, EHX Memory Man with Hazarai, Digitech Hardwire Reverb) via a Syinsi pedal i/o 1U tile. I was originally using my Khronos module for the delay->reverb, but actually the Teensy DAC was just too noisy, and seems to be noiser now than ever, possibly because I’m running a lot of modules from a cheap power supply board. I will make something similar using a module with an external audio codec at some point. After that the sound is routed to the modules I’ve designed, Glitch Delay, Audio Freeze, and 2 Looper modules. These form the core of my sound. I have the Foxfield Gearbox as the master clock. The Music Thing Turing Machine with Pulses is sending triggers to the looper to randomly cut up the loop. My alternate RadioDrum firmware for the RadioMusic, is providing all the drum sounds. The Befaco ADSR is responsible for that pulsing distortions at the end of the set. Everything is then routed to my 2 mixers, a passive one that I designed, and the Rakit 5 mixer. Ideally I’d like to get a eurorack mixer with some EQ, I’ve got my eye on the Befaco Hex Mix, but it looks like quite an involved build, so need to find the time. See here for more details on the modules I’ve designed and the piezo noise boxes.

     

    Live stream setup

  • Developing on STM32

    Over the past months I’ve been investigating moving away from Teensy to another microcontroller  ecosystem. I love Teensy, and I wouldn’t have made the majority of my projects without it, I’ve learnt so much from it, and I still think it has the best libraries of any of the alternatives. It’s always the first thing I recommend to get people started on doing digital audio electronics and I’m sure I’ll use it again in the future. But, it has a few, in my opinion, major downsides, once you get a bit more advanced.

    Development Environment – Teensy uses the Arduino IDE, which is fine for writing small programs to flash leds, read sensors etc, but is a little basic for larger scale projects.

    Debugging – This is the big one for me, Teensy doesn’t provide a method for debugging (other than using Serial Monitor). I’ve spent literally hours trying to debug audio glitches that would have been relatively straightforward to find if I could just set a breakpoint and step-through. I have seen people exposing the JTAG pins on the Teensy and using these, but I wanted something supported by the vendor.

    Manufacture – If you want to do a manufacturing run of your project with Teensy you have 2 options. Either mount the Teensy itself on the board, which can become quite expensive if you’re doing more than a couple, or buy the bootloaders directly from PJRC and use the specific microcontroller to match the Teensy. I wanted to be able to make small runs of my boards (still less than 10), without the expense of buying many Teensy’s, and choose a chip specific to the needs of each project.

     

    STM32

    After chatting with Alex Evans, (mmalex on Twitter), who had already started working with the STM32 range of microcontrollers, I decided to check them out. They have a huge range of chips, ranging from arduino level all the way up to Teensy 4 capabilities. The Eclipse based IDE supports debugging, and they are fairly easy to include in your schematic (requiring a bunch of power-filtering caps but not much else.)

    STM make their own range of dev boards, similar to Arduino and Teensy, called Nucleo. There are lots of them, and it takes a while to filter through the STM range and find the chip and associated Nucleo you are looking for. They’re very reasonably priced (I suspect they are sold as a loss-leader) and are the best way to get started. They have a fairly large form-factor, so it’s unlikely you’d want to include them directly in your project, like you would a Teensy. But they are perfect for experimenting with the hardware before you start on your own PCB.

    I strongly recommend checking out mmalex’s youtube channel, where he has live streamed a series of videos explaining how to get into STM32 eurorack module design. They are super informative and well worth watching. Also this series by DigiKey on getting started with STM32 is essential viewing if you are interested in developing with them.

    STM32CubeIDE

    First experiences with the IDE weren’t great, unfortunately  it’s plagued with a number of small bugs and glitches. It really didn’t like me working in C++ and kept defaulting my project to C, which I then had to unpick in the project settings each time. Actually that bug has been fixed, and it does seem to be slowly improving, although each new update seems to introduce some fun new issues. It works ok-ish though, it’s free to use, and I can FINALLY debug!

    The work-flow involves using the IDE to visually configure your chip, you can set which peripherals you want to use, and which pins to connect them to. This will then generate (lots) of code, which basically sets the correct registers to initialise the peripherals and provides you functions to use them. They use something they call HAL (Hardware Abstraction Layer), so that the functions look the same regardless of what underlying chip you are using. Beware though, I’ve heard that different chips seem to have their own foibles in terms of setup, and some of the code requires manual tweaking. I’m using an F446, and so far, the generated code seems to be fine.

    Once this code is generated, you can start adding your own code. Any code added in the auto-generated files needs to exist between specific comment lines that the generator marks out for you. My first project was a PCB which connected the STM32F446 to a WM8731 audio codec, was powered by eurorack +12/-12V, and broke out many of the STM32 pins onto header. The intention is that this board will be coupled with another (module specific) board, which will add interface components (pots, jacks etc) and route them to the breakout pins. You can see the code here which initialises the STM32 and configures the WM8731 via I2C.

    The SMT32 board with solder paste applied and components placed ready for the reflow oven.

     

    I’ve just sent out some gerbers (PCB files) for manufacture, I will hopefully have them in a week or so, so look out for more news on my latest module!

  • First workshop done

    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!

     

    Teensy Workshop

  • Looper Version 1 Complete

    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.
  • First experience with SMD reflow soldering

    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.

     

    Reflow oven
    The reflow oven I used

     

    The reflow process is essentially:

    1. 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.
    2. 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).
    3. 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.
    4. Painstakingly place each component on the board with tweezers.
    5. ‘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.

     

    Laser cutting stencil
    Stencil about to be laser cut

     

    SMD Stencil
    The finished stencil

     

    A rudimentary ‘jig’ for aligning stencil

     

    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.

     

    SMD reflow board
    The finished board after reflow
  • Case and new module finished

    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.

  • DIY case almost ready..

     

     

    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..

  • Fun with audio codecs

    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!