What microswitch for piano keys?

A place to discuss all things involving power and technology (including cameras). Generator tips, alternative energy, lighting your camp/bike/art/self, sound systems and more.
User avatar
Elliot
Posts: 7581
Joined: Sun Dec 18, 2005 8:41 pm
Burning Since: 2006
Camp Name: Elliot’s Bicycle Service
Location: Clearlake, Northern California
Contact:

What microswitch for piano keys?

Postby Elliot » Tue Oct 25, 2016 11:59 am

A proposed project has "come across my desk".
A group of students hope to do Burning Man and bring a colorful light display with 88 circuits -- to be controlled by the 88 keys on a piano.

I know... these days it could be done with electronics and zero moving parts.

But they want to build it "old school".

My first thought was "sealed micro-switches".

(Actually, my very first thought was home-made paper-clip-wire switches. :lol: )

So I poked around online a bit. Here is an example. 100 of these can be on my front porch for $85. About two inches long overall, and 16 Amp capacity (enormous!). These are not sealed, but I'm not done searching and learning.

First I need to know whether I'm even remotely on the right path.

http://www.ebay.com/itm/10-pc-TEMCo-Mic ... 1997380933

:?:
Elliot's Naked Bicycle Service, Healing Arts, Body Paint & Piano Bar
Cell-Phone-Free & Non-Smoking in 2018!


-----Bike come unglued? Take it to the nude dude! -----

http://www.elliotsbikes.org

Awesome? Yes, Ma'am, we do awesome.
Image

User avatar
Traveller in Time
Posts: 600
Joined: Tue Aug 23, 2016 11:52 am
Burning Since: 2020
Camp Name: Neon Light Alley (should be: Camp Envy)

Re: What microswitch for piano keys?

Postby Traveller in Time » Tue Oct 25, 2016 12:13 pm

Some ancient (computer) keyboards may contain 'reed relays'.
Those would come in sufficient numbers and while using a magnet close to a sealed glass tube with two magnetic needles they should be Playa proof.


Wiki suggests they were even used by the millions as memory cores :D
Dreaming a temporary world improving the default world



Not expressing yourself but embracing all other expressions is The Challenge




...I can make anything I can imagine . . . I just can't make _some_ things happen



Have some Free will

User avatar
Popeye
Posts: 499
Joined: Thu Aug 15, 2013 10:39 pm
Burning Since: 2013
Location: Where the east wind blows

Re: What microswitch for piano keys?

Postby Popeye » Tue Oct 25, 2016 1:21 pm

Do you want to be able to play a "tune" with light? If so the response time of the key/switch combination might be to slow.
nobody wants to live in a world with only one flavor...

User avatar
some seeing eye
Posts: 2607
Joined: Tue Sep 09, 2008 12:06 pm
Burning Since: 1999
Camp Name: Woo
Location: The Oregon

Re: What microswitch for piano keys?

Postby some seeing eye » Tue Oct 25, 2016 1:34 pm

If you have an actual piano keyboard unit with weighted keys, here is one idea for a velocity sensitive keyboard, but it uses electronics. Whatever you develop, suggest setting up 2 keys and have an experienced pianist play it for feel before the whole project.

http://hackaday.com/2013/01/29/building ... -keyboard/ (There are probably a ton of ideas on the maker sites)

I just ran across some artists who make instruments to translate music to visual or tactile experiences for listeners who are deaf. They did a piano by sensing the notes with a microphone, the softwaremagical translating it to light.

http://www.pianopushplay.com/cover/

Last edited by some seeing eye on Tue Oct 25, 2016 1:52 pm, edited 1 time in total.
increasing the signal to noise ratio with compassion

User avatar
Token
Posts: 3478
Joined: Tue Sep 02, 2003 2:55 pm
Burning Since: 2001
Location: Gold Country, CA

Re: What microswitch for piano keys?

Postby Token » Tue Oct 25, 2016 1:45 pm

Isn't a piano a percussion instrument where pressing the key is so much more than binary?

