Skip to the content
PCBKitNew board
2 layers25 × 105 mm5hp controller oled, the printed circuit board in 3D

max4live OSC controller with 3 12 bit magnetic encoders, 2 push buttons and oled screen

Size
25 × 105 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
58
Pads
118
Tracks, vias
254, 17
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Nov 2023
Updated
15 Feb 2024

Overview

5hp controller oled is an open-source printed circuit board by Lytrix, from the Lytrix/max4live_controller_w_oled repository on GitHub. It is a 2-layer board of 25 × 105 mm with 14 parts on 58 nets, routed with 254 tracks and 17 vias.

It is built around the TCA9548APW. Its parts include 10 connectors, 2 resistors and 2 ICs. It belongs with the lEDs and displays and audio and music boards and the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

1

README

README.md

Max4Live Magnetic Encoder controller with oled screen

This repository contain the files to be able to create a Max4live 4 controller with Oled as a 5HP Eurorack module to control your VST plugins.

This setup can easily be extended to a 4 units by using jumper cables on the same pcb together with the headers on the boards to maximize a 5 panel order from jlcpcb.

Image Image

How to install & use

  1. Download this repo
  2. Open the Arduino code and upload to the Teensy
  3. Copy the Max4Live Controller & Hub folder to /Music/Ableton/User Library/Presets/Audio Effects
  4. Open Ableton and place the Max4live Serial Hub OSC.amxd to the master channel and select your Teensy device.
  5. Place Max4live Controller OSC.amxd on to the track you want to control
  6. Select the VST device in the pull down menu which you want to control
  7. Select the parameters for each potentiometer and button row.

History

After using excelent Eurorack Droid system and having created my own Launchpad type solution on it, I wanted to have more hands on controllers also for my VST plugins within Ableton.

I really like the SSL suite of EQ's so I first looked at the UC1, As it was too big to fit in my small studio, I decided to build my own eurorack version to fit into my controller case with visual feedback to limit having to look at the DAW screen when adjusting EQ.

MIDI?

I discovered early on the 127 midi steps were not fine grained enough. Even using the pitchbend range or using MSB/LSB (sending on CC1 + CC 32) were often with issues still:

  1. Still quite noisy with an analog encoder so hard to dail in precise values
  2. Ableton could not set a parameter as 14bit midi

So after some experimentation I decided to go with using an 3 euro AS5600 magnetic encoder and a cheap 0.75 Euro EC11 encoder to get a noise free 12bit 4096 step resolution which was precise enough to dail precise frequencies using this video as an example: https://www.youtube.com/watch?v=1UmqNF65rck

This worked surpisingly well and is a great hack!

Breadboard tests and hacking the potentiometer to work with the magnetic encoder

ImageImageImage ImageImage

SYNC mouse and controller input

The next challenge was to ensure the encoder did not switch back to 0 halfway if the parameter changed via mouse input or when the parameter type changed. The solution was to set the offset of the magnetic encoder chip when the value changed externally. That way the encoder is always in sync before it adjusts it's value.

I coded a piece of logic to ensure whenever the value of the encoder is outside of +-2 numbers, MaxMSP sends an offset value update to the Teensy. The encoder is only allowed to change the values when the values of the VST parameter and the AS5600 offset are the same.

Th next challenge was to ensure the value was updated before the encoder could output any values. Here I got a lot of race condition issues, and it took me a week before I could tackle this.

Controller & Display updates

For all functions I use lists to iterate over all changed values which are updated and also to set each of the AS5600 controllers and OSC adresses within different functions. This makes the code more DRY and makes it easier to add more parameters.

I created one function to gather all values to be displayed which loops in the main loop of the Arduino code. I also created one function to set all updates from the encoders And created one function to parse to each specific OSC address recieving part.

Parts list

Software

The software side consists on 2 pieces of code. One for the Teensy and one for Max4live.

I tested first a simple setup with using the standard serial ASCII communication, but found it quite fiddly to ensure to retrieve each different piece of information being send. The Open Sound Control (OSC) addressing structure felt like a much more robust way to send information back and forth, but unfortunately the OSC library from CNMAT did not work properly any more in the current MaxMSP and via serial (instead of network port). After a lot of research I finally found a good working library to make this work on the Teensy with MaxMSP (jey!): https://github.com/thomasfredericks/MicroOsc

Research documentation

Max4Live using more than 1 instance fix: add r --- to create random unique numbers https://cycling74.com/forums/multiple-max4live-instances

Serial input Teensy to MaxMSP https://www.youtube.com/watch?v=6bT3G4Mep7E

Serial output MaxMSP to Teensy https://www.youtube.com/watch?v=68L-WHh3Ows

Button switch using internal pull up: https://www.pjrc.com/teensy/td_digital.html

MaxMSP scaling log https://cycling74.com/forums/vst-plugin-parameter-scaling-problem

Dynamically load bpatchers: https://cycling74.com/forums/dynamically-created-sub-patchersbpatches

Dummy virtual Serial https://arduino.stackexchange.com/questions/9857/can-i-make-the-arduino-ignore-serial-print

Best example with many displays https://www.youtube.com/watch?v=XFh9ZhL0jhE

Control Surface library struggle https://github.com/tttapa/Control-Surface/issues/286

Good example to start with, also using 4 displays and using MCU: https://projecthub.arduino.cc/criusdigitalstudio/diy-usb-midi-daw-controller-ecdcf6

good example of display fader https://github.com/yilmazyurdakul/ArduinoOledMidiController https://github.com/yilmazyurdakul/ArduinoOledMidiController/blob/main/ArduinoFile.ino

4 rotary encoders with midi control http://little-scale.blogspot.com/2017/04/teensy-36-basicsusing-rotary-encoders.html

2 displays https://www.brainy-bits.com/post/two-is-better-than-one-how-to-connect-two-spi-oled-displays

4 displays with Arduino https://www.youtube.com/watch?v=MO6hbQcX8fE

4 displays and 4 encoders with visuals https://projecthub.arduino.cc/yilmazyurdakul/arduino-midi-controller-with-encoder-oled-display-eeprom-311960

Libraries

display https://www.pjrc.com/teensy/td_libs_SSD1306.html encoder https://www.pjrc.com/teensy/td_libs_Encoder.html endless potentiometer: https://github.com/juanlittledevil/EndlessPotentiometer noise reducer analog signal: https://github.com/dxinteractive/ResponsiveAnalogRead

scroll text example: https://stackoverflow.com/questions/40564050/scroll-long-text-on-oled-display

midi https://github.com/tttapa/Control-Surface

LCD suggestions

http://midibox.org/forums/topic/29225-modul-box-ng-v2/?do=findComment&comment=199453

Oled display <25mm height https://www.winstar.com.tw/products/oled-module/graphic-oled-display/sh1106-oled.html

multiplexer met tutorial (zie ook youtube filmpje) https://www.tinytronics.nl/shop/nl/communicatie-en-signalen/io-converters/i2c-multiplexer-tca9548a

128 pulse encoder (too expensive) https://nl.mouser.com/datasheet/2/54/ace-777357.pdf

1024 to 256 midi values with 10 bit nano: https://forum.arduino.cc/t/potentiometer-send-midi-cc/142766/7

analog potentiometer Kore2: https://hackaday.io/project/171841-driveralgorithm-for-360-deg-endless-potentiometer with: https://nl.mouser.com/ProductDetail/Alpha-Taiwan/RV112FF-40B3N22F0B10K?qs=Znm5pLBrcAJwOGngbhkPgg%3D%3D

more examples: https://diyelectromusic.wordpress.com/2021/09/28/arduino-midi-rotary-encoder-controller/

magnetic encoder: https://curiousscientist.tech/blog/as5600-magnetic-position-encoder

working magnetic encoder example https://www.youtube.com/watch?v=1UmqNF65rck

Bourns dail 20 turn https://www.zendamateur-marktplaats.nl/componenten/componenten-anders/bourns-dial-model-h-46-36496.html

potential bigger potentiometer: https://www.gear4music.com/Guitar-and-Bass/Emerson-Custom-CTS-250K-Short-Split-Shaft-Pro-Potentiometer/1GAA

Encoder example fast/slow relative unsigned bit: https://remotify.io/community/question/absolute-14-bit

OSC https://github.com/CNMAT/OSC/blob/master/examples/SerialOscuinowithMessages/SerialOscuinowithMessages.ino https://www.ableton.com/en/packs/connection-kit/ https://github.com/thomasfredericks/MicroOsc

https://forum.arduino.cc/t/slipserial-and-osc-but-generally-reading-serial-across-loop-s/563369

Parts

14
QtyValueFootprintReferences
3AS5600_2_PWRSSD1306:AS5600J2, J4, J5
2220Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2
2Conn_01x01_SocketConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ6, J9
2Conn_01x02_SocketConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3, J7
1SSD1306SSD1306:128x64OLED_25mmJ1
1TCA9548SSD1306:DIP-24_W9.xx mm_SocketIC1
1Teensy4.0Teensy:Teensy40_SMTU1
1ToMAINModuleConnector_PinSocket_2.54mm:PinSocket_2x08_P2.54mm_VerticalJ16
1ToSateliteModuleConnector_PinSocket_2.54mm:PinSocket_2x08_P2.54mm_VerticalJ10

Questions

How big is the 5hp controller oled PCB?

It measures 25 × 105 mm and has 2 copper layers, 1.6 mm thick.

What parts does the 5hp controller oled use?

14 parts, built around the TCA9548APW. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the 5hp controller oled KiCad files?

From the Lytrix/max4live_controller_w_oled repository on GitHub, at the commit this page was made from: the board is Kicad/5hp_controller_oled.kicad_pcb and its schematic Kicad/5hp_controller_oled.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the 5hp controller oled design in my own project?

Its repository states no licence, so its author keeps all rights: ask Lytrix before reusing the design.

Similar boards

  • 4 layers307 × 46.1 mmStm32pe midi, the printed circuit board in 3D

    Stm32pe midi

    udu3324/stm32pe-midi

    a midi controller using the mpe protocol to create more expressive music

    136 parts35GPL-3.0
  • 2 layers284 × 128.5 mmXva1-ui, the printed circuit board in 3D

    Xva1-ui

    MacMannes/XVA1-User-Interface

    A hardware user interface for the XVA1 virtual analog synthesizer, inspired by the Hydrasynth's layout. The XVA1 (and its FM sibling the XFM2) is built on an Artix-7 FPGA but has no built-in UI — this project adds one.

    65 parts10GPL-3.0
  • 2 layers60 × 30 mmTriax loadwing, the printed circuit board in 3D

    Triax loadwing

    Scottapotamas/triaxial-loadcell-breakout

    Breakout board to sample 3-axis load cells with I2C interface

    52 parts4
  • 20 layers228.6 × 304.8 mmBpm dfe, the printed circuit board in 3D

    Bpm dfe

    jamead/rfsocdfe-hw

    rfsoc DFE carrier board Kicad files

    930 parts1
  • 2 layers68.6 × 53.3 mmShiled, the printed circuit board in 3D

    Shiled

    lucimobility/luci-sdk-encoders

    Design files and documentation for power wheelchair encoders compatible with the LUCI sensor system

    25 parts1Apache-2.0
  • 2 layers65 × 90 mmEchoSafe RevA, the printed circuit board in 3D

    EchoSafe RevA

    Advk2k4/echosafe

    Wearable real-time sound classifier for the hearing-impaired

    30 parts
  • 2 layers116 × 122.5 mmMainBot, the printed circuit board in 3D

    MainBot

    ArnaudSchlumberger/MainBotPCB

    This project is part of Robot Télécom Strasbourg's work as part of our participation to the French Robot Cup.

    99 parts
  • 6 layers178 × 118 mmMoriShield Carrier 6L, the printed circuit board in 3D

    MoriShield Carrier 6L

    aswinserigreen/morishield_hardware

    all components bom , pcb layouts and schematics of morishield is maintained here

    157 parts