I would like to wire up a guitar string as a resistor so I can generate a trigger/gate in my axoloti patch.
So my question is: is it as safe as I am assuming to just connect Vdd 3,3V and Gnd to each side of the string and touch it?
I have no idea about how much current axoloti can provide to the pins.
Using body as resistor via gpio
I’m not sure what you’re trying to do but I’m guessing that a guitar string is good conductor, in which case you are likely to short the power supply.
Maybe it wasn't totally clear - I would wire it up as a potentiometer/resistor basically. So that the board can read out a voltage between 3,3V (that would be the "shorting" case) and something less when I touch the string.
Probably something like this: https://sebiik.github.io/community.axoloti.com.backup/t/axoloti-and-sensors/726/33
My question is just about whether it's safe.
And as I realise now, also whether it can work. Does the resistance of the string really change when touching it?
It won’t harm you, but it might damage the Axoloti. You need to measure the resistance of the wire - if it is less than approx 100 ohms you might be drawing too much current from the power supply. If it is less than a few ohms, which it might be, then you will cause a short across the power supply pins. Why use a guitar string? Are you trying to trigger the Axoloti whilst playing it?
What exactly are you trying to achieve? Do you want to trigger the Axoloti every time you hit a string? Every string or just one? Or do you want the voltage to change depending on the position where you touch
the string?
I want to build like a one string instrument that can be played one handed.
So it's basically a string, a sustainer and - for one hand use - a possibility to control gate on the string.
And looking on the schematics in the link above it should also be possible to get a volume information, but I'll see.
(I know a volume pedal could make things easy but aim is to be able to not use but the hand here)
OK I see now what you are trying to do. The circuit you refer to is perfectly safe, but it relies on the resistance of the sensor to create a potential divider which will send a variable voltage to the Axoloti. The problem is that it depends on the sensor having a relatively high resistance - and I suspect that the resistance of the guitar string is too low, in which case you will produce the same note wherever you touch it. As I said, measure it with a meter - anything above 100 ohms is probably usable, depending on how much current the Axoloti can put out.To be honest, I think a more practical option would be a softpot. They come in various lengths and work as a touch sensitive potentiometer.
Thanks for your thoughts.
Yeah, I thought of a softpot too, but then things start to get difficult with both softpot and string for one hand. Still, it's the option if the other way doesn't work out.
Maybe a bass string has more resistance?
I will do some measuring!
Sounds like a cool instrument idea and I'd like to see the results! I probably shouldn't answer this as I have no real electronics knowledge, but I'd say just try it out! As any switch or button is connecting VDD and GPIO pins directly I don't see why it should damage the Axoloti. Also 3.3V should be safe to touch.
If you use a softpot, you won’t need a string. Or if you really want to use one, don’t connect it to the power, just use it directly above the softpot so that when you press down on it, it also activates the softpot
As I understand it the string isn't supposed to be like a ribbon controller but a sound source, permanently excited by feedback between coils inside a guitar sustainer and @Mat just wants to gate this signal on the Axo when touching the string. If the voltage changes measured at the GPIO pin are big enough he can easily patch that, I just wonder how the electrical connections will be done.
Yes, the string is also the sound source (basically it would end up being something like a mono synth voice, of which the oscillator is electromechanical).
But putting the softpot underneath the string (basically as the fingerboard) could be a good idea nevertheless to translate pressure into volume, that might come more natural in the end
Will think about it and try.
I will keep you posted in a few weeks.