Capturing the velocity of the hammer would be key, pun intended.

Hmm, more questions than answers.

- Optical coupling
- Magnetic coupling
- Mechanical coupling
- Capacitive coupling

Each of the above can be:

- Binary
- Proportional

My head would explode.

Scrap this and go MIDI. They got ADSR built in.

maladroit
Posts: 2290
Joined: Thu Jul 26, 2012 10:37 pm
Burning Since: 2012

Re: What microswitch for piano keys?

Postby maladroit » Tue Oct 25, 2016 3:53 pm

It sounds like they just want to directly run lights off the switches. No interface with a computing device or electronics of any kind. I would trust any ordinary microswitch for a week on the Playa, and spares are cheap.

User avatar
Jackass
Posts: 1830
Joined: Fri Jun 04, 2010 9:25 pm
Location: way out in left field

Re: What microswitch for piano keys?

Postby Jackass » Tue Oct 25, 2016 4:54 pm

Sooner or later, it will get real strange...

11th Principle: Depussyfication - Keeping Burning Man potentially lethal. Token

User avatar
BBadger
Posts: 5617
Joined: Wed Jan 19, 2011 10:37 am
Burning Since: 2018
Location: (near) Portland, OR, USA

Re: What microswitch for piano keys?

Postby BBadger » Tue Oct 25, 2016 5:47 pm

Velocity sensitive keys would add a nice extra touch to the keyboard, especially since you can have the lights shine brighter or decay at different rates depending on how the key is pressed. It'd be like the light show in Close Encounters of the Third Kind. You will need to have two switches (leaf switches, etc.) to measure velocity and a microcontroller to calculate it.. Having the microcontroller might be worth doing that anyway for more control over the project's output and have neat effects.

They keyboard would be laid out like this, but using mechanical switches instead of rubber. You could then read off the value using a parallel-in-serial-out shift register chip (74HC165N) to obtain all the values at once. Then do the calculations on velocity and switch your lights accordingly.
"The essence of tyranny is not iron law. It is capricious law." -- Christopher Hitchens

Hate reading my replies? Click here to add me to your plonk (foe) list.

User avatar
GreyCoyote
Posts: 2137
Joined: Mon Feb 18, 2013 8:24 am
Burning Since: 2000

Re: What microswitch for piano keys?

Postby GreyCoyote » Fri Oct 28, 2016 5:09 am

Old school synth keyboards (early 80's) were just simple switches. PAIA was one manufacturer. There was a common rail, and each key grounded to common when pressed. Or was pulled up to the supply rail, whichever way you wired it. The cross connection at each switch was a gold plated wire and was basically self-cleaning. The more you played them, the cleaner they became. Current was limited to about 10 ma per key, but the switch was good for an amp. Would something like this work for the project?
"To sum up my compassion level, I think we should feed the unwanted animals to the homeless. Or visa versa. Too much attention and money is spent on both."
(A Beautiful Mind)

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Sun Oct 30, 2016 9:19 am

Hey guys,
I'm one of the students. We would like to just run wires directly to the switches. Thank you for your ideas, but we've ran out of time and have to finish the project on paper tommorow. We will try to implement them later, but now we just have to finish what we have. Do you think that we can use regular, cheap non-sealed micro switches? Or do we have to buy expensive durable ones?

User avatar
GreyCoyote
Posts: 2137
Joined: Mon Feb 18, 2013 8:24 am
Burning Since: 2000

Re: What microswitch for piano keys?

Postby GreyCoyote » Sun Oct 30, 2016 11:33 am

Cheap. Go cheap.

The best, (and a cheap) suggestion was to use reed switches activated by magnets in the keys. These are also sealed and will survive drunken burners banging on the keys if you do it right. You can run an amo or two through them if needed.

Sounds like a neat project! I hope this comes to fruition.
"To sum up my compassion level, I think we should feed the unwanted animals to the homeless. Or visa versa. Too much attention and money is spent on both."
(A Beautiful Mind)

User avatar
some seeing eye
Posts: 2607
Joined: Tue Sep 09, 2008 12:06 pm
Burning Since: 1999
Camp Name: Woo
Location: The Oregon

Re: What microswitch for piano keys?

Postby some seeing eye » Sun Oct 30, 2016 12:11 pm

AterCZ wrote:Do you think that we can use regular, cheap non-sealed micro switches? Or do we have to buy expensive durable ones?


The fine corrosive dust is sub-micron. So it might be good to research how sealed those sealed switches are.

If a switch fails, it is not going to significantly impact the function of the piece. If you have the time you can field replace them. And it has to work for how many weeks? That is a very short time in the scheme of electronic devices.
increasing the signal to noise ratio with compassion

User avatar
GreyCoyote
Posts: 2137
Joined: Mon Feb 18, 2013 8:24 am
Burning Since: 2000

Re: What microswitch for piano keys?

Postby GreyCoyote » Sun Oct 30, 2016 4:21 pm

Data point: Reed switches are completely encapsulated. They consist of a pair of contacts activated by a magnet in a glass tube. Zero possibility of dust issues. Likely the ideal configuration for the playa! :)
"To sum up my compassion level, I think we should feed the unwanted animals to the homeless. Or visa versa. Too much attention and money is spent on both."
(A Beautiful Mind)

