Learn to manufacture your own solenoids and then use them to play the xylophone by watching the tutorial video after the break. [Humberto Evans] and the team at Nerd Kits do a great job of not only manufacturing the coils, but the xylophone itself. The bars are machined from some aluminum stock and they take you down the rabbit hole with they why’s and how’s of engineering the keys.
We’re unlikely to replicate this machining process but the solenoids are another story all together. Starting at about 3:30 you can learn about designing, building, and using these little marvels. They’re basically an electromagnetic cuff with a metal slug in the middle. The solenoid seen above uses a body milled from HDPE and wrapped with magnet wire. The slug in the center is steel, with a few rare-earth magnets at the top. When you run current through the coil it repulses the magnets on the slug, witch then strikes the xylophone key. Using a MOSFET and a protection diode, actuating them is as simple as sending a digital high from your microcontroller of choice.
We’ve seen solenoids used to play a vibrophone before, but those were commercial units. Making your own hardware is far more hardcore.