Posted on Leave a comment

Troubles with Triggers

Everything was going so well. I had worked out a fast, repeatable way to churn out triggers for my 6″, 8″ and 10″ printed drums. All I had to do now was crank out about 30 of them for my massive drum array. Then I made three triggers in a row that didn’t work. Some others only worked intermittently, when struck directly on the cone, or returned very low voltage. Something was wrong – something new that only showed up when I started the production line. My very first triggers were still working with no issues apart from a bit of variance in sensitivity that could be dialed away in the drum brain. So what went wrong? I had some hypotheses:

  1. Bad piezos. They are the cheapest of the cheap .. but the distribution of failures does not seem to support this. My triggers were working, then most of them were not. That suggests a problem with my manufacturing process. Also, I would be shocked to find that the expensive and the cheap piezos were actually coming from different factories, not just identical units priced for their destination market.
  1. The sensors are flexing too much, damaging the piezo material. I have never been able to experience a real trigger from a commercial product because I am too poor to waste money buying one – everything I’m doing is experimentation and guesswork. I don’t know exactly what stiffness of foam is used above and below the sensor and it is possible that the hard foam cones are transmitting too much force to the disc or not supporting them properly underneath. I do have some early sensors I made with soft foam that are working very well, but they are fitted to 10” drums where I used the soft foam to compensate for the large travel of the mesh ‘skin’. I switched to using hard foam because the soft foam was impossible to shape with power tools and did not respond to a hot wire cutter.
  1. The adhesive on the foam sheeting is too strong and is damaging the sensors. It is impossible to open up any of my failed sensor packages – the adhesive tears the packaged piezo off the baseplate, leading me to think that the adhesive might be doing the same during assembly or when in use. Commercial products use 3M adhesive sheets that seem just as powerful, but if they are attached to softer foam this might not be a problem. I have also seen instructional videos where the foam cones on Roland drums were changed and it is possible to remove those without destroying the underlying piezo. This one seems plausible.
  1. I purchase piezo elements with leads already soldered on. The solder joints are sufficient, but have huge solder balls. It is possible that the strong adhesive is attaching itself to the piezo around the solder balls when I press the stacks together, then damaging the attachment point when I let go (or when hit during normal operation). Official and third-party replacement cones have little channels cut in the cone to accommodate the lead attachment points but I have not been very consistent with my hand-cutting of the relief channels in my own cones (foam with strong adhesive attached is hard to cut reliably with anything. Even scalpels are fouled by the adhesive).

These effects are linked by the physical properties of the system and may affect the outcome collectively or independently.

Now I can try some experiments to see if I can pinpoint what is going wrong. I can’t do any forensics on the assembled triggers as they cannot be taken apart without destroying them. There are, however, a few things I can try at the design phase to sort out what the problem is.

Trigger Assembly and Testing

A range of new triggers to test materials and assembly strategies

Make the foam cone from softer materials.

This could help with:

  • Flex or shock damage by reducing the forces on the piezo transmitted from impacts on the drum head.
  • Possible adhesive damage – the soft foam is not held well by adhesives so it is unlikely to damage the piezo by pulling it apart.
  • Possible damage to the solder attachments or surrounding material – the soft foam will not exert a high degree of force around the sensitive areas.
2V peak is not a lot to work with, but it does work

This sensor works – I’m not surprised, I’ve built them before, but I have not directly compared them to sensors made with hard foam. I was not expecting the voltage peak to be this low. This may be from the reduced travel of the 6″ drum skin in comparison to the 10″ I have been using with these softer cones. It may be worth trying to source another foam that has a hardness somewhere between the two I am already using. This foam also has a lot of trouble staying attached to the adhesive on the top of the piezo. In the 10″ shell these soft cones eventually detach from the tape and ‘walk’ out of the drum as they are hit. This is not the design I need.

Reduce the flexing of the piezo

This could help with:

  • Possible damage from the cone adhesive when the piezo moves
  • Damage to the piezo from flexing with impacts

I have designed a new sensor base that replaces the bottom 6mm of foam (the layer directly under the sensor) with solid plastic. The piezo will mount instead to a length of 2mm think double sided foam tape. I expect that this will drastically increase cross-talk by reducing the isolation from neighbouring pad vibrations, but that can be addressed in software.

A healthy 6V peak and an almost flat tail in comparison to other traces on this page

This sensor package is working well, delivering good voltages when installed in a 6″ drum. Curiously, although it supplies an almost identical peak voltage to the normal sensor with a foam base, the oscilloscope trace shows a very flat recovery from the drum hit with almost no bounce or ringing. A possible interpretation is that sensors made with a foam lower disc store and return energy, allowing the piezo to flex (flexing also returns voltage from a disc piezo). This is worth looking into further, but with ~30 drums in total crosstalk and transmitted noise from the shell mounting brackets could become a major issue.

Assemble the cone upside down

This could help with:

  • Possible damage to the solder attachments or surrounding material from the powerful adhesive on the bottom of the foam sheet.

The top cone is made of three layers of foam sheeting. By assembling it upside down (with the adhesive layer on top) I can attach the bottom of the cone using the much softer and weaker Bear tape (with a hole cut out for the solder joints and leads). As a bonus I can use the adhesive on the top layer to add some material that protects the tip of the cone that rubs on the mesh drum skin. I made a sensor like this accidentally when I was working out the manufacturing process and it has been working flawlessly on an 8” drum.

A healthy ~6V peak, but look at that ringing afterwards

This is working just as well as my normal designs. The vibration after the initial impact is interesting but falls well below the threshold of hit detection.

The piezo in this design is sandwiched between two layers of thin, soft and slightly stretchy double-sided tape with a generous cut out for the sloppy factory soldered leads. As usual, the cone base has a channel cut for the leads though this may not be necessary when the cone has no adhesive. I’ll build some more in this design and see what works.

Side mounted sensors

I recently found an old Roland pad in a music shop, a PDX6 or 8, and saw that the sensor in this model was mounted at the rim of the drum, with a flat-topped cylinder of foam contacting the skin. My current practice of mounting a cone shaped sensor in the middle of the drum should guarantee an even response around the drum head but if any hits land on the cone tip, they blast though regular playing at 100% velocity. A side sensor might fix that problem and side-step some of the issues described above that might originate in mechanical stress. A drum head deforms the most in the centre so a side mounted pickup should see much lighter impacts, less flex and less travel overall. I designed some side-mounting fittings and put together test rigs in soft and hard material. These sensors used a pack of smaller 25mm piezos from an earlier project.

The soft cylinder of foam returned very low voltages
The hard cylinder was more usable. Even if, for some reason, it returned negative voltage

I was expecting lower voltages from the side mounted sensors. They were smaller in diameter (25mm vs 37mm) and the side mounting would transmit a lot less of the stick energy to the piezo. I was not expecting numbers this small. The cylinder of soft material was useless, my hardest hits were just touching 0.5V. The harder cylinder was more promising, giving me ~1V, inexplicably negative. The wires were correctly installed on the piezo and correctly connected to the Cliff jack. This piezo just wanted to be different.

From watching a repair video for the PDX8, I can see that the side mounted piezo element in that pad is much closer to the skin than in my far deeper, more drum-like design, with a much shorter cylinder of foam. I also noticed that the replacement foam does not have a channel for the solder attachments, so they do not seem to be concerned that the adhesive will damage the top of the piezo.

The biggest problem I found with side-mounted sensors was a wildly varying sensitivity across the drum skin, with the side opposite to the sensor unplayable. These side sensors appear to need either a larger drum diameter (for more energy) or a much flatter foam column to get more of the impact energy to the piezo.

What About Tension?

That did get me thinking about the role that the drum head tension is playing. For this test I used the under-performing soft cone, to see if I could make it more usable. Tighter heads move less than loose heads, so would loosening the drum heads give my sensors more energy to use?

It does. But not a significant amount considering other variables, such as cone material, can have a much larger impact. In a not-very-scientific test I barely finger-tightened a double thickness mesh skin, measured some strong hits, then tightened the tensioning nuts by a half turn for each test afterwards. It only took two steps to get to the maximum tautness I would want to play with. As can be seen above, the loose skin returned ~2.5V, then just under 2V at medium and ~1.5V at maximum tension. The medium tautness is the loosest skin I would want to actually play, so while these are interesting results, they are not enough to make the soft cone a better sensor than the firm cone for supplying ~5V of velocity sensitivity to an Arduino input or even an Arduino set to 3.3V of input range. I would rather slightly exceed the input ceiling than lose sensitivity to light hits. It might be worthwhile to try the test again with a single-ply mesh head, but I do not have any free.


After all of these experiments, what really stands out to me is that all of these sensors worked. That does not give me any new information to help diagnose what went wrong with my last batch, but this shootout leaves me feeling more confident that I am on the right track with my firm, centrally mounted cones on a 37mm piezo and that they will work if I am careful and switch to the upside down cone design for the rest of the drum array.

Posted on Leave a comment

Arduinos and Piezo Triggers

It isn’t hard to make a DIY e-drum system that ‘sorta’ works, but there is a much longer road to making one that is good to play. The Alesis DM Pro that I have using is the latest of a series of Alesis products that I have used for processing my home-made drum pads. I’ve also owned a DM10, DM5 and a DM4. My very first E-drum unit was an ancient Roland PM16. All of them gave a far superior ‘feel’ to just sticking peizos straight into the Arduino analogue inputs. This direct approach has problems detecting some triggers, strange velocity response and crosstalk (one input setting off other adjacent drums) even when only one drum is plugged in.

We are using roughly the same hardware components, my old Tama Techstar pads were just piezos glued to plywood, so what is going on and how do these commercial products make it work so well? To get a more predictable, stable drum we need to improve our handling of the sensors. Look at the oscilloscope captures below, particularly at the Vmax(1) at the bottom of the images.

  • Piezos can damage your Arduino. A piezo, struck hard, can send (depending on the model) 10, 20 or even 30v down a line that would really rather be seeing about 5v. We need to limit the voltage to safe levels.
  • Piezos are the wrong impedance for easy sensing. The Arduino wants to measure from a low output impedance (~10KΩ) but it is currently seeing about 1MΩ from the input resistor. We can fix this by adding an active buffer (or putting a lower value resistor across the input, but this will reduce sensitivity).
  • Commercial products have gain controls (usually electronic, but the PM16 had tiny potentiometers), velocity curve selection and crosstalk detection. These are software solutions and shall be addressed later.

For the sake of simplicity and getting a system up and running quickly, we can use a unity buffer to protect the Arduino and condition the signal.

A quick 3D printed test bed containing an Arduino Mega, 8 channel multiplexer (not used yet), breadboard and eight Cliff jacks.