User avatar
Elliot
Posts: 7581
Joined: Sun Dec 18, 2005 8:41 pm
Burning Since: 2006
Camp Name: Elliot’s Bicycle Service
Location: Clearlake, Northern California
Contact:

Re: What microswitch for piano keys?

Postby Elliot » Sun Oct 30, 2016 6:37 pm

Aha! I see that Stepan -- AterCZ -- found this thread before I got back to it.

To fill in some gaps.... They are in Czech Republic and applying for a grant to cover the trip to BRC. And the deadline for the grant application is tomorrow.
They have met with Misa, who is the regional representative there. Yes, that Misa -- Misa Blue here on ePlaya. Small World!
Elliot's Naked Bicycle Service, Healing Arts, Body Paint & Piano Bar
Cell-Phone-Free & Non-Smoking in 2018!


-----Bike come unglued? Take it to the nude dude! -----

http://www.elliotsbikes.org

Awesome? Yes, Ma'am, we do awesome.
Image

User avatar
BBadger
Posts: 5617
Joined: Wed Jan 19, 2011 10:37 am
Burning Since: 2018
Location: (near) Portland, OR, USA

Re: What microswitch for piano keys?

Postby BBadger » Sun Oct 30, 2016 6:52 pm

On another note, if you're wiring up these things I would consider buying some 3M UR2 splicing connectors so that you don't have to do any soldering and so your wires are weatherproofed. The connectors only cost about $0.10-$0.15 each depending on quantity, and work on unstripped 19-26 gauge wire, saving a whole lot of time stripping, soldering, and insulating. Also important is that each connector has gel in it that keeps out moisture or other contaminants like dust.

They'll make connecting up up lots of wire connections a snap, and field repairs a lot easier. No need to put heat-shrink tubing around the wires (or electrical tape, but that may just get gummy and fall off), or having to reinforce the soldering connections so they don't weaken from vibrations or movement.
"The essence of tyranny is not iron law. It is capricious law." -- Christopher Hitchens

Hate reading my replies? Click here to add me to your plonk (foe) list.

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Sun Oct 30, 2016 11:02 pm

Thank you for your suggestions.
So let's imagine that we did like a backflip and added one huge thing to the project, which we do not know how to make technically.
We'd like the lights to gradually turn on (spread) after the press of key/keys. Something like the more keys you press, the more the light will spread. Would anyone here who knows how this could work be so kind and explain it to me?

User avatar
BBadger
Posts: 5617
Joined: Wed Jan 19, 2011 10:37 am
Burning Since: 2018
Location: (near) Portland, OR, USA

Re: What microswitch for piano keys?

Postby BBadger » Mon Oct 31, 2016 1:47 am

