Cort Buffington’s madness, documented.

DVR-4004


Another Crazy Project is Born

Quick Links:

DVR-4004 PCB

A while back my friend Darrell, KI4RXJ came to me with a simple request. He was working on putting together a Radio Rally event for the Douglas County ARC (Kansas). He asked if I could put something together that would allow a DTMF sequence to play back a pre-recorded message over the air. I’m sure that he was thinking more along the lines of a commercially available DTMF/relay module (something like this) tied to an equally commercially available audio module (maybe along these lines). A couple of modules and some hardwiring or a breadboard precariously holding the lash-up together long enough for the Radio Rally would have been fine. But Darrell hasn’t spent enough time around me to know he shouldn’t threaten me with a good time! Nope, not me – no modules from Amazon or eBay for this one; I was going to build this one from scratch. I had just a little bit of a motive beyond just Darrell and Radio Rally, more on that later. I was determined to make Radio Rally the #1 priority to ensure I could get it done in time, so out came the big breadboard, a radio, a trusty ISD4004-08MPY, MT8870, MCP6004 and an ATmega328P and we’re off to the races!

DVR-4004 early breadboard concept.

I love the smell of a new PCB in the morning!

I liked working on breadboards more when I was younger. Now I really want to spend just enough time on one to verify circuits and move right into laying out a PCB. This one was a bit of a trick. The ISD “chip corder” uses very low analog audio levels to record – making breadboarding harder than usual. And yes, the ISD chips are basically CCD arrays that hold the analog level in each cell for at least 100 years, and not really “digital”, I digress. Oh yeah, I got in front of myself here: I wanted to use stuff I had kicking around in the basement. I seem to always end up buying components for every project. I had a few MT8870s (also obsolete, but still readily available) and I have several ATmega328Ps in DIP28 that I never carry over to a board. So I decided this was going to be an “eat leftovers from the fridge” project. While on the breadboard, I had minimal software; just enough to prove the concept. I’d done snippets of things in this project before, so it was largely going to be a matter of pulling a piece from here and there and stitching them together. I’ve spent the last 13 years heavily involved in Python on Linux systems and admit my C on AVR skills were rusty. I had about a month and a half to do it all. Confident I could get the software together, I turned to putting together a PCB. And what a dog’s breakfast it is – look at that mix of through-hole and SMD parts! I started off with the notion that I’d do it all through-hole (again, using up parts), but the board started feeling cramped in a hurry. I switched to SMDs for the little stuff.

DVR-4004 PCB Layout

Next came the really interesting part. I’d been using various LLMs integrated with VSCode for updates to my DMR call routing software and a few helper programs. It helped me both finish and port to C (a good example is ipsc2hbpc) several things I was stalled out on for lack of time. Over the last year and a half I’d felt like I had reasonably honed my use of these tools and they’ve gotten substantially better in that time as well. Best of all, they helped me finish off projects that had been sitting in various stages from very little done to almost complete for a long time. I’d not yet used them with MCUs and physical electronics though. It had trouble hallucinating pinouts and pin definitions; I learned to verify everything. But I figured it could handle pulling pieces from other projects and assemble those bits together for the DVR. I’d written a device driver for the ISD4003 previously and the ISD4004 was nearly identical. I had a DDS generator and morse code message sender (I’d need something for telemetry feedback during remote programming)… DTMF decode? Yep, I had an old project for that too. Keeping the LLM out of the physical circuit and focused on pulling the code together from pieces was a good move. I was seeing about a 10:1 “amplification factor” over me working without it. Add a 3D printed enclosure for the PCB, load the basic software for Darrell’s Radio Rally and the project is done. Yeah right. I’m not done yet because…

There’s 32kB of Flash on the ATmega328, Son.

Here is where it snowballed. I was having good luck with the LLM and really, once the basic firmware was in place, it formed a nice framework for the LLM, giving it greater success with less hand-holding. With the existing firmware acting as a set of guardrails, adding DTMF codes and similar action functions (e.g. record message, play message) was almost too easy. Sure the LLM made mistakes or chose the long way around and I had to re-direct it a few times, but 10:1 amplification was holding… maybe even improving. I started to think, ” “I have this piece of hardware that can interface with a radio. It has a functional UI with DTMF as the input and CW as the response. It has timers (ID, DTMF digit timing, Morse character timing, etc.) lots of free flash, what else might it be used for?” I added several other features – variations on the theme, such as playing messages at timed intervals, rotating different messages. And then I was so close, I could add a beacon/fox hunt mode. Super cool! After x transmissions, it could start giving hints about the location of a hidden transmitter! Wait, I have a few I/O pins left on the ATmega; why not add some GPIO? Set outputs, read inputs… better yet, also alarm on inputs. This thing was getting super cool! But adding features was creating a new problem: You can’t assume hams know Morse code anymore (am I that old?) my own skill with it was ever great. What started out as a CW ID and “OK” or “ERR” just wouldn’t do anymore for all of the features I was adding, but there really isn’t any way around this. Or is there?

The Chip Not Appearing on this PCB

I had played with the “talkie” library for Arduino/ATmega a few years back. It emulates my favorite computer voice of all time. No, it’s not Majel Barrett, it’s the TI TMS5220. When I got into amateur radio, this was the voice of an expensive repeater controller. It was the voice of ACC and every other controller that wanted to be like them. We all wanted a repeater that sounded like that. Having one meant you’d made the big time – and you were also driving the local hams bat-shit crazy with all of the constant talking the repeater was doing! I had been working on improving talkie by incorporating pieces MAME‘s TMS5220 emulator. Ok, talkie was based on MAME’s emulator in the first place, but took a few liberties with the complexity and while it sounded pretty good, it was far from spot on. Following the work of others, I’d already committed a pretty good Python TMS5220 emulator, but admittedly, didn’t have much real world use for it – it was good for a nostalgia trip. I could sit around and make it say “THEE TWO METER MEGA MACHINE. N ZERO M J S REPEATER” and get a warm fuzzy. Time for the intern again! What? Who is the intern? My friend Adam, AF0G and I have been referring to coding with LLMs as “the intern” because that’s basically how we treat them. Young, lacking wisdom, but willing work long hours for pennies and try hard to make you happy. Sure, you don’t always get what you’d hoped for, but all things considered, sending the intern off to do the things you don’t have time for is a great way to get a project finished. I asked the intern to do some math and see if my modified talkie library and a few words into the remaining flash. Not only did the intern do that, but it also came back at the same time to tell me it could drop some of the unused features out of the library and save some flash space – bonus! Thanks, intern. I replaced the CW prompts (though kept the DDS CW generator for IDs) with TMS 5220 speech – yeah, this was the right move, “RECORD SEVENTEEN” Is a lot better than “r 1 7” in CW! This project had to be nearing the end, I was down to a few hundred bytes of flash left and running out of kitchen sinks to throw in. Just one more feature?

The Last ACC RC-96. DVR-4004 is on top of the chassis

The Last ACC RC-96 Repeater Controller

At the beginning of all of this, I said I had something of an ulterior motive. Well… yeah. I had thought at the outset that the same hardware with different firmware would work for this other project that needed voice recordings. I might just have enough flash left to add it to what I have – no new firmware load required. A few months prior, my most excellent friend Joe Haas, KE0FF stumbled onto a project to build an ACC RC-96 repeater controller from an acquired NOS, original, unpopulated PCB. I helped with the chassis aesthetics, moral support (I mean, who else other than Joe and I would think this was a great idea?), and a promise to buy it so he wasn’t sitting on a bunch of expenses for another controller he doesn’t need, Joe embarked on the project that you can read more about here. About the time I finished up the version for Darrell and Radio Rally, I had the RC-96 in my possession and had become sure it wasn’t going to be complete without a DVR. But not your dad’s ACC DVR filled with power-hungry SRAMs waiting to lose all of your messages at the slightest loss of flowing electrons. In “ACC mode”, two of the GPIOs are pressed into service to communicate with the RC-96, and the DVR-4004 can now fake an ACC DVR. Yep that’s right: Off-the-shelf, drop-in replacement for the ACC DVR – sans the voice mailbox. Pretty sure nobody cares about voice mailboxes on a repeater in 2026, but it sure is nice for voice IDs, bulletins, etc. The best part? If you match the TMS5220’s clock rate to the TMS5220 emulator, the DVR4004 responds in the same voice (something the original never did), and you can’t tell it’s not the RC-96 talking to you.

Is This Post Over Yet?

Never fear, we are at the end of the story now. It all started with Darrell wanting something to play a message when you key in a DTMF code, and me wondering if it might be integrated with the RC-96 too. Then, as my projects often do, it exploded into a whole bunch more. Radio Rally was a success, the “Last ACC RC-96”, produced 30 years after ACC closed their doors sounds like it was bought with all the options. I became more comfortable integrating “the intern” into this part of my development world, and oh yeah, Darrell gets to figure out more ways to use it now too! Mission accomplished!

Have any Question or Comment?

2 comments on “DVR-4004”

KI4RXJ

Great writeup! Too bad you weren’t able to make the rally. Hope you can join in the spring.

Reply
Joe, KE0FF

What are we gunna do tonight, Cortney?

The same thing we do every night… Try and take over the WORLD!

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux