Decoding RF link using a PC soundcard

[Ray] wanted to use a microcontroller to send signals to some wireless power outlets. Instead of tapping into the buttons on the remote control he is using an RF board to mimic the signals. There are two hurdles to overcome with this method. The first is to make sure your RF module operates on the proper frequency. The second is to get your hands on the codes that are being sent from the remote control unit.

Now you could just hook your oscilloscope up to the transmitter and take a look at the timing of the signals. But most hobbyists don’t have that kind of high-end test equipment in their basement or garage shops. [Ray's] approach uses something we all have available to us: a sound card and some open source software. He connected the data pin from his RF receiver to an audio plug and inserted it in the line-in jack of his computer. Using Audacity he recorded the signal as he pressed buttons on the transmitter.  This method not only captures the data, but the time stamps native to the audio editing program let him easily work out the timing for each signal.

It’s kind of amazing what you can do with this audio analyation technique. Earlier this year we saw it used to measure response time for DSLR cameras.

Comments

  1. tz2026 says:

    I used Audacity to record J1850 before I had an ELM327 and to record the datastream and audio from my Valentine One radar detector.

    Caution! If your sound card is DC coupled you can fry the input.

    But anything within the bandwidth can be logged.

  2. hpux735 says:

    This is a great way to capture signals. If you want to protect your sound card, it’s not a bad idea to install a op-amp as a voltage buffer, provide it +/- 1 volt supply, and ac-couple the output (small value capacitor inline).

  3. Alex Henrique says:

    I wonder if it would be possible to use the arduino itself to capture and analyze the signals.

    http://dangerousprototypes.com/forum/viewtopic.php?f=23&t=1970&p=19240#p19240

    • Ray says:

      That should be possible. But considering the amount of work to program the Arduino for what you need, and the potential limit on the sampling rate, it’s probably easier to use a sound card.

    • Grawp says:

      Actually I used ATmega for digital sampling once to get precise timing informations when I was debugging 433MHz on-off modules.

      The problem is sampling rate and communication. I sampled only digital transitions and their times and I had to buffer them because the serial link was too slow.
      So real-time osciloscope from Arduino is not possible IMHO for practical applications.

      • Alex Henrique says:

        Great!!! Capture signals, buffer and send to terminal or aplication. Thanks!!!

      • Whatnot says:

        I’m sure there are simple to implement ready-made chips to do the sampling and reduce the load, and probably from various manufacturers and design.
        After all there are many instances where some sampling is needed and it’s typically something that can be baked in cheap chips.

  4. AussieTech says:

    Neat hack, but “analyation” Wut?

    @NewCommentor1283 – good in theory, except go look at some datasheets – most op-amps simply won’t work with such a low supply voltage.

    • NewCommentor1283 says:

      thats exactly what i wanted to say to the other guy… ive never seen a opamp that will work with less then 4v single or +/- 3v…

      in this case you would want to limit BOTH the input AND the output… only takes 5 passive parts, 6 parts with POWER opamp chip.

      2 clamp diodes and one resistor, resistor for extreme over voltage input protection
      the 6th part is over current protection during output limiting; only for poweropamp

      • Oliver Heaviside says:

        he said “most op-amps simply won’t work with such a low supply voltage”, and the key word is most.

        They exist – you need ~ .7vdc difference unless you want really expensive parts, but I’ve used microvoltage/micropower opamps that worked pretty well.

        For this, I’d just use a resistive pad.

  5. wowme@wtf.com says:

    What? No Raspberry PI today?

    • AC says:

      I know. Actual interesting informative content! CRAZY!!

    • AC says:

      This is actually a perfect application for Software Defined Radio using the RTL_SDR dongles. They can receive the entire band that these consumer electronics operate on, and you have the full power of GNURADIO to analyze the captures. Transmitting is another story, but just analyzing the communications is the first step, and harder step in my opinion.

  6. Dave says:

    I’m pretty new to these kind of things..

    Would it be possible to connect a transmitter to the audio out plug, and “play” the signals to interact with the rf receivers?

  7. Dave says:

    Note that this is a receiver, which receives signals. If you want to send RF signals you need a transmitter.

    I knew _that_, but thanks for mentioning it.

    Thanks for all the help. Will post about my findings. :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,613 other followers