Sometimes the best builds aren’t anything new, but rather combining two well-developed hacks. [Marc] was familiar with RTL-SDR, the $30 USB TV tuner come software defined radio, but was surprised no one had yet combined this cheap radio dongle with the ability to transmit radio from a Raspberry Pi. [Marc] combined these two builds and came up with the cheapest portable radio modem for the Raspberry Pi.
Turning the Raspi into a transmitter isn’t really that hard; it only requires a 20cm wire inserted into a GPIO pin, then toggling this pin at about 100 MHz. This resulting signal can be picked up fifty meters away, and through walls, even.
[Marc] combined this radio transmitter with minimodem, a program that generates audio modem tones at the required baud rate. Data is encoded in this audio stream, sent over the air, and decoded again with an RTL-SDR dongle.
It’s nothing new, per se, but if you’re looking for a short-range, low-bandwidth wireless connection between a computer and a Raspberry Pi, this is most certainly the easiest and cheapest method.
Interesting hack, especially the transmitter which I hadn’t seen before.
However, easiest and cheapest? How about nRF24L01+? Sells for $3 a pair on eBay and can transmit and receive on both ends at up to 2Mbps rate.
…or the rfm69hw… as the nRF24L01+ max range is probably below 30 meter
How far could this be extended ? Maybe with some additional hardware ?
And what limits this range ?
Tx power and the antenna mainly limit the range. With a linear amplifier and a good antenna, it could transmit reasonably far (limited by line-of-sight more than anything else). BUT, I wouldn’t hook one of these things up to an amp on a bet. First, it puts out square waves, which are inefficient and have a high potential for interference – a lot of the power ends up on odd harmonics instead of at the fundamental frequency. Hardware filtering could suppress the harmonics, but you still have an unstable oscillator because it’s running on an RPi with a non-real-time OS and your frequency will necessarily drift as the processor does other things.
This is a cool hack, I’m not knocking it, but a quality long-range transmitter this most certainly isn’t. There are other, inexpensive ways, to transmit FM if that’s your goal.
A linear amplifier is class a. If you’re transmitting FM then you can get away with a class c amp since all the information is in the frequency and not the amplitude. It’s much more efficient and easier to design. Even so, between the frequency instability of the GPIO pin and the unfiltered square waves, I bet that thing is making a mess of the whole broadcast band in his whole neighborhood!
At those power levels I doubt anyone in his neighborhood will ever notice. Hooking it up to any kind of amplifier though would be a really bad idea.
It does not toggle the pin in software.
It sets a clock generator to modulate FM.
Interesting hack, but PLEASE, for the love our eyes and that’s holy, change the contrast on that waterfall display!!!
*all that’s holy*
(how could I screw that up?!?)
What’s wrong with green on green?
Oh, right.
What’s wrong with red on green?
Great hack. I thought it could not generate a 100 MHz carrier and all they were receiving was an harmonic of a lower frequency but apparently it’s possible to output such a high frequency. Just beware of the interferences you are generating though: this device outputs square waves which means a huge amount of unwanted signals. If you want a more powerful and clean transmitter, couple that pin with a RF transistor based amplifier and add the necessary filtering and impedance matching networks before the antenna. The ARRL Handbook will teach you how to.
Even with filtering I’m thinking the frequency would drift too much. As a short range hack it is awesome but I wouldn’t hook it up to an amplifier.
Even through walls?? You don’t say
Nice find. Wifi would likely be cheaper, faster and better for pi to pc. Heck, it’s plug-n-play.
It is a wonderful hack, but please do not do it unless you are both aware of and in compliance with radio regulations. Building transmitters often requires some knowledge of RF engineering, which is necessary to avoid interfering with other radio services. (Keep in mind, the world is analogue. This often creates unintended consequences.) In some cases you will require a license to create transmitters, but this can be done through your country’s amateur radio service.
I am saying this as encouragement to do things properly, rather than discouraging people from doing it at all. There is a lot of good material out there, both electronically and in print. You can develop amazing projects if you utilize it. (Just ignore some of the naysayers, because they’re interested in protecting their own turf.) By following the regulations we can ensure that such projects remain legal for the decades to come.
(Note: the ARRL is a good starting point, even if you aren’t an American.)
+1
Well said.
if all you need is 300 BITS per second you could use an analog cordless phone and two uControllers at each end programmed as modems. top that off with a protocol of any type and you got radiomodem.
unfortunately i dont believe 9600 is possible through a cordless phone.
i believe the audio bandwidth is less then 5000 … maybe 2000
as for the square waves in this project, i think with appropriate analog output filters and shielding from actual chip to the shielded box with the filter and THEN the 20cm antenna this design could work wonders with speed. modulation speed. 50 simultaneous synthisized parallel …….. mmmm bandwidth
Please, NEVER do such a hack. It’s a great way to create bloody mess in radio.
You don’t HAVE to use 100MHz. The actual limit is – the lowest range the RTL-SDR will pick up. If that’s [for example] 50MHz, you can lower your transmit frequency.
Bonus points for not blatting out in airspace supposedly reserved for commercial radio. Considering the range quoted with a 20cm antenna, that makes for happy neighbors.
I’d still suggest some filtng, but at least a square wave dominates odd harmonics – so using 50MHz should leave 100 MHz fairly clear, while blatting around 150 MHz (amateur radio, some weather satellites).
Public service band at 150MHZ
I experimented with this and successfully transmitted SSTV images over 2m ham frequencies. Add a low pass filter! There are VERY strong harmonics on the odd harmonics, ie, your frequency x3, x5, x7…).
Looks like I didn’t look hard enough for a program like minimodem, I want something simple to be able to create APRS packets.
I had to change the C transmit program to reduce the bandwidth (to maybe 3kHz?) and remove pre-emphasis.
Ditto that — add a band-pass or a low-pass filter. The RPi’s harmonics are all over the damn spectrum.
This kind of hack is fun to read about and I am in no way knocking what Brian Benchoff did. However…
“if you’re looking for a short-range, low-bandwidth wireless connection between a computer and a Raspberry Pi, this is most certainly the easiest and cheapest method.”
No way! http://goo.gl/snDcH9 You can get low-bandwidth transciever modules for about $5! And… you don’t even have to chew up all your CPU power doing SDR.
Agreed! The RTL dongles use too much power, and the SDR uses too much of the processor, and yet even more power. It’s not a good idea for a battery powered project…
The RF little modules are definitely the way to go if you’re trying to build a reliable low power data network! They have the FIFO, modem and integrity checking right on the chip. I made an in house pager with those that keeps me alerted of email, etc.
The hack is the frequency can be between 1-250 MHz.
“i dont believe 9600 is possible through a cordless phone.”
I did 16.8 kbps under poor signal conditions, up to 28.8 kbps with a clean signal. The speed usually fluctuated between those speeds. With a clean signal it would start out at 33.6 kbps but wouldn’t hold, the modems would re-train to 28.8 kbps or lower.
For filtering the 100.MHz square wave you could use a simple 3-pin monolithic FM bandpass filter – most FM radios have these. I use these between my RF gain stages for my xmters.
Implement dstar
Stay away from 50 Mhz peeps….this is An AMATEUR RADIO BAND….
We don’t need crud in the band….
There are frequencies available for low power devices around 49 MHz and 27 MHz…
Cheers though…
I have a drone and want to upgrade it with a Raspberry with a few sensors and a camera. I want those datas transmitted in real -time by radiowaves since the drone is going to far for bluetooth or wifi
the video will be in 1080p that means i need a strong connection that reaches at least 2km
what should i do?
GSM/CDMA :P