Easily Turn Your Raspberry Pi into an FM Transmitter

RasPi FM Transmitter

Have you ever wanted to be your own radio DJ? [Kevin] has made it easier than ever with his Raspberry Pi FM Transmitter program. The program is written in C. [Kevin] has made source code is available along with a compiled binary.

PIFM allows you to load up any audio file and specify a frequency to transmit. The program will then use PWM to modulate the audio sample through the Pi’s GPIO4 pin. [Kevin] claims that the RasPi alone will only transmit around a 10 cm distance. He says that making a simple antenna out of a jumper wire can increase the distance to around 100 meters. All you have to do is hook up the wire to the GPIO4 pin to drastically increase the range.

The legality of such a transmitter will vary from place to place, so be sure to check out your local regulations before you go transmitting audio on regulated frequencies. If this kind of thing is interesting to you, you may want to investigate ham radio. It’s not all Morse code and old fogies. Some people claim it’s a hacker’s paradise.

[via Reddit]

Controlling RC Toys With The Raspi

signal

An interesting trick you can do with a a fast CPU and a GPIO pin mapped directly to memory is an FM transmitter. Just toggle a pin on and off fast enough, and you have a crude and kludgy transmitter. [Brandon] saw a few builds that turned a Raspberry Pi into an FM radio transmitter and realized a lot of toy remote control cars use a frequency in the same range a Pi can transmit at. It’s not much of a leap to realize the Pi can control these remote control cars using only a length of wire attached to a GPIO pin.

The original hack that turned a Pi GPIO pin into an FM transmitter mapped a GPIO pin to memory, cycled through that memory at about 100 MHz, and added a fractional divider to slightly adjust the frequency, turning it into an FM transmitter. Cheap RC cars usually listen for radio signals at 27 and 49 MHz. It doesn’t take much to realize commanding RC cars with a Pi is possible.

The only problem with this idea is that most RC cars use pulse modulation. For an RC transmitter to send the command for ‘forward’, a synchronization pulse is sent, then a series of pulses and pauses. The frequency doesn’t change at all, something the originally FM code doesn’t do. [Brandon] realized that if he just moved the frequency up to something the RC car wasn’t listening to, that would register as a zero.

All that was left was to figure out the command codes for his RC truck. For this, [Brandon] decided brute force would be the best option. Armed with a script and a webcam, he cycled through all possible combinations until the webcam detected a moving truck. Subtlety brilliant, if you ask us. Of course more complex commands required an oscilloscope, but now [Brandon] has a git full of all the code to control a cheap RC car with a Pi.

Build Your Own Radio Clock Transmitter

NIST

Deep in the Colorado foothills, there are two radio transmitters that control the time on millions of clocks all across North America. It’s WWVB, the NIST time signal radio station that sends the time from several atomic clocks over the airwaves to radio controlled clocks across the continent. You might think replicating a 70 kW, multi-million dollar radio transmitter to set your own clock might be out of reach, but with a single ATtiny45, just about everything is possible.

Even though WWVB has enough power to set clocks in LA, New York, and the far reaches of Canada, even a pitifully underpowered transmitter – such as a microcontroller with a long wire attached to a pin PWMing at 60kHz – will be more than enough to overpower the official signal and set a custom time on a WWVB-controlled clock. This signal must be modulated, of course, and the most common radio controlled clocks use an extremely simple amplitude modulation that can be easily replicated by changing the duty cycle of the carrier. After that, it’s a simple matter of encoding the time signal.

The end result of this build is an extremely small one-chip device that can change the time of any remote-controlled clock. We can guess this would be useful if your radio controlled clock isn’t receiving a signal for some reason, but the fact that April 1st is just a few days away gives us a much, much better idea.

TDOA (Time Difference of Arrival) Directional Antenna

tdoa-antenna-tutorial

We have posted articles in the past on directional antennas such as Yagi antennas used for transmitter hunting otherwise known as fox hunting. Those types of antennas and reception suffer from one major drawback, which is as you get close to the transmitter the S meter will go full scale. At which time the transmitted signal appears to be coming from all directions. To correct for this problem you need to use clever signal attenuators or change to a poor receiving antenna as well as tuning off frequency effectively making your receiver hard of hearing so that only the direct path to the transmitter is loudest.

There is another popular type of antenna that you can build yourself called a TDOA which stands for Time Difference of Arrival. [Byon Garrabrant N6BG]  shared a short video tutorial on the functionality of his home built TDOA antenna. Effectively this is an active antenna that uses a 555 chip or, in [Byon’s] case, a PIC chip to quickly shift between two receiving dipole antennas at either end of a shortened yardstick. In his explanation you learn that as the antenna ends move closer or farther from the source a 640 Hz generated audio tone will go from loud to very soft as the antennas become equal distance from the source. This type of directional reception is not affected by signal strength. This means you can be very close to a powerful transmitter and it will still function as a good directional antenna.

The current circuit diagram, BOM and source code are all available on [Byon’s] TDOA page.