If you've got a microcontroller connected to your switches, you can have it control the intensity of lights under or inside your keys. For you could make the keys out of semi-transparent white plastic and the lights could shine through them to glow. The microcontroller would then read the signals from the keys and control the lights by position with a gradual dimming effect, or even something like wave motion.

This would be easy enough to do with some addressable LEDs in the keys. You'd probably want a few LEDs per key in order to light up the whole key. You could try some like this, or some of the other multi-led bars, etc. that cost a little more. You could even just buy some LED strips and cut them up to whatever size you need. Search for "ws2812b" to find addressable LEDs.

For coding up the keyboard or other things you can use a microcontroller like a Teensy 3.2 and use the FastLED library and the Arduino development environment. If you need help let us know. The sky is the limit on what you can do with LEDs and these microcontrollers.
"The essence of tyranny is not iron law. It is capricious law." -- Christopher Hitchens

Hate reading my replies? Click here to add me to your plonk (foe) list.

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Mon Oct 31, 2016 2:26 am

Actually we'd like to use normal piano. I feel like like a that electrical keyboard wouldn't be nearly as "cool" as an actual piano..

User avatar
Elliot
Posts: 7581
Joined: Sun Dec 18, 2005 8:41 pm
Burning Since: 2006
Camp Name: Elliot’s Bicycle Service
Location: Clearlake, Northern California
Contact:

Re: What microswitch for piano keys?

Postby Elliot » Mon Oct 31, 2016 10:04 am

A 50-to-100 year old mechanical piano is what AterCZ contacted me about in the first place. (And I have pledged to provide.
Specifically, he asked about keeping such a piano operational for a week on Playa.)

My impression so far... is that they want to do this with old school technology and no modern electronics. I'm thinking "steam punk". Again, my impression only, at this point.

But this would suit me, since I know nothing of electronics and computers! :lol:

More circuits lit the faster you play? I'm thinking "latching circuit", but with a timer to open it again.
Elliot's Naked Bicycle Service, Healing Arts, Body Paint & Piano Bar
Cell-Phone-Free & Non-Smoking in 2018!


-----Bike come unglued? Take it to the nude dude! -----

http://www.elliotsbikes.org

Awesome? Yes, Ma'am, we do awesome.
Image

User avatar
Traveller in Time
Posts: 600
Joined: Tue Aug 23, 2016 11:52 am
Burning Since: 2020
Camp Name: Neon Light Alley (should be: Camp Envy)

Re: What microswitch for piano keys?

Postby Traveller in Time » Mon Oct 31, 2016 11:09 am

As I read previous comments any cheap switch will do for a week in the playa.

Hmm, steam punk switches

Great to read all these images in this conversation ranging from old school light organs to spectrum analysed pattern sequencers. :D
Dreaming a temporary world improving the default world



Not expressing yourself but embracing all other expressions is The Challenge




...I can make anything I can imagine . . . I just can't make _some_ things happen



Have some Free will

maladroit
Posts: 2290
Joined: Thu Jul 26, 2012 10:37 pm
Burning Since: 2012

Re: What microswitch for piano keys?

Postby maladroit » Mon Oct 31, 2016 11:42 am

Starting from zero knowledge:

88 switches connected to 88 lights is one level of complexity.

Switches connected to a microcontroller with 88 inputs and proper debouncing and addressable RGB LEDs and the code to read all the inputs and perform fading and colored animations on all the LEDs, let's say it's about 20 to 30 times more complex, and more things to go wrong. And there are a thousand ways to do it, so you'll get a thousand different pieces of advice.

They are both totally doable and I'd probably choose the second option because this project is being started in November rather than two weeks before Gate opens. But just make sure you understand what the depth is before you jump in.

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Mon Oct 31, 2016 12:24 pm

We have exactly 3,5 hours to send the application :D.
Would you please be so kind and described how to connect everything using microcontroller for a total noob? Just a simple, general description would totally suffice, we do not have to be very detailed in the application. And approximately how much would a sufficient microntroller cost?
Originally, we wanted to go with steam punk only. But as the project evolved into a more complex one, so we will need something more complex..

