Skip to content

Latest commit

 

History

History
308 lines (236 loc) · 11 KB

README.md

File metadata and controls

308 lines (236 loc) · 11 KB

Analog synth to OpenOSC interface

Project description

Analog synth is coming back into hype among music artists. It has a strong culture of vintage, DIY, and customisation.

On the other hand, pro systems use digical control systems, such as DMX for lighting, or OpenSoundControl (OSC) for sound.

The idea for this project is to have a hardware to interface analog synth to advanced sound control systems.

This project is also designed to leverage the possibilities of open-source software Chataigne.

It is similar to Befaco VCMC, but with TCP-IP for OSC instead of serial for MIDI - so we need to upgrade the microcontroller.

Some inspiration for hardware can be found at open hardware synths company Mutable Instruments. In its repository we can find the exact reference design, typically for the Yarns V3 MIDI digital interface.

Glossary

OpenSoundControl (OSC)

Open, message-based protocol for communication between multimedia devices. Intended to be a next-generation replacement for MIDI. It is usually implemented on TCP-IP stack.

Musical Instrument Digital Interface (MIDI)

Communication protocol dedicated to music, used for communication between musical instruments and multimedia devices. Usually implemented as a serial connection, with a 5-pins DIN connector.

CV - Control Voltages

The analog signals generated by the synthetisers are called CV.

Gate and triggers

Other types of signals generated can be:

  • Gate: a "digital" 0 and 1 signal, but with the synthesiser reference voltage,
  • Trigger: a short-pulse "digital" 0 and 1 signal, to trigger a particular event.

Chataigne

Chataigne is a user-friendly open-source software allowing to connect several multimedia devices between them, for instance, triggering light color changes via DMX on an OpenOSC event sent by a mixer.

Analog synthetizer

Synthetizer that uses analog circuits and signals to generate sound electronically.

See the wikipedia page

VCV Rack

Open-source software able to emulate analog synthetizers.

Eurorack

Standardized mechanical format for synthetizer, in a modular 3U rack.

  • 3U = 128.5 mm height
  • 1HP = 5.08 mm, width is multiple of 1HP
  • Depth should be <2.5mm or <4mm to be shallow

Exemple: Yarns is 12 HP and 3U, so front plate is 128.5x60.96mm. Its bottom PCB is tinier: 59x106,8mm, and has 3 screw holes to fit it to the front plate.

It uses 3.5mm jack for cabling, +/- 12V power supply on a 2x5p header connector, on the right lower corner of the board (facing the bottom). Red side = -12V. Print a | on the board to indicate side. Don’t forget the protection circuit.

Kroki generated Ditaa

Benchmark

Befaco VCMC specs

  • Teensy 32 controller

    • NXP MK20DX256VLH7
    • 2x 16-bit ADC
    • 1x 12-bit DAC
  • 8 CV muxed on 1 ADC

Yarns V3 specs

  • ST STM32F103CBT6 controller
    • 2x 12-bit ADC (16 channels)
    • 2x DAC
  • External DAC DAC8564
    • 1x 16-bit DAC (4 channels)

First architecture

The first prototype includes:

  • 8 analog inputs
  • Rotary encoder and screen
  • 4 digital inputs and 4 buttons for 8 interrupt inputs
  • 1 analog audio output
  • Pretty front panel with Eurorack format
  • 5V power supply input

The BOM is:

  • Raspberry Pi 3
  • Pi-Plates DAQCR1 (?)
  • Adafruit I2C rotary encoder module, with click and LED #4991
  • Adafruit quad-alphanumeric segmented display with I2C #1912
  • 4 mini-arcade buttons with retro-lighting

Pi-Plates DAQC2

Pi-Plates DAQCplate

  • SoC: Microchip PIC16F1517-I/PT
  • 16x 10-bit ADC
  • Analog input via TI SN74LV4051A 8:1 analog multiplexer
  • Open Collector outputs via TI DS2003CM high-current Darlington driver and NXP 74HC 8-bit parallel-in/serial out shift register.

Second architecture

This aims to integrate LEDs, buttons, and DACs on a board. The Raspberry Pi is dropped and replaced by a custom board with WiFi/TCP-IP SoC and all the analog stuff. It is possible to use a PCB board as front panel too.

