Faking Bluetooth LE With An NRF24L01+ Module

Despite the name, Bluetooth Low Energy (BLE) has very little to do with the original Bluetooth, other than its use of the same 2.4 GHz frequencies. This is where [Dmitry] got the idea to use a 2.4 GHz nRF24L01+ module to implement his very own BLE device, without the typical BLE chipset. This should be easy, since this popular IC supports GFSK modulation, 1 MHz channels and the 1 MBit data rate of BLE.

Despite of how simple BLE seems to implement, [Dmitry] quickly came across a range of issues due to limitations of the nRF24L01+. These include no support for a 24-bit CRC, a too sluggish PLL cycling for BLE’s frequency hopping, and as the coup de grâce, a lack for incoming data packets larger than 32 bytes — which destroyed any hope of accepting incoming connections.

Unperturbed, [Dmitry] set to work implementing what would work on this IC: broadcasting BLE packets. In the article he covers the entire code (in C) that allows the nRF24L01+ to send broadcast packets and any BLE-supporting device that’s listening to receive them. Admittedly not as useful as having a fully functional BLE stack, but good enough for broadcasting something like sensor data. It also raises the question of which alternative released in the intervening decade to the venerable nRF24L01+ might fill in the missing features, without making a dedicated BLE IC (or ESP32 variant) look more cost-effective.

It’s always a good day when a new project from [Dmitry] hits the tip line. We’ve previously covered his impressive efforts to add more RAM to the RP2040, and his business card that can boot Linux on an ATSAMD21.

The Tracer board strapped to the frame of a bicycle with a red Velcro strap

Tracer, A Platform For All Things Movement Logging

[elektroThing] is building a lightweight, battery-powered board to track and measure movement of all kinds, called Tracer. Powered by an ESP32, it has a LSM6DSL 6DoF accelerometer & gyroscope sensor, and a VL53L0X Time-of-Flight sensor. A small Li-ion battery in a holder reportedly provides for 5 hours of streaming data over Bluetooth Low Energy (BLE) at 100 Hz. It’s essentially a wireless movement sensor platform to be paired with a more powerful computer for data logging and analysis. What’s such a platform good for?

They show it attached to a tennis racket, saying you could use the data to, for a start, count the strokes done in a given match. They’ve also strapped it to a bicycle’s crankshaft and used it as a cadence sensor – good for gauging your cycling efficiency! But of course, this can be used in more applications than sport. A device like this could be used for logging movement of any relatively nearby objects, be it your cat, an office chair, or a door someone might slam a bit too hard at times. Say, you wanted to develop a sleep tracker and were to collect some data for defining your algorithms and planning your hardware requirements – this would work wonders.

There’s already available example code for streaming data into the Phyphox data logging and graphing app, as well as schematics – hopefully, the full board files will be available soon. A worthy open-source opponent to commercial devices available for similar purposes, this platform is good news for any hacker that wants to do motion measurement projects without reinventing quite a few wheels at once. We are told this board might get to CrowdSupply soon, and we can’t wait! Platforms like these, if done well, can grow an offspring of new projects for us to have fun with, and our paid projects get all that much easier to work on.

We’ve shown projects with such sensors before – here’s one that helps your rifle aim by giving you data to debug your last-second rifle movements, and another that logs movement data from inside a football. There’s a million endpoints you could stream your data into, and we are told you could even use Google Sheets. Just a year ago, we held our Data Logging contest and the entries we received will surely point out quite a few under-explored areas in your daily life!

DropController Sets The Bar For Documentation

dropController has the kind of documentation we wish would spontaneously generate itself whenever we build something. [Martyn Currey] built a robust rig for water droplet photography, and we don’t want to dismiss the hardware, but the most impressive part might be the website. It might not be very fancy, but it’s thorough and logically organized. You can find parts lists, assembly manuals, tutorials, sketches, and schematics. If only all the projects that came our way were so well detailed.

Water droplet photography is pretty cool, although freehanding it will make your patience fall faster than 9.81 m/s². The concept is that a solenoid valve will flicker open to release a drop of water, wait for a certain number of microseconds, and then trigger your DSLR via a wired remote cable. The tricky part comes from controlling as many as six valves and three flashes. We don’t have enough fingers and toes to press all those buttons.

The bill of materials contains many commonly available parts like an Arduino Nano, an LM2596 voltage regulator, some MOSFETS, an HC-06 Bluetooth module, plus standard audio connectors to hook everything up. Nothing should break the bank, but if money is not an issue, [Martyn] sells kits and complete units.

