The goal of this project is to teach music-enthusiasts how to get a feel for piano using a custom electronic keyboard that can be hooked up to the computer for sound! Traditionally, people try learning piano using digital apps, but the feeling of playing with tactile keys is quite different from a touchscreen. It’s also quite difficult to access a keyboard for people who just want to learn the very basics, so this project aims to resolve these two issues by creating a mini keyboard that is able to handle polyphony!
I finally wired up the hall sensor and tested whether it was sensitive enough to detect magnetic flux changes as I move neodymium magnetics near it.
The baseline was 2.5V as expected (analog serial signal 512) and I was able to get up to plus minus 25 on this serial value if two small magnets got really close. With more magnets (say a stack of around 10-15) the values were far more drastic (going into the 100s or 1000s depending on the polarity of the magnets).
This is the pinout diagram. The flat side down is the one where these correspond (although this can be checked by setting the serial monitor to the correct baud rate and making sure the baseline is around 512.
The Nano pinout is also here as a handy reference.
The first round of 3D printing took place last week! The first thing I noticed was that I would need to make my keys substantially thinner if I want them to look more realistic.
The bearings and magnet design worked well because the components fit right in. I am having some issues with getting the bearings on the rods, however. I also still need to figure out how to get the keys/springs set up onto some sort of base plate in order to show the keypress effect.
Purchasing 6mm rod and bearings, torsion springs, and the hall effect sensors (A1324) for high sensitivity
Updated the CAD to account for insets for bearings as well as different test locations for neodymium 52 magnets! Still need to add some sort of inset for the torsion spring end (need to learn more onshape skills + intuition for this)
Something to think about: the current magnet insets are 2mm and the magnets are diameter 6mm with 2mm thickness, but I'm wondering if the inset into the key needs to be reduced so that the hall sensor can actually detect the field and experience more fringing/exposure to detect changes in the magnetic flux.