Show older

I finally made a new breath sensor that's *better* than the first one! It feels nicer and the modulation is even a little better.

Also the wiring comes out the bottom which is a lot neater. No more wires getting in the way of seeing the music!

I'm not sure this is the final shape I'll go with but I *do* think it looks pretty cool!

Here's a rough schematic of the electro-sax's internal wiring:

I think it'd be a good idea to add some feedback LEDs for the three calibration buttons, so you at least know whether the press was registered. Maybe also a "cancel" button in case you only accidentally hit them.

It's been a while since I worked on the electro-sax, but I'm back at it. I wasn't happy with the octave buttons, which were just capacitive buttons and hard to time right. They needed a mechanical element like the finger buttons.

Some quick sketching helped me figure out how I wanted to do this. It could also be 2 of the finger buttons facing each other, but that just didn't seem very nice to me.

The prototype feels good on its own, I'll have to get it mounted to the sax to figure out if it's right.

Update on the hybrid thumb buttons for the electro-sax: They feel good! The way they pivot is very similar to the one on an actual alto sax, so it feels right.

The only problem is that the activation point is too late - on a real sax it's near the start of the press, here it's near the end. I can either make the travel shorter or make it more sensitive to presses in software. The latter approach is easy but has the risk of making it too sensitive and registering phantom presses.

I'm still working on the electro-sax project, just very slowly. I settled on using mechanical buttons with capacitive sensing because they feel like a real sax. Now I'm opening back up to other options that would be less susceptible to interference.

I've bought some conductive silicone to try something like a membrane keyboard. Got some small magnets and Hall effect sensors on the way. I could make contact between two battery springs, but I'm not super keen on it and they're kind of expensive.

Hall effect sensors seem quite neat for electro-sax keys. I bought some unbranded 49E ones and they seem very low noise compared to my previous capacitive sensing. Right now it does mean that I have to use analog pins on the Arduino, so I'd still need a multiplexer to have enough for a full sax.

I like the idea of adding a per-key threshold with a comparator and a potentiometer. That way it's just on/off signals going between keys and microcontroller.

There are 13 keys (currently) and 16 IOs available on a Pro Micro. That leaves me enough free to use one analog pin for the breath sensor and there are still a couple free for buttons. Maybe I should make those the i2c pins just in case I need an IO expander.

Alternatively, maybe I could get the comparators to trigger transistors, and scan them as a matrix? That would get me down to 8 IOs used for keys. It's more comfortable but adds extra parts to each key (and I'd need to figure out how to do that!)

This is the kind of thing I'm thinking of. The green trace is the hall effect sensor output, going from 4.5V when the magnet is far away to 2.6 when it's close.

There's a threshold set with a potentiometer (represented by R1+R2) and the two are compared by a comparator. It goes high when the button is pressed down.

Now I think I just need to get the comparator to switch a MOSFET which would be part of a matrix.

I'm not entirely sure about the multiplexing for the last bit. Any thoughts?

I tried out the conductive silicone. Cut some interlaced fingers in a piece of copper-clad board and laid the silicone on top. Even just the weight of the silicone is enough to make good enough contact to overcome the Arduino's internal pullups.

I'd be a little bit concerned about debouncing (without introducing too much latency) but this seems like a nice simple solution for the main finger keys on the electro-sax!

The electro-sax needs two types of buttons to mimic a real sax. The finger buttons activate at the bottom of the stroke, when you fully close a hole on the sax. The palm and thumb buttons activate at or near the top, when you open a hole on the sax.

That difference seems to be quite important when trying to recreate the feel of the sax. Some types of sensing will be better for one button type or the other.

Testing two different types of button for the electro-sax. The conductive silicone one works really well! The only downside is it actuates too late for the palm+thumb switches.

The hall effect sensor one works but I'll have to do something to deal with oscillations. With actuation based on a simple threshold it's easy to get it to fluctuate between on and off. The silicone one doesn't seem to have that problem.

I think what I'll do is use the silicone switches for the finger buttons, and Hall effect or something else for the palm and thumb keys.

I made this little circuit based around an LM311 comparator to turn the analog voltage from the hall effect sensor (V_HALL) into a digital input. It actually works!

I'm not familiar with TTL - I'm thinking I can common up the outputs on multiple of these, and use the LM311's STROBE pin to enable the output of one at a time. That way I can build a matrix. Does that sound right?

The matrix of comparators seems plausible! I wired this up on a breadboard - two LM311s with separate enable pins attached to their "strobe" inputs.

