A clone of the Mutable Instruments Yarns module with the use of the STM32 Blue Pill.
If you want to build the module yourself, I uploaded firmware, schematic, BOM and Gerber files for the PCBs.
NOTE: Firmware and schematic differ from the original design due to restrictions on the Blue Pill board. More details are given below in section Firmware.
There are two different versions for the control board, an "original" and a "Thonk" version. Reason is that for my own module I am using specific 3.5mm jack sockets - MJ-355 from Marushin - available at my local electronics shop.
However, since most DIY projects for Eurorack modules out there are using potentiometers from ALPHA and so-called THONKICONN jacks, as they are provided by Thonk in the UK, I also created a control PBC version with footprints for those components. Choose the one you need.
The layout of the main PCB is the same for both versions.
I created the Gerber files with the online tool EasyEDA and ordered it at JLCPCB. I cannot guarantee, if this set of zipped Gerber files works also for other providers, like e.g. PCBWay. I have not tried that. But I saw online, that others did it.
I added the information about hole coordinates for the front panel in the folder PanelLayout, referring to the component layout in the PCB Gerber files.
In addition, there is another Gerber file for the panel, following the HP standard. My own modules do not follow that width standard, as I am only using sliding nuts in my racks.
You can use the panel Gerber file to have the panel built out of PCB material.
Most of the components are through-hole, including the microchip part, thanks to the available Blue Pill board. However, there are a few components, which I did not find as THT version, or which I got used to due to frequent usage in other projects (like bypass caps for ICs and NPN transistors). The SMD components are:
- DAC8564 (DAC, 16-TSSOP package, the most challenging component due to its size)
- LM1117-3.3 (voltage regulator, SOT223 package)
- MCP1703 (voltage regulator, SOT223 package)
- SN74AHCT1G125 (buffer, SOT235 package)
- MMBT3904 (SMD version of the 2N3904 transistor, SOT23 Package)
- 0.1uF bypass caps for ICs (1608 package)
Concerning the resistor size, I am usually using small-size resistors, about half the length of the usual size, so they need less space on the PCB. If you want to use my Gerber files, you have to consider that fact. You might still use normal size resistors and put them in a standing position on the boards. Should also work fine.
The original version from Mutable Instruments is using the OPA4171 quad op amp for the 4 CV output channels. The component was not available at the time, when I built the module. I tried it with the TL074 quad op amp. The pinout is the same, so it can easily be replaced. It turned out that the module also works with the TL074.
The connection between the two DIN sockets (MIDI in and MIDI out) needs to be done via cables or wire. I used some cut-off wires from the resistor legs.
The numbers of the pin labels on the control PCB refer to the pin numbers of the sockets. E.g. MIDI OUT5 needs to be connected to pin 5 of the MIDI output socket. The numbering of socket pins are given in the graph below.
I shared the .hex files for the STM32F103 chip (bootloader and main) in the folder Firmware. Those files and the schematic differ from the originals from Mutable Instruments. Reason is the use of the Blue Pill board, as the chip's pins C13, C14, and C15 are already occupied on the Blue Pill board. But the original design from Mutable Instruments is using them for the encoder.
Therefore, I changed the coding in two source code files, so that instead pins A0, A1, and A2 are used, which are not in use in the original design. In my version, the following original source code files have been adjusted:
- encoder.cc (in subfolder /drivers)
- encoder.h (in subfolder /drivers)
If you want to compile your own .hex files, you need to search the texts in the below table and replace them in the entire file, as stated.
| File name | Original | Replace with |
|---|---|---|
| encoder.cc | Pin_13 | Pin_1 |
| encoder.cc | Pin_14 | Pin_2 |
| encoder.cc | Pin_15 | Pin_0 |
| encoder.cc | GPIOC | GPIOA |
| encoder.h | Pin_15 | Pin_0 |
| encoder.h | GPIOC | GPIOA |
If you want to see more about the chip programming process, you can check out my YouTube video about my other MI clone build of the Braids module. The process described in there is also valid for the Yarns module. You can also check my YouTube video about this module.
CAUTION! There are three different versions of the Blue Pill board available. The difference is the version of the ST32F103 microchip on the board. The versions differ in the flash memory size:
- STM32F103C6T6: 32kB flash memory
- STM32F103C8T6: 64kB flash memory
- STM32F103CBT6: 128kB flash memory
The code size requires the 128kB version. However, that version is currently (Feb2023) difficult to find, if available at all.
I gave it a try and bought the 64kB version. Surprisingly, the programmer showed 128kB available flash memory, and the code could be loaded. I tried it with several boards. So it seems STM32F103C8T6 is ok for this module.
The calibration procedure is the same, as the one for the original module from Mutable Instruments. A multimeter with at least 4 1/2 digits of precision is needed.
To enter the calibration menu, press the encoder for one second and select C(ALIBRATE) in the list. The display shows the active CV output.
Use the encoder to select the output to calibrate, or select OK to exit the calibration mode.
Once a CV output has been selected, connect a patch cable from this output to your multimeter. The display indicates the voltage, in Volts, that should be read on the multimeter (-3 at the beginning of the procedure), when measuring the voltage between ground and the CV output of the module.
If the reading is incorrect, click the encoder (the display blinks), and rotate the encoder until the target voltage is reached.
Each increment corresponds to about 0.2mV. You can also hold the TAP button while rotating the encoder for a faster adjustment, by 6mV increments.
Click the encoder when you are done - the display no longer blinks.
Select the next voltage in the list, and do the necessary adjustments.
Calibration has to be done for all voltages between -3V and +7V.
Select "OK" after the last voltage has been adjusted. The part selection menu is shown.
Calibrate the other CV output channels if necessary.