Author Topic: Modular control surface project  (Read 922 times)

0 Members and 1 Guest are viewing this topic.

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Modular control surface project
« on: July 30, 2026, 09:26:07 am »
I finally got round to develop hardware for a project I started thinking about in 2020. At the time I bought me some IS31FL3737 LED drivers, but they ended up in a drawer. Last year I started doing all sorts of hardware developments from my Allwinner F1C200s and T113-S4 MCU boards, Vacuum Florescent Display boards to the different MCU development board carriers with MIDI and audio support. Writing software for those projects still needs to be done, but I have been suffering from programmers block, so not much beyond testing of the boards has come from it.

The latest hardware project is to make a modular control surface that can be used to control synthesizers, audio mixers, or what ever needs controlling with knobs and buttons.

For this project the first thing I developed is a set of rotary encoder boards with LED rings. It consists of two active boards and two passive boards, each 35mm x 35mm. These boards are:
1) An active rotary encoder board that has a STM32F103C MCU, a rotary encoder and a bunch of connectors on it.
2) An active LED ring board that has an IS31FL3737 LED driver, a load of LED's and a bunch of connectors on it.
3) A passive rotary encoder board.
4) A passive LED ring board.

I wrote a simple LED test program for it and the result is shown in the video below



The idea is to have the active MCU modules connected in a tree arrangement and have them auto number themself, so that a master controller can talk to every module via the top of the tree module. This master controller can be a PC or some other standalone processor system. The connection can be made via USB or UART (3V3)

I also designed a module for push buttons with LED's to show some state, and these are currently in production at JLCPCB.

There is a lot of thinking about protocol and functionality that still needs to be done, and hopefully my coding speed will pick up again.

Once things are up and running a bit more I will make the designs available. Soldering the boards is still doable by hand, but requires a bit of experience.

Online Terry Bites

  • Super Contributor
  • ***
  • Posts: 3164
  • Country: gb
  • Recovering Electrical Engineer
Re: Modular control surface project
« Reply #1 on: July 30, 2026, 04:37:36 pm »
"Rotary encoder to bar-graph LED" A bar that just happens to be curved?
Ask chat gpt for an idea, I did.


A rotary encoder to LED bar graph project is a common microcontroller application. As you rotate the encoder, more (or fewer) LEDs in a bar graph illuminate to indicate the current position.

>>Components

    Arduino Uno, Nano, or compatible

    Rotary encoder (e.g. KY-040)

    10-segment LED bar graph

    10 × 220 Ω resistors (if using a bare LED bar)

    Breadboard and jumper wires

Example wiring

Rotary Encoder

    CLK → D2

    DT → D3

    SW (optional) → D4

        → 5V

    GND → GND

LED Bar Graph
Connect each LED through a 220 Ω resistor:
LED   Arduino Pin
1   D5
2   D6
3   D7
4   D8
5   D9
6   D10
7   D11
8   D12
9   D13
10   A0
Arduino example

const int clkPin = 2;
const int dtPin = 3;

const int leds[10] = {5,6,7,8,9,10,11,12,13,A0};

int position = 0;
int lastCLK;

void setup() {
  pinMode(clkPin, INPUT_PULLUP);
  pinMode(dtPin, INPUT_PULLUP);

  for(int i=0;i<10;i++) {
    pinMode(leds, OUTPUT);
  }

  lastCLK = digitalRead(clkPin);
}

void loop() {
  int currentCLK = digitalRead(clkPin);

  if (currentCLK != lastCLK && currentCLK == LOW) {
    if (digitalRead(dtPin) != currentCLK)
      position++;
    else
      position--;

    position = constrain(position, 0, 10);

    for(int i=0;i<10;i++) {
      digitalWrite(leds, i < position ? HIGH : LOW);
    }
  }

  lastCLK = currentCLK;
}

How it works

    Turning the encoder clockwise increments position.

    Turning it counterclockwise decrements position.

    position is limited between 0 and 10.

    The first position LEDs are turned on, creating a growing/shrinking bar graph.

If you're using a 74HC595, MAX7219, TM1638, or an addressable LED strip (WS2812/NeoPixel) instead of directly wiring 10 LEDs, I can provide a version that uses those components and requires far fewer Arduino pins.

rotary encoder to led bar graph
 

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: Modular control surface project
« Reply #2 on: July 30, 2026, 05:08:31 pm »
Sure it is a way of approaching a project, just ask AI. Many people will do this nowadays. For me the fun is making a design myself, and as one can see the rotary encoder part is already done.

Even though I procrastinate a lot when working on software, I still don't need AI to write up some code to make the LED's respond to the rotary encoder. And I won't be using the Arduino framework to make it work. The STM32F103 is a MCU I have mastered years ago and the fun is in the challenge of solving puzzles on my own. Like creating a protocol for the modules and the needed functionality to make it as generic as possible.

The code for lighting up the LED's in order was simple and basically to test the hardware. It also showed me that I have to make some settings on the IS31FL3737 to stop the ghosting of the LED's that are supposed to be off.

The module size came forth out of my long desire for a modular synthesizer like the Elektor Formant. I have the two books that were published since the early 1980's but never got round to building one. The front panels of those modules are 70mm and most of them have two potentiometers side by side. To allow for full modularity, I decided to do a 35mm x 35mm board for a single rotary encoder.

With a big bunch of these modules I can create a controller for modular synthesizer software that runs on a PC, and have the feel of twitching real knobs instead of moving a mouse on a screen.

I know about the availability of a new kit for the Elektor Formant, made by Erica Synths, but I don't want to mess around with patch cables. I have other ideas on this.




Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: Modular control surface project
« Reply #3 on: August 09, 2026, 06:33:12 pm »
The boards for the second module type I designed have arrived and I soldered them yesterday. It is a module for push buttons with LED indicators. There are three different boards for this design:
1) The main controller based on a STM32F103 MCU and the IS31FL3737 LED matrix driver.
2) A type A button and LED board with 6 push buttons and six RGB LED's.
3) A type B button and LED board with 6 push buttons and six RGB LED's.

Why the two different button LED boards, well to allow the use of up to 8 switch select lines for a total of 48 push buttons per controller. The only difference between the boards is the group of select lines being used. See the schematics on how it is setup.

On each side of the main controller a chain of up to four button boards can be connected. So far I only soldered up two button boards, one of each type. For full testing I have to solder up three more of each type.

To make a big control surface, I have ordered lots of components on Aliexpress, among which also 85 STM32F103C6T6 MCU's. Only 41 euro cents a piece and they seem to be the genuine article. Though the way they shipped them is a bit shitty. Looks like they used wide painters tape to secure the IC's in the tray. No idea how a reputable distributor ships them, but it was a pain in the bum to remove the tape due to the IC's also sticking to the tape. Used the side of a pair of tweezers to hold the row of 4 IC's down while peeling back the tape. Luckily only 5 IC's had some minor pin bends.

Plenty of soldering to do in my foreseeable future.  :)

Ideas for other modules are popping up in my head. I have a bunch of these PS4 joysticks and going to design a module for these in combination with a WS2812 LED. Another one is for scanning synthesizer keys. But this will be something bigger to allow mounting under a synthesizer keyboard. Either scanning with the use of HAL effect sensors or a key matrix, but only for a single octave, so a single controller per octave.

Also looking into LCD panels and motorized faders.

Will keep me buzzy for quite some time.  :-+

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: Modular control surface project
« Reply #4 on: August 18, 2026, 11:45:39 am »
Today I received my PCB's for the mass production of my rotary encoders and also the PCB's I designed for the assembly of a full control module.

It is kind of meccano based. There are base boards and fix plates. The base boards come in three sizes, of which the smallest has to be put in production yet.

1) 70x70mm to up hold to four modules
2) 70x35mm to hold up to two modules
3) 35x35mm for a single module (This one is to allow for making a three wide control module like for instance the Elektor RFM module)

The fix plates also come in three sizes.

1) 30x30mm
2) 30x20mm
3) 30x15mm

With these boards a bigger full control module can be made by soldering the base boards together with the fix plates.

The bottom side of the base boards have tinned sections to which the fix plates can be soldered with the use of hot air. I have not tried this yet though. There are small alignment holes in the boards, leaving the big holes free for the mounting posts.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->