4017 in place of input shift register

First post here! Hey everyone!

Somewhat inspired by the Tic Tac Tunes, I want to have a go at building an Arduino powered pocket synthesizer with controls like a guitar using six strings and at least four frets + open string (unfretted) so any open chord can be played. I should explain for non-musically-knowledgeable users that a guitar has six strings which are pressed against metal frets to shorten them, thus changing the resonant frequency of the string. Little shortcuts can be taken like keeping a fret held down and tapping one a few up for a smoother sound and so on and I want that to be possible. Originally it was to be 555-based (one for each string) but getting the frequencies right and handling the above proved difficult and the Arduino Nano is a bit more versatile than square waves.

So, to get at least 30 inputs in (4 frets + a "pick") I need some kind of multiplexing. Unfortunately, the CD4021B isn't available via my preferred supplier, but I had another idea; the 4017 decade counter. With this, just one clock output and six inputs could sample nine frets and one pick by using it to power a row of switches. That'd work, right? Would there be any delay to worry about?

Lastly, though, the actual implementation. Rather than using fairly expensive microswitches or something, I want to go for something a bit cooler and use actual strings under low tension for inputs and frets + a pick hooked up to the 4017 outputs. This does pose some potential issues; what would be necessary to protect the Arduino inputs and 4017 outputs from ESD? I picture some diodes might work on the 4017 but I don't know.

Thanks for reading.

This kind of 4017?

You would use this to read the state of the switches for each row of frets quickly? I could see that working.

"Rather than using fairly expensive microswitches or something, I want to go for something a bit cooler and use actual strings under low tension for inputs and frets + a pick hooked up to the 4017 outputs."
That part is a lot more difficult, now you have to be able to read each string's frequency.
Maybe if you had a uC per string so you could filter/analyse for a specific frequency fast enough.
Or perhaps measure the tension on each string as the string is pressed against the fret.

CrossRoads:
now you have to be able to read each string's frequency.

No, no - the frets themselves would be wired up to the 4017, as would a wired metal pick, with each string being wired to an input on the Arduino - thus the need for some pretty strong ESD protection - and when the string is pressed against a fret it completes the circuit.

EDIT: basic overview

The wired fret completes the circuit between what & what?
How does the pick come into play?
The nano will be putting out a clock, the 4017 will be putting out a 1 across its outputs, the nano will see a 1 walking across its inputs - you propose to short a string to 0 while and have the nano look for that as a difference when it should be a 1?
Or ...?
Keep talking this out, lets fill in the holes some more.
I'm hitting the road, be back in a few hours ...

The Nano pulses the 4017. The 4017 has each output connected to a different fret, with the last one plugged into the pick. The strings are individually wired into 6 digital inputs on the Arduino. So it goes like this:

Read inputs -> 001000 D string is on the first fret
Pulse clock
Read inputs -> 000100 G string is on the second fret
Pulse clock
...
Read inputs -> 000001 High E string is on the ninth fret
Pulse clock
Read inputs -> 111000 Low E, A and D strings are in contact with the pick
Pulse clock

The frets, strings and pick are all metal

Once a string is down, I think you find all frets below it are connected.
If two strings are down, how do you tell which differentiate the two strings?
That's the problem here - too many conductors!

Still not following what the pick does.

That schematic gets my vote for the "Most artistic schematic of the year" award :slight_smile:


Rob

CrossRoads:
Once a string is down, I think you find all frets below it are connected.
If two strings are down, how do you tell which differentiate the two strings?
That's the problem here - too many conductors!

Still not following what the pick does.

I'd differentiate the strings by the fact that every single string is wired up to a different input. Each position of the 4017 selects a different fret/the pick and then by reading my six inputs I can see which strings are in contact with that fret/the pick. It's actually quite simple.

Don't forget to connect diodes between the 4017 outputs and the frets, otherwise you will short two 4017 outputs together when a string touches 2 frets.

Yeah, to be honest, I'd probably need to split each fret into six segments all with their own diodes otherwise I could have a string in contact with two frets, another string in contact with one of those frets and it'd flag up both of the frets (fret A->string A->fret B->string B)