Bluetooth As Proxy For Occupancy

During [Matt]’s first year of college, he found in a roundabout way that he could avoid crowds in the dining hall by accessing publicly available occupancy data that the dining hall collected. Presumably this was data for the dining hall to use internally, but with the right API calls anyone could use the information to figure out the best times to eat. But when the dining hall switched providers, this information feed disappeared. Instead of resigning himself to live in a world without real-time data on the state of the dining hall, he recreated the way the original provider counted occupancy: by using Bluetooth as a proxy for occupancy.

Bluetooth devices like smartphones, fitness sensors, and other peripherals often send out advertising packets into the aether, to alert other devices to their presence and help initiate connections between devices. By sniffing these advertising packets, it’s possible to get a rough estimate of the number of people in one particular place, assuming most people in the area will be carrying a smartphone or something of that nature. [Matt]’s Bluetooth-sniffing device is based on the ESP32 set up to simply count the number of unique devices it finds. He had some trouble with large crowds, though, as the first ESP32 device he chose didn’t have enough RAM to store more than a few hundred IDs and would crash once the memory filled. Switching to a more robust module seems to have solved that issue, and with a few rounds of testing he has a workable prototype that can run for long periods and log at least as many Bluetooth devices passing by as there are within its range.

While [Matt] hasn’t deployed this to the dining hall yet, with this framework in place most of the work has been done that, at least in theory, one of these modules could be easily placed anywhere someone was interested in collecting occupancy data. He has plans to submit his project to the university, to research the topic further, and potentially sell these to businesses interested in that kind of data. This isn’t an idea limited to the ESP32, either. We’ve seen similar projects built using the Raspberry Pi’s wireless capabilities that perform similar tasks as this one.

Thanks to [Adrian] for the tip!

A Ham Radio Answering Machine

For those who grew up with a cell phone in their hand, it might be difficult to imagine a time where the phone wasn’t fully integrated with voicemail. It sounds like a fantastical past, yet at one point a separate machine needed to be attached to the phone to record messages if no one was home to answer. Not only that, but a third device, a cassette tape, was generally needed as a storage device to hold the messages. In many ways we live in a much simpler world now, but in the amateur radio world one group is looking to bring this esoteric technology to the airwaves and [saveitforparts] is demonstrating one as part of a beta test.

The device is called the Boondock Echo, and while at its core it’s an ESP32 there’s a lot going on behind the scenes. It has an audio interface which is capable of connecting to a radio given the correct patch cable; in this case with a simple Baofeng handheld unit. The answering machine can record any sounds that come in. However, with a network connection the recordings are analyzed with an AI which can transcribe what it hears and even listen for specific call signs, then take actions such as sending emails when it hears triggers like that. Boondock also plans for this device to be capable of responding as well, but [saveitforparts] was not able to get this working during this beta test.

While an answering machine might seem like a step backwards technologically, an answering machine like this, especially when paired with Google Voice-like capabilities from an AI, has a lot of promise for ham radio operators. Even during this test, [saveitforparts] lost a radio and a kind stranger keyed it up when it was found, which was recorded by the Boondock Echo and used to eventually recover the radio. Certainly there are plenty of other applications as well, such as using AI instead of something like an Arduino to do Morse decoding.

Continue reading “A Ham Radio Answering Machine”

DIY Walkie-Talkie With ESP32 And ESP-NOW

In a recent article in Elektor magazine, [Clemens Valens] describes the construction and software for an ESP32 walkie-talkie system that uses ESP-NOW for the wireless connection between units, along with a low-cost condenser microphone with a transistor-based preamplifier and an LM386 op-amp for the speaker circuit. In the ESP32 module the built-in DAC and ADC are used for audio in and output, which provide just about enough resolution for voice communication.

So why use ESP-NOW rather than WiFi or Bluetooth? Mostly because of range, power usage and convenience with no SSIDs and passwords to bother with.

The DIY Walkie-Talkie circuit diagram. (Credit: Clemens Valens, Elektor magazine)
The DIY Walkie-Talkie circuit diagram. (Credit: Clemens Valens, Elektor magazine)

ESP-NOW is Espressif’s own network protocol that uses the same underlying hardware as 2.4 GHz WiFi and Bluetooth, but focuses on more basic direct and mesh-style communication. It can be considered to be somewhat like low-level UDP with MAC address instead of IP address, which makes it useful for fire-and-forget traffic such as from IoT devices.

In the past, we’ve seen ESP-NOW control everything from fake security cameras to CNC machines. In fact, we’ve even seen it used in another walkie-talkie a couple years back.

One Less Binary Blob

Open-source software has gone a long way into making modern technology the way it is today. The Linux kernel alone is almost single-handedly holding up the entire Internet, and various other open-source projects allow for more access to computing resources not just because the software is often free, but because it’s possible to look under the hood and modify it for specific needs. Without open-source software available we often run into problems both expected, such as software licensing costs, and unexpected, which often come up because a developer can’t or won’t fix issues or add features. To that end, a group at Ghent University in Belgium are attempting to rectify a problem with the ESP32 by eliminating one of its binary blobs and replacing it with an open source driver.

The ESP32 is famously a low-cost microcontroller with on-board wireless capabilities, but its Wi-Fi functionality currently relies on closed-source software from Espressif. The team is currently working on building a fully working open-source networking stack with the hopes of enabling greater flexibility of these devices but also making things like security auditing possible. The other major goal is to improve low-cost mesh networking which is currently not available with the proprietary driver. Reverse engineering is the name of the game here, both from a hardware and a software level, but current versions of the software already able to send and receive packets.

The source code for the project is available on the team’s GitHub page for any open-source aficionados to take a look at. We certainly hope the project gains some steam, as any new open source project helps all of us using the platform. Open source projects frequently get stymied by a single or small handful of binary blobs too, often with little hope for recourse. Examples include Android being an open-source operating system but generally using the closed-source Google Play suite in practice, or Firefox including support for Adobe Flash. Another great example is that even computers running 100% open-source code once they boot their operating systems, there’s still some black boxes running in the background few of us think about.

Thanks to [Crote] for the tip!

Capacitive Rainmeter Measures The Sky Water Just Fine

If you’ve got a smart home, or you just want to know how soaked your garden is getting in the winter, you might want to measure rainfall. There are a bunch of ways to go about it, and this capacitive rainmeter solution from [Magnus Thome] might just be the perfect solution you’re looking for.

Like many who came before, [Magnus] had experimented with traditional resistive-based sensors using copper traces to measure water levels. As the soil moisture measuring set learned as well, corrosion tends to promise a pretty short life for these designs. Capacitive sensors, on the other hand, can be isolated from the water itself, and thus sense the levels without being subject to such degradation.

[Magnus] pairs the off-the-shelf capacitive sensor with an ESP32 charged with reading it and reporting back to Home Assistant. It’s also outfitted with a heater to keep it at a constant temperature to avoid it freezing over during those cold and snowy Swedish winters.

It’s a tidy way to integrate a quality commercial sensor with a DIY smart home setup. If you’ve been whipping up your own neat sensor networks for your smart home, don’t hesitate to let us know. Video after the break.

Continue reading “Capacitive Rainmeter Measures The Sky Water Just Fine”

Drone Motion Capture, The Open Source Way

If you want to do some really advanced flying with drones, you typically need to be able to track them in space. [Joshua Bird] has whipped up a drone tracking system that can do the job for as little as $20 with millimeter-scale precision.

The system uses four PS3 Eye cameras which can be had second-hand at a cost of just $5 each. They’re modified by removing their IR cut filter, and putting in an IR-passing filter in the form of a cut-up slice of floppy disk. The system tracks the drones via their infrared indicators and the known locations of the four cameras themselves, which the system is capable of mapping out automatically. By using four cameras, the system is robust in the event the view of a camera is occluded. The system can track multiple drones at the same time, with [Joshua] demonstrating it working with two drones each carrying three infrared markers. He has the system set up to send positional updates to ESP32 microcontrollers on the drones themselves, which command the drones to hold them in set positions.

Code is available on GitHub for the curious. We’ve seen other similar work before, too.

Continue reading “Drone Motion Capture, The Open Source Way”

ColorReplica Is A Rainbow At Your Fingertips

Have you ever wanted to match paint to the color of a pillow, or make a website where the primary color matches your favorite shade of electrolytic capacitor? Then ColorReplica is the project for you.

At the heart of this build are two ESP32s, one of which controls the color picker, and the other lights up the 18 WS2812 LEDs and displays information on the OLED screen.

ColorReplica has two modes, ColorPicker and ColorCube. In ColorPicker mode, you just choose what color you want, adjust the brightness level, and choose between static and dynamic modes for the LEDs. [CiferTech] used the ESP32 touch pins extended to pads on the PCB to control different menu variables, which is a nice touch.

In ColorCube mode, there’s a secondary circuit with a color sensor an another ESP32. Once detected, it transmits the color data to the main device at the push of a button. The RGB LEDs turn that color, and shows the RGB, HEX, and HSV values on the OLED screen. If you’d like to make one of these yourself, everything is available on GitHub.

Want something a big more tangible? Check out this color picker that types HEX codes for you.

Continue reading “ColorReplica Is A Rainbow At Your Fingertips”