DTMF generation/decoding

I’m working on a project that will need DTMF encoding and decoding.

Encoding is easily handled in a microcontroller through the use of the DTMF commands, but I’m hoping to avoid having to tie up a micro just for some big, dumb tone generation. Similarly, I’m looking for a simple DTMF decoding solution.

Both of these functions were previously performed by readily-available chips off-the-shelf, but now it seems that said chips are disappearing from on-hand stock, with no simple one-chip solutions to replace them. The encoders can probably be found in salvage, and DTMF decoder kits are still around, but it seems fairly wasteful to have to purchase a kit for one part. Does anyone have any leads on sources for off-the-shelf DTMF encoder and decoder chips?

What exactly is a DTMF? Dual Tone Multi Frequency? Whats that?

It’s what touch tone telephones use.

8-Dale

Oh. So whats he trying to do?

They are getting a little more expensive, but BG still has the chips.

docs.bgmicro.com/pdf/page7.pdf

Aha! Most excellent. Thanks.

Yes, as explained above, DTMF stands for “Dual-Tone, Multi Frequency”, also known as “Touch Tone”, the bleeps and bloops that you hear when you dial a telephone. Aside from their telephone usage, they’re often used in ham radio to control equipment such as repeaters remotely, but DTMF can be used in many other applications where you wish to use up to 16 discrete signals (0 through 9, *, #, A, B, C, and D), either singly or in combination, without requiring a lot of bandwidth, and in a fairly fault-tolerant manner.

In this case, I plan to use them in a simple wireless remote control scheme. Most handheld and mobile radios on the 2-meter ham band come with a DTMF generator and keypad built into them, and are capable of throwing a signal a hellofalot farther than most low-power off-the-shelf wireless transmitters. A key fob transmitter or wireless playstation controller, for example, may have a maximum range of a couple hundred feet. A handheld radio on the 2-meter band can easily throw a signal a mile or so in real-world conditions, and a mobile rig can easily have a range of tens of miles without resorting to fancy antennas on either end of the link.

Just about any audio modulation scheme would work fine for passing control signals over such a radio link, but DTMF has the advantage of there being a keypad already built into most radios, including the one I plan to use for this project.

Hi Semus,

Are you a ham? I’m sure you know that transmissions in the amateur radio bands (you mention 2 meters) must be under the control of a licensed radio amateur.

While DTMF is certainly a way to convey information over the radio waves, the data rate is slow. Why not use packet? Bel 202 (or is it 212?) modem chips are still available.

Well that sounds like you ARE a ham! What’s your call? Although I still think packet would serve you better. TNCs can be had quite cheaply, or even built. Of course, if all you need are a few characters a minute…

I just bought an old Kenwood 2M xcvr at a ham radio auction last Friday. I’m having similar thoughts, but I will go with 300 baud packet.

Alan KM6VV

Yes, I’m a ham - W4TQI.

I do intend to implement packet at a later date - already have a couple of small TNCs that I’ve been tinkering with for passing data - but this is just for preliminary testing purposes. I’m building the DTMF controller as a “quick and dirty” in order to get things running and tested. Once I am satisfied with that, I can move to packet for more bandwidth, which will free up the DTMF decoder for other projects for which it will be quite adequate.

DTMF controller --> Mobility base --> Upgraded communication/control --> Etc.

At the very least, a packet implementation would require a control unit to read the controls, packetize the data, and transmit it. Not too difficult, but if I use DTMF to start, all I need for the basic “get it up and running” stage is an off-the-shelf HT with a keypad, which I already have in hand (no pun intended), with no development needed, other than on the receive end.

Hi Patrick!

Nice to meet you!

Sounds like a good plan! Do you have a really light 2M receiver in mind for your 'bot?

True, but that’s the fun! I think Kenwood has a TNC built into one of its 2M rigs, but it’s a bit pricy.

I have the wireless PS2 Joystick controller running currently on my 'Bot, although my goal is autonomy. I’m more interested in telemetry back from the 'bot.

One could use DTMF there as well, but packet would be more useful. I suppose Bluetooth xcvrs could be used as well. Might even be cheaper! I suspect I’ll need a “debug port” once I get started implementing behaviors.

I’ve got two sensors on the way, an SRF08 ultrasonic ranger, and a DE-ACCM2G accelerometer. The SRF08 is I2C, but as the ACCM2G is two channels of analog, I think I’m going to either just add it to my 18F4620 control processor, or possibly give it it’s own PIC board and talk I2C to it as well. That way, I could off load some pitch/roll calculations.

Alan KM6VV

How about $48 for an open-source KISS TNC, with full access to the TTL-level data lines in both directions?
It’s 2.5 x 3.75 inches, runs on 5 volts, and has an option to use a USB connection for data and/or power.

TNC-X]

I’m still testing and fiddling around with it, but so far, so good.

Design-wise, I’ll be working incrementally, and in phases. I’ve got an old Alinco HT that will probably be the first receiver, and then I’ll see where I want to go from there.

Admittedly, it’s fun tinkering and developing stuff, but progress is nice too, and it provides a “flow” to help the tinkering along. If I were to wait until I had a workable packet-based transmitter, I’d be fiddling with it forever trying to get it just right, and not building on a bot. If I get the wheels on the ground first, then I’ve got something to improve, which is a situation I work better with.

Hi Patrick,

Yeah, that’ll work! It DOES look familiar…

I like the open-source PIC code to control it; I’ll bet it could be expanded to decode commands, and shifted over to I2C if desired. CCS compiled, but that’s OK, I’ve ported from that compiler before. And if no changes are made, it’s fine.

Humm, still need a SMALL xcvr for the 'bot. My recent acquisition weighs more then my batteries (and needs it’s own)!