They both have the same two input voltages (but wouldn't in actual usage). I enabled one then the other and got the same reading from both! I think that's enough to indicate that this works - now I can make some little stripboard versions and build them into some test keys.

Added some hysteresis to the comparators by swapping them round to an inverting arrangement and added positive feedback on the reference side.

That means that noise and small movements don't make the button state oscillate between on and off. Could have done with this on my capacitive version!

Since I'm only using this for 5 of the buttons I think it's OK to use the more expensive analog Hall effect sensors. The rest of the buttons will be conductive silicone.

Thinking about the shape and workings of the electro-sax keys

I've made the "lever" part of the electro-sax key into an L-shape, so that the return spring will sit inside the body of the sax. I think this will work!

The important difference here is that once I add a widened top part onto the lever, the rubber band and the base of the key are hidden. That means I can make this whole thing look much slicker (while actually making it easier to replace the rubber bands because they'll be accessible on the inside).

Printed a couple of the new button design and it feels promising! These could either each have their own PCB or all mount to one shared PCB. They clip neatly onto a PCB edge.

I think they could do with a slightly longer lever so they don't twist so much under your finger. They also needed a slight bit of filing due to sagging while printing. I think I can just rotate the print orientation and that won't be a problem, but the curved top will be less smooth.

Adjusted the angle of the electro-sax button lever, so that it's more compact underneath. Now when it's fully pressed, the lever doesn't swing out past the length of the button. That'll make fitting it into a sax easier.

I had some fun trying to remember how to do nice surface modelling too! There was an attempt.

Also they won't be in this horrendous colour scheme, of course.

They look cool and feel great! Now I just need to design the rest of the saxophone...

Some new keys for the electro-sax - these are the keys on the sides that you hit with your palm.

These are a bit tricky because they basically need to be "normally closed" and actuate as soon as you start pressing the button.

Luckily there's plenty of space to make them longer, and I think I can use the same PCB as the finger buttons.

I still haven't figured out "the right amount" of supports on my resin printer and every time I try I just end up with a blob on the bottom. So I err on the side of "a fucktonne of supports"

Does this RC filter make sense? S1 is just some contacts that form a switch when the conductive silicone presses on them.

Am I right in thinking that when this is wired in a matrix I can't use an RC filter without having either GND or VCC for a reference voltage?

Electro-sax button PCBs have arrived! I snapped off a couple and they fit, but I won't be able to add the diodes and connect them up until tomorrow.

Still haven't soldered any diodes, but I glued some switches to a cardboard box! They feel pretty similar to my alto sax, although the springs on this are slightly lighter. This is less "clunky" too - when you press a key on the real sax you hear it close an opening. So that's not really something I can replicate.

So far this feels pretty close to a real sax - hopefully that's still true when wired up!

I hooked up the prototype electro-sax buttons to an Arduino and had it send some MIDI to my computer. The buttons feel really nice! (see previous toot in thread for photo)

With only 5 keys it's hard to tell how it really feels to play but initial indications are good. I think it's worth printing a whole set.

I'm still putting off the challenge of redesigning the breath sensor. That one will be tricky.

Electro-sax update: I said "screw it" to designing a new breath sensor and just bought an off-the-shelf pressure sensor. It'll be a lot more reliable than my dodgy homemade one. I just need to orient it to keep most of the breath moisture out.

I've also been playing with the Raspberry Pi Pico, and ordered some RP2040s and supporting components to make my own board.

These pressure sensors are a lot smaller than I expected for a DIP package! They're very smol and cute

Designed a new mouthpiece for the electro-sax that's more like a real sax mouthpiece! That means it now has a movable reed which senses lip pressure!

It's a little too flexible and sensitive right now - I'll either solve that with a threshold or adjust the shape a little. It's also too thick - a little uncomfortable. But it's close!

The condensation from blowing into it does get down to the sensor, so I want to think about how to avoid that. It's not going to stop it working but it's kinda gross.

Finally making some progress on the electro-sax again! I designed a little Y-splitter to connect the pressure sensor to the main tube, as well as a couple of options for restricting the flow downstream of the pressure sensor.

You need to restrict the flow so that your breath raises the pressure that can be detected, instead of just creating flow.

The aim of arranging it like this is that the sensor is pointing downward, so any moisture that makes it in there should make its way out if the sax is upright.

I don't have any octave buttons for the rear of this yet so it's not going to be playable, but I'm still going to wire it up so I can give the pressure sensor a try.

Designed some octave buttons for the back of the electro-sax! The levers on these get pulled up towards your thumb by the o-rings, so it doesn't protrude so far into the body of the sax.

I suspect they won't feel quite right - the actuation point is at the bottom of the press instead of near the top. But it's a short stroke (~2.5mm) so maybe I can get away with it.

Here are the new octave buttons mounted on the sax - and that means I finally got to give it a go! I also really like the curve that the finger buttons make down the front of the sax.

It feels really nice to play - I was worried about the octave buttons' actuation point but it feels perfectly natural. The proper pressure sensor works beautifully too, with plenty of resolution.

Now it needs a thumb rest hook and a mouthpiece mount.

Also it looks really cool from the inside! Could do with some neater wiring but hey, that's what happens if I don't plan it!

The breath condensation in the tube is pretty distracting. Not sure what I can do about it other than not playing it. Maybe a removable sponge to catch it? It's kinda gross.

@gbrnt Gross? Wait until it sat like that for a while and black mould is growing in there 🤪

How did other breath controllers like Eigenharp solve this? They must need regular cleaning too.

@yngmar Yeah I need to have a look at some teardowns of existing products. I suspect some of them just hide how gross they get inside!

@gbrnt I think that's pretty much how actual brass instruments do it.

Most have a drain, like the spit valve on the trumpet (it's mostly condensation with a little spit).

Cleaning involves soaking in bathtubs or at least pulling a rag through. Bathing probably not ideal for electronics :)

@yngmar perhaps the way to go is to make the tube removable then! The pressure sensor part could still get dirty but I could make it seal around the actual sensor's inlet with an o-ring so you can remove everything else.

@gbrnt That's what Eigenlabs did (removable pipe). Double o-rings, which is a good idea to limit pressure loss (theirs also swivels).

@yngmar It looks like the pressure might be measured in the body of the instrument between the two o-rings! It mentions two small holes between the two. I wonder what the rest of the air does once it enters the body, though - that doesn't seem to be mentioned.

Sign in to participate in the conversation
Mastodon for Tech Folks is shutting down by the end of 2022. Please migrate your data immediately. This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!