Sensing string vibration/activation in an accessible guitar

For a university project we are making a guitar/uke for children with reduced motor skills in their hands. As a safety issue we cannot use the standard metal or nylon strings (when you're not moving accurately its pretty easy for fingernails to get caught). We are using an elastic shoelace/ hair tie like material instead.
Its a pretty simplified system, when a string is activated the arduino collects the appropriate guitar note recording from an SD card and outputs it to a mini speaker.
Our issue is in deciding how to sense the string activation, we keep going back and fourth. We don't need any real data about the strum just an on/off state for each string.

We have thought about:

  • piezo electric sensors/ other vibration sensor methods?
    * These will likely need a decent amount of signal processing, we are a bit behind
    and my group partners are hesitant to get into that now
  • pullswitch mechanism
    * We did a tear down of a toddler guitar that had levered microswitches and a spring
    attached to the string as a simplified mechanical on-off system. This was very janky
    though and worked much better when you pressed on the strings rather than did a
    natural strumming movement
  • microphone
    * Also processing? Don't know if it would work great cuz the elastic strings are pretty
    close together in the guitar and pretty quiet
  • IR/ laser
    * I don't know if this is super extra but I noticed that when plucked the strings move
    like crazy, so could probably obscure a light running along side them

Sorry for the essay. This is very new to us, so any insight on the best way forward would be much appreciated

If you only need on/off, piezo sensors shouldn't need anything other than an ADC channel and if the voltage is above a threshold, then it was plucked. I've read those things with a digital input: they generate enough voltage if you hit them hard enough.

Can the voltage check be done as part of the arduino code then, like without an actual threshold circuit? Sorry I'm super new to arduino

Picture a desktop vapor cloud...
Shooting through the cloud are pillars of light..
Breaking a beam of light yields a tone, slewing from the previous tone to the current tone.

If you an optical slot device you can place the string at the point where it normally just clears the beam, but any vibration will cause it to break the beam.

Do a search for
Optical slot sensor

There are many types, some whit built in electronics. I made a bass guitar out of bungee chord and used this method, but I only used two strings.

I also make instruments for disabled people and I think you are better off making the whole thing rather than trying to modify an existing instrument, especially with your quite frankly paranoid safety restraints.

Here is one I made earlier

2 Likes

Yes. I did a quick test with some thin steel wire (about 30 AWG) attached to a piezo sensor at one end and a screw at the other end, tensioned with a spring. Not the best way to mount it (sensor is under a lot of strain that it's not designed for), but it worked. Piezo sensor connected between A0 and GND. Simply plucking the string shows a usable signal on the serial monitor.

Did you look at this signal on a scope?
A sensor can easily generate over 100V both positive and negative. This is the sort of signal that the Arduino is having to absorb. Eventually it will stop working.

Mike, this is brilliant. Do you do requests? I would like to hear "Karma Police" or "Creep" or "No Surprises" by Radiohead. If you're unfamiliar with Radiohead you should definitely check them out. If you like Leonard Cohen, you might like Radiohead!

Indeed I do like them for many years now. When OK computer came out my lad was the first to transcribe Paranoid Android and put it on the web. He says that virtually all the transcriptions available now can be traced to his original. This is because he made a mistake and it has been copied over to lots of others claiming to have transcribed it.

Seen then many times live, even got a photo of my wife and lads with them outside the back of the venue at Trentham gardens. No one else there.

1 Like

I grew up only a couple of miles from Trentham Gardens... I had no idea Radiohead had played there...

This is a picture of my Bat Bass with opto sensors.
IMG_2782

It was a Tuesday, the day after we saw them in Blackpool. The Boo Radleys were supporting. I will see if I can dig out the picture tomorrow.

Good reminder. No, I didn't: I was just curious whether or not a light pluck would generate enough voltage to rise above the noise level, and it does quite easily. OP would have to add voltage limiting if they decided to go down this path.

Thanks so much! How would you recommend attaching them to the string mechanism? We'll be using elasticated string which I assume will oscillate at a lower frequency but hopefully that should be fine

If you're using something thick enough to trigger an optical sensor, then Grumpy_Mike's suggestion is probably more robust, since it's non-contact.

Using the piezo, I'd mount it in such a way that it was being partly tensioned by the string. i.e., if you have the string taut between two points, then mount the piezo perpendicular to it and touching, with enough pressure that it's slightly bent. Then it will oscillate when the string is plucked.

For protection, I'd put a 5V zener diode across the arduino input. As he mentioned, those things can generate a lot of voltage into a high impedance. Come to think of it, instead of a zener, try just having a 10k ohm resistor across the input (between input and GND). That may provide enough of a load so the voltage doesn't go too high.

Our string is 2mm in diameter, I'm not sure if that would be wide enough. Sincere thanks for being so patient with me by the way

Also I'm interested to know with the piezo approach whether the fact that there's multiple strings might become a problem. As they are in close proximity

@Grumpy_Mike Thank you so much for your response and ideas. Our string is 2mm. Would you mind talking me through the logic of how it is coded? (the triggering of the string at least) Do you have to take into account the oscillation of the string triggering it on/off/on/off or not as your string is so large?

Depends on your layout. You could potentially mount the piezo so it's vertical and stagger them if they were so close that they could touch otherwise.

It is a simple digitalRead to see if the sensor is blocked or not. Normally the string would not block the beam. When you see it block the beam you would send a note on MIDI message. Then you keep monitoring the sensor and when it has been found to be off for a certain time you send the note off message. The "certain time" is up to you to determine by experiment but it is not very critical.

The difficulty you will have is that a 2mm string might not be enough to block an opto slot sensor beam, but it will reduce the overall strength of the beam. In which case you might require some simple external circuit that detects an analogue level from the sensor. This circuit is called a comparator, and you normally get four of them in a single IC package. A poplar one is an LM339.