Benchmarking Latency Across Common Wireless Links For MCUs

Although factors like bandwidth, power usage, and the number of (kilo)meters reach are important considerations with wireless communication for microcontrollers, latency should be another important factor to pay attention to. This is especially true for projects like controllers where round-trip latency and instant response to an input are essential, but where do you find the latency number in datasheets? This is where [Michael Orenstein] and [Scott] over at Electric UI found a lack of data, especially when taking software stacks into account. In other words, it was time to do some serious benchmarking.

The question to be answered here was specifically how fast a one-way wireless user interaction can be across three levels of payload sizes (12, 128, and 1024 bytes). The effective latency is measured from when the input is provided on the transmitter, and the receiver has processed it and triggered the relevant output pin. The internal latency was also measured by having a range of framework implementations respond to an external interrupt and drive a GPIO pin high. Even this test on an STM32F429 MCU already showed that, for example, the STM32 low-level (LL) framework is much faster than the stm32duino one.

Continue reading “Benchmarking Latency Across Common Wireless Links For MCUs”

Nerfnet Tunnels TCP/IP Over NRF24L01 Radios

There’s an excellent chance you’ve already worked with the nRF24L01. These little modules are an easy and cheap way to shuffle data across a 2.4 GHz radio link at a respectable rate, making them great for remote control projects. But after seeing that others had experimenting with using these radios to transmit digital audio, [Andrew Rossignol] got to wondering if some software trickery could push the envelope even further.

The result is nerfnet, a Linux program that allows you to tunnel TCP/IP over a pair of nRF24L01 modules. The link appears as a virtual interface, meaning everything happens transparently as far as other programs are concerned. Anything that uses TCP/IP to communicate on Linux can take advantage of this low-cost link, albeit at speeds that most of us haven’t had to deal with in decades.

Though it’s not quite as bad as you might think. Latency is around 50 ms, and after some tweaks, [Andrew] has been able to squeeze almost 300 Kbps out of the link. That’s more than enough for terminal work, and some light audio and video streaming isn’t out of the question.

In terms of range, he was able to maintain a fairly reliable connection at a distance of up to 60 meters (200 feet) outdoors. It might not sound like much, but again, you’ve got to take the cost of these radios into account. If you’re looking to SSH into a Raspberry Pi weather station you’ve got in the backyard, a pair of these could get the job done for just a couple of bucks.

The blog post [Andrew] has put together explains the software in fantastic detail if you’re interested in the nuts and bolts of it all. But if you just want to play around with the idea, you just need to connect some nRF24L01 modules to a pair of Raspberry Pis with short SPI wires to cut down any interference, and follow the instructions. Ideally the radios would have external antennas, but it’s not strictly required.

We’ve seen these modules pushed into service as impromptu Bluetooth Low Energy transmitters in the past, but nothing quite like this. While the latency and bandwidth offered by this technique might seem antiquated to modern eyes, it could be the perfect dedicated communication channel for your sensors, smart devices, or home automation projects.

Continue reading “Nerfnet Tunnels TCP/IP Over NRF24L01 Radios”

Intercontinental Radio Communications With The Help Of Fly Fishing Reels

All of us have experience in trying to explain to a confused store assistant exactly what type of kitchen implement you’re looking for, and why it is a perfectly suitable part for your autonomous flying lawn mower. Or in the case of [MM0OPX] trying to find fly fishing reels that are suitable for his  Adjustiwave multi-band VHF-HF  ham radio antenna.

HF radios allow intercontinental communication but require very large antennas which can be tricky to tune properly, and this antenna helps ease both these problems. The basic configuration is quarter wave, linear loaded (folded), vertical antenna. A quarter wave length radiator wire runs up a fibreglass pole, folds over the top, and comes back down, to form a shorter, more practical antenna while remaining the required length. Ground plane radial wires are usually added to improve performance by helping to reflect signals into antenna.

[MM0OPX] expanded this concept by using two pairs of fly fishing reels to quickly adjust the length of the radiators and radials. One reel holds the actual antenna wire while the second holds fishing braid, which is tied to the end of the wire to provided tension. The radials wire is exactly the same, it just runs across the ground.

The four reels are mounted to a plastic junction box, which houses the feed line connector and matching transformer, which is attached to the base of a fibreglass pole with hydraulic pipe clamps. Each wire is marked with heat shrink at defined points to allow quick tuning for the different frequencies. [MM0OPX] tried a couple of wire types and found that 1 mm stainless steel cable worked best.

This being Hackaday, we are big fans of repurposing things, especially when the end product is greater than the sum of its parts, as is the case here. Check out the walk around and build discussion videos after the break. Continue reading “Intercontinental Radio Communications With The Help Of Fly Fishing Reels”

Low-cost, Low-bandwidth Wireless Arduino To Android Communications

android_nfc

[Joe] was experimenting with his Arduino when he started thinking about how he could get it to communicate wirelessly with his Android phone. Bluetooth is an option, but it requires some extra components, and Google’s ADK works as well – just not wirelessly.

Instead, he thought it would be neat to see if he could get the two devices to communicate with a simple magnetic coil. He constructed a small 1cm diameter coil, connecting it to the Arduino via a resistor and diode. Using the Android Tricorder app, he was able to locate his phone’s magnetometer, after which he ran some tests to narrow down the best sample rate and frequency range for communications.

To transfer data between the two devices, he had to bit bang the signal in software, since the Arduino’s UART has a lower limit far faster than the 7 bps data rate he was able to achieve with the magnetometer.

While his wireless Arduino to Android bridge isn’t likely to win any awards for throughput, it is a great proof of concept project. Be sure to check out the video below to see his “poor man’s NFC” in action.

Continue reading “Low-cost, Low-bandwidth Wireless Arduino To Android Communications”