Show newer

New electro-sax breath sensor is attached. It looks pretty good but unfortunately it's kinda bad :(

It has the thing where if you start blowing suddenly the note is really quiet. I'm really not sure why. Got to figure out the actual cause.

The feel of the mouthpiece is good, but I need to be able to twist it to an angle for it to feel right. Aligned with the sax means I need to twist my head.

Show thread

I spent a bunch of today trying out different combinations of software and hardware to figure out the best latency I can get.

I'm really not sure how to present the info so here's a table. It looks like I can get latency as low on Arch as I can on Ubuntu Studio (without tweaking Jack). The lowest latency synth is Yoshimi, but Qsynth is good. Pulseaudio seems to be lower latency than Pipewire.

I suspect a good chunk of the remaining latency could be on the Arduino side, so I'll have to measure that next.

Show thread

For reference, here's the previous sensor. You can see because the air *must* move the balloon to flow from inlet to outlet, there's a significant jump when I start blowing.

I think that's the better way to go!

Show thread

There's something weird going on with the new sensor - when blowing gently the reading from the sensor actually goes down!

Here's a graph of the readings as I gradually increase from not blowing to full speed. It dips down at the start. That's not good!

I'm guessing it's because I added a slight "bypass" between inlet and outlet, and the flowing air has a lower pressure that actually pulls the balloon towards it.

Show thread

Ok that didn't last long!

Might just make it screw on instead in the next version because that's easy

Show thread

Some more progress on the updated breath sensor. It's still quite bulky, but at least with the longer mouthpiece I won't be bumping my nose into it!

Will try this for a while before deciding whether it needs a fake reed - the positioning of the air inlet might be enough to make it feel close enough to a real sax.

Show thread

Here's the new breath sensor design mounted to the electro-sax cardboard prototype. It's a lot nicer to play! I can do staccato notes now!

Latency continues to be a problem on my computer, but at least I can be sure it's not on the Arduino, as it works fine with my phone.

Show thread

Look mum, I did a science!

This is using the new sensor distance tester. It made it so much easier to do this experiment properly.

It looks like my previous conclusion was about right - 13-15mm between sensor base and membrane is about the right distance.

The good news is that with that distance, I get a range of ~270 ADC counts between "not blowing" and "blowing as hard as possible". That's great - it can easily be mapped into MIDI's 127 breath velocity values.

Show thread

The electro-sax sensor distance tester looks pretty cool. This will let me vary the distance between the membrane and sensor in a more controllable and measurable way than my cardboard prototype.

Show thread

Today I rewired my first mains plug since learning to do it for my Physics GCSE years ago. It's the one from my hot air soldering station.

I noticed that the plug has no fuse in it and the ground has the plastic shielding halfway up (it's supposed to be fully brass).

There is a fuse in the station, but it's on the neutral side! There's probably a reason not to have 2 fuses, but it's gotta be safer than the dodgy plug.

I tried changing the resistor on the phototransistor and it didn't have much obvious effect on the max breath sensitivity, so I'll probably leave it at the original 4.7K.

Show thread

It looks like I found the sweet spot for this sensor. With this setup it's 14-16mm from the membrane. My measurement of the distance is bad so I'll still need some adjustability.

I found it was best to set the current-limiting resistor for the LED so that the "non-blowing" voltage was about 4V - maximising the sensitivity.

Not sure why the distances needed in the datasheet are shorter than mine - they're using a mirror to reflect the beam so I'd expect it to be longer.

Show thread

Time for a slightly more scientific test of the TCRT5000 based solution. This is the reflective IR sensor with an IR LED and phototransistor.

So far it looks like I can make this good enough by correctly setting the distance between balloon and sensor, and the LED brightness.

I might also test the effect of changing the (current limiting?) resistor next to the transistor, because I've never really got my head round transistors.

Show thread

The best breath sensor I've built is still the original LDR-based one, with a difference between "not blowing" and "blowing hard" of 77 counts.

I could tell that its response was slow, though. So now I've measured it!

Going from LED off to on, the response time is 30ms. From on to off it's 100ms. Luckily that's the ok way round, and normally it won't be varying by so much.

I'd like it to be faster but it's probably an ok solution for now.

Show thread

Here's my finished painted Ploopy - I'm not happy with the buttons but I wanted to start using it! I'll do some black / dark grey ones another time I think.

Show thread

Hmm, not doing great with the BMP280 pressure sensor. It works really nicely for detecting a change in pressure, but it doesn't seem to be very good at going back to its original zero point.

So in the screenshot you can see the lows are at different points each time I stop blowing. I assume it's doing something clever, but whatever it is it makes it less useful to me.

Show thread
Show older
Mastodon for Tech Folks

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!