Waterdrop controllers are not the newest kids on the block, and strobe photography is a time-honored tradition.

Continue reading “DropController Sets The Bar For Documentation”

Hackaday Links Column Banner

Hackaday Links: April 26, 2020

Gosh, what a shame: it turns out that perhaps 2 billion phones won’t be capable of COVID-19 contact-tracing using the API that Google and Apple are jointly developing. The problem is that the scheme the two tech giants have concocted, which Elliot Williams expertly dissected recently, is based on Bluetooth LE. If a phone lacks a BLE chipset, then it won’t work with apps built on the contact-tracing API, which uses the limited range of BLE signals as a proxy for the physical proximity of any two people. If a user is reported to be COVID-19 positive, all the people whose BLE beacons were received by the infected user’s phone within a defined time period can be anonymously notified of their contact. As Elliot points out, numerous questions loom around this scheme, not least of which is privacy, but for now, something like a third of phones in mature smartphone markets won’t be able to participate, and perhaps two-thirds of the phones in developing markets are not compatible. For those who don’t like the privacy-threatening aspects of this scheme, pulling an old phone out and dusting it off might not be a bad idea.

We occasionally cover stories where engineers in industrial settings use an Arduino for a quick-and-dirty automation solution. This is uniformly met with much teeth-gnashing and hair-rending in the comments asserting that Arduinos are not appropriate for industrial use. Whether true or not, such comments miss the point that the Arduino solution is usually a stop-gap or proof-of-concept deal. But now the purists and pedants can relax, because Automation Direct is offering Arduino-compatible, industrial-grade programmable controllers. Their ProductivityOpen line is compatible with the Arduino IDE while having industrial certifications and hardening against harsh conditions, with a rich line of shields available to piece together complete automation controllers. For the home-gamer, an Arduino in an enclosure that can withstand harsh conditions and only cost $49 might fill a niche.

Speaking of Arduinos and Arduino accessories, better watch out if you’ve got any modules and you come under the scrutiny of an authoritarian regime, because you could be accused of being a bomb maker. Police in Hong Kong allegedly arrested a 20-year-old student and posted a picture of parts he used to manufacture a “remote detonated bomb”. The BOM for the bomb was strangely devoid of anything with wireless capabilities or, you know, actual explosives, and instead looks pretty much like the stuff found on any of our workbenches or junk bins. Pretty scary stuff.

If you’ve run through every binge-worthy series on Netflix and are looking for a bit of space-nerd entertainment, have we got one for you. Scott Manley has a new video that goes into detail on the four different computers used for each Apollo mission. We knew about the Apollo Guidance Computers that guided the Command Module and the Lunar Module, and the Launch Vehicle Digital Computer that got the whole stack into orbit and on the way to the Moon, but we’d never heard of the Abort Guidance System, a backup to the Lunar Module AGC intended to get the astronauts back into lunar orbit in the event of an emergency. And we’d also never heard that there wasn’t a common architecture for these machines, to the point where each had its own word length. The bit about infighting between MIT and IBM was entertaining too.

And finally, if you still find yourself with time on your hands, why not try your hand at pen-testing a military satellite in orbit? That’s the offer on the table to hackers from the US Air Force, proprietor of some of the tippy-toppest secret hardware in orbit. The Hack-A-Sat Space Security Challenge is aimed at exposing weaknesses that have been inadvertantly baked into space hardware during decades of closed development and secrecy, vulnerabilities that may pose risks to billions of dollars worth of irreplaceable assets. The qualification round requires teams to hack a grounded test satellite before moving on to attacking an orbiting platform during DEFCON in August, with prizes going to the winning teams. Get paid to hack government assets and not get arrested? Maybe 2020 isn’t so bad after all.

Adora-BLE Synth Wails Without Wires

Isn’t this the cutest little synth you ever saw? The matching sparkly half-stack amp really makes it, visually speaking. But the most interesting part? There’s not a wire in sight, ’cause [Blitz City DIY]’s futuristic rig sends the bleep boops over Bluetooth LE.

Hardware-wise, both the synth and the amp are fairly simple. Underneath each of those cute little printed keys is one of those clicky momentaries that usually come with bright button caps in primary colors — the keys themselves just press-fit over the tops. All twelve ebonies and ivories are connected up to an Adafruit Feather, which communicates over Bluetooth LE to a CircuitPlayground Bluefruit (CPB) in the amp. Each time a note is played on the synth, its corresponding color circles comet-like around the CPB’s NeoPixels, which shine through the amp’s speaker grille.

