ItsyBitsy M0 Synth | Sigma-6 Voice Module A DIY project by M.J. Bauer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() Eurorack module (3U x 10HP) front and back views (Photos courtesy of Jean-Pierre Meyer) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This project should appeal to a diverse range of DIY synth enthusiasts from beginners to experts. Don't be misled by the simplicity of the hardware... the micro-controller firmware implements a complete sound synthesizer comprising 6 oscillators, mixer, 3 envelope shapers, LFO with ramp, variable-gain attenuator, audio limiter/clipper (overdrive) and reverb effect. Audio quality is excellent using a 12-bit SPI DAC and 32-bit (fixed-point) precision DSP computations. Build variants range from a simple low-cost MIDI-controlled sound module, with or without control panel, up to a full-featured Eurorack module (pictured above) with analog (CV) inputs and a control panel comprising 1.3" OLED display, 2 push-buttons and a 'data entry' pot. Several sigma-6 "voice modules" may be connected to a master controller board to make a respectable polyphonic synthesizer. (More about that later.) Examples of Sigma-6 Synth build options:
Note 1: Multi-module systems require a "MIDI Distribution board" to provide a standard opto-isolated MIDI input receiver and bus driver circuit. (Details TBA.) Note 2: Polyphonic systems will require a "Master Controller" to decode MIDI messages from a polyphonic keyboard (or sequencer) and assign notes to respective Sigma-6 "voice modules". The Master Controller needs only a "low-end" 8-bit MCU, e.g. Arduino Nano, Pro Micro (AT_32U4), etc. (Details TBA.) The design is based on the "ItsyBitsy M0 Express" (ATSAMD21) MCU board from Adafruit. For makers on a tight budget, it is possible to substitute a dirt cheap SAMD21 breakout board (RoboDyn 'SAMD21 M0-Mini' - available on AliExpress). My decision to use a SAMD21 should make the design immune to obsolescence. Details of the Sigma 6 synth concept and software design can be found in this PDF document... Ignore sections on user interface -- the document was written for no specific hardware platform. Disclaimer: The 'ItsyBitsy M0 Sigma-6 Synth' is not a commercial product. The hardware design and software source code are
in the public domain. The design may be replicated by suitably skilled
electronics hobbyists. Detailed step-by-step
instructions are not provided. The information
published here may be used as a basis on which to design your own
customized device.
The author accepts no responsibility for any adverse consequences to
makers attempting to replicate projects described on this website. There
is no plan to sell fully-assembled modules, or a complete kit of
parts. However, Gerber files for PCB fabrication will be made
available. Also, bare (unpopulated) circuit boards may be offered for
sale at cost price. Sample Sound Clips
... more to follow shortly! ... ... Development & test platform (right) coupled with DIY MIDI Tester/controller (left) Hardware Design Below
is a schematic of the minimum practical build. The
control panel (comprising OLED display, 2 buttons and 'data entry' pot) is
optional, depending on your intended usage. ![]() There is a choice of MIDI IN circuit configurations. The opto-coupler (6N138) is optional, but recommended for applications where only one Sigma-6 synth module will be connected to a MIDI controller. The MIDI IN circuit was designed with a view to connect multiple synth modules to a common MIDI bus. For these applications, the opto should be omitted and R1 replaced with 2k2. The common bus connection is pin2 of header P5 (and GND of course). The MIDI bus scheme requires a simple "MIDI distribution board" having a standard opto-isolated MIDI IN receiver circuit and an open-collector output driver. Hardware variants requiring analog (CV) inputs will need additional circuitry, as shown in part 2 of the schematic below. The PCB will have provision for the extra parts, of course. SAMD21 ADC inputs are 3.3V full-scale. The external CV inputs are scaled to accept a 0 to +5V signal range. The op-amp buffers ensure that the voltage at the ADC inputs cannot exceed +3.5V, or go negative. The LM2904 and LM358 have a common-mode input range 0 to +3.5V provided Vcc = +5V. The op-amps also allow a high input resistance (50k ohm) at the external CV inputs and a low source resistance feeding into the ADC inputs, as required. The GATE input is fed into a 555 timer IC which is not wired as a timer, but as a Schmitt Trigger to ensure glitch-free transitions. With Vcc = 5.0V, the upper input threshold (VH) is about 2.5V; the lower threshold (VL) about 1.25V, which is 5V logic compatible. The 555 "discharge" output is open-collector which makes a simple 5V to 3.3V level translator using a pull-up resistor. A
low-capacity I2C EEPROM (24LC08B) may be fitted for storage of
persistent data, independent of the SAMD21 MCU which loses its marbles
every time a firmware update is done. The EEPROM is
optional -- User preferences, configuration parameters, CV1 calibration constant, etc, can be hard-coded into the
firmware - A cheap ATSAMD21 breakout board may be used instead of the Adafruit 'M0 Express' board. These are available on AliExpress under the name "RobotDyn SAMD21 M0-Mini". Although the RobotDyn board is not physically compatible with the Adafruit 'IstyBitsy M0', all of the required MCU I/O pins (and more) are accessible. This picture shows the signal pin assignments for the "SAMD21 M0-mini" board...
How to obtain a circuit board (bare PCB) Project collaborator Jean-Pierre Meyer (in France) has kindly offered to design circuit boards and other hardware to facilitate construction of synth modules. There are PCB designs for six hardware variants, depending on your choice of board size and CV jack type (if any), as in this table:
* Jack type PJ301M needs a wire link soldered from sleeve lug to GND pad on PCB. Jack type PJ301MB is better suited for PCB mount, but much harder to obtain. (My recommended jack type is PJ301M.) This picture shows the board layout (type 2A) and front-panel decal for the eurorack module.
Gerber files to fabricate PCB type 2R (the most popular option?) are available to download here. There may be some surplus boards (2R) available which I would be happy to sell to makers within Australia. Construction Notes: Be sure to use a polarized pin header and plug for the 5V DC supply (P1). There are variants of the 1.3 inch OLED display available. To match the PCB footprint (P3), choose a display type with 4 pins in the order: 1=VDD, 2=GND, 3=SCL, 4=SDA. Pullup resistors R6, R7 (2k2, on SDA and SCL) are required for the I2C OLED display and EEPROM. If your PCB uses the Adafruit 'ItsyBitsy M0 Express' MCU, be sure to fit the extra 2 I/O pins needed on the MCU board (digital '3' and '4' on the short edge) and fit a corresponding 2-way socket strip on the PCB. If your PCB uses the RobotDyn 'SAMD21 M0-Mini' MCU, be sure to fit the extra 2 I/O pins required (MOSI and SCK), i.e. two centre pins (3 & 4) in the 6-pin 'ICSP' connector on the MCU board, and fit a corresponding 2-way socket strip on the PCB. (The other 4 pins in the ICSP connector are not needed.) R18 (47k) was an after-thought... there is no footprint for R18 on the PCB (v1). A 47k resistor should be wired across the GATE input jack terminals to hold the GATE input low when there's nothing plugged in. If the OLED display is not fitted, be sure to put wire links in place of buttons A and B,
i.e. link pins 1, 2 and 3 of header P4 together. This tells the firmware not
to drive the OLED controller. MIDI Implementation The ItsyBitsy M0 Synth recognises MIDI messages: Note-On (with Velocity), Note-Off, Program Change (= Preset select), Pitch-bend, plus Control Change messages summarized in the table below:
Note 1: If Hold Time = 0, the Decay segment is bypassed; i.e. Attack is followed by Sustain. Note 2: 0 = Use Patch parameter; 1 = Fixed (full-scale); 2 = ENV x Velocity; 3 = Expression Note 3: 0 = Vibrato Off; 1 = MIDI Modulation (CC1); 2 = CV4 AUX-IN signal; 3 = Automatic (ramp) Note 4: 0 = Pitch-bend disabled; 1 = MIDI Pitch-bend msg; 2 = CV1 PITCH signal Note 5: Registered param 01 = Master Tune (fine tune). Follow with CC38 (Data entry) message. Most of the synth parameters settable by MIDI CC messages (70 ~ 89) are also settable using the control panel. Configuration parameters set by CC85 thru CC89 are stored in EEPROM (where fitted) and hence are persistent across power-downs. Parameters set by CC70 thru CC79 are active patch parameters. These settings will default to values defined by the preset patch, whenever a preset is selected. MIDI channel selection ... DIP-switch settings:
[ Legend: 0 = On (closed); 1 = Off (open) ] * The module responds to valid messages addressed to the selected MIDI IN channel and, if MIDI mode is set to 'Omni' (switches set to 0000), it will respond to all messages received, regardless of which channel(s) the messages are addressed to. The module also responds to valid messages addressed to channel 16, regardless of the DIP switch setting, so that the host controller can transmit a "broadcast" message to all modules on the MIDI network simultaneously. NB: Restart the device (reset MCU) after changing MIDI channel or CV mode jumper settings. Control Panel - User Interface The control panel allows selection of preset/patch, of course, and setting of configuration parameters, plus adjustment of some patch parameters, similar to those supported by MIDI messages. The selected preset determines the basic sound characterstics. However, it is impossible to define presets for every desired combination of patch parameters. It is also not feasible to allow every patch parameter to be adjustable with such a simple user-interface... 2 buttons and a knob! Nevertheless, the ability to adjust parameters such as amplitude envelope (A-H-D-S-R), LFO frequency, LFO FM depth, etc, from the front panel, provides essential variability of instrument characteristics. User Guide You don't need one... the control panel is very intuitive to use! Default Configuration Default values for configuration parameters are assigned if the EEPROM contents are erased or corrupted, or if there is no EEPROM fitted. In any case, you can customize the firmware to suit your own preferences. Edit the code in function "DefaultConfigData" in source file "ItsyBitsy_M0_synth.ino". Example: Whenever your synth is powered up, the display will present a "Start-up" screen with an option to default the configuration. Press Button [B] within 3 seconds from start-up to invoke this function. ... Analog (CV) Control Mode The Sigma-6 "Voice Module" can be configured to operate either as a voltage-controlled or MIDI-controlled device. To select CV control mode, place a jumper link on header JP1. If you are likely to be swapping modes often, consider connecting a switch to header JP1. The jumper input is read at power-on/restart only. You can't change modes while the module is running. In CV mode, oscillator frequency is set by the CV1 (pitch) input voltage, which covers a 5-octave range. The pitch corresponding to zero volts is set by a configuration parameter 'Pitch CV base note', which can be modified by a MIDI message (CC85) or using the control panel. The default setting, note #36 (C2), is hard-coded in the firmware... see function "DefaultConfigData" in source file "ItsyBitsy_M0_synth.ino". Audio output amplitude can be controlled either by the internal envelope shaper (ENV) or by CV3 (EXPRN) input if using an external signal. If using CV3 to control expression, set configuration parameter 'Ampld Control Mode' to 3 (Expression). There is no "Key Velocity" signal in CV mode, of course, so this is set to a constant value (approx. 80% of full-scale) by the firmware when using the internal envelope shaper. Another option is to use an external voltage-controlled amplifier (VCA) to control audio amplitude, in which case set the 'Ampld Control Mode' parameter to 1 (constant full-scale output level). An external GATE signal (5V logic) may be required to control the internal envelope shapers (including the "Contour" and "Transient" envelopes) even if the main amplitude envelope generator is bypassed. The envelope generators enter the 'Attack' phase on the GATE signal rising edge (Low to High). They enter the 'Release' phase on the GATE signal falling edge (High to Low). There is an option to "quantize" the CV1 (pitch) input signal so that the oscillator (fundamental) frequency is set to the nearest semitone on the chromatic scale. This may be useful if the external control voltage source is not already tuned to a musical scale, or if it is not well calibrated. Various analog sequencers and random note generators (using sample-and-hold techniques) may fall into this category. Of course, you may prefer not to have the oscillator pitch quantized, in which case turn off the 'quantize' option! This parameter can be set via the Control Panel and/or you can edit the default setting in the firmware. NB: If CV control mode is selected, the CV1 input controls absolute pitch (1 V/octave, 5 octave range); otherwise (in MIDI control mode) CV1 may be configured to control pitch-bend. The lowest note in the 5-octave range (base note) is a configuration parameter. The synth responds to all supported MIDI messages in CV mode as well as in MIDI mode. Be aware that GATE input signals may clash with MIDI Note-On and Note-Off commands. However, the CV1 (Pitch) signal takes precedence over MIDI note numbers. It's probably best not to send MIDI Note-On or Note-Off messages to the synth while in CV control mode. Max. frequency of signal fed into CV1 input Execution time to service the CV1 input is approx 600us, including interrupting processes. (The audio ISR accounts for 70% of MCU load.) All other processes take about 200us on average (for each iteration of the CV1 service routine), so CV1 gets serviced every 800us, i.e. 1250 times per second. This rate allows osc. frequency modulation by an external analog signal up to about 250Hz. Hence, the AC component (if any) of the signal fed into CV1 should be band-limited (low-pass filtered) with a cut-off frequency around 250Hz; otherwise aliasing artefacts (unwanted audio frequencies) could occur. CV1 Input Calibration Assuming the module starts up in CV control mode, the 'Start-up' screen will present an option to calibrate the CV1 input. Press Button [A] within 3 seconds from start-up to invoke this function. Apply a stable DC voltage source to the CV1 input. You can use a battery (3 ~ 4.5V), or use the internal +3.3V line, or a voltage-divider on the +5V supply to obtain a voltage in the range 3 ~ 4.5V. Measure the voltage applied to the CV1 input jack using an accurate voltmeter. Call this "actual_input_mV". You could use a 3½ digit DMM (full-scale 3.999V) if the voltage source is less than 4V, but these are rarely better than 0.5% accurate on DC volts. Preferably, use a 4½ digit DMM with DC accuracy 0.1% or better. Wait a few seonds for the CV1 voltage indicated on the display to stabilize. Call this "adc_reading_mV". The ADC reading assumes CV1 input full-scale is 5100mV, based on the voltage-divider (18k + 33k) and ADC reference voltage (3.3V). Calculate the actual (calibrated) full-scale value using this formula... full_scale_mV = 5100 x actual_input_mV ÷ adc_reading_mV Enter this value (rounded to the nearest integer) in the function "DefaultConfigData", replacing the existing default value (5100) as in this example: g_Config.CV1_FullScale_mV = 5073; Compile and upload the firmware to your synth board. Restart the module and default the configuration... (see section "Default Configuration", above). Optionally, check the calibration by repeating the above meaurements. The displayed CV1 reading should agree with the actual (measured) voltage, within about 5mV. ... Firmware Installation Download and install the latest version of Arduino IDE and follow the instructions here: To build the ItsyBitsy M0 synth firmware, you also need to install a "fast timer" library in the Arduino IDE. Sigma-6 Synth software repository Steps to build and "upload" the firmware:
If you have any problems, send me an email inquiry. It
should be possible to
program the firmware into the target board from a prebuilt ".hex"
object file, without needing to use the Arduino app, but first I need to
get my head around Adafruit's SAMD21 USB bootloader! Then I'll
enlighten you with the procedure. Thanks for taking
an interest in this project. Feel
free to send comments and queries, either post on the Synth-DIY Facebook group
(search for my posts), or email direct to me (address below). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Send email enquiries, comments, suggestions, etc, to... Last update: 15-FEB-2025 ___ |