Opamp Buffering

A unity amplifier is one of simplest ways to use an opamp – you just connect the output of the chip to the negative input, as shown below. Any voltage coming in will be mirrored to the output.

The LM324 is a quad opamp that can operate at low voltages. Output cannot go higher than Vcc – 1.5V (1.5v lower than the voltage you are using to power the opamp), but that should still be enough for testing. If we run it from the Arduino’s 5v out line we will still have 3.5v of room to play. If everything works out an independent power supply can be arranged at a higher voltage to allow a full 5v output.

The oscilloscope screen pictured on the right shows the voltage from the drum hitting 3.6v and flattening out for the duration of the hit. This behaviour can be used to our advantage.

The 8-inch drum input buffered by am opamp powered by the Arduino’s 5v line. The spike tops out at 3.6v from ~13v input.
A simple unity buffer. Just hook the output into the negative input.

Is this good enough already?

Experimentation with an 8″ drum showed that a lot of expressive playing happens below 3.5v with the hard voltage limit acting like an audio compressor – hard hits are effectively flattened out to similar velocity values, smoothing out runs and fast rudiments. The Arduino Mega also has the ability to use a range of reference voltages for measuring input on the analogue lines. We can set the Mega to measure against 4.3v (the closest preset available) instead of 5v or supply 3.5v to the input reference pin to get a full velocity range from our sensor. We could also just use a 3.5v Arduino like the ESP32 that expects a maximum of 3.5v input, but in that case we would have to find a 5v source from outside the Arduino to run the opamp. We could also just adjust the velocity range in software but we are still losing precision and my work on the sampling violin showed that after you account for a reasonable noise floor that loss of precision really does matter. The biggest problem I found was sitting down at a drumkit is a very different experience from hitting a drum in front of an oscilloscope; what I thought was a reasonable velocity range in lab testing was nowhere near the velocity achieved in real playing. All of my hits were flattening out on the 3.5v rail, giving a very artificial drum-machine like feel to performance. This is not good enough, it feels lazy to leave it half-baked like this, and I’m going to need a lot more drum inputs than even the Mega can give me so we might as well do the inputs properly while working out the multiplexers than can give me 8 inputs per analogue channel.

Next – full range input and signal multiplexing

Posted on

3D Printed E-Drum and sensor system

This is a build document for a large array of E-Drums I am making to support a VR hyper-instrument project. All of the 3D printed objects, Arduino source code and instrument files will be made available through this website with appropriate copyleft licencing, mostly dependent on the most permissive possible licence of the source materials I am using. The hyper-instrument itself will be covered later in a separate series of posts after the construction of the physical instruments has been completed.

One piece shell and one piece rim printed in ESUN ABS+. The skin is a Remo Silentstroke 6″. Tension Bolts are 75 or 80mm M6. The shell is modified from a set published by RyoKosaka on Thingiverse under the Creative Commons Attribution-ShareAlike licence. In accordance with that licence my modifications and my sensor mount design are licenced similarly.

Get a good printer.

After several years of mostly solid performance, I decided to upgrade my 3D printer. My old refurbished Wanhao Duplicator (Sold as Cocoon through Aldi) had seen me through the construction of the Ambsonic dome, but was unable to reliably print ABS or run overnight. Temperature variations would always detach print jobs from the build plate no matter how much glue stick or hairspray I applied. It was also far too slow for the big, dense prints I needed to create drum shells. I needed a cheap, fast, fully enclosed printer.

The Creality K1 has mixed reviews and comes with many warnings from the cognoscenti of Reddit about poor build quality and recurring print issues. I considered myself experienced enough to fix whatever went wrong and bought one at a good discount. It has jammed only once in several months of hard use. It is fully enclosed and reaches temperatures of up to 50°C internally with heat from the build plate alone. This is not always desirable, so leaving the door open when printing PLA in hot weather is a must.

Printing the drums

I found several sets of designs for drum shells on Thingiverse (a site with a huge selection of free-to-use ready-made 3D print designs) and quickly settled on this collection of shells deconstructed for printing on 20cm print beds. The shells and rims are printed in sections and held together with M3 screws. The K1 is just big enough to print the 6″ shells in one piece, taking 6.5 hours in fine mode. The 6″ rim also prints in one piece, taking 2 hours. Shells printed using both ABS and PLA have held tension with skins installed for around a week with no signs of structural problems. Larger rims, such as the 8″ and 10″ sets have distorted (shown below) but are working well enough and are not losing tension.

Printing a one piece shell in rainbow silk PLA from ESUN.

Making the sensors

E-drums use a type of pressure sensor called a piezo. These are usually sold as flat discs that may have wires already attached. In the type of sensor I am using, force from the drum stick impacting the mesh head is transmitted to the piezo through a cone of soft material. The piezo is sandwiched between the cone and another disc of the same material that insulates the piezo from the frame of the drum. Multi-sensor drums that can detect playing on the rim often mount another peizo directly to the drum frame.

Completed cone sensor for the 6″ Drum. The cone is made from 3 layers of 12mm self-adhesive EVA foam sheet.

The mounting plates for the internal sensors included with the downloaded files made no sense to me, so I quickly designed a new friction-fit sensor sled that allowed for another jack to be installed underneath the drum, to be used for tight arrangements where the sides of the shell might not be accessible. The sensor is patterned after the Roland cone sensors used on their V-drum products. Although ready-made cones are available from aftermarket manufacturers, they are easy to make from materials available from Bunnings, for a fraction of the price

I experimented with several types of foam when developing the cones, including hybrid cones that used softer material for the top half. It didn’t really matter – every foam I tried gave good results, but a cone with a pointed tip such as the one shown above will need to be constructed from a firm material. Having a small point is especially desirable for drums with a centrally mounted sensor as it makes the foam cone harder to hit directly with the drum stick (which usually results in a very, very loud hit that stands out from regular playing). The sensor sled is a tight friction fit inside the drum but is secured with 20mm M3 bolts to keep it in place when plugging leads into the integrated Cliff jack.

Making the cones

I use a 3D printed cone shaping jig and a reciprocating scroll saw to shape the cones. Firmer foams, such as this EVA, can be shaped with a powered wheel sander. Soft foams have a tendency to grab blades and sanding discs/belts and can be dangerous to work with if you are using high-speed equipment, so I would recommend shaping those materials by hand with a scalpel. The jig is designed to replicate the 66° slope of the original Roland cones.

Assembling the sensor sled.

The sensor sled mounted to the 6″ shell. The Cliff jacks are simply wired with the red wire from the piezo to the tip of the inserted 6.5mm jack.
The tip of the cone should ~2-3mm proud of the height of the shell, allowing it to make good contact with the mesh drumhead. The cone described above comes out at exactly the same height. Take care when tightening the drum head as high tension may cause the sensor to stop working. If a satisfactory tension cannot be reached without stressing the cone, trim a very small amount from the top, taking care to leave a flat, smooth surface.

Bill of Materials

6″ Drum shellABS or PLA filament55m/165g$4.62
6″ Drum rimABS or PLA filament22.3m /67g$1.86
Sensor sledABS or PLA filament3m/9g$0.18
37mm Piezo In a pack of 25 from Ebay1$0.30
6.5mm Cliff jack Bulk order of 30 from Element142$3.70
37mm disc of EVA foamCut from 400 x 500 x 12mm Adhesive Rubber Mat4$0.80
Hookup wireAnything lying aroundTo taste??
Double sided tapeSomething thin – not foamTo taste??

Files (will be linked soon)

Posted on

Making an instrument from a scan of my own teeth.

My dentist recently mapped my mouth with a 3D scanner. I asked if I could have a copy of the file, promising to create a bespoke instrument from the scan.

The information arrived as an STL file. The scan had a good level of detail, but some problems needed to be addressed before I could turn this into a printable model. It has been many, many years since I last used Blender, so I decided to use this project as a re-introduction. I looked for ‘Blendercam‘, the modified version I used to use for creating cutting files for my CNC mills, but there were no valid downloads that would run on my Mac. Vanilla Blender it is then, with Ultimaker Cura as the 3D printing processor.

The raw model was inside out – the inner surface of the model was on the outside, preventing me from turning it into a printable object. I used Autodesk’s Meshmixer to clean up the edges of the mesh and ‘flip’ the faces so the outside was properly outside. I am aware that Blender has similar tools but using Blender is very similar to using Avid’s Pro Tools – it is filled with a seemingly random mix of useful and esoteric functionality that is not navigable until you have spent a few weeks unraveling the interfaces and learning the hotkeys. It is often quicker to use another, simpler tool that is focused on the task you want to achieve. Meshmixer can also turn a surface, like my scan, into an solid object. It does a good job but I was unhappy with the loss of detail in the final model. I imported the fixed mesh back into Blender and manually extruded the scan into an object.

Rough scan of teeth.
The original state of the scan mesh in the raw STL file.
Meshmixer: The pink faces are inside out – they show the ‘outside’ of the object.
Meshmixer’s ‘Make Solid’ command does a good job, but will take away some detail.

In Blender I used the circle select tool to separate the teeth into objects. I have a very old 3D Connexion Space Navigator that is still supported, even in Monterey on an M1 Mini. Flying around the object with the left hand and controlling selection with the right makes Blender so much easier to use than just a mouse/keypad/keyboard combination. After isolating the teeth I used ‘Fill’ to create new faces, filling the open mesh holes in the teeth and in the gums. Blender’s sculpting tools filled the faces with a dynamic mesh that I could push and pull into shapes that I felt comfortable printing. I added rods to the teeth and subtracted them from the gum object – they will allow me to mount the teeth and run wires into them from underneath the gums.

Removing the teeth from the gums in blender.
All of the teeth as separate objects
Using Blender’s sculpt tools to fill in holes in the gums after removal of the teeth.
Posts for mounting teeth and routing wires through the gums.
Tooth mounted on a post.
Test print after turning the mouth scan into an object.

Posted on

DIY 26 Speaker Ambisonic Dome – Part 5

This small Ambisonic dome is, by design, a one-person experience. These works combine the immersion of Ambisonic audio with interactive augmented and virtual reality, creating very personal worlds that cannot be experienced through 2 dimensional media. Each work gives the audient different levels of agency, discovery and immersion. The VR headset views and projections are all generated in real-time with MAX. The audio content is a combination of Ambisonic processing in MAX, Cherry Voltage modular synthesiser and Native Instruments Reaktor.

These pieces were made to be experienced, not watched. Watching an immersive experience from the outside is like eating the menu at a restaurant – but below is a collection of short clips showing the system in action. ‘Coil’ and ‘Living Room’ use the Vive controller as an exploratory tool.