The super interesting part is that all the hard work is happening in the code. Both boards have the same array of colors in rainbow order, and the CPB has an array of tone frequencies that match up one for one with the colors. For every note played, the CPB looks up the color, swirls it, and plays the note. If you want to build one, this project is wide open — [Blitz City DIY] even made a learn guide with all the dirty details. Be sure to check out the demo and extended walk-through after the break.

More in the market for making a computer keyboard? Just grab the nearest ESP32.

Continue reading “Adora-BLE Synth Wails Without Wires”

MIDI Controller In A Concertina Looks Sea Shanty-Ready

Did you know that the English concertina, that hand-pumped bellows instrument favored by sailors both legitimate and piratical in the Age of Sail, was invented by none other than [Sir Charles Wheatstone]? We didn’t, but [Dave Ehnebuske] knew that the venerable English gentleman was tickling the keys of his instrument nearly two decades before experimenting with the bridge circuit that would bear his name.

This, however, is not the reason [Dave] built a MIDI controller in the form of an English concertina. That has more to do with the fact that he already knows how to play one, they’re relatively easy to build, and it’s a great form factor for a MIDI controller. A real concertina has a series of reeds that vibrate as air from the hand bellows is directed over them by valves controlled by a forest of keys. [Dave]’s controller apes that form, with two wind boxes made from laser-cut plywood connected by a bellows made from cardboard, Tyvek, and nylon fabric. The keys are non-clicky Cherry MX-types that are scanned by a Bluefeather microcontroller. To provide some control over expression, [Dave] included a pressure sensor, which alters the volume of the notes played depending on how hard he pushes the bellows. The controller talks MIDI over Bluetooth, and you can hear it in action below.

We’ve seen MIDI controllers in just about everything, from a pair of skate shoes to a fidget spinner. But this is the first time we’ve seen one done up like this. Great job, [Dave]!

Continue reading “MIDI Controller In A Concertina Looks Sea Shanty-Ready”

Which Wireless Is Right Wireless?

Back in the early days of Arduino proliferation (and before you ask, yes we realize there was a time before that too), wireless was a strange and foreign beast. IR communication was definitely a thing. And if you had the funds there was this cool technology called ZigBee that was available, often in funny blue house-shaped XBee boards. With even more funds and a stomach for AT commands you could even bolt on a 2G cell radio for unlimited range. WiFi existed too, but connecting it to a hobbyist ecosystem of boards was a little hairier (though maybe not for our readership).

But as cell phones pushed demand for low power wireless forward and the progression of what would become the Internet of marking Terms (the IoT, of course) began, a proliferation of options appeared for wireless communication. Earlier this week we came across a great primer on some of the major wireless technologies which was put together by Digikey earlier in the year. Let’s not bury the lede. This table is the crux of the piece:

There are some neat entries here that are a little less common (and our old friend, the oft-maligned and never market-penetrating ZigBee). It’s actually even missing some entries. Let’s break it down:

  • Extremely short range: Just NFC. Very useful for transferring small amount of sensitive information slowly, or things with high location-relevance (like between phones that are touching).
  • Short range: BLE, Zigbee, Z-Wave, etc. Handy for so-called Personal Area Networks and home-scale systems.
  • Medium/long range: Wifi, Bluetooth, Zigbee, Z-Wave, LoRaWAN: Sometimes stretching for a kilometer or more in open spaces. Useful for everything from emitting tweets to stitching together a mesh network across a forrest, as long as there are enough nodes. Some of these are also useful at shorter range.
  • Very Long range/rangeless: Sigfox, NB-IoT, LTE Category-0. Connect anywhere, usually with some sort of subscription for network access. Rangeless in the sense that range is so long you use infrastructure instead of hooking a radio up to a Raspberry Pi under your desk. Though LoRa can be a fun exception to that.

You’re unlikely to go from zero to custom wireless solution without getting down into the mud with the available dev boards for a few different common protocols, but which ones? The landscape has changed so rapidly over the years, it’s easy to get stuck in one comfortable technology and miss the appearance of the next big thing (like how LoRaWAN is becoming new cool kid these days). This guide is a good overview to help catch you up and help decide which dev kits are worth a further look. But of course we still want to hear from you below about your favorite wireless gems — past, present, and future — that didn’t make it into the list (we’re looking at you 433 MHz).