Rolling Magnet Lights Up This Board

An experiment with a reed switch matrix and RGB LEDs.

Jeremy S. Cook
a month agoGaming / Lights

As creator Andrei Erdei explains in his project write-up, reed switches are the simplest of magnetic sensors, consisting of a pair of flexible ferromagnetic blades inside a tiny inert gas filled capsule. When they encounter a magnet, these switches close, allowing electricity to flow. Using 36 of these amazing little switches for detection, he was able to create a board that lights up a 6x6 matrix of LEDs in response to a magnetic ball's position.

The board structure is 3D-printed, with the surface made out of 3mm smoked plexiglass and semi-transparent foil that enables lights underneath to shine through. An Arduino Pro Mini reads the switches, which are also arranged underneath the plexiglass as a keyboard matrix, detecting up to 10 contacts at once.

Erdei has programmed his board for a test mode, along with a game where you chase the red dots with the magnetic marble, a paint application, and even a music sequencer. A small speaker for sound output is used in the sequencer and to provide fun audible feedback for the game.

How these switches are activated is influenced to some degree by the magnet’s north/south orientation, making the game/applications a bit unpredictable. The sensors affect the actual travel of the magnetic ball as well, further enhancing its random fun!

You can check it out in action in the videos below and find the code on GitHub.

Jeremy S. Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Related articles
Sponsored articles
Related articles