1. Cookin’ up a new gurdy preamp with even less noise than before. The secret ingredient? The pot itself! Turns out EM shielding is every bit as important as all those grumpy people on guitar forums spend their spare time telling each other.

  2. Turns out that it’s possible to use cheaply available (~2€ each) 7-pin SPI OLED displays with the magpie modular 8hp microbraids PCBs. A hardware and software modification are required, although as the ATMega is using software SPI it may be possible to work around the hardware modification with further software modifications.

    Please note that I would not recommend building the magpie modular micro braids module! Instead, try one of the newer adaptions (e.g. the one from Antumbra) which uses normal LED displays and have prettier panels. This guide is intended as reference for people who still have one of the old boards lying around and want to get it working without shelling out 20€ or more for a tiny OLED module.

    The seven pin SPI header on the cheap OLEDs I bought maps to the eight pin header of the original Adafruit OLED (and therefore the microbraids PCB) like this:

    |    X      X      |        \
    CS RS DC CLK MOSI Vin 3.3v GND

    I cut the relevant traces on the OLED board, scratched away some solder mask and used enamel-insulated wire to connect the traces to their new pins. Then, I installed a 7 pin female header on the braids PCB, and bridged the 3.3v and GND pins, which sounds like a terrible idea, but the board doesn’t make any use of the 3.3v pin, I’m just using it as a convenient way of connecting the OLED GND pin to the braids GND pin.

    If your OLED module has the same layout as mine, it should end up looking something like this:

    The display ends up being in a slightly different place to the original, but five minutes of filing the aluminium panel fixed that. It ended up looking a little bit messy, but the panel (from pusherman, not a magpie modular original) is extremely ugly anyway so it didn’t make much difference. I quickly cut out and filed a 3mm acrylic screen, wedged it in place and secured it with some high-viscoscity superglue.

    After reflowing and flashing both the ATMega and STM, everything was working perfectly, except the display was upside-down. Looking through the Adafruit graphics library led to a simple solution: adding the following line to the init function on line 39 of mbraidsv3.ino:

    display.setRotation(2); // Invert display for use with cheap Aliexpress 7-pin OLED

    After re-flashing the ATMega, everything worked perfectly.

    It was only after I made the hardware modification that I noticed the ATMega is using a software SPI library, with the pin definitions on lines 9-13 of mbraidsv3.ino. It should therefore be possible to achieve exactly the same result by leaving the OLED module unmodified, bridging the 3.3V and GND pins on the 8 pin OLED header on the PCB, and swapping the pin definitions around so they look like this:

    #define OLED_MOSI   10
    #define OLED_CLK   9
    #define OLED_DC    13
    #define OLED_CS    12
    #define OLED_RESET 11

    The display rotation mod will still be necessary, unless your display module is oriented differently. If anyone attempts the software modification please let me know, I’d be curious to know if it works!

  3. Augmented Hurdy Gurdy Experiments


    As I can’t currently commit to building a new series of gurdies due to my living situation, I’ve been keeping myself busy developing the MIDI system for my instruments, to develop new extended, augmented playing techniques.

    This video is the first demonstration of some hybrid electronic-acoustic experiments using the prototype MIDI system installed on my hurdy gurdy.

    0:22 Technique: Pitch-shifting Polyphony

    Gurdy MIDI and Audio → Apogee ONE → Macbook running a puredata patch

    Monophonic acoustic gurdy signal is pitch-shifted down in real time to play chords and harmonies. Chords and intervals on the keyboard can also be used to pitch-shift the trompette signal (0:55) or the drones. Inspired by an idea from Sébastien Tron.

    1:18 Technique: Expressive MIDI Controller

    Hurdy Gurdy MIDI → DIY Hybrid Poly Synth based off Mutable Instruments Ambika

    The keyboard and wheel sensors send MIDI note, expression and polyphonic aftertouch messages to a polyphonic synthesizer. In this case a split keyboard effect is used to play two sounds.

    1:36 Technique: Layered Acoustic and Electronic Sound

    Hurdy Gurdy Acoustic audio, Gurdy MIDI → DIY Hybrid Poly Synth based off Mutable Instruments Ambika

    1:36 The acoustic string plays a melody, the bottom half of the keyboard controls a synthesizer with a long release for subtle held chords

    2:08 Using trompette technique can send MIDI messages, used here to play synthesized percussion on an Ambika voice assigned to MIDI channel 10, whilst the keyboard plays chords.

    2:30 Acoustic trompette and melody string sound layered over subtle polyphonic synthesized chords

    Playing, Instrument and Software: Barnaby Walters https://gurdy.is https://waterpigs.co.uk
    Polyphonic Pitch-shifting idea: Sébastien Tron
    Filming, editing: Adriana Borger

  4. Some tips for building a Mutable Instruments Ambika, based on my experiences:

    Based on the part numbers in the BOM, suppliers will sometimes pick a CD4050 chip. These are not fast enough and will cause SD card access to fail, it’s necessary to use a 74HC4050.

    If you’re using a 74HC4050 and SD card access is still failing, check whether communication with all of the voicecards works. I had a lot of issues where failing or badly connected voicecards would interfere with the serial lines and prevent SD card access from working.

    The 3.3V regulator, DACs and all the MCUs can be obtained free from the Microchip samples service if you’re willing to do it over a few months in limited quantities of two part numbers at a time.

    My Pololu USB AVR Programmer wasn’t able to provide enough power whilst programming, so I had to power the boards for programming. For the voicecards, having both 6 pin headers connected interfered with programming because of data being sent to the voicecards over the serial lines. I ended up powering up the motherboard, placing a stackable connector in the power/audio socket voicecard socket and plugging the voicecard into that for flashing, so that it’s powered but the serial lines are disconnected.

    I programmed my Ambika with the YAM firmware to get those smooth sounding PolyBlep square and saw waves. I built the firmware myself, downloading CrossPack 2010-01-15 which provides avr-gcc 4.3.3, the correct version for compiling most old MI AVR firmwares.

    I would recommend buying higher quality pots and encoder with metal shafts rather than the flimsy plastic ones in the BOMs. There are so few on the Ambika that the added expense is only a few euros in total. An Ambika is such a large time and financial investment that there’s really no reason to use flimsy, wobbly plastic pots.

    I got my PCBs from the Pusherman group-buy, they‘re very cheap and work fine.

  5. I built an Ambika to join my family of Walnut Mutables!

    I messed up the LED holes in this one, but the laser engraved front panel graphics and text came out really well. The back panel is acrylic so I can admire my electronics handiwork and Olivier’s amazing design any time.

    I took the opportunity to give my Shruthi a knob upgrade, too.

  6. Anyone trying to buy stackable ("Arduino-style") headers from eBay, "elec_mall2012" is the only Chinese seller I've come across who actually shipped stackable headers. All the others shipped normal ones.

    The other sellers were always very good about refunds, but shipping takes so long that it's still a waste of time. Would recommend buying from elec_mall2012, or just shelling out the extra few euros to buy the headers from a US or EU component dealer.

  7. Found at a market in Berlin: what I think is an old DIY oscilloscope, complete with handwritten panel lettering!

    I’m guessing this could have been a build by someone living under the GDR who couldn’t get hold of a scope.

  8. FREE: ATmega1284p TQFN to DIP adapter boards available for Shruthi/Ambika/open source work!

    TL, dr; I had a batch of adapter boards for the ATmega1284P (a pin-compatible upgrade to the ATmega644 used in the Mutable Instruments Shruthi and Ambika open source synthesizers) built which enable an SMD version of the chip to be inserted into the DIP socket on the MI boards. I now have loads of them and am giving these boards away for free to people who want to work on open source Shruthi/Ambika firmware! I’m also happy to assemble them for a few euros.

    For context:

    Why the ATmega1284P?

    This chip is a drop-in, pin-compatible upgrade to the ATmega644 used in the original Ambika and Shruthi designs, which provides twice the flash available in the 644p. This is particularly important for Ambika firmware development because the stock firmware, and YAM, uses up almost all the space.

    Why not just use a DIP ATmega1284p, if they’re pin-compatible?

    As previously discussed on the Mutable Instruments forums, the DIP ATmega1284p chips have a hardware fault related to the UART used for MIDI functionality which can cause the chip to crash. The SMD version of the chip apparently doesn’t have this fault, and therefore using the SMD chip via an adapter board should fix the problem and act as a drop-in replacement without having to totally redesign the synth.

    I designed this board last month and now have 44 of them. I’m sending some to the developer of the excellent YAM firmware, and will experiment with a few myself, but I have no need for so many.

    So, if anyone’s interested in doing firmware development work on Ambika or Shruthi, or using these for any other open-source purposes email me barnaby@waterpigs.co.uk your address, paypal me the shipping costs if it’s going to be more than a couple of euros, and I’ll send you some boards!

    I’m also happy to assemble the boards with headers and ATmega chip for €8 + P&P per board, if anyone wants.

    Disclaimer: the boards are untested, and I personally have not tested them with the shruthi hardware or firmware! I may not have time to do so but will post my experiences here when I get round to it. Point is, these boards are strictly experimental with no guarantee they actually work!

    Boards in stock as of 2017-11-18: 32

  9. The old Fitbit and Fuelband which Aaron Parecki gave me a few years ago (thanks Aaron!) don’t hold a charge anymore. The Fitbit battery is near impossible to replace, and with the Fuelband I decided that as there’s no way of loading custom firmware (which would let me get at data without an internet connection and proprietary apps), it wasn’t worth trying to get replacement batteries. So before throwing the devices away, I took them apart.

    I didn’t find out much which I hadn’t already seen in teardowns, but these devices have such strange form factors that it was fascinating to see the engineering up close.

    The rubber coating comes off very cleanly. Here you can see some of the funny curved traces used on flexible circuit boards:

    The LED array, with “Just Do It” written on the top of the PCB (invisible to the end user). On the sections of flex between the more solid boards you can see the unbelievably fine traces:

    On the back of the LED matrix section, with a part number. To the right you can see the jaggedy bluetooth antenna trace:

    The fitbit isn’t so interesting. Removing the cap with a heatgun reveals a tiny circuit board with a tiny battery and vibrating element.

    I also opened up the dock, as I noticed that the USB cable was power only, with no possibility of wired data transfer. The third pogo pin must be for the reset switch, which is mounted in the dock. There’s a little IC in there too, but I was more interested in seeing how the pogo pins were attached to the board. Turns out they’re just soldered straight on:

    I’d love to have been able to flash custom firmware to the Fuelband, it’s a lovely bit of hardware, and manufacturing something like that is completely out of the question for a hobbyist. There are so many fun things which could be done with a device equipped with an LED matrix, accelerometers and bluetooth — a wearable MIDI controller, for example.

    That possibility would also have made replacing the batteries worth doing, and in doing so saved the device from the landfill. Free software and open hardware isn’t just political, it’s better for the environment.

  10. if ordering rotary switches from Digikey, most of the ones they stock are adjustable (even if marked as fixed in the product description), so if the switch doesn’t seem to rotate to all of the positions, try taking the nut off and removing the index washer. I just received two supposedly “fixed-index” 12 pole switches which only rotated to 11 positions. Turns out they were actually adjustable and worked fine.

  11. There’s something incredibly satisfying, if a little masochistic, about poring over PIC datasheets and manpages, and tinkering with low-level code you only half understand, when it all actually works and you get two devices to talk to each other (in this case a PIC16F886 and a Raspberry Pi, via I2C)

  12. Fitted basic optical encode circuit to my , now figuring out optimal settings for calculating wheel speed. Notes:

    Sane gurdy speed of 14 revs every 10 seconds = 1.4 RPS
    52 markers on wheel = 52 * 1.4 = 72.8 transitions per second ≈ 73Hz minimal input signal
    Timer nominal input freq is Fosc / 4 = 4MHz / 4 = 1Mhz
    Max prescaling = 1:256, i.e. TMR0 increments once for every 256 Fosc/4 pulses
    Resultant timer freq = 1Mhz / 256 = 0.00390625 Mhz = 3906.25 Hz
    Input signal has ≈50% duty cycle so periods between pulses should be 1 / 73 = 13.69863014ms
    Period of 3906.25Hz wave = 0.256ms
    Num pulses @ 3906.25Hz after 13.7ms = 13.7 / 0.256 = 53.515625
    1.4 RPS is minimal normal gurdy trompette playing speed, so counting 54 clicks per transition gives a little space for speeding up and a lot of space for slowing down.
    High gurdy trompetting speed of 24 revs per 10 seconds = 2.4 RPS
    TPS = 52 * 2.4 ≈ 124.8 = 125Hz maximum input signal = wavelength of 1 / 125 = 8ms
    Num pulses @ 3906.25Hz after 8ms = 8 / 0.256 = 31.25

    So these values should give a just-wide-enough span of ≈20 ticks between nominal and trompetting speed, with room to halve or potentially even quarter the prescaler if this turns out to not be enough. One advantage of these values is space to track much slower wheel movements, opening this up to be used for slower performance tools as well as speed measuring.

    An external switch could always adjust the prescaler if necessary to cover both use cases.

  13. Returned to Iceland to find RTC chip free samples waiting for me @ Vísar HQ, solidifying maximintegrated.com as my favourite semiconductor company — samples shipped to Iceland, of all places, arriving within days of being ordered.

  14. Voltage Dividers

    Working through some example circuit simulations I finally gained an intuitive understanding of the voltage divider equation — it’s just a ratio, but I had never figured this out before.

    Given this circuit, where the voltage source is rated at 1V:

    The voltage at A is equal to 1V·(R2 / R1 + R2), which is 1·(1/1+1) = 1·(1/2) = 0.5.

    Why? Because R1 + R2 represents the total resistance of the path, and as such the total voltage drop. Dividing R2 by the total produces a fraction representing the voltage drop over R2. Multiplying the input voltage by this fraction leaves us with the voltage dropped over just the R2 portion of the circuit, which must be VA because there are no other branches in the circuit.

    Put another way, the equation finds the ratio of resistance (and so voltage drop) R2:R1 and then feeds the input voltage through this. Here’s a more abstract visual representation of what’s going on: