# Walkmellotron: Cassette Player Mods

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/112/762/medium800/hacks_edited_P1380261.png?1656479518)

![](https://cdn-learn.adafruit.com/assets/assets/000/112/761/medium800/hacks_walkmel-7877.jpg?1656479386)

https://youtu.be/wTrl89AjCcw

Portable cassette tape players aren't just the best way to listen to music on the go, they also can be turned into musical instruments in their own right! By adjusting playback speed of the tape motor, you can increase or decrease the pitch of the playback.

This guide shows a couple of great ways to hack your Walkman for speed control. First there's the Walkmellotron, which uses USB MIDI on a QT Py RP2040 with a DAC board for voltage control of the player's potentiometer wiper. Use a MIDI keyboard, controller, or sequencer to "play" tape tunes.

The second method replaces the tape player's on-board motor controller entirely, allowing total motor control, including a wide range of speeds in both forward and reverse! NOTE: custom tape loop cassette required.

https://youtu.be/ivdLFmMQwIQ

# Walkmellotron: Cassette Player Mods

## Walkmellotron MIDI Controlled Tape Player

https://youtu.be/5YtKhl76MII

The Walkmellotron uses a widely available GE cassette player that featured a simple speed control dial. To adjust the playback speed, you'll connect a DAC (digital-to-analog converter) to the ground and wiper of the speed dial potentiometer, and send it different voltages to select the speed. The QT Py RP2040 will be used to interpret USB MIDI messages and send the voltages via the STEMMA QT-connected DAC board.

This build is loosely inspired by the Mellotron, an amazing instrument invented in 1963, that used one tape loop per key to play beautiful, lush soundscapes.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/728/medium800/hacks_mell.jpg?1656463368)

## Parts
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Adafruit MCP4728 Quad DAC with EEPROM

[Adafruit MCP4728 Quad DAC with EEPROM](https://www.adafruit.com/product/4470)
If you've ever said to yourself, "Gee, I wish I had four 12-bit DACs that came in a single package with the ability to save their settings to an EEPROM", well I have good news. The MCP4728 is the answer to your wishes! Within its little package, the MCP4728 has four 12-bit DACs...

In Stock
[Buy Now](https://www.adafruit.com/product/4470)
[Related Guides to the Product](https://learn.adafruit.com/products/4470/guides)
![Angled shot of black, square-shaped DAC breakout board.](https://cdn-shop.adafruit.com/640x480/4470-07.jpg)

### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
![Angled shot of coiled pink and purple USB cable with USB A and USB C connectors.](https://cdn-shop.adafruit.com/640x480/5153-02.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

## Cassette Player
### GE 3-5362A Cassette Player/Recorder

This is a great, easily available player to use for cassette hacks. Online auction sites are full of them, usually priced to sell at around $10-$20.

Look for one that has been tested and works, unless you want to get a replacement belt, which is the most common thing to break in old tape players.

![hacks_ge.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/712/medium640/hacks_ge.jpg?1656458982)

# Walkmellotron: Cassette Player Mods

## Build the Walkmellotron

![](https://cdn-learn.adafruit.com/assets/assets/000/112/754/medium800/hacks_IMG_7957_2.jpg?1656466658)

## Tape Player Mod

The player needs to be modified to receive control voltage from the DAC board. This is as simple as soldering a wire to cassette player ground electrical (GND) and another to the variable speed control potentiometer's wiper, which is labeled VS+ (variable speed positive, perhaps) on the board.

To start, remove the four screws on the back of the player and carefully open it up, being sure not to damage the battery and speaker wires.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/714/medium800/hacks_walkmel-7852.jpg?1656461003)

## Solder to VS+

Solder a 6" length of red silicone covered wire to the **VS+** point. This will go to the **VA** (voltage A) pin of the DAC board.

![hacks_walkmel-7862b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/716/medium640/hacks_walkmel-7862b.jpg?1656461425)

![hacks_walkmel-7863.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/717/medium640/hacks_walkmel-7863.jpg?1656461460)

## Solder to GND

Next, solder a 6" length of blue wire to a **GND** point on the player as shown here. (You can find a GND point with a multimeter in continuity mode testing from a known ground if needed, such as the negative battery contact.)

This wire will go to the **GND** pad on the DAC.

![hacks_walkmel-7866b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/718/medium640/hacks_walkmel-7866b.jpg?1656461708)

## Wire Run

Run the two wires you soldered outside of the player via the nearby DC jack hole.

NOTE: If you plan to use external power, you can run them through a gap in the cassette well, or drill a separate hole for the wires.

Use some short lengths of heat shrink tubing to neaten up the wiring if you like.

![hacks_walkmel-7867.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/719/medium640/hacks_walkmel-7867.jpg?1656461917)

![hacks_walkmel-7868.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/721/medium640/hacks_walkmel-7868.jpg?1656461954)

## Wire to DAC

Solder the wires to the DAC board as shown:

- **blue** wire to DAC **GND&nbsp;** pin 
- **red** wire to DAC **VA** pin

![hacks_walkmel-7869.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/722/medium640/hacks_walkmel-7869.jpg?1656461974)

## DAC to QT Py, come in QT Py

Use the STEMMA QT cable to connect the DAC board to the QT Py RP2040.

![hacks_walkmel-7870.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/730/medium640/hacks_walkmel-7870.jpg?1656463493)

## Affix!

Use two adhesive squares to affix the DAC and the QT Py to the case as shown.

![hacks_walkmel-7871.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/734/medium640/hacks_walkmel-7871.jpg?1656465357)

![hacks_walkmel-7872.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/735/medium640/hacks_walkmel-7872.jpg?1656465363)

![hacks_walkmel-7873.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/736/medium640/hacks_walkmel-7873.jpg?1656466363)

![hacks_walkmel-7874.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/737/medium640/hacks_walkmel-7874.jpg?1656466378)

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/112/739/medium800/hacks_walkmel-7875.jpg?1656466392)

Plug in the USB C cable to your computer and the QT Py so you can get ready to code it!

![](https://cdn-learn.adafruit.com/assets/assets/000/112/748/medium800/hacks_walkmel-7877.jpg?1656466448)

# Walkmellotron: Cassette Player Mods

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_qtpy_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# Walkmellotron: Cassette Player Mods

## Code the Walkmellotron

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

## Text Editor

Adafruit recommends using the Mu editor for using your CircuitPython code with the Feather. You can get more info in [this guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

Alternatively, you can use any text editor that saves text files.

## Download the Project Bundle

Your project will use a specific set of CircuitPython libraries and the&nbsp; **code.py** &nbsp;file. To get everything you need, click on the&nbsp; **Download Project Bundle** &nbsp;link below, and uncompress the .zip file.

Drag the contents of the uncompressed bundle directory onto your QT Py board's **CIRCUITPY** &nbsp;drive, replacing any existing files or directories with the same names, and adding any new ones that are necessary.

![hacks_libs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/760/medium640/hacks_libs.jpg?1656478564)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Walkmellotron/code.py

Next you can hook up your Walkmellotron and play!

# Walkmellotron: Cassette Player Mods

## Jam on the Walkmellotron

## Source

A continuous tone or chord is great source material for your Walkmellotron tapes. Record an entire side of a cassette with this tone or chord.

For this demo, I recorded a slightly de-tuned sine wave tritone I made with VCV Rack.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/771/medium800/hacks_sine_source.png?1656516965)

## Playing the Walkmellotron
![](https://cdn-learn.adafruit.com/assets/assets/000/112/775/medium800/hacks_walkmel-7963.jpg?1656519739)

Place your prepared tape into the Walkmellotron and make sure it is rewound.

![hacks_walkmel-7964.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/774/medium640/hacks_walkmel-7964.jpg?1656519712)

Hook up the audio out to headphones or an amplifier/powered speakers -- or even better through some effects pedals or outboard units such as reverb and delay.

![hacks_walkmel-7966.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/777/medium640/hacks_walkmel-7966.jpg?1656519768)

Plug in the QT Py to a USB MIDI host/controller/sequencer or your computer/iOS device. Basically, anything capable of being a USB MIDI host.

I used a RetroKits RK-006 to pair the Walkmellotron with an Arturia Keystep MIDI keyboard.

![hacks_walkmel-7967.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/778/medium640/hacks_walkmel-7967.jpg?1656520076)

Press play to start the cassette playing.

![hacks_walkmel-7969.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/779/medium640/hacks_walkmel-7969.jpg?1656520109)

Now, play any notes from MIDI 1 to 31 (A0 - G1). You can adjust the note range in **code.py** if needed, depending on the range of your MIDI controller.

Your Walkmellotron will play it's mellow/slightly haunting tones!

![hacks_walkmel-7972.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/780/medium640/hacks_walkmel-7972.jpg?1656520152)

![hacks_walkmel-7973.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/781/medium640/hacks_walkmel-7973.jpg?1656520163)

https://www.youtube.com/watch?v=wTrl89AjCcw

![](https://cdn-learn.adafruit.com/assets/assets/000/112/786/medium800/hacks_walkmel-7977.jpg?1656520217)

# Walkmellotron: Cassette Player Mods

## Motor Controlled Cassette Player

![](https://cdn-learn.adafruit.com/assets/assets/000/112/686/medium800thumb/hacks_modReveal.jpg?1656427692)

This cassette player modification controls the player's motor directly with an L9110 motor driver. An Adafruit QT Py RP2040 controls the L9110 with two PWM pins and uses CircuitPython code to affect the motor's throttle by reading a potentiometer value.

This mod should be used with a cassette tape loop. By driving the motor independently from the cassette player's circuit board, you can damage regular cassette tapes since the motor will keep spinning the tape even once the tape has reached the end.

https://youtu.be/ivdLFmMQwIQ

Warning: 

The circuit is built on a perma-proto board that fits perfectly on the back of the cassette player with a 3D printed plate. The QT Py RP2040 can power the audio output of the player with its 3.3V output.

![hacks_edited_P1380261.png](https://cdn-learn.adafruit.com/assets/assets/000/112/667/medium640/hacks_edited_P1380261.png?1656357906)

The potentiometer affects the speed and direction of the motor being driven by the L9110 driver. If you turn the potentiometer all the way to the left, the motor throttles at full speed in reverse. If you turn the potentiometer all the way to the right, the motor throttles forward at full speed.

![hacks_turningPot.gif](https://cdn-learn.adafruit.com/assets/assets/000/112/684/medium640thumb/hacks_turningPot.jpg?1656427522)

The button controls a revved warble effect when it is held down. The motor will perform the effect forward or reversed depending on the position of the potentiometer.

![hacks_edited_P1380298.png](https://cdn-learn.adafruit.com/assets/assets/000/112/685/medium640/hacks_edited_P1380298.png?1656427568)

## Electronic Parts
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### L9110H H-Bridge Motor Driver for DC Motors - 8 DIP

[L9110H H-Bridge Motor Driver for DC Motors - 8 DIP](https://www.adafruit.com/product/4489)
Run two solenoids or a single DC motor with up to 800mA per channel using the super-simple L9110H H-bridge driver. This bridge chip is an 8 DIP package so it's easy to fit onto any breadboard or perfboard.  
  
Each chip contains one full H-bridges (two half H-bridges). That means...

In Stock
[Buy Now](https://www.adafruit.com/product/4489)
[Related Guides to the Product](https://learn.adafruit.com/products/4489/guides)
![Demo Shot of the Feather wired to L9110 chip, driving a DC motor back and forth](https://cdn-shop.adafruit.com/product-videos/640x480/4489-03.jpg)

### Adafruit Perma-Proto Half-sized Breadboard PCB - Single

[Adafruit Perma-Proto Half-sized Breadboard PCB - Single](https://www.adafruit.com/product/1609)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

In Stock
[Buy Now](https://www.adafruit.com/product/1609)
[Related Guides to the Product](https://learn.adafruit.com/products/1609/guides)
![Top view of Adafruit Perma-Proto Half-sized Breadboard PCB.](https://cdn-shop.adafruit.com/640x480/1609-00.jpg)

### Soft Silicone Top 6mm Push-buttons (20-pack)

[Soft Silicone Top 6mm Push-buttons (20-pack)](https://www.adafruit.com/product/4183)
This product is really annoying to have to write a description for because it's really something you have to touch to understand! Instead of a hard plastic actuator-button, these have a soft molded silicone button top. The underlying switch is still a clicky dome-switch but you have this...

In Stock
[Buy Now](https://www.adafruit.com/product/4183)
[Related Guides to the Product](https://learn.adafruit.com/products/4183/guides)
![Angled shot of 20 6mm soft silicone top pushbuttons.](https://cdn-shop.adafruit.com/640x480/4183-04.jpg)

### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
![Small, black, SPDT slide switch.](https://cdn-shop.adafruit.com/640x480/805-03.jpg)

### Part: IC Socket - for 8-pin 0.3" Chips - Pack of 3
quantity: 1
DIP-8 IC socket
[IC Socket - for 8-pin 0.3" Chips - Pack of 3](https://www.adafruit.com/product/2202)

### Part: 2.54mm/0.1" Pitch Terminal Block - 2-pin
quantity: 2
2-pin terminal block
[2.54mm/0.1" Pitch Terminal Block - 2-pin](https://www.adafruit.com/product/2138)

### Part: USB-C Cable
quantity: 1
USB-C to USB-A cable
[USB-C Cable](https://www.adafruit.com/product/5153)

## Cassette Gear
### Part: Portable Cassette Player
quantity: 1
Portable cassette player
[Portable Cassette Player](https://www.amazon.com/gp/product/B07JWC2624/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

### Part: Maxell UR 90 Normal Bias Blank Audio Recording Cassette Tape
quantity: 1
Blank cassette tapes
[Maxell UR 90 Normal Bias Blank Audio Recording Cassette Tape](https://www.amazon.com/gp/product/B00006IAAL/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

### Part: Audio Cassette Tape Splicing Tape
quantity: 1
Cassette splicing tape
[Audio Cassette Tape Splicing Tape](https://www.amazon.com/gp/product/B00GK77D1G/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

# Walkmellotron: Cassette Player Mods

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/112/633/medium800/hacks_cassetteFritzing_bb.png?1656341578)

Button

- **Board pin A0** to **button input**
- **Board GND** to **button GND**

Potentiometer

- **Board GND** to **potentiometer pin 1**
- **Board pin A1** to **potentiometer wiper**
- **Board 3.3V** to **potentiometer output**

Switch

- **Board 5V** to **switch input**

L9110 IC

- **Cassette motor wire 1** to **L9110 pin 1**
- **Switch output** to **L9110 pin 2**
- **Switch output** to **L9110 pin 3**
- **Cassette motor wire 2** to **L9110 pin 4**
- **Board GND** to **L9110 pin 5**
- **Board pin A3** to **L9110 pin 6**
- **Board pin A2** to **L9110 pin 7**
- **Board GND** to **L9110 pin 8**

Cassette Power Terminal Block

- **Board 3.3V** to **cassette player positive terminal**
- **Board GND** to **cassette player negative terminal**

# Walkmellotron: Cassette Player Mods

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/112/662/medium800/hacks_edited_P1380265.png?1656356364)

The perma-proto board may be mounted on a 3D printed plate, described below. The plate benefits from some supports. There is a 3D printed lever for the potentiometer that prints with no supports.

The STL files can be downloaded directly here or from Thingiverse.

[motorControlCassetteSTLfiles.zip](https://cdn-learn.adafruit.com/assets/assets/000/112/666/original/motorControlCassetteSTLfiles.zip?1656356711)
[Thingiverse download](https://www.thingiverse.com/thing:5420640)
You can use support blockers in your slicer software to only have supports in the center of the plate's mount. This should provide enough support for your printer to bridge the wall.

![hacks_supportBlock.png](https://cdn-learn.adafruit.com/assets/assets/000/112/665/medium640/hacks_supportBlock.png?1656356668)

The plate slides onto the cassette player's belt clip to keep the mod compact.

![hacks_edited_P1380244.png](https://cdn-learn.adafruit.com/assets/assets/000/112/663/medium640/hacks_edited_P1380244.png?1656356405)

The potentiometer lever is sized to fit onto the circular alpha pot.&nbsp;

![hacks_edited_P1380268.png](https://cdn-learn.adafruit.com/assets/assets/000/112/664/medium640/hacks_edited_P1380268.png?1656356444)

# Walkmellotron: Cassette Player Mods

## Code the Motor Controlled Cassette Player

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Cassette_Player_Mod_L9110/code.py

## Upload the Code and Libraries to the QT Py RP2040

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

Your QT Py RP2040&nbsp; **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder and the&nbsp; **code.py&nbsp;** file.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/Cassette_Player_Mod_L9110.png )

## How the CircuitPython Code Works
The L9110 motor controller can be used with the `adafruit_motor` CircuitPython library. It just requires two PWM pins.

```python
#  PWM pins for L9110
PWM_PIN_A = board.A3  # pick any pwm pins on their own channels
PWM_PIN_B = board.A2
#  PWM setup
pwm_a = pwmio.PWMOut(PWM_PIN_A, frequency=50)
pwm_b = pwmio.PWMOut(PWM_PIN_B, frequency=50)
#  motor setup
cassette = motor.DCMotor(pwm_a, pwm_b)
```

In the loop, the potentiometer's value range is mapped to the motor's throttle range. When the pot's value is `0`, the motor will throttle full speed in reverse. When the pot's value is `65535`, the motor will throttle full speed forward.

```python
mapped_speed = simpleio.map_range(pot.value, 0, 65535, -1.0, 1.0)

cassette.throttle = mapped_speed
```

The button acts as a revved warble switch. When it's pressed, it incrementally increases the motor's throttle in increments of `0.06` to create a warbling sound. The direction of the warble is affected by the pot's position.

```python
#  if you press the button...
    #  creates a ramping effect
    if not warble_switch.value:
        #  checks current pot reading
        #  if it's positive...
        if mapped_speed &gt; 0:
            #  sets starting speed
            i = 0.4
            #  sets last value to loop
            last_i = i
            #  notes that it's positive
            pos = True
        #  if it's negative...
        else:
            #  sets starting speed
            i = -0.4
            #  sets last value to loop
            last_i = i
            #  notes that it's negative
            neg = True
        #  loop 8 times
        for z in range(8):
            #  if it's positive...
            if pos:
                #  increase speed
                i += 0.06
            #  if it's negative
            else:
                #  decrease speed
                i -= 0.06
            #  send value to motor
            cassette.throttle = i
            time.sleep(0.1)
        #  loop the value while button is held down
        i = last_i
        pos = False
        neg = False
```

# Walkmellotron: Cassette Player Mods

## Soldering

![](https://cdn-learn.adafruit.com/assets/assets/000/112/654/medium800/hacks_edited_P1380236.png?1656346174)

The circuit is soldered to a half size perma-proto board. You can reference the perma-proto board's coordinate numbers to make sure all of the items will fit.

## Components
## Socket Headers

Solder socket headers to the perma-proto board for the QT Py RP2040. You can use the QT Py as a jig for the headers. The headers will be placed at perma-proto board coordinates **D1** - **D7** and **H1** - **H7**.

![hacks_edited_P1380186.png](https://cdn-learn.adafruit.com/assets/assets/000/112/634/medium640/hacks_edited_P1380186.png?1656343383)

## DIP-8 Socket

Solder a DIP-8 socket to the perma-proto board with pin 1 placed at coordinate **E17**.

![hacks_edited_P1380189.png](https://cdn-learn.adafruit.com/assets/assets/000/112/635/medium640/hacks_edited_P1380189.png?1656343447)

## Terminal Blocks

Solder the motor's terminal block at coordinates **A14** and **A15**. Solder the cassette player's power terminal block on the front power and ground rails.

![hacks_edited_P1380190.png](https://cdn-learn.adafruit.com/assets/assets/000/112/636/medium640/hacks_edited_P1380190.png?1656343556)

## Button

Solder the button with pin 1 at coordinate **E26**.

![hacks_edited_P1380194.png](https://cdn-learn.adafruit.com/assets/assets/000/112/637/medium640/hacks_edited_P1380194.png?1656343642)

## Switch

Solder the switch with pin 1 at coordinate **J23**.

![hacks_edited_P1380196.png](https://cdn-learn.adafruit.com/assets/assets/000/112/638/medium640/hacks_edited_P1380196.png?1656343828)

## Potentiometer

Solder the potentiometer with the ground pin at coordinate **J10** , wiper at **J12** and pin 3 at **J14**.

![hacks_edited_P1380199.png](https://cdn-learn.adafruit.com/assets/assets/000/112/639/medium640/hacks_edited_P1380199.png?1656343920)

## Wiring
## GND Signals

Solder the following ground connections with solid core wire.

- **GND rail** to **I2** (board GND)
- **GND rail** to **I10** (potentiometer GND)
- **GND rail** to **I17** (L9110 pin 8)
- **GND rail** to **I20** (L9110 pin 5)
- **GND rail** to **I28** (button GND)
- **GND rail** to **GND rail**

![hacks_edited_P1380200.png](https://cdn-learn.adafruit.com/assets/assets/000/112/640/medium640/hacks_edited_P1380200.png?1656344192)

## 3.3V Signals

Solder the following 3.3V connections with solid core wire.

- **Front positive rail** to **I3** (board 3.3V)
- **Front positive rail** to **I14** (potentiometer pin 3)

![hacks_edited_P1380204.png](https://cdn-learn.adafruit.com/assets/assets/000/112/641/medium640/hacks_edited_P1380204.png?1656344338)

## 5V Signals

Solder the following 5V connections with solid core wire.

- **Back positive rail** to **I1** (board 5V)
- **Back positive rail** to **H25** (switch input)
- **H24** to **B19** (switch output to L9110 pin 3)
- **B19** to **B18** (L9110 pin 3 to L9110 pin 2)

![hacks_edited_P1380205.png](https://cdn-learn.adafruit.com/assets/assets/000/112/642/medium640/hacks_edited_P1380205.png?1656344489)

## Button Input

Solder a piece of wire from **A26** (button input) to **A1** (board pin A0).

![hacks_edited_P1380210.png](https://cdn-learn.adafruit.com/assets/assets/000/112/643/medium640/hacks_edited_P1380210.png?1656344599)

## Potentiometer Wiper

Solder a piece of wire from **H12** (potentiometer wiper) to **A2** (board pin A1).

![hacks_edited_P1380211.png](https://cdn-learn.adafruit.com/assets/assets/000/112/644/medium640/hacks_edited_P1380211.png?1656344697)

## PWM Connections

Solder the following PWM connections for the L9110.

- **H18** (L9110 pin 7) to **C3** (board pin A2)
- **G19** (L9110 pin 6) to **B4** (board pin A3)

&nbsp;

![hacks_edited_P1380213.png](https://cdn-learn.adafruit.com/assets/assets/000/112/645/medium640/hacks_edited_P1380213.png?1656344837)

## Motor Connections

Solder the following motor connections for the L9110.

- **C20** (L9110 pin 4) to **C15** (motor terminal block)
- **D17** (L9110 pin 1) to **D14** (motor terminal block)

![hacks_edited_P1380218.png](https://cdn-learn.adafruit.com/assets/assets/000/112/646/medium640/hacks_edited_P1380218.png?1656344907)

## Cassette Player Wiring
Open the cassette player by removing the four screws on the back.

![hacks_edited_P1380129.png](https://cdn-learn.adafruit.com/assets/assets/000/112/647/medium640/hacks_edited_P1380129.png?1656345373)

## Motor Wiring
Desolder the cassette player motor's two wires from the PCB.

![hacks_edited_IMG_5652.png](https://cdn-learn.adafruit.com/assets/assets/000/112/648/medium640/hacks_edited_IMG_5652.png?1656345783)

Extend the motor wires' lengths with pieces of wire and heatshrink over the solder connections.

![hacks_edited_P1380223.png](https://cdn-learn.adafruit.com/assets/assets/000/112/649/medium640/hacks_edited_P1380223.png?1656345846)

## Power Connections
Cut and splice two pieces of wire for the cassette player's battery terminals.

![hacks_edited_P1380226.png](https://cdn-learn.adafruit.com/assets/assets/000/112/650/medium640/hacks_edited_P1380226.png?1656345933)

Solder one wire to the back of the positive battery terminal.

![hacks_edited_P1380228.png](https://cdn-learn.adafruit.com/assets/assets/000/112/651/medium640/hacks_edited_P1380228.png?1656345982)

Solder one wire to the back of the negative battery terminal.

![hacks_edited_P1380229.png](https://cdn-learn.adafruit.com/assets/assets/000/112/652/medium640/hacks_edited_P1380229.png?1656346038)

Now you'll have four wires connected to the cassette player: two for the motor and two for the battery terminals.

![hacks_edited_P1380231.png](https://cdn-learn.adafruit.com/assets/assets/000/112/653/medium640/hacks_edited_P1380231.png?1656346088)

# Walkmellotron: Cassette Player Mods

## Assembly

Run the four breakout wires through the cassette player's battery door. Reattach the back of the player with the four screws.

![hacks_edited_P1380240.png](https://cdn-learn.adafruit.com/assets/assets/000/112/657/medium640/hacks_edited_P1380240.png?1656355972)

Attach the perma-proto board circuit to the 3D printed plate with M2.5 screws and standoffs.

![hacks_edited_P1380249.png](https://cdn-learn.adafruit.com/assets/assets/000/112/658/medium640/hacks_edited_P1380249.png?1656356043)

Slide the plate's notch over the cassette player's belt clip.

![hacks_edited_P1380251.png](https://cdn-learn.adafruit.com/assets/assets/000/112/659/medium640/hacks_edited_P1380251.png?1656356103)

Attach the motor's wires to the motor terminal block. Attach the player's power wires to the power terminal block. Make sure that the positive wire is attached to the positive terminal and that the negative wire is attached to the negative terminal.

![hacks_edited_P1380257.png](https://cdn-learn.adafruit.com/assets/assets/000/112/660/medium640/hacks_edited_P1380257.png?1656356155)

Attach the potentiometer lever and you're ready to start playing with tape loops!

![](https://cdn-learn.adafruit.com/assets/assets/000/112/661/medium800/hacks_edited_P1380263.png?1656356291)

# Walkmellotron: Cassette Player Mods

## Make a Cassette Tape Loop

![](https://cdn-learn.adafruit.com/assets/assets/000/112/672/medium800/hacks_edited_P1380274.png?1656362741)

There are cassette tape loops available for purchase but it is fairly simple to create your own.

Open the blank cassette's case by removing the four screws.

![hacks_edited_P1380275.png](https://cdn-learn.adafruit.com/assets/assets/000/112/673/medium640/hacks_edited_P1380275.png?1656362776)

Remove the two large wheels in the cassette body. Push the roll of magnetic tape off of the wheel. Then, cut the magnetic tape from the wheels using an exacto knife.

![hacks_edited_P1380278.png](https://cdn-learn.adafruit.com/assets/assets/000/112/674/medium640/hacks_edited_P1380278.png?1656362815)

![hacks_edited_P1380283.png](https://cdn-learn.adafruit.com/assets/assets/000/112/675/medium640/hacks_edited_P1380283.png?1656362850)

Warning: 

Cut a piece of magnetic tape that is approximately 8 5/8 inches long.

![hacks_edited_P1380280.png](https://cdn-learn.adafruit.com/assets/assets/000/112/676/medium640/hacks_edited_P1380280.png?1656362907)

Join the two ends of the tape together using cassette splicing tape. Place the tape on the inside of the loop.

![hacks_edited_P1380285.png](https://cdn-learn.adafruit.com/assets/assets/000/112/677/medium640/hacks_edited_P1380285.png?1656362961)

Run the magnetic tape loop through the bottom of the cassette tape housing. Finish installing the loop by placing the loop over the wheel on the right.

![hacks_edited_P1380288.png](https://cdn-learn.adafruit.com/assets/assets/000/112/678/medium640/hacks_edited_P1380288.png?1656362985)

Replace the wheel on the left inside the cassette housing. Close the housing with the four screws. Now you're ready to record a loop!

![hacks_edited_P1380287.png](https://cdn-learn.adafruit.com/assets/assets/000/112/679/medium640/hacks_edited_P1380287.png?1656363049)

# Walkmellotron: Cassette Player Mods

## Usage

![](https://cdn-learn.adafruit.com/assets/assets/000/112/682/medium800/hacks_cropped_P1380292.png?1656426062)

Warning: 

To use the modified cassette player, first you will press play on the player and then switch on the L9110 circuit with the slide switch.

You can use the built-in speaker or a standard 1/8" audio jack cable to get audio out from your tape loop. If you use the headphone jack, you can send the audio signal through effects pedals like reverb and delay.

![hacks_edited_P1380293.png](https://cdn-learn.adafruit.com/assets/assets/000/112/683/medium640/hacks_edited_P1380293.png?1656426172)

Turn the potentiometer to affect playback speed and direction. Press the button to get the warbling speed up effect.

The motor speed can also be used while recording to a tape loop. This can give you more or less recording time, as well as unique effects that you wouldn't be able to normally record.

![hacks_turningPot.gif](https://cdn-learn.adafruit.com/assets/assets/000/112/687/medium640thumb/hacks_turningPot.jpg?1656427846)


## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Adafruit MCP4728 Quad DAC with EEPROM

[Adafruit MCP4728 Quad DAC with EEPROM](https://www.adafruit.com/product/4470)
If you've ever said to yourself, "Gee, I wish I had four 12-bit DACs that came in a single package with the ability to save their settings to an EEPROM", well I have good news. The MCP4728 is the answer to your wishes! Within its little package, the MCP4728 has four 12-bit DACs...

In Stock
[Buy Now](https://www.adafruit.com/product/4470)
[Related Guides to the Product](https://learn.adafruit.com/products/4470/guides)
### L9110H H-Bridge Motor Driver for DC Motors - 8 DIP

[L9110H H-Bridge Motor Driver for DC Motors - 8 DIP](https://www.adafruit.com/product/4489)
Run two solenoids or a single DC motor with up to 800mA per channel using the super-simple L9110H H-bridge driver. This bridge chip is an 8 DIP package so it's easy to fit onto any breadboard or perfboard.  
  
Each chip contains one full H-bridges (two half H-bridges). That means...

In Stock
[Buy Now](https://www.adafruit.com/product/4489)
[Related Guides to the Product](https://learn.adafruit.com/products/4489/guides)
### Alpha Single-Gang 16mm Right-angle PC Mount - 10K Linear

[Alpha Single-Gang 16mm Right-angle PC Mount - 10K Linear](https://www.adafruit.com/product/5280)
This **Alpha 10K Linear** potentiometer is a two-in-one, good in a breadboard or with a panel. It's a fairly standard linear taper 10K ohm potentiometer. It's smooth and easy to turn, but not so loose that it will shift on its own. We like this one because the legs are 0.2"...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/5280)
[Related Guides to the Product](https://learn.adafruit.com/products/5280/guides)
### Soft Silicone Top 6mm Push-buttons (20-pack)

[Soft Silicone Top 6mm Push-buttons (20-pack)](https://www.adafruit.com/product/4183)
This product is really annoying to have to write a description for because it's really something you have to touch to understand! Instead of a hard plastic actuator-button, these have a soft molded silicone button top. The underlying switch is still a clicky dome-switch but you have this...

In Stock
[Buy Now](https://www.adafruit.com/product/4183)
[Related Guides to the Product](https://learn.adafruit.com/products/4183/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### IC Socket - for 8-pin 0.3" Chips - Pack of 3

[IC Socket - for 8-pin 0.3" Chips - Pack of 3](https://www.adafruit.com/product/2202)
An IC (Integrated Circuit) socket allows you to insert and remove chips easily from an assembled kit or project

**This item contains 3 of the 8 pin 0.3" wide version.** Best used with...

In Stock
[Buy Now](https://www.adafruit.com/product/2202)
[Related Guides to the Product](https://learn.adafruit.com/products/2202/guides)
### 2.54mm/0.1" Pitch Terminal Block - 2-pin

[2.54mm/0.1" Pitch Terminal Block - 2-pin](https://www.adafruit.com/product/2138)
After a long day out harvesting in the terminal block fields, we've returned with a veritable bounty of these very nice and compact 2.54mm/0.1" terminal blocks in a variety of sizes.

Our harvest of terminal blocks is great news&nbsp;since nothing makes a project harder to...

In Stock
[Buy Now](https://www.adafruit.com/product/2138)
[Related Guides to the Product](https://learn.adafruit.com/products/2138/guides)

## Related Guides

- [Adafruit MCP4728 I2C Quad DAC](https://learn.adafruit.com/adafruit-mcp4728-i2c-quad-dac.md)
- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Lemon Mechanical Keypad](https://learn.adafruit.com/qtpy-lemon-mechanical-keypad-macropad.md)
- [USB MIDI Host2Host](https://learn.adafruit.com/usb-midi-host2host.md)
- [Three Button Foot Switch](https://learn.adafruit.com/three-button-foot-switch.md)
- [UV Manicure Lamp](https://learn.adafruit.com/uv-manicure-lamp.md)
- [Tandy 1000 Keyboard to USB with CircuitPython](https://learn.adafruit.com/tandy-1000-keyboard-to-usb-with-circuitpython.md)
- [Hexpad](https://learn.adafruit.com/hexpad.md)
- [MIDI for Makers](https://learn.adafruit.com/midi-for-makers.md)
- [Animated Edge Lit Acrylic NeoPixel Lamp](https://learn.adafruit.com/acrylic-neopixel-lamp.md)
- [Cup o' Sound](https://learn.adafruit.com/cup-o-sound.md)
- [Toddler Timer](https://learn.adafruit.com/toddler-timer.md)
- [Pocket PiGRRL](https://learn.adafruit.com/pocket-pigrrl.md)
- [Tyrell Desktop Synthesizer](https://learn.adafruit.com/tyrell-desktop-synthesizer.md)
- [NeoPixel Novelty Cufflinks with Scrolling Text](https://learn.adafruit.com/neopixel-novelty-cufflinks-with-scrolling-text.md)
- [NeoPixel Mini VU Meter](https://learn.adafruit.com/neopixel-mini-vu-meter.md)
- [USB Rotary Media Dial](https://learn.adafruit.com/usb-rotary-media-dial.md)