I agree; it’s too easy to get sidetracked, and forget to get the main project ('bot) running! But it IS fun to combine hobbies!

Wheels? I’m a LEG man! What’s your 'bot project?
73’s,

Alan KM6VV
P.S. Couple more hams on the robot/IK Yahoo list below.

Wow, now I am going to have to get at least a Tech ticket. I have always been interested in VHF/UHF, satellite, and packet. I was licensed as WB7UEF back in 1977, but never upgraded from Novice.

8-Dale

Hi Dale,

Yeah, we HAMS do LOVE our technology!

No more novice, and Tech, General and Extra are all no-code now. Pick up an ARRL tech guide, read it, and go and take your test! Too bad you’re not down here, I gave a 7 week (Saturdays in the Santa Cruz Yacht Harbor) course on the tech license for boat skippers (or anyone else interested). 9 out of 9 taking the test passed! 2 or 3 also got their General! So, it’s not hard. ;>)

Alan KM6VV

Wow, no more Tech either. Well, Tech needed most of the same theory as General anyway.

We’d probably get into a lot of mischief if I was down there! I know the theory for General isn’t that hard. I guess I am just not as interested in antennas and HF stuff. I will probably get more interested once I have two robots operational.

Pretty soon we will need a forum for HamBotics. :smiley:

8-Dale

Hi Dale,

I probably didn’t say that quite right. There are currently Technician, General and Extra class licenses (no Novice or Advanced, and no code requirement).

Yeah, we might have some fun! Just go for the General, it’s easy enough!

OK, you HAVE TO get the 'bots up (legged?) before coming over!

Alan KM6VV
VE

You might see if you can pick up an old used HT from a hamfest, swapmeet, or club swapnet or something. If you have a good club, a quick mention at a meeting that you’re looking for an HT might get you somewhere. I got my Alinco cheap because it’s bigger than most new HTs, the NiCd pack was shot, and the dial encoder only works half the time. It still works perfectly well as a transceiver though, and it’s about half it usual size with the battery removed. The Yaesu VX-110/150 is a fairly small radio, and from what I’ve heard, is fairly bulletproof. Heck, the old Radio Shack HTX-202 HTs are about 1/2 to 1/3 of their usual size when you remove that big ol’ battery, and you can still find them around on the used gear market, usually because the pack (which you don’t need anyway) is dead and they don’t want to replace it.

I’m working towards a tracked roverbot - initially teleoperated, but I eventually plan to integrate autonomous GPS-based navigation while sensing and working around obstacles to get to where it wants to go. I got a GPS module talking to a PIC the other day for another project, so progress is being made on that front as well.

As mentioned previously, the command channel will be via 2 meters (that 145.500 - 145.800 MHz allocation for “miscellaneous and experimental modes” is my best friend). Teleoperation feedback will be via fast-scan ATV on 70cm, with text overlay on the video, and fast-polling APRS data packets on the audio subcarrier. I’ve been working on the camera/overlay/TX/RX/recording for (yet) another project, so a big chunk of that is already done, too.

Legs have their appeal I guess, and a certain amount of “gee whiz” factor, but I prefer wheeled locomotion for its simplicity (less programming and mechanical overhead required to spin a wheel than to coordinate a walking gait), load carrying ability, and the fact that the robot doesn’t need to expend power just to lift its own mass. This isn’t to say that I hate walkerbots - I have both a BRAT and a hexapod, but I still prefer my rollers.

Seamus,

I hear you about the rovers. The rovers are great for high end robotics where weight is not as much of an issue as with walker bots like you have mentioned.

I thought you were still working on the brat? Did you finish it? also, you mentioned video overlay recording, are you going to write text to the video? sounds interesting.

Hi again,

Yeah, that’s what I was talking about, I bought an old Kenwood 2M xcvr! Battery is dead, had a vehicle plug hard-wired into some scrapped battery pack. Received the local repeater OK, but PL (only one) was wrong. I didn’t hear it in my base xcvr, but that might have just been de-sense. I need to put the Bird WM on it. Still a lot of weight for a hexapod.

I’d like to do some more with GPS, but it’s not really needed (or useable) on my sized 'bot. Now on the BIG bot (8" wheels)…

Oh yeah, I copy that! Very ambitious project(s)!

I hadn’t done legs the LAST time I did robots, always wanted to. I’m enjoying the math for the IK needed to move the hexapod. I know, strange!

New sensors on order will require some interfacing code and some telemetry. And now my nephew wants a 'bot!

73s,

Alan KM6VV

The BRAT project is still there - it just hasn’t been doing too well in the fight for parts and attention, lately. I’ll eventually be adding some axes to it, in order to get away from the “foot slide” turning, at the very least.

The video overlay is being implemented a little bit differently in a couple of different projects. The rover will be using a BOB-4 overlay module from Decade Engineering in order to superimpose text relating to operation and telemetry on the returned video, as well as my callsign to satisfy the FCC requirements.

I haven’t done very much with the BOB-4 yet, because I’ve been working with a now-obsolete BOB-3 module for a different project. That one uses an onboard PIC as a controller, but does little more than display my callsign, the date, and maybe a couple other bits of information in the corner of the screen every so often, and then make it go away for a few minutes. It’s all going into a package barely any larger than the BOB module though (the size of an old 30-pin SIMM stick), so it’s not the roomiest of installations.

Interestingly, I’ve discovered that these overlay modules make absolutely fantastic debugging tools. Rather than depending on a little debug window on the PC, or a 16x2 LCD character module, I have a 40x16 video screen to fill up with all the text I need, interfaced with a simple servo-cable serial connection - it’s great!