Gyromatrix
This is an octagonal LED matrix made of 213 LEDs. It features sand and PIC/FLIP fluid simulations, Conway’s Game of Life, and several interactive demos. Each LED can be dimmed from 0 to 100% in 1% steps using a logarithmic brightness curve that matches human perception.
Its main components are an STM32G441 microcontroller and a BMI323 IMU. The LEDs are driven by an IS31FL3763 matrix driver.
There are a lot of these sims floating around on the internet. I was very interested in them, so I made my own with a few feature upgrades. Charlieplexing is very practical because it uses very few components, but it has limited dimming capabilities. So I decided to use the IS31FL3763. It provides 12-bit dimming per LED.

The human eye does not perceive brightness in a linear manner, so 12-bit dimming makes sense for logarithmic dimming curves. I settled on a range of 0 to 100% in 1% steps, using a logarithmic dimming curve.

The PCB is a four-layer board designed in KiCad. The layout is optimized for one-sided assembly only. This is because I currently do not have a reflow oven, only a cheap PCB hotplate. The hotplate works great for one-sided assemblies, though.


The actual firmware is a no HAL, no LL completely bare metal C implementation. The firmware treats the matrix as actual octagon shaped and not just a square with hidden corners. The current feature include:
- Simulations:
- Bouncing ball:
- The ball does not feel very natural. But as its just a test I will not bother to make it accurate.
- Pic/Flip water simulation:
- The underlying physical grid can be set to 1:1, 2:1 or 3:1. Then the amount of particles in one physical grid cell can determine its brightness. That makes a really nice effect.
- Pic or Flip selection is configurable.
- Amount of fluid is configurable.
- Sand simulation:
- Each grain of sand has its own "color" by simply dimming randomly per grain.
- Game of life:
- Tap to add cells.
- Text:
- between the modes a gravity driven scroll text is shown.
- Demo mode:
- Falling rain in gravity direction.
- Fireworks on tap in gravity direction.
- A box that seems to be fixed in space when the matrix rotates around it.
- Other stuff.
- Bouncing ball:
- Hardware:
- STM32G441
- BMI323
- enables a single, double or triple tap user input.
- IS31FL3763
- 216 channels
- 12 bit dimming per channel
- configurable current
To better understand and implement all the functions, I made a simple HTML- and JavaScript-based simulator, similar to those used in the Ten Minute Physics tutorials. It is a full-featured matrix simulator that resembles the actual hardware. A circular slider simulates the direction of gravity.
The case is 3D printed.

This makes development much faster than flashing the firmware for every small change. The sliders also make it practical to tune parameters. The algorithms and values can then be ported 1:1 to the embedded system.

Credits and attributions:
- The PIC/Flip simulation was inspired from the excellent tenMinutePhysics tutorials.
- The sand simulation is a very loose inspiration of Adafruit Pixeldust.