Robot Listens To Commands–Literally

Where you might see a can, [Adam Kumpf] sees a robot. [Adam’s] robot (named [Canny]) doesn’t move around, but it does have expressive eyebrows, multicolored eyes, and a speaker for a mouth. What makes it interesting, though, is the fact that it receives audio commands via the headphones it wears. You can see [Canny] in action in the video below.

The headphones couple audio tones to [Canny’s] microphone using AFSK (audio frequency shift keying). [Canny] uses an opamp to bring the microphone level up and then uses a 567 PLL IC to decode the audio tones. [Adam] selected two clever frequencies for the mark and space (12345 Hz and 9876 Hz). In addition to being numerically entertaining, the frequencies are far enough apart to be easy to detect, pass through the headphones with no problem, and are not harmonically related.

The 567 IC detects only one of the tones. Ignoring one tone is not always great for noise rejection, but for this use should be more than adequate and cuts the parts count down. To avoid false commands, the data contains markers, lengths, and checksums. The 567 feeds the Arduino, which handles all the robot control.

How do you create the sounds that go to the headphones? You use a Web page. Of course, you could generate the low baud rate tones in other ways, too. AFSK modems are common in Ham radio circles, and there are certainly plenty of modem designs. Then again, there is something pleasing about the simplicity of this circuit. The appeal of [Canny] doesn’t hurt any, either.

14 thoughts on “Robot Listens To Commands–Literally

  1. My real interest in making Canny was to experiment with building a communication channel that is designed to still work 20+ years from now. Since the way we hear is likely to be rather fixed (in the sense that sound is mechanical vibration) using audio to program seemed like a good candidate.

    Granted, the tin can, servos, and other parts of the robot won’t make it nearly that far, but in principle, as long as there are audio players, Canny could still be updated without special cables or connectors.

    1. Why would the parts you mention not make it 20 years into the future? Tin cans and windings are pretty time-proof if not exposed to the elements..
      And 20 isn’t that incredible long.

  2. Yes, this is a real benefit. I’ve been experimenting with Morse code for this reason but in a different scenario: I have little circuits around the house that need to display data on a screen. So they beep/flash out their info using Morse code. There are Morse code apps for android that can listen/see and display for the circuit. No need to add a display to my circuit (I already have one with me). No Wi-Fi to worry about (sometimes out of range while in my greenhouse), no Bluetooth to connect/configure, no additional circuits necessary other than an led(flash Morse), and/or headphone speaker(tone Morse). There will always be an app Morse code translator on future devices.

  3. My daughter has one of those furbies… There is a app for our tablet so she can play games on the tablet and the furby reacts. The app emits a super high frequency (much like the above robot) to communicate with the furby. It drives me crazy b/c Im the only one in the house that can hear it.

  4. Not harmonically related? 12345/9876 = 5/4, exactly, which is a pretty close harmonic relationship; they’re the fourth and fifth harmonics of 2467 Hz. Interestingly (if you’re some kind of math nerd), if you take the nine digits 123456789 and divide them into two piles, one increasing and the other decreasing, this is the *most* harmonically related pair you can get. Next closest is 2457 and 98631, the 7th and 281th harmonics of 351 Hz.

        1. Not sure the headphones would produce such a frequency. Must try : piezo buzzer tuned up to inaudible and canny somewhere in the room. See if it would be able to create such “inaudible” morse.

    1. Indeed, the frequencies are exactly related by 5/4 (but that’s okay in this case).

      A lot of modem techniques use frequencies that need to be harmonically distant, but for this particular setup it wasn’t important. Canny’s audio-to-UART converter is really just a very tight bandpass filter (via a PLL/Tone Decoder) centered at the high frequency; the low frequency just needs to be outside the filter enough to fall below the trigger threshold. While silence could be transmitted instead of the low frequency, the rapid change in amplitude seemed to reduce reliability (so I used another fun number instead).

      Math nerdiness is always appreciated – thanks for crunching the numbers!

      1. So why not use the DTMF tones? Those can not only be easily generated but even modern phones can send them, so you can call the robot on speakerphone and give commands with the keypad.
        I think the 567 was originally designed for use with DTMF (amongst others).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.