For the software part, the board would only output the OSC, or ideally have an embedded, web-interface version of Chataigne. I would consider implementing TinyOSC, a lightweight OSC implementation, preferably on Zephyr RTOS.

Requirements

DAC

  • 8 channels input (audio stereo 3.5mm mini-jack)
  • Minimum 16 bits, preferably 24
  • Sample rate: ideally 50Hz, it can be quite slow (LFO are around 2 Hz)
  • MCP3008 ?

Other IO

  • MIDI input (also using stereo mini-jack) MIDI in uses an UART port, see the Arduino tutorial.

Midi-jack pinout:

Kroki generated Ditaa

UART baud rate is 31250.

Power supply

Eurorack standard includes a +12/-12V power supply, but the currents are quite low, and sensitive to pollution. So we should rather use a 5V additional external power supply.

Mechanical

It has to fit in Eurorack format. The smaller, the better,but no hard requirement for width. Some work has to be done to fit the connectors, leds, buttons and mechanical parts nicely.

CV inputs

VC analog inputs can wiggle between several voltage ranges:

  • -5V / 5V
  • -12V / 12V
  • 0 / 5V
  • 0 / 12V

We need an input stage able to fit those input the 0 / 3.3V ADC microcontroller input.

Attenuators are specific modules used to reshape a specific CV.

The most used input is copied from Mutable Instruments and remaps a -5V / 5V input in a 0 / 3.3V output, but needs a -10V bias to handle those negatives. In Befaco VCMC, an optional voltage gizmo converts 5V power supply to -12V / +12V for standalone behaviour. We could also use an inverting circuit but it will... invert: -5V mapped to 3.3V and 5V mapped to 0V.

Voltages are clamped to 0-3.3V using Shottky diodes, but it should maybe signal saturation to the user somehow.

Better scaling:

  • Several input scalers muxed?
  • A fancy IC with digital control?
  • Single scaler controlled by DAC output (hard)?
  • 2-steps converter: rescaler (-12/12 to -5/5), scaler (-5/5 to 0/3).

Diagram

Kroki generated Mermaid

STM32 option

  • Only performance range (STM32F7 and STM32H7) have RMII
  • STM32H7 has 16-bits ADC, it's perfect

Kroki generated Mermaid

Power consumptions estimates

3V3 bus

  • STM32H7 absolute maximum current through VDD/VSS: 620mA

  • STM32H7 running at 100deg, VOS1, all peripheral enabled: around 500mA

  • ETH PHY, 10BASE-T traffic: 130mA

  • OLED display logic: 300uA

  • 3V3 LDO: 800 mA

  • Fuse: 1.25A, trip 2.5A

  • Filter ferrite rating: 3A

  • Schottky rating (SS24): 2A

10V

  • OLED display lighting: 25mA
  • Step-up rating: 2.1A
  • Step-up inductor: 2.4A
  • Schottky rating (SS24): 2A

12V

  • Schottky rating (1N5819W): 1A
  • LDO efficiency (vout/vin): 12-5V -> 42%, 5-3V -> 66%
  • 800mA @ 3V3 => 800mA @ 12V (not crazy, but linear)

5V

  • USB spec: 500 mA in USB 2.0
  • USB spec: 900 mA in USB 3.0
  • USB 2.0: 500mA on 3V3 after LDO
  • USB 3.0: 900mA on 3V3 after LDO Might be useful to have USB 3.0 supply.

Notes about JLCPCB files

Generate files

Some modification are required from Kicad output files (BOM csv and placement files) to be imported to JLCPCB for assembly.

  • Change field names in BOM and placement CSV headers
  • Fix component rotation

There is a way to automate both with a Python script called jlc-kicad-tools. You will need 2 files in the project folder:

  • Netlist file: project.xml
  • Placement file: project-all-pos.csv

In order to get the project.xml file, in Eeschema, go to "Legacy BOM", create a custom XML exporter with the following command:

/bin/echo "%I"

Don’t forget to create a "JLCPCB" column with the JLCPCB references, for advanced components. For standard ones, keep their value and package and use the "--include-all-component-groups", otherwise the script will erase them.

Exemple use:

jlc-kicad-tools myproject -o ./assembly --include-all-component-groups