[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.
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.
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).
i think you mean “limit” the “output” to +/- 1 volt. ???
Yep, that’s what a buffer Op-amp with a +/- 1 volt supply would do. It isn’t possible for the op-amp to exceed its supply voltage (baring massive failure)
I would just use this instead and not rely on the input protection diodes of the op-amp to clip the signal. Although… one can just stack two diodes in series with respect to each rail and do it that way.
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
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.
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.
Great!!! Capture signals, buffer and send to terminal or aplication. Thanks!!!
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.
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.
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
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.
What? No Raspberry PI today?
I know. Actual interesting informative content! CRAZY!!
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.
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?
This is a VERY interesting thought. I just tried it and it actually works! What I did was to use an RF transmitter, provide 5V Vcc, and the data pin is connected to the audio out (either of the stereo channel) from the sound card. Then when I play back the wave it successfully triggers the power socket. The trick, however, is to adjust the volume to a high enough level (I maximized the volume) so that the audio output can drive the RF transmitter.
Thank you for the reply. Could you provide the schematics for the transmitter build?
I’m considering making something like this, just for the fun of it. However in Europe these things work on 433 Mhz.. :/
I guess my skills are too limited..
Would this one be almost thesame?
http://store.qkits.com/moreinfo.cfm/rx433
It’s a 433… Let me know, thanks.
Well, not sure what sort of schematic you are looking for, but the connection is pretty straightforward. Check this hand-drawn sketch:
Sorry, the sketch image is at:
http://rayshobby.net/wordpress/wp-content/uploads/2012/07/rf_audio_transmit_skecth.jpg
Sure, the module you gave in the link works fine. Note that this is a receiver, which receives signals. If you want to send RF signals you need a transmitter.
Just use a transistor with whatever input voltage you need to trigger the transmitter, then you wont have to max your volume.
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. :)
Ray, what band transmitter did you use connected to the audio jack? 315, 433 MHz? This is the most exciting solution I’ve heard of yet. I am trying to automate 6 remote ceiling fans and garage doors in my own home and the only solution I’ve found are cannibalizing weak 304MHz transmitters or building one myself. If you’re using an easily attainable transmitter of a different frequency, the problem has been solved. I’m thinking RPI with sound bites for each remote command driving one transmitter connected to some app like Blynk in conjunction with Alexa.