The reason [Byon] used a programmable PIC instead of the 555 for his design is because he wants to add a few more modifications such as feeding back the audio output to the PIC in order to programmatically turn on a left or right LED indicating the direction of the transmitter. Furthermore, he plans on adding a third antenna in a triangular configuration to programmatically control a circle of 6 LEDs indicating the exact direction of the signal. When he finishes the final modifications he can drive around with the antenna array on his vehicle and the circle of LEDs inside indicating the exact direction to navigate.

We look forward to seeing the rest of the development which might even become a kit someday. You can watch [Byon’s] TDOA video after the break.

[Read more...]

Verifying A Wireless Protocol With RTLSDR

rtlsdr_nrf905_rtlizer

[Texane] is developing a system to monitor his garage door from his apartment. Being seven floors apart, running wires between the door and apartment wasn’t an option, so he turned to a wireless solution. Testing this wireless hardware in an apartment is no problem, but testing it in situ is a little more difficult. For that, he turned to software defined radio with an RTLSDR dongle.

The hardware for this project is based around a TI Stellaris board and a PTR8000 radio module. All the code for this project was written from scratch (Github here), making it questionable if the code worked on the first try. To test his code, [Texane] picked up one of those USB TV tuner dongles based around the RTL2832U chipset. This allowed him to monitor the frequencies around 433MHz for the packets his hardware should be sending.

After that, the only thing left to do was to write a frame decoder for his radio module. Luckily, the datasheet for the module made this task easy.

[Texane] has a frame decoder for the NRF905 radio module available in his Git. It’s not quite ready for serious applications, but for testing a simple radio link it’s more than enough.

Build a Cheap Airplane ADS-B Radio Receiving Tracking Station

airplane tracking with ADS-B radio receiving

Do you have commercial or general aviation flying over your home or near your home? Would you like to know more about these airplanes: identity, heading, speed, altitude and maybe GPS data along with even more information? Well then [Rich Osgood] has just the project for you and it’s not that expensive to set up. [Rick] demonstrates using a cheap USB dongle European TV tuner style SDR (software defined radio) tuner that you can get for under $30 to listen in on the Automatic Dependent Surveillance-Broadcast (ADS-B) 1090 MHz mode “S” or 978 MHz mode “UAT” signals being regularly transmitted from these aircraft.

He steps us through configuring the radio to use a better antenna for improved reception then walks through detailed software installation and set up to control the radio receiver as well as pushing the final decoded data to mapping software. This looks like a fascinating and fun project if you live near commercial airways. You won’t need a license for this hack because you’re only listening and not transmitting, plus these are open channels which are legal to receive.

There are some frequencies you are not legally allowed to eavesdrop on—private communications for residential wireless telephones and cellular frequencies to name just a few (Code of Federal Regulations Title 47, Part 15.9). So remember you do have to be careful and stay within legal frequencies even if your equipment is not restricted from such reception. Also note that just because you have a legal right to intercept conversations or data on some frequencies it could be illegal to publicly share the intercepted content or any details on the reception or decoding (just saying for the record).

We wonder if [Rick] could partner with [G. Eric Rogers] to upgrade [Eric’s] motorized telescope airplane tracking system to extrapolate the radio telemeter data into vector data so his Arduino can track without relying on a video feed. That merger might just get them both on a short TSA list.

Join us after the break for some extra informational links and to watch the video on setup, installation and usage of this cheap airplane tracking rig.

[Read more...]

Tape Measure VHF Yagi Antenna

tap measure yagi vhf antenna

Radio direction finding and fox hunting can be great fun and is a popular activity with amateur radio (ham radio) enthusiasts. These antennas are great and are not only good for finding transmitters but also will greatly increase directional distance performance including communicating with satellites and the international space station (ISS).

[jcoman] had a nephew who was interested in learning about amateur radio so [jcoman] figured building and using a cheap and portable 2 meter band VHF Yagi style beam antenna would be the perfect activity to captivate the young lad’s interest in the hobby.

His design is based on [Joe Leggio’s] (WB2HOL) design with some of his own calculated alterations. We have seen DIY Yagi antenna designs before but what makes this construction so interesting is that the elements come together using bits of cut metal tape measure sections. These tape measure sections allow the Yagi antenna, which is normally a large and cumbersome device, to be easily stowed in a vehicle or backpack. When the antenna is needed, the tape measure sections naturally unfold and function extremely well with a 7 dB directional gain and can be adjusted to get a 1:1 SWR at any desired 2 m frequency.

The other unique feature is that the antenna can be constructed for under $20 if you actually purchase the materials. The cost would be even less if you salvage an old tape measure. You might even have the PVC pipes, hose clamps and wire lying around making the construction nearly free.

We were quite surprised to find that such a popular antenna construction method using tape measure elements had not yet been featured on Hackaday. For completeness this is not the only DIY tape measure Yagi on Instructables so also check out [FN64's] 2 m band “Radio Direction Finding Antenna for VHF” and [manuka’s] 70 cm band “433 MHz tape measure UHF antenna” postings. The other Yagi antenna designs featured on Hackaday were “Building a Yagi Uda Antenna” and “Turning an Easter Egg Hunt into a Fox Hunt” but these designs were not so simple to construct nor as cleverly portable.

Follow

Get every new post delivered to your Inbox.

Join 92,339 other followers