Close
0%
0%

Simple Universal Modem

Can it save audio? It can save data too!

Similar projects worth following
The Simple Universal Modem let's you convert data to and from audio - no matter if it's a modern PC, an old MP3 player, a cassette player or a 1972 reel-to-reel tape deck!

Video: https://www.youtube.com/watch?v=k8hlYr6N3Ls

This little board has everything you need to save data from a retrocomputer, a PC, a microcontroller or just about anything else you can think off. On the other side of things it'll save data to pretty much any media that can record and play audio. 

This relatively tiny board of less than 50x15mm gives you an easy way to put any old audio device to good use, especially for era appropriate retrocomputer data storage or just for the fun of putting data somewhere new and interesting. 

Finally you have a good excuse to save that old cassette player and put it to good use instead! 

And even better: If you have some old tapes lying around with invaluable data from the 70's or 80's, the Simple Universal Modem, will make it super easy to read the data with a modern MCU, Arduino, Raspberry Pi, since it has an encoding agnostic demodulation interface. 

To demonstrate how it can be used with old hardware - on both sides - I have successfully saved and played back 1200bps data, in Kansas City Standard format, using my #ABN6502 SBC R1 microcomputer. 

Technical description

On the technical side of things this board has a simple 5 stage RC filter along with an Emitter Follower buffer transistor used for filtering and modulating a square wave into a sine-like signal, that will record and playback better on tape and other old mediums than a harsh square wave that contains harmonics and other sources of analog trouble. 

The demodulator consists of a LM393 comparator set up as a zero crossing detector, outputting a nice clean square wave for digital circuits to decode.

Since there's a significant lack of standardization for TRRS pinouts, the modem simply takes advantage of that and leaves the pins jumper selectable according to the silkscreen text on the back of the PCB. 
That way you can select whether the cable on the other end is a TRRS cable with all four lines, for instance to connect to an Android phone, or an iPhone(Mic is S for iOS, Android the second R), or a minijack -> phono/rca cable. 

Caveats include that you still have to generate a square wave and not just a serial signal, but the positive side to that is that you are less locked in to a certain baud rate(considering the tx RC filter can also be changed with new values), adding to the universality of the board. 

Software suggestions

For my #ABN6502 SBC R1 I simply generate a square wave using Timer 1 and PB7 for TX and count the interval between falling edges using Timer 1 and CA1 interrupts for RX. The source is open for that project too, so check it out. 

If you just need a cheap way to get data to an MCU or retrocomputer, you can use minimodem (available on many linux package managers and homebrew for macOS) to convert a binary to a format of choice for your project. 

For Arduino, etc, using a timer and interrupts should work perfectly fine too - I haven't had the time to try that out though. 

  • 1 × LM393 U1 Amplifier and Linear ICs / Comparator ICs
  • 1 × BC547 Q1 Discrete Semiconductors / Transistors, MOSFETs, FETs, IGBTs
  • 5 × 100nF 0603 C1, C2, C8, C9, C10
  • 4 × 470pF 0805 C3, C4, C5, C7
  • 1 × 1nF 0805 C6

View all 17 components

  • It even works with Microsoft BASIC!

    Anders Nielsen4 days ago 0 comments

    It's hard to make a big sensation from something that does a seemingly simple thing, but I have to say I'm really happy with it - it does what it does and does it well! 

    However, that does mean you have to give it a great big "think" to improve it. I've had suggestions like changing the resistor values to improve the bias level of the LM393, since the range of the comparator actually isn't GND to VCC like you'd expect but only GND to VCC-1.5V. Luckily that didn't even involve changing the PCB. 

    Hopefully I can at improve it a bit more without adding to the cost - it really is supposed to be as cheap as possible. 

    But speaking of PCB - I haven't even ordered it yet, since I'm hoping to order it together with my new #ABN6502 SBC R1 PCB's(they need a few of the actual R1 features moved to the PCB instead of floating in free air :)) 

    For now I've moved it to a tiny little breadboard and featured it in my new video about running BASIC - the Simply Universal Modem play's a big part as I couldn't save and load without it. And it actually worked perfectly the first time!

    Check it out! :D 

  • Demo video out!

    Anders Nielsen07/21/2022 at 04:51 0 comments

    I'm super happy to say the long-awaited video of my Simple Universal Modem is now out on Youtube. 


    You will see me demonstrate the modem in different ways and talk a bit about how howbrewers started using tape in the 1970's and all the details you'll need to make your own is right here on hackaday.io

  • You can now make your own!

    Anders Nielsen07/16/2022 at 20:50 0 comments

    Kicad files, along with a zip of the gerber files, and schematic as PDF has now been uploaded to Github. 

    I haven't ordered boards yet, but if you want, you now have a chance to beat me to it! (Goes without saying the PCB layout is untested)

    https://github.com/AndersBNielsen/SimpleModem

  • Success!

    Anders Nielsen07/16/2022 at 13:43 0 comments

    My 50 year old reel to reel deck has given up all it's secrets and is now spinning along like it was built yesterday. Almost anyway. The motor fan is making a tiny bit of noise, so I will probably have to take the unit apart and adjust the spring holding it, but it is now playing tape perfectly at factory speeds.

    Luckily my guess about the 1.5+0.5uF run capacitor seems to have been right, as the motor now spins absolutely silently with a replacement 2uF (400V rated) motor run capacitor. 

    Luckily I caught another issue at the same time. The motor has some filters to prevent spikes when the motor turns on and off. Let's just say one of these pop filters have popped and I was lucky to get it replaced at the same time - I probably should've replaced both but time was running short. 

    After I barely managed to fix the thing before going on holiday - not intending to bring a tape deck that weighs about the same as the rest of my luggage - I also managed to get some raw video of how it works together with my #ABN6502 SBC R1

    I successfully managed to record and recover data from both my laptop(via external USB soundcard - had a hard time convincing my MacBook an external mic was plugged in) and the tape deck. 

    Strangely I had worse luck when recording the video footage than when I did my first tests with the failing tape deck. My best guess so far is that I messed up the voltage divider values for the comparator reference voltage when I went from a LM339(quad) to an LM393(dual) - it should not be at exactly half VCC if I also bias the input at half VCC. Even if I have some hysteresis to prevent rail to rail noise, it won't have a defined state at reset.
    I think I can solve that issue by replacing one of the 100k resistors in the ref voltage divider with a 120k - giving a zero crossing reference of 2.7 or 2.3V instead of 2.5V.  Either way it shouldn't hurt. 

    My other guess is that the USB-C-hub I threw on my MacBook is noisy when combined with a USB-A external sound card. 

    For now I'm happy with the design of the PCB itself - even if the resistor values are a bit off. You can expect all the schematics, gerbers, and Kicad files on Github very soon and a video about the whole thing on YouTube, soon-ish.. 

  • A modem for a 50 year old reel to reel tape deck

    Anders Nielsen07/10/2022 at 21:13 0 comments

    Beware: There's less about the actual modem in this log and a bit more about restoring an old tape deck! I promise I will get back to the modem another time, after some background info.

    Restoring something old can be a joy and a pain all at the same time. Restoring a Sony TC-252W reel to reel tape deck – with the single purpose of using it as 1970’s appropriate data storage for my 6502 computer – has so far been more of a pain but the small joys of getting it in a little bit better condition, working a little bit better, has so far been worth it.

    When I first got it, the internal parts were so gunked up it was completely useless for anything but spooling a reel onto another. The tape roller couldn’t even be forced into position.

    After a thorough alcohol cleaning of all the old gummed up lubricant and reapplication according to the service manual, it was time to reset all the mechanical adjustment parts.

    After having the poor thing opened about 50 times it was finally in a condition where it would play music at almost enjoyable speed … for about 5 minutes before the single motor system would lose the torque needed to keep the speed up.

    I had myself convinced it was the various wheels putting too much strain on the motor but after meticulously adjusting every roller – that luckily haven’t dried up – it still had the same issue. Just plain slow after a few minutes of playback.

    Until yesterday that is… I was in the middle of preparing to record a video about using it as data storage when… It died. Not even enough torque to start the motor. I could push it into motion with my fingers but it didn’t take much resistance with a finger again to overwhelm it, stop it and lock it up.

    Since I’ve already had the motor apart and relubricated it, I know it’s not in bad condition, but after 50 years the capacitors are the usual suspect.

    Even though it didn’t have any visible damage or leaks I decided to take out the motor run capacitor. My DMM measured 0 of the 1.5uF capacitance, but in DC resistance mode it measured 93 ohms.. That does not sound right. 

    The design of the can is 1,5uF + 0,5uF – I’m not exactly sure why it’s arranged like that(with two capacitors inside the same can) but since they are in parallel on the schematic I will take my chances and replace it with a 2uF can of the same physical dimensions, rather than putting an extra can in there.

    Thinking about it a bit more I see they are in parallel on the schematic but I suspect the wiring diagram will show the extra 0.5uF are only switched in when the screw switch on the back is set to 50Hz. So 50Hz == 2uF and 60Hz == 1.5uF.

    I’m happy I figured that out before I ordered a 1.5uF cap instead of a 2uF. Only downside, I guess, is that this TC-252W will from now on and forever be a European 50Hz tape deck, no matter how the switch on the back is set.

    Let's just hope I actually get it running.. 50Hz or otherwise.

View all 5 project logs

  • 1
    Send gerber files from Github to your favorite PCB manufacturer

    There's a zip with all the usual layers

  • 2
    Source components

    Hopefully you have most in your junk pile

  • 3
    Solder away!

    ..in a well ventilated area

View all 5 instructions

Enjoy this project?

Share

Discussions

Mitsuru Yamada wrote 07/28/2022 at 03:46 point

It's wonderful. I used to use 2-pass assembler in the 1970s on a Hitachi HR68/TR computer with Kansas City standard 300 bps tape recorder interface. I miss the sound.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates