Skip to the content
PCBKitNew board
2 layersTape deck circuit, the printed circuit board in 3D

Tape deck circuit

mprosk/midi_tape_deck

MIDI controlled tape deck including transport and pitch bend

Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
43
Pads
92
Tracks, vias
317, 72
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
31 Jul 2021
Updated
16 Mar 2022

Overview

Tape deck circuit is an open-source printed circuit board by mprosk, from the mprosk/midi_tape_deck repository on GitHub. It is a 2-layer board with 15 parts on 43 nets, routed with 317 tracks and 72 vias.

Its parts include 4 capacitors, 3 ICs, 3 connectors, 2 resistors and 2 diodes. It belongs with the AVR (ATmega, ATtiny) boards of this library.

README

README.md

MIDI Tape Deck

MIDI controlled tape deck. Dynamically adjust the pitch of a recording to a specific pitch based on MIDI note data.

This project is built around the Yamaha KX-130 but can likely be adapted to other decks and mechanisms

Theory of Operation

Cassette tapes are designed to run at a nominal rate of 1.75 inches per second. When the speed of tape playback is changed, the resulting sound will have a change in pitch. The slower the speed, the lower the pitch, and vice versa. By adjusting the speed of tape playback by a specific amount, the pitch of the recording can be changed to a specific note, assuming the nominal pitch of the recording is known.

This project provides the hardware and software for performing such a task.

Speed Control

In the tape deck used in this project, the tape speed could be adjusted using a 1k potentiometer. The pitch range of the 1k pot was quite limited, meaning that few notes could be reached. Experimentation revealed that the larger the value of the potentiometer, the larger the change in frequency, and thus the more notes that could be tuned to. In addition, the change in pitch as a function of the change of resistance was observed to be linear.

Digital potentiometers are one way of interfacing digital and analog systems. The value of the pot can be changed in software but wired to the tape deck in place of the existing 1k pot. However, digital potentiometers typically have only 128 or 256 "taps" on them, meaning they can only stop at a fairly low number of values between the minimum and maximum values. This is in contrast to the mechanically actuated potentiometer, which can be adjusted continuously along is range.

Due to the low number of taps, a single digital potentiometer would not be able to control the tape deck with enough precision to reach a specific note. In order to mitigate this, two digital potentiometers were ganged together in the circuit shown below.

dual_pot

This configuration results in one of the potentiometers causing a larger change in the overall resistance, while the other produced a larger change, creating a "coarse" setting and a "fine" setting. This configuration allowed for a much larger number of frequencies to be reached, as instead of 256 discrete points, there were now 2562 different combinations across the two potentiometers.

Transfer Function

The purpose of the potentiometers is to adjust the playback speed of the tape such that the frequency is changed by a target amount. In order to know what values to set the potentiometers to, we must know what the relationship between the potentiometer settings and the change in frequency is in the first place. By understanding this relationship, we can figure out what pot settings we need to obtain the desired change in pitch.

This system has two independent variables--the settings of the coarse and fine potentiometers--and one dependent variable--the change in pitch of the tape. By stepping through a range of combinations of potentiometers settings and recording the resulting pitch shift, we can start to see the relationship develop.

plot

Note that this relationship is only linear when the coarse potentiometer is changed, and is nonlinear when the fine potentiometer is changed. Also note how the coarse potentiometer has a greater impact on the output frequency than the fine potentiometer.

Once we have captured enough data points, a best fit equation can be calculated for the surface using polynomial regression. This is performed in eval/eval.py. This produces a formula that equates the change in output frequency based on the coarse (x) and fine (y) potentiometer settings.

text
freq(x,y) = -1503.0871471 + 12.0767089x + 0.9015391y + 0.0115233xy + 0.003259y^2

Equation Solver

Now that we are able to calculated the change in output frequency for a given combination of coarse and fine settings, we can start to work on the inverse: finding the combination of potentiometer settings that result in the desired change in output frequency.

Solving the equation mathematically for a given frequency is not conducive to an embedded device (or me) so this approach will be a little more brute-force, essentially a recursive guess-and-check.

First, the setting of the fine potentiometer is fixed to 127. A binary search is performed on the setting of the coarse potentiometer, using the equation above to determine what the output frequency will be. Once a coarse settings is found that puts the output close enough to the target value, the same operation is repeated for the fine potentiometer. Essentially the coarse pot is adjust to get the output close, then final adjustment is made using the fine pot.

Parts

15
QtyValueFootprintReferences
40.1uFCapacitors_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC1, C2, C3, C4
2MCP41HVx1midi_tape_deck:TSSOP_BreakoutU2, U3
11N914Diodes_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1
11kResistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
1220Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
16N138Housings_DIP:DIP-8_W7.62mm_SocketU1
1Arduino_Nano_v3.xModule:Arduino_NanoA1
1LEDConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalD2
1MIDI INConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ1
1POWERConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1SPEED POTConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2

Questions

What parts does the Tape deck circuit use?

15 parts. 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 Tape deck circuit KiCad files?

From the mprosk/midi_tape_deck repository on GitHub, at the commit this page was made from: the board is schematic/tape_deck_circuit.kicad_pcb and its schematic pcb/pitch_ctrl.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Tape deck circuit design in my own project?

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

Similar boards

  • 2 layers19 × 76 mmSub, the printed circuit board in 3D

    Sub

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    15 parts3kApache-2.0
  • 2 layers26.7 × 62.2 mmDeniseadapter, the printed circuit board in 3D

    Deniseadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    15 parts1kGPL-3.0
  • 2 layers100 × 44 mmVideoslot, the printed circuit board in 3D

    Videoslot

    mntmn/amiga2000-gfxcard

    MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog

    15 parts1k
  • 2 layers91 × 51 mmBusinessCard, the printed circuit board in 3D

    BusinessCard

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    15 parts915
  • 2 layers24.3 × 57.9 mmFlosspods pro flex, the printed circuit board in 3D

    Flosspods pro flex

    kenp-io/not-for-airpods-repairs

    The content of this repository is licensed under the WTFPL License. Please have a close look at the terms before using this material.

    15 parts609WTFPL
  • 2 layers20.3 × 15.2 mmL0 Load, the printed circuit board in 3D

    L0 Load

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    15 parts546MIT
  • 2 layers68 × 50 mmEleLab v2 PowerFeed, the printed circuit board in 3D

    EleLab v2 PowerFeed

    Chrismettal/EleLab_v2

    Cheap DIY lab system for hobbyists and the tinkering folk

    15 parts531GPL-3.0
  • 2 layers50.8 × 35.6 mmInterface, the printed circuit board in 3D

    Interface

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    15 parts454