maladroit
Posts: 2290
Joined: Thu Jul 26, 2012 10:37 pm
Burning Since: 2012

Re: What microswitch for piano keys?

Postby maladroit » Mon Oct 31, 2016 12:58 pm

Go with what you know. You don't want to submit a spec someone else wrote, when you're supposed to write it.

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Mon Oct 31, 2016 1:01 pm

Alright. So my basic understanding is this: wires would run from microswitches to the microcontroller. The microcontroller would control the lights accordingly.
Would you please just estimate the prize of the microcontroller? I have no idea which one would suffice.. We have to write it in the application.

User avatar
Traveller in Time
Posts: 600
Joined: Tue Aug 23, 2016 11:52 am
Burning Since: 2020
Camp Name: Neon Light Alley (should be: Camp Envy)

Re: What microswitch for piano keys?

Postby Traveller in Time » Mon Oct 31, 2016 1:04 pm

Piano.png

Make matrix with some diodes and select lines
Arduinos for microcontrollers ($3 to $25)
Sketches not included . . .
You do not have the required permissions to view the files attached to this post.
Dreaming a temporary world improving the default world



Not expressing yourself but embracing all other expressions is The Challenge




...I can make anything I can imagine . . . I just can't make _some_ things happen



Have some Free will

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Mon Oct 31, 2016 1:07 pm

Thank you :).
Is my description in the previous post wrong? We just need a simplified explanation now.

User avatar
Traveller in Time
Posts: 600
Joined: Tue Aug 23, 2016 11:52 am
Burning Since: 2020
Camp Name: Neon Light Alley (should be: Camp Envy)

Re: What microswitch for piano keys?

Postby Traveller in Time » Mon Oct 31, 2016 1:16 pm

Think I used your discription then made a drawing then you formulated the exact same thing then you asked for your own answer.

erm, simple: No you are not wrong, what you wrote was what I draw :D I just messed up with causality I think
Dreaming a temporary world improving the default world



Not expressing yourself but embracing all other expressions is The Challenge




...I can make anything I can imagine . . . I just can't make _some_ things happen



Have some Free will

AterCZ
Posts: 8
Joined: Thu Oct 20, 2016 6:38 am
Burning Since: 2017

Re: What microswitch for piano keys?

Postby AterCZ » Mon Oct 31, 2016 1:26 pm

Alright, thank you very much! :D

User avatar
BBadger
Posts: 5617
Joined: Wed Jan 19, 2011 10:37 am
Burning Since: 2018
Location: (near) Portland, OR, USA

Re: What microswitch for piano keys?

Postby BBadger » Mon Oct 31, 2016 7:20 pm

A microcontroller that will do everything you want (e.g. a Teensy 3.2) will be about $25. LED strips or parts will vary. You can get them from China or Amazon for relatively cheap. You'll want a power supply too, which will run about $60 for a 300W or you can use a converter from some 12V batteries or something else like that.

As far as keyboards, you could also take your fully mechanical keyboard and create your own keys or key tops containing lights with lights inside. Employing the LEDs elsewhere in the design would be pretty easy, even behind paneling or something would have a nice effect.

The program on the microcontroller itself can be developed after you've decided on the hardware layout or at least an idea of the effect you want to achieve.
"The essence of tyranny is not iron law. It is capricious law." -- Christopher Hitchens

Hate reading my replies? Click here to add me to your plonk (foe) list.

maladroit
Posts: 2290
Joined: Thu Jul 26, 2012 10:37 pm
Burning Since: 2012

Re: What microswitch for piano keys?

Postby maladroit » Mon Oct 31, 2016 10:38 pm

End result: a bunch of kids staggering around, dehydrated, thousand-yard stares, grinning like fiends, a half-disassembled piano somewhere out of focus in the background.


Return to “Power & Electronics”

Who is online

Users browsing this forum: No registered users and 4 guests