‘Coil’ places you inside a gradually intensifying map of the electromagnetic radiation emitted from consumer devices in a kitchen & lounge room. Discovering the unseen topology of the fields we live with every day is surprisingly visceral.

‘Living Room’ scales Australia down to 3 meters inside the dome. Dynamic maps of bushfire, rainfall and temperature variation can be selected via a bluetooth footswitch. Although you are inside the data projection, an FM modular synthesiser controlled by the position of the Vive handset is your only feedback, growing more discordant as time passes and the maps intensify. Areas without change are the only respite but they grow fewer and smaller as change accelerates.

‘Workspace’ is a subset of tools designed to make a complete VR mixing environment. The spherical audio emitters can be placed in 3 dimensional space, adjusted for volume and given animation paths that they will repeat until reset. Evaluating the efficacy of my DIY Ambisonic dome when combined with immersive headset VR in this manner was the subject of my thesis.

‘Drown’ is simple, largely passive and surprised me with the nasty intensity of the conveyed experience. This work is entirely dependent on the power of visual and audio VR immersion. Seated in the centre of the dome, over several meditative minutes your mind accepts the reality of the undulating wireframe ocean and drifting sound emitters. Then you realise that the level is rising. The moments when the water surface is just at head height and the waves are higher than you can crane your neck are genuinely disturbing.

A slightly redacted version of the artist statement can be downloaded here.

Posted on

DIY 26 Speaker Ambisonic Dome – Part 3


Back in the 70’s you could buy hardware Ambsonic decoders, such as the Integrex. They were niche, and usually available as a kit you built yourself. Reportedly, they did not perform very well though I’d love the opportunity to hear one to judge for myself. The largest drawback of a hardware solution is that you are tied down to one configuration of speakers. Personal computers have become so inexpensive and powerful that it is easier and far more flexible to drive the dome from a software solution.

The ideal software for cost effectiveness is Pure Data, also known as PD. It’s hard to beat free software for price. This is an open-source solution and comes with all of the benefits and drawbacks of an open product. There is a lot of support and a real community around PD, but if it breaks, you get to keep both pieces and there may be no-one interested enough to help you. This is also a good way to describe the current state of Ambisonics in PD, specifically the HOA toolset.

HOA tools from the PD patch repository.

It looks great – it also doesn’t work anymore with the current version of PD and hasn’t worked for years. You could try running it in a version of PD from when it was released, but then you will discover that other parts of PD will not work because they are too old. To borrow a phrase from the Linux community, you are now in ‘dependency hell’ where there is no combination of software versions that will work for everything you want to do.

I’ve run into this problem a lot when developing for Arduino, where it is particularly bad. I often wonder if anyone in the Arduino community actually gets any real-world work done with the products they write about on their webpages. A popular library for processing the output of gyroscopes has an axis completely reversed for some hardware. None of the popular Youtube channels or blogs even noticed and the main library remains unfixed.

With PD reluctantly excluded, we must turn to MAX/MSP and MAX for Live. The HOA tools from PD are also available in MAX, but why make life difficult when the excellent ICST Ambisonics package is available for free in the package manager.

ICST Ambisonics in MAX/MSP

ICST Ambisonics makes a complex job easy. If you know where your speakers are and you know where your sources should be (or you have audio already recorded in a surround format), you can have audio coming out of the array in just a few minutes. My own software stores lists of speaker configurations to suit different rooms. You can select 4, 5, 10, 20, or 25 channels (plus the subs channel).

A simple decoder for playing prerecorded sound through the dome. The speaker array selector buttons are on the right.
My own MAX patch for an Ambisonic mixer/instrument and DMX lighting controller
This one is an interface for an Ambisonic computerised version of Laurie Anderson’s tape bow.
The Ambisonic decoder plugs right into the outputs from your computer. Two FireWire Focusrite Liquid 56s are twin-linked together to create this output set. It all fits within the bandwidth of one single FireWire 400 connection.

Unfortunately, MAX/MSP is not an open source product and it is not cheap. I still hope to replace MAX with PD when I have enough time to return to programming for fun, but that time may be never.

Waves NX

Although the dome is portable, transporting it requires several large boxes and about 6 hours of swearing to set it up (if you are on your own). There are some clever tools available to bring something approaching surround sound to your headphones.

Let’s first talk about mix room simulation.

Room simulation tools have been around for a long time. I used to use Focusrite’s VRM (Virtual Room Modelling) until an Apple OSX update made it inoperable. These tools were very polarizing when they were released, many engineers hated they way they sounded. One friend who disliked the effect flipped through the presets, turned it off and on a few times, complaining about how fake and smeared the sound was. If you have the desire to try one of these tools, this is exactly how not to audition one. By turning it off and on and jumping from one room model to another you are concentrating on the differences between the emulation and the reality – you are creating a condition where the emulation cannot win.

At first, I didn’t like the VRM much either, but I left the headphones on and set to work mixing. About fifteen minutes later there was a knock at the studio door and I leapt to the room controls to turn the monitors down. I had been fooled and completely forgot that I wasn’t listening to speakers. The same approach works with Waves NX – don’t dismiss this technology before giving it a fair listen.

Waves NX is step above a static room emulator. It is capable of tracking the movement of your head, either through your laptop’s camera or by using a special bluetooth sender that attaches to the band of your headphones. Some popular headphones have frequency compensation curves built into the plugin. Measure the circumference of you head and the distance between your ears around the back of your head (the inter-aural arc) and Waves NX will use a HRTF (head related transfer function) to calculate what each ear should be hearing as you move your head.

