Cast Spells on Devices with This Magic IoT Wand

Sam March can now "magically" control smart outlets with a wand that detects gestures and sends them via Bluetooth.

As stated best by the writer Arthur C. Clarke, "Any sufficiently advanced technology is indistinguishable from magic." Internet-connected homes can certainly feel like magic sometimes, as every appliance, light bulb, and outlet can all talk to each other and relay information for increased convenience and efficiency. However, just saying a command to your favorite digital assistant or pressing a few buttons on an app isn't that fun, which is why Sam March decided to invent a novel way of activating smart outlets — through a magic wand. By performing certain gestures, the user can cast "spells" on specific outlets through Bluetooth.

How Bluetooth beacons work (in a nutshell)

Bluetooth is a set of communication protocols that operate on the 2.4GHz frequency across several channels. It's great for creating decentralized networks that send and receive smaller chunks of data, including as Internet of Things (IoT) devices or wearables. For Bluetooth Low Energy (BLE), a host device will broadcast various bits of information about itself, such as its name, transmit power, manufacturer information, and certain services at regular intervals.

So what if instead of having to connect to a BLE server to retrieve information, the client device could just read the information directly from the advertising packets instead? That's the idea behind Bluetooth beacons, and in this case, the wand broadcasts the current gesture in the manufacturer data for the smart plugs to read.

Electronic components

At the heart of the wand is a small, super low-power Dialog Semiconductors DA14531 microcontroller that handles all of the logical and IO operations. It communicates with the BLE module to send and receive Bluetooth data. There's also an LIS3DH accelerometer onboard that detects changes in velocity and reports them back to the microcontroller for further processing and decision making. The wand is equipped with a vibration motor that lets the user know when it's time to send a new gesture.

Designing and assembling the wand

March began this project by coming up with some ideas for how the wand would look and behave. The circuit board for the wand is housed in the bottom piece, along with a 10440 LiPo battery for power. The top piece goes over the electronics to keep them securely in place, along with an end cap and longer wand at the end for styling. The entire handle is wrapped in leather to hide any unsightly seams.

All of the pieces were CNC milled from a solid stock of hardwood, and after some careful sanding, it was time to assemble. March first cleaned off one of his custom PCBs with a bit of isopropyl alcohol and applied solder paste. He then carefully placed each electronic component by hand and stuck the entire assembly into a reflow oven to melt the tiny solder beads within the paste. After letting it cool down, the board was ready to be programmed at set into its housing.

Activating some outlets

Each smart outlet features a circuit containing a Bluetooth-enabled microcontroller and a relay. They constantly scan for BLE devices and check the manufacturing data within the advertising packet. If the included gesture matches the target, the controller activates its relay, thus closing the AC circuit and switching on whatever device is plugged into the outlet.

It's always intriguing to see someone take a fun idea and turn it into a functioning device that adds a bit more "magic" in an otherwise mundane setting. One possible improvement might be adding tinyML that would let the user train multiple complex gestures based on the values the accelerometer detects.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles