Manage if/else statement of several capacity sensors

Hey guys,

for a school project I try to build 20 (or more) capacity sensors to use them as a regular button. I already have tried some experiments and everything works fine, but now i dont understand if my project is possible anymore.

I printed five note lines with electric paint and connected each with one pin on my Arduino-Mega. Then I made a leadable disc, which should work as my note. Now I thought that i can place my "disk-note" on or between my note lines and always when I touch the note, i could send the right note, dependent on some if/else statements. (if line 1 and line 2 is activated then play Note F, if only line 1 is pushed then play Note E and so on)

My problem is that it could only work with one note, because more notes would connect my leadable-print lines and then it will play more notes at the same time. :confused:

My question is if anyone has an idea how i can manage more notes, i really appreciate every help.

Cheers

From the picture you appear to have a geometry problem placing the lines too close together. You connect one line to an Arduino pin, but where is the second line connected? Another pin, which pins are you connected to?

Paul

Hey there,

thats because of the capactiy sensor, i just need one pin for each line. On the picture it still works, but when i would build it up with five note lines, then I would connect the lines through the leadable disc and i would play more than just one note.

Maybe I need another way to connect the lines? or one Arduino for each line? But i guess the problem would be the same. Or I need more lines to make more precise if/else statements?

Why do you need the "disk" if it is a capacitive sensor. Your finger will work with a capacitive sensor.

And what is your disk made of?

Paul

It should be a a "game" for kids to learn about musicnotes, how each one sounds and to get in touch with the basics of musicnotes. So my disc stands for the note and should connect the lines to manage the if/else statement. In the end the disk should be out of some leadable material like aluminum but as a prototype I painted a cardboard with conductive ink and placed a magnet in the middle.

I think it would be possible if I try to seperate each note in between of the five notelines, its not the pretty way but i know no other one...

Anyone?

Eternal first note: a capacitive sensor consists of two plates, a single contact will not work. The tutorial is misleading here.

You can have hidden contacts between the note lines, instead of notes shorting adjacent lines. Shorting lines is a bad idea with capacitive sensors.