The Waves NX interface. Note the area for entering your head measurements in the lower left.

Waves NX is not kind to your processor if you use webcam tracking, and the positional lag as the camera system chases your face wrecks the effect a little (in a similar way to visual lag ruining your Virtual Reality immersion). It does work though, and a slew of competitors are releasing similar products.

DIY 26 Speaker Ambisonic Dome – Part 1, The Dome Structure

DIY 26 Speaker Ambisonic Dome – Part 2, The Audio

Posted on

DIY 26 Speaker Ambisonic Dome – Part 2

The audio

My vision for this project was to create an ambisonic dome for tinkerers and musicians who have a tiny budget but don’t mind putting in some DIY time. One of the biggest hurdles for keeping the dome design affordable was working out how the audio amplifiers and computer interfaces could be made or found cheaply.

Amplifiers can be very cheap when you need one or two channels – any Hi-Fi amplifier will do. If you want up to 6 channels you might be able to re-purpose an old surround-sound amplifier. You can’t get 26 channels of ready-made audio cheaply. Commercial power amps that handle over 16 channels are thousands of dollars. It was obvious that I would have to make something myself.

Digital amplifiers

I have been impressed by some of the small digital amplifiers available through Ali Express and Ebay. They can run from a huge range of voltages, deliver lots of power and are typically quite compact.

This is a Nobsound Mini Bluetooth Power Amplifier. You can find comparable models for ~$40-60. Audio performance is very good, but It is best to avoid the cheap Bluetooth implementation in these budget devices.

$20 per channel is still far too expensive for powering the dome – I’ll need 26 channels of audio. You can, if you look a bit harder, find digital power amplifiers sold in a very basic form, just a PCB and few support components. I found the PAM8610 stereo amplifier for $3.45

Digital amplifiers are very, very efficient and can operate without heatsinks for low power loads. The speakers in my dome are very small, but there are a lot of them. Sounds, even very directional ones, are represented in the dome by an array of speakers sharing the load, keeping the power demand on each speaker small. These little modules seemed perfect and my first test module seemed to perform OK. I ordered a whole pile of them and started on an enclosure.

The digital power amp. Each little module is two channels.

For each stereo module I 3D printed a mounting ‘sled’. The sled had push-fit fingers that held the modules in place, wire routing holes and mounting holes that could take an M3 bolt or a small cable-tie. It went together very quickly, looked neat and could be powered from a single 12V laptop power supply. It was also unusable.

I had noticed a small amount of noise during my individual module tests but I was entirely unprepared for the wall of noise that 26 channels of the PAM8610 would put out. It wasn’t only hiss – these units were interfering with each other, causing some very harsh noise components. I leveraged my years of experience fighting feedback squeal in valve amplifier designs and re-routed the grounds and power supply lines with a star-topology. A small improvement. I bypassed the power supply on each board with an MKT capacitor and added filtering at the power entry. Another small improvement but not enough. I had a week left before I had to exhibit the dome and I still did not have a working amplifier, so I needed to change course and try something different.

Old fashioned linear amplifiers are also available in chip form – though they can be annoying to work with at medium power, needing heatsinks or direct mounting on a metal case to keep them from destroying themselves through waste heat. I didn’t have time for all that, but I remembered that Jaycar stocked pre-made encapsulated amplifier modules. I bought every one they had and bulk ordered more than they probably would have sold in a year.

Not nearly as visually satisfying, but it did they job for the exhibition night. These amplifiers are now housed more neatly in a roomy 3U high case.

The amplifiers were sorted, but I still had to route sound to the dome from my computer. This is another area where a small number of channels is very inexpensive – stereo and even 5.1 surround sound is often built into motherboards or available on a cheap USB dongle. Finding 16 channels will probably cost you ~$2000, and 32 channels ~$4000. Although I would love to be able to justify buying an Orion 32+ from Antelope Audio, that would be overkill for this project. I also don’t have $4000 to spend for fun.

Whatever happened to FireWire?

FireWire equipment is available at bargain prices, if you are willing to take a risk on second-hand gear. FireWire used to be the only connectivity choice for professionals – unless you had some kind of solution that came with its own PCI card and bespoke connectors. USB was too unstable, too slow and had an air of “Intel PC” about it when everyone was using Apple to get creative work done. Then everything changed. Windows became stable (or stable enough depending on your luck and hardware) and Apple forgot that their professional users even existed, abandoning the Mac Pro and removing ports and functionality from their Pro laptops. It became nearly impossible to guess if your expensive interface would survive Apple’s next operating system upgrade. I have a graveyard of interfaces that no longer work with Apple computers – Focusrite, Digi, Edirol, Steinberg, Tascam, IK and others that I have forgotten about that now reside in dusty boxes in the shed.

There are a lot of FIreWire interfaces out there that are still compatible with current operating systems and doing good work but Firewire is obsolete technology and the prices really reflect that. You can buy large capacity systems cheaply but you have to be very careful what hardware you buy. Your hardware choices may restrict you to a few compatible versions of your operating system, preventing you from upgrading until you sell it. The interfaces I am using now are compatible with MacOS 12 but will probably not work for much longer.

Focusrite Liquid Saffire 56. You’re not supposed to be able to link them together – but you can.

I already owned a Focusrite Liquid Saffire 56 with a pair of additional 8-channel optical inputs. It was a great inexpensive system for recording live bands. I was able to find a second 56 for ~$600. Focusrite FIrewire interfaces have a special mode called ‘Twin Linking’ where the driver software ties two interfaces together as one unit. The documentation says that you can NOT link two 56s together – but you can. This configuration is not allowed by Focusrite because, with every input and output channel running, it is possible to exceed the maximum bandwidth of the Firewire 400 connection. Fair enough – but they don’t stop you from just doing it anyway. My only concern is to push 26 channels of audio out of the computer to run my dome and they are able to handle it brilliantly for a fraction of the price of a 32 channel interface.

Since writing this entry I have changed the hardware setup several times. I discovered a cheaper hardware combination that pairs two old Alesis ADAT recorders with the Liquid Saffire 56. ADAT units are currently $100 or less each. The drawback of using the first generation black case ADATs is a fixed -10dB output from the converters, which has to be matched to the +4dB outputs of the Saffire. I modified the dome software to store presets for individual channel gain and the problem was fixed. Later ADAT units (with silver cases) can output at +4dB.

Alesis ADAT recorders in the dome controller box. These are a very cheap option for adding channels to an audio interface.

In the interests of maintaining compatibility with modern operating systems into the future I am transitioning the dome to combination of an RME Fireface 800 and two Behringer ADA8200 ADAT converters. RME have an excellent record of keeping every one of their interface drivers up to date. Their very first Firewire interface is still supported. The ungainly chain of dongles required to attach it to my M1 Mac Mini (Thunderbolt 3 to Thunderbolt 2 to Firewire 800) is rock solid in daily use. Eventually I will probably abandon Firewire and move to the RME Digiface USB. This tiny interface is just a box of ADAT lightpipe ports, allowing me to connect four ADA8200 units for 32 output channels.

DIY 26 Speaker Ambisonic Dome – Part 1, The Dome Structure

DIY 26 Speaker Ambisonic Dome – Part 3, The Software

Posted on

DIY 26 Speaker Ambisonic Dome – Part 1

This project seemed fairly simple when I started designing it around March 2020. 26 Speakers, 26 amplifiers, an ambisonic decoder and some simple arduino based controllers. It got out of hand very quickly and although I am happy with how the project has come together, I have spent more time than I would like to admit wanting to set the whole thing on fire and forgetting that I ever wanted this thing to exist.

The Dome Structure

It’s what everyone sees first – it defines the whole project. It turned out to be the easiest part.

The first test assembly, proving the viability of the electrical conduit and PLA printed hubs

The hubs are 3D printed from PLA using a very cheap little 3D printer from Cocoon Products. It’s branded ‘Balco’ and I think that this model was once sold through Aldi. Although it was cheap it has some features that I think a 3D printer must have in order to be genuinely useful.

  • A heated bed – if you print in ABS or other less forgiving mediums than PLA you will need a heated bed. Without one your prints will curl up from contraction of the hot plastic while the job is still being printed. Sometimes it still will anyway. Ambient temperature can have a big effect on the quality of your prints. On cold nights I’ve built boxes from styrofoam, cardboard and clear polycarbonate around to printer to keep the heat from the bed escaping. A ready-made fully enclosed printer would be great, but is three times more expensive than my Balco.
  • Standalone operation from an SD Card – I have CNC mills that are driven straight from the computer (via the parallel port). It’s great to have a cool animated display (from Linux CNC), but it requires me to have a monitor, computer, keyboard and mouse for each mill. Either that or have my laptop tied up for four hours during a cut. It’s great to just load a GCode file onto the SD Card, open it from the touch screen and walk away.
  • Moving bed gantry design – this is nice because the bed doesn’t move beyond the boundaries of the printer base. For messy people like me, this means that your printer won’t push things off the bench. (My CNC mills will do this all the time if I’m careless).
  • A cool little touch screen with utility functions built in – filament exchange, homing and bed-leveling are all built into the unit. This saves a lot of time and fiddling around.

Files are prepared for the 3D printer using the free software package ‘Ultimaker Cura‘. It won’t help you with modifying your designs, though it can expand or shrink the size – a function I’ve used in very small increments to make the caps fit better on my hubs.

The Dome Components

The dome is a 2V geodesic semi-dome, needing three hub types to complete. The clips are electrical conduit clips. Also shown in the picture are the 6cm speakers and the first version of the class D 26 channel power amp. There’s 100m of speaker lead on that top reel – it wasn’t nearly enough.

My original plans were to test print the dome using PLA (it’s faster and more forgiving to print) and, after verifying the design, to reprint the whole thing in ABS for better strength. I never had to. The dome has been set up several times in differing locations, been left out in a thunderstorm, and has undergone rapid unplanned disassembly several times (the first few times we tried to raise a finished dome onto its legs. I’ve had to re-print parts due to breakage only four five six times so far).

Each hub contains a single 6cm speaker held in place with a printed ring. They are quite small and don’t have a lot of power behind them, so they can’t handle low frequencies. Low frequencies are not very important for directional audio, so a single subs unit can handle the low frequency audio.

Structural test installation of the dome with temporary legs. The ring of computer controlled lights around the base give the performer information about the intensity and position of active voices, controlled by the wireless, Arduino powered gyro violin. The steel picket legs can be reversed and driven into the ground for a sturdy outdoor setup.
Audio rig test with 10 of the 26 channels active. The MAX/MSP powered control software is visible on the laptop screen.

DIY 26 Speaker Ambisonic Dome – Part 2, The Audio

DIY 26 Speaker Ambisonic Dome – Part 3, The Software

Posted on

Nichrome wire as a controller input for Max Msp

The bow hair has been replaced with strands of nichrome wire. When the wires are connected by contact with a violin string or another piece of metal they form a conductive loop. The aim is to reliably measure the length of that loop and deduce the position of the bow. The electronics packages also contain gyros and bluetooth modules.

Recently I attempted to create a violin controller that used lengths of nichrome wire to replace the horsehair in the bow. The theory was that I could use the predicable resistance of the nichrome to detect where the bow was contacting a conductive element on the violin bridge. It turned out to be a little more complicated than I anticipated.

28 gauge (0.3mm) nichrome wire (Jaycar). 13.77 Ω/m resistance.

What is nichrome?

Nichrome in an alloy of nickel, chromium and (often) iron. It has high resistivity and is used to construct heating elements. DIY types would know it as the hot wire in a home-made foam cutter. The resistance increases linearly with length – a property I thought would make it ideal for constructing my own sensor.

Turning nicrome into a length sensor

Arduinos, and their clones, make measuring resistances very simple. The usual method is to construct a voltage divider using 5v or 3.3v sourced from the Arduino (or a power supply) and a known resistance (usually something in the order of a few kΩ). There are two reasons why this method will not work with the length of nichrome I am using in my project:

The usual way to measure a resistance with an Arduino. Ideally, the known and unknown resistances need to be similar, but that is not possible with my project due to current concerns.

The sensitivity and voltage range of the Arduino

The change in resistance over the length of nichrome I am using is small – only ~16Ω, and I need to measure that small resistance with the highest accuracy I can get.

Using the voltage divider equation, a divider using, for example, a 1k resistor as the known value will give me a tiny range of 5V to 4.92V on my 5V powered Arduino Pro.

The standard Arduino only has a 10 bit resolution for measuring that input voltage – that’s a 0 – 1023 range, of which I can use ~80 with that tiny change in voltage. To make matters worse, in the real world you sacrifice some of that range to ensure that the values you are measuring are all relevant and all captured. A system set up to use all of the input range has no room for values to slip, components to change, or for just the random behavior that seems to creep into home-built hardware. It is possible, however, to tell the Arduino to use a different measure for comparing voltages.

Input voltages are usually measured against a reference voltage that matches the voltage used to power the Arduino. This is convenient, as the Arduino is commonly the voltage source for sensing attached switches and potentiometers. It is possible to set a different reference voltage inside the Arduino, using AnalogReference(). This approach has some limitations, not the least of which is the lack of uniformity across the range of Arduinos and clones. This project began on an Arduino Mega clone, was installed on genuine Arduino Pro units for the final product and was moved to a Duinotech Nano for one of the interfaces. The second round of hardware has spent some time installed on 3.3v Duinotech ESP32s and a 3.3v Arduino Nano 33 BLE Sense (the sense has an optional 12 bit resolution but uses 10 bits for compatibility).

Lets’s look at the available reference voltages for the family of boards that I have used for the first round. Setting anaglogReference(INTERNAL) gives different results on different boards, some values are only available on Mega boards and the standard value differs between 5v and 3.3v versions of the same boards.

Arduino AVR style internal reference voltages: 
5V (5V power supply) or 3.3V (3.3V power supply)
INTERNAL: 1.1 volts on the ATmega168 or ATmega328P and 2.56 volts on the ATmega32U4 and ATmega8 (not available on the Arduino Mega)
INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)

So why not maximise the voltage available for measurement by using a known resistance similar in value to my length of nichrome? Because that would be very dangerous for my Arduino. The nichrome in the bow forms a loop when the two strands are bridged by a metal contact, so the total resistance would be < ~14Ω when in use (you won’t usually use the very ends of the bow, so you won’t see the full 16Ω). Even if we double that and use a 25Ω resistor, with a 5v source that is is ~200mA (1W @ 5v!). I’ve looked through the specifications for a few models of Arduino, and they have all had a 40mA maximum for IO pins. So how do we do it safely?

Safe sensing

Connecting a constant current source to the Arduino.

We can measure low resistances safely using an external constant current source. R = V / I, so with a known voltage and current we can measure resistance without presenting a risk to the Arduino. The LM317 regulator shown in the diagram provides a known 104mA. We can round this down to 100mA (0.01A) and see that R = 10V. My 14Ω usable resistance range is now a manageable voltage range of 0 – 1.4V of 1.6V total range measured against 5V. That immediately improves the 5V Arduinos measurement resolution to ~287 of ~328. The hardware will be re re-implemented on newer 3.3V modules which improves the Arduinos performance to ~434 of ~496. The 3.3V Nano 33 BLE SENSE has an optional 12 bit mode (0 – 4095) that improves the bow reading accuracy again to ~1736 of ~1984.

Making it Better

There are some easy ways to make the hardware better – the most obvious being altering the current source, but these modules are already built and I’d like them to be useful for other low resistance tasks, so they’ll stay at 100mA for now. There is, however, a simple way of drastically improving the apparent resolution of a hardware sampling system without touching the hardware at all:

Next installment: oversampling

LM317 modules in action:

Bow electronics package. The LM317 is visible on the bottom right.
Another electronics package for the body of the violin, to sense a nichrome replacement for one of the violin strings. The LM317 and 12Ω resistor are visible on the middle right.