Close

Finishing the Tangle module

A project log for Modular MIDI

Using a CAN bus to distribute MIDI messages in a modular synthesizer

davidDavid 03/25/2024 at 18:060 Comments

The work on the tangle module started with a bang. Something short-circuited on the -12V rail, which blew out my mini-PSU. It turns out the reverse polarity protection had failed, the gate terminal of the MOSFET shorted with the source. I replaced it with a beefier MOSFET and it is working now, so I assume it was underdimensioned. I also forgot to connect the CAN controller interrupt pin, but is any prototype complete without any bodging?

The bodged connection

The light pipes are working well, there is a small gap which I think is the source of some light bleed but I can live with it. The circuit is a bit overcomplicated though, because the peak detectors are not making a difference. With audio-rate signals, the color indicates the duty cycle of the signal with yellow being roughly 50%.

Light pipes

As for the code I have now implemented the EEPROM driver. For a while, I wondered how to organize the data. The configuration takes up three bytes, but the MIDI bank, channel, and program number would take another four. The main problem would be finding the correct configuration because there's not enough RAM to store an index of every stored config. In the end, I stored just the three-byte configs in a main section then the bank and channel in a header section. This gives enough space to store twenty full banks by using the memory location to determine which program number is where. Having 2500 configurations across 20 banks is probably plenty, maybe even overkill.

I also switched to the midi library from midi2.dev. It caused some weird compilation error when the library was included where the ROM overflowed by more than twice the total size. Switching to the nano GCC instructions seems to fix this issue.

The only thing missing now is some MIDI 2.0 features like the function block and maybe some implementation of property exchange. Next up I'm going to finish soldering the CV16 module and get started on some code.

Discussions