StevenCombs.com

Logo

Thoughts from Steven as he goes "combsing through the minutia" to discover tech, retro-computing, gadgets, Google, higher education, physical computing, and sci-fi.

19 July 2020

retroCombs: The Tapuino Project - Build an Arduino powered Commodore Datasette clone

by Steven B. Combs, Ph.D.
tags: commodore - datasette - cassette - retro-computing - arduino - plus4 - ted - tap

As part of my Commodore Plus/4 series, chapter three, of the user’s manual, includes a sections on using a datasette and a disk drive. In a previous post, I created the modern replacement for the disk drive, now it’s time to create a datasette replacement called, the Tapuino.

“What’s a Tapuino,” you ask? It’s an Arduino-based modern replacement for the Commodore Datasette. For this project, the inexpensive Arduino Nano version along with some easy to source electronic components. You can learn all about the Tapuino on the Sweetlilmre’s 1337 beef: Building the Tapuino R2 blog post.

NOTE: While this post focuses on the Tapuino for a Commodore Plus/4, this build will also work with a C16 or other TED series Commodore computer. If you want to use the Tapuino with a VIC-20, C64, or C128, you only need to replace the 7 pin DIN connector with this C2N Power Adapter that will also allow you to tap power from those computers for other projects.

Sweetlilmre’s (Is that pronounced, “Sweet Lil Marie?”) original blog post was written in 2015 and things have changed since then. His build uses veroboard to mount the Tapuino components. I’m not going to use veroboard, but will only breadboard the Tapuino. Later on, I will my working Tapuino to a solderable breadboard and create a custom 3D printed case.

This post and the companion video will include updates to build materials, layout, imagery, parts sourcing, and processes. Before you read this blog post, I recommend you watch the video below. It shares my build process and first use of the Tapuino. Hopefully you will also have a little fun along the way.

YouTube Video: retroCombs: The Tapuino Project - Build an Arduino powered datasette clone for the Commodore Plus/4

In the video below, I breadboard and operate a Tapuino:

Let’s get this project started by listing all the materials necessary.

Bill of Materials

The list below includes everything you need and the most convenient way I’ve found to source the items. The problem is that you simply can’t purchase some items as a single unit and will end up with extras. Not a problem for someone like me who has several projects on the bench at a time, but if you want the cheapest way to a Tapuino, I recommend you purchase a kit or a completed unit.

Below is my list of materials:

Makers or electronic hobbyist probably have many of these items (I did!) and only need to purchase one or two of the items above. I did splurge for this project with the purchase of the multi-color momentary switches and the all-in-one LCD display with I2C backpack (I had them as separate items). I did not have a 4n25 optocoupler.

Tools

  1. Wire Stripper - I really do think this is the best $10 I’ve spent for my electronic projects.
  2. Soldering Iron/Station - This is an inexpensive station that I recommend.

Fritzing Time

The first step in my process was to use a regular breadboard to build the Tapuino based on Sweetlilmre’s original Fritzing file, as shown below:

Tapuino Fritzing Layout

Afterward, I played around with the layout to streamline, and or, update part locations. Very little changed from the original because it was already efficient; however, I was able to locate updated Fritzing parts and took a different approach to labeling the cable connection. A Fritzing image of my layout is below as well as a download link for the original .fzz file.

My Fritzing Layout

Download my Fritzing File

Building the Tapuino

Building the Tapuino is demonstrated extensively in the video; however, below are additional thoughts and tips:

  1. While Fritzing allows me to document my build, the other advantage is that I become more familiar with the layout and how the components operate. This came in handy when troubleshooting (and there was a lot of that).
  2. I’d not used an 4n25 optocoupler; or opto-isolator (which is why it took me a few times to say it correctly in the video). It’s an interesting device. Sweetlilmre’s site doesn’t explain what it does, so I did a bit of research. Wikipedia says an optocoupler “is an electronic component that transfers electrical signals between two isolated circuits by using light. Opto-isolators prevent high voltages from affecting the system receiving the signal.” Here’s the data sheet if you’d like to learn more.
  3. Add the components to the breadboard first and then cut your wires. I use a pair of Harbor Freight wirestrippers. For $10, they are well worth the it.
  4. Speaking of breadboards, I’m still not sure why the original Arduino or the header pins kept popping out. It’s very odd. Its as if the connectors are smaller than the connectors on my other breadboards. It must be a manufacturing error, but I’m not giving up on it since resistors and other components with small leads work.
  5. You can install the software on the Arduino before connecting it to the breadboard. It will make things easier and also ensure you don’t accidentally destroy the Arduino. What’s that you ask? How does that happen…
  6. My Fritzing image has a warning and I’m serious, do not connect the Arduino to USB power while connected to the Plus/4. You will throw 10v across the circuit and you will smoke the Arduino. How do I know? Because I have a burned up Arduino in the trash can. This warning was on Sweetlilmre’s post, but somehow I missed it. When I was troubleshooting a cable issue (see Building the Cable below), I thought I could keep the Arduino plugged in to power the LCD. Oh, it turned on, but for about a second and then smoke began to rise from the Arduino. I immediately turned off the Plus/4 and luckily, the only component harmed was the Arduino. I purchased in threes, so I grabbed another, reloaded the software, and I was quickly back where I left off.
  7. I recently purchased a proper variable temperature soldering iron for $35 along with a series of tips. I’m surprised at how much better I solder with proper tools instead of those cheap single temperature plug-in units. I would not have been able to solder those tiny CAT5 wires to the tiny connectors on the 7 pin DIN. If you don’t have a good iron, get one and save yourself some frustrations with your electronic projects.
  8. The pinout on the SD Card module with built-in level conversion I purchased was different than the one used by Sweetlilmre. The connectors were also named differently; however, it was an easy conversion and this is one change I got correct on the first attempt!

That concludes my additional tips and thoughts. I’ll add others as I think of them or use the Tapuino. Additions will be date-stamped. Leave comments below if you think I should include other comments or have questions.

Building the Cable

While I could include these in comments in the section above, this inclusion was substantial enough to warrant its own section. First, a shout-out to AWSM.de for providing this wonderful tape connector conversion reference image:

AWSM's C64 to TED Tape Connector Chart

I originally tried to use another diagram from another site and found after a first attempt, I wired the cable incorrectly. Everything was mirrored. I discovered the error when I noticed that the Tapuino powered on, but the display was blank. When I placed a volt/ohm meter on the breadboard positive and ground rails, I discovered the Commodore Plus/4 was sending -5v to the Tapuino. Aha!

When I fixed the polarity, by swapping the wires on the rails, the Tapuino display was correct but the unit wasn’t working properly. It would recognize the Tapuino trying to send or save a Plus/4 program, but it would never release the Plus/4. That led me to believe that there were other incorrect connections.

After a few check against the image above, I found all the connections, minus the sense pin, were mirrored. The good news, I didn’t have desolder the connector or the wires on the header pins. I slipped the pins out of the header and reordered them. “Presto-changeo!”

Rewiring the Tapuino connector without re-soldering

Preparing and Uploading Software

This is another process that deserves its own section. Once the Tapuino is built, it’s a simple matter to download and install. I demonstrate each step in the accompanying video; however, below are the steps and additional thoughts and tips:

  1. Download the zip archive - you can download directly to a microSD if you want to save a step later; however, I always download to my computer first, make changes, and then keep a copy locally for problems.
  2. Extract the file - the archive includes several files. You need them all!
  3. Rename the extracted folder to tapuino - This is required or the tapuino.ino file won’t be able to find the support files and upload them.
  4. Rename, or copy, the config-user.h.example configuration file to config-user.h.
  5. Modify the configuration file to match the hardware and language - here’s what my file looks like:

     //*****************************************/
     // User selectable configuration settings
     //
     /******************************************/
    
     /******************************************/
     // LCD Definitions
     /******************************************/
    
     // uncomment one of these sets for your specific LCD
     #define LCD_USE_1602_LCD_MODULE
     #define LCD_I2C_ADDR 0x27 // I2C address for the LCD
     // #define LCD_USE_SSD1306_OLED_MODULE
     // #define LCD_I2C_ADDR 0x3C // I2C address for the OLED
     // #define LCD_SSD1306_BIG_FONTS // define this for ... bigger fonts...
    
     // choose one of these depending on your display
     // #define LCD_SSD1306_128x64
     // #define LCD_SSD1306_128x32
     // #define LCD_USE_SSD131X_OLED_MODULE
     // #define LCD_I2C_ADDR 0x3C // I2C address for the OLED
    
     /********************************************/
     // Language Definitions
     /********************************************/
     // uncomment one of these for your language
     #define TAPUINO_LANGUAGE_EN
     // #define TAPUINO_LANGUAGE_IT
     // #define TAPUINO_LANGUAGE_TR
     // #define TAPUINO_LANGUAGE_ES
     // #define TAPUINO_LANGUAGE_DE
    
  6. Start the Arduino IDE - I use Linux but this process is similar on other platforms.
  7. Navigate into the tapuino folder and load the tapuino.ino file - that will load also load the support files.
  8. In the Tools menu, select the Arduino Nano and the correct serial port.
  9. Upload the program to the Arduino Nano - I receives an out-of-memory error, but everything worked, so I ignored it.

Prepare the microSD Card

You will need the smallest microSD card you can find. I only had a 32Gb card and this is overkill! If I could find a 1, 2, 4, 8, or 16 that would be fine, but you can’t even purchase them in these configurations!

Format the card as FAT32. You can place directories on the microSD but keep them 16 characters or less and the shorter the better. In my demonstration, I have a games folder with three .tap files with long names. The Tapuino will scroll longer file and folder names.

UPDATE 2020-07-22: The animated .gif below is a short “copying .tap files to the microSD card” demonstration:

Copying files to the microSD card

When you save a file from a Commodore computer using the SAVE command, the Tapuino will create its own recordings folder. As far as I know, there is no way to delete these files from the Commodore computer. You will need to remove the microSD and perform that function on a computer.

Looking for Plus/4 .tap files? I recommend Plus4world’s tape index. I would imagine any program released on cassette is archived but be careful, you have to select the right video version (PAL or NTSC). PAL specific programs will not work on an NTSC computer and vice-versa. And that’s a real problem. If you own an NTSC Plus/4, like I do, you will find that you can’t enjoy the majority of Plus/4 games. Most titles were PAL only since the computer was more popular across the pond.

Once the microSD is prepared, ensure the Tapuino power is off and place the microSD into the card reader.

You can now turn on power to the computer and that will also power the Tapuino.

Tapuino Menu Usage

The Tapuino includes four buttons to navigate the Tapuino interface as shown in the table below:

Button Usage
1 Select
2 Abort/Back
3 Down
4 Up

To display the contents of a directory, navigate to the directory and push button 1 (Select). If you need to stop a program from saving or loading on the Tapuino, you can push button 2 (Abort). The navigation is intuitive after a few uses.

On an early drawing of a custom case I am designing, I have these buttons labeled. I’m not sure that is necessary, but it will be helpful for new users.

NOTE: One menu item on the Tapuino you must visit in order to use with a Plus/4 is Options / Machine / C16. This configures the Tapuino to act as a 1531 Datasette. I’ve not found what this option does to make the Tapuino operate differently. If anyone know, please drop a comment below.

Final Thoughts

I LOVE this project so much. It hits all my favorite hobby ticks; Commodore retro-computing, physical computing, and electronics kits. With the Tapuino built, it will also get to my next favorite hobbies of 3D modeling and printing as I design and build a custom case for my Tapuino. Stay tuned for that post and video.

I’m not sure how often I will use the Tapuino since the Pi1541 is faster, but if there is a random .tap file out there, at least I know I can load it. With the Tapuino, I can also return to my Plus/4 User’s Manual series since I can finally cover chapter 3 which requires a cartridge, disk drive, and datasette.

References

Huge thanks to Sweetlilmre for the original instructions. This would not have been possible with our his/her amazing original work. I hope I have added something to the build!

comments powered by Disqus