Close

Making Magic Tiles

A project log for A Tile Based MacroPad

Using "magic" tiles to assign keystrokes to this MacroPad's keys.

michael-gardiMichael Gardi 09/26/2023 at 15:470 Comments

OK I know the tiles are not magic, they are magnetic, but despite my advanced years I still find magnetism well, magical.

A tile starts with a base. The base has two square "wells" to hold the magnets. I learned from TMD-3 that with one magnet and a single linear hall effect sensor, given the thickness of a tile as a constraint and the sensitivity of the sensor, you can reliably differentiate between about 8 different tiles. So with two magnets and two sensors I can have 64 unique tiles. You can see the dark violet base below.

You can also see in this picture four lavender magnet holders. When trying to measure the strength of the magnetic fields consistently between different tiles it's important to set the magnets in the exact same position each time. Each of the four magnet holders positions the magnet at a different distance from the base (where the sensor will be), from 0 mm to 3 mm. Of course we know that the magnetic field strength (magically :-) decreases as distance increases. The linear hall effect sensors are responsive enough to detect these small differences. 

The voids in the magnet holders are sized to snugly hold two 6 mm diameter x 1.6 mm high neodymium magnetic disks. There are also some wedges to make sure that the magnets inserted from the side are precisely centered over the sensor. Here is a better look at the holders. The numbers help me keep them straight.

But Mike that's good for only four different tiles. Right, but it turns out that the hall effect sensors I am using can detect the polarity of the magnetic field in addition to its strength. So you can double the number of different tiles recognized to eight by just reversing the polarity of the magnets and using the same four holders. 

To make a tile simply drop two "loaded" magnet holders into the well and attach a labelled "top" to the tile with a few drops of glue. Of course you will have to keep track of the "values" associated with the magnets used and map them to the specific macro that the label of that tile indicates. More on this later.

Discussions