accelerometer, oled, and PocketBeagle create a gesture-controlled calculator

The Calculator Charm: Calculatorium Leviosa!

Have you ever tried waving your hand around like a magic wand and summoning a calculator? We would guess not since you’d probably look a little silly doing so. That is unless you had [Andrei’s] cool gesture-controlled calculator. [Andrei] thought it would be helpful to use a calculator in his research lab without having to take his gloves off and the results are pretty cool.

His hardware consists of a PocketBeagle, an OLED, and an MPU6050 inertial measurement unit for capturing his hand motions using an accelerometer and gyroscope. The hardware is pretty straightforward, so the beauty of this project lies in its machine learning implementation.

[Andrei] first captured a few example datasets to train his algorithm by recreating the hand gestures for each number, 0-9, and recording the resulting accelerometer and gyroscope outputs. He processed the data first with a wavelet transform. The intent of the transform was two-fold. First, the transform allowed him to reduce the number of samples in his datasets while preserving the shape of the accelerometer and gyroscope signals, the key features in the machine learning classification. Secondly, he was able to increase the number of features for the classification since the wavelet transform resulted in both approximation and detailed coefficients which can both be fed into the algorithm.

Because he had a small dataset, he used the Stratified Shuffle Split technique instead of the test train split method which is generally more suited for larger datasets. The Stratified Shuffle Split ensured approximately the same number of train and test samples for each gesture. He was also very conscious of optimizing his model for running on a portable processing unit like the PocketBeagle. He spent some time optimizing the parameters of his algorithm and ultimately converted his model to a TensorFlowLite model using the built-in “TFLiteConverter” function within TensorFlow.

Finally, in true open-source fashion, all his code is available on GitHub, so feel free to give it a go yourself. Calculatorium Leviosa!

Continue reading “The Calculator Charm: Calculatorium Leviosa!”

An animated newspaper image from Harry Potter

Muggle Uses E-Paper For Daily Prophet Replica

News from the wizarding world is a little hard to come by for common muggles, but [Deep Tronix] has brought us one step closer to our magical counterparts with their electronic replica of the Daily Prophet newspaper.

Those familiar with the Harry Potter series will no doubt be familiar with the Daily Prophet. In the films, the newspaper is especially eye-catching with its spooky animated images, a reflection of the magic present throughout the wizarding world. This was achieved with post-production special effects for the films, but this fan-made front page of the Prophet brings the concept to life using e-paper technology and a few other interesting gadgets, all hidden away in a picture frame.

As mentioned, the heart of this project is the e-paper display and a Teensy microcontroller. While e-paper displays are excellent for displaying static text and simple graphics, they are usually not suitable for moving images due to suffering from a form of ‘burn in’, which can leave errant pixels on the screen. This means that e-paper technology typically has a relatively low frame rate for video. [Deep Tronix] has used a custom dithering library to somewhat mitigate this issue, and the results are impressive. Moving images are loaded from an external SD card, processed, and then displayed on the e-paper display, which is almost indistinguishable from the newspaper print that surrounds it.

The seemingly magical newspaper also has a face detection feature, which is enabled by a hidden camera and the venerable ESP32 microcontroller. This system integrates with the Teensy to record and then display the reader’s face on the e-paper display. A neat trick, which is made all the more eerie when these faces are later displayed at random.

We’ve seen Daily Prophet replicas before using more traditional display technology, however the move to an e-paper display goes a long way to improving the overall aesthetics, despite the lower frame rates. With Halloween just around the corner, you might just end up tricking a few people with this clever prop – check out all the build details here.

Continue reading “Muggle Uses E-Paper For Daily Prophet Replica”

Better Security, Harry Potter Style

We all know we shouldn’t use 1234 as our password. But we often don’t do the absolute best practice when it comes to passwords. After all, you should have some obscure strange password that is unique for every site. But we all have lots of passwords, so most of us use $pock2020 or something like that. If you know I’m a Star Trek fan, that wouldn’t be super hard to guess. [Phani] writes about a technique called Horcruxing — a term taken from the literary realm of Harry Potter that allowed Voldemort to preserve life by splitting it into multiple parts, all of which were required to bring an end to his villany. [Phani’s] process promises to offer better security than using a single password, without the problems associated with having hundreds of random passwords.

Most people these days use some form of password manager. That’s great because the manager can create 48 character passwords of random words or symbols and even you don’t know the password. Of course, you do know the master password or, at least, you better. So if anyone ever compromised that password, they’d have all your passwords at their fingers. Horcruxing makes sure that the password manager doesn’t know the entire password, just the hard parts of it.

Continue reading “Better Security, Harry Potter Style”

Do You Know Where Your Children Are? Check The Weasley Clock

What’s the coolest thing you could build for a Harry Potter fan, aside from a working magic wand or Quidditch broomstick? We would have to say a Weasley clock that shows the whereabouts of everyone in the family is pretty high on the list, especially if that fan is a wife and mother.

Here’s how it works: they’ve set up geofences to define the boundaries of home, each person’s school or workplace, and so on. The family’s locations are tracked through their phones’ GPS using Home Assistant, which is hosted on a Raspberry Pi. Whenever someone’s location changes, the Pi alerts the clock over MQTT, and it moves the 3D-printed hands with servos.

The clock has some interesting granularity to it as well. As someone gets closer to home, their pointer’s distance reflects that in its proximity to the Home slice. And Home itself is divided into the main house and the shop and reflected by the pointer’s position.

We particularly like the attention to detail here, like the art poster used for the clock’s face that includes all the Weasley’s whereabouts in the background. It’s built into a thrift store grandmother clock, which is smaller than a grandfather clock but no less majestic. In the future there are plans to implement the clock’s chimes to announce that someone is back home.

No matter what you’re into, the whereabouts clock idea can probably fit that universe. For instance, here’s one that uses LEGO mini-fig heads to locate roommates.

Harry Potter Wand Hack Makes Magic Real

Any sufficiently advanced hack is indistinguishable from magic, a wise man once observed. That’s true with this cool build from [Jasmeet Singh] that magically opens a box when you wave a Harry Potter magic wand in the right way. Is it magic? No, it’s a neat hack that uses computer vision to track the wand and recognize when you make the magic gesture.

The trick is based on the same technique that Universal Studios use in their Harry Potter theme park, as detailed in a patent with the snappy title of “System and method for tracking a passive wand and actuating an effect based on a detected wand path“. The basic idea is that a retroreflective dot on the end of the wand reflects light from a set of infra-red LEDs around the camera. An infra-red sensitive camera detects this reflected light as a bright dot. This camera is tied into a computer vision system that tracks the path of the dot, then triggers the action if it follows a certain pattern.

The version that [Jasmeet] built uses a Raspberry Pi NoIR camera, and a Raspberry Pi 3 running OpenCV. This feeds into a machine learning graph that detects the letters of the alphabet. If the detected letter is an A (for Alomahora, the Harry Potter open spell), then the box opens. If it is a C, the box closes. This is all tied together using Python.

It’s a neat build that ties together a number of interesting techniques, and which could keep the kids amused for a while. You could also expand it further, such as adding a death ray that triggers if you trace an S for Sectumsempra. That’ll teach them not to mess with the dark arts.

Continue reading “Harry Potter Wand Hack Makes Magic Real”

Lighting Up Your Spectrespecs

In the ever-popular world of Harry Potter, a pair of Spectrespecs are useful if you’re hunting for wrackspurts and nargles. While we’ve never spotted either of these creatures ourselves, if you’d like to go out on a hunt, [Laveréna]’s build might be for you.

To start with, you’ll need the frames for the Spectrespecs. [Laveréna] elected to source hers commercially, but you can 3D print them or even craft them by hand if you so desire. Then, a TinyLily microcontroller board is installed, with its small size allowing it to be tucked neatly out of sight in the top of the sunglasses. Two NeoPixels are then installed, with the TinyLily programmed to flash the LEDs in the requisite blue and red colors for easy identification of supernatural creatures.

Tools such as cheap microcontrollers designed for wearables and low-cost addressable LEDs are making advanced cosplay designs easier than ever. Whipping up custom blinkables no longer requires knowledge of advanced multiplexing techniques and how to properly drive high-power LEDs. Of course, LED wearables do still get properly advanced – like this skin-based 7-segment display. If you’ve got a glowable project of your own that you’re dying to share, be sure to let us know!

Play Chess Like Harry Potter

If you are a Harry Potter fan, you might remember that one of the movies showed an Isle of Lewis chess set whose pieces moved in response to a player’s voice commands. This feat has been oft replicated by hackers and [amoyag00] has a version that brings together a Raspberry Pi, Arduino, Android, and the Stockfish chess engine in case you want to play by yourself. You can see a video of the game, below.

Interestingly, the system uses Marlin — the 3D printing software — to handle motion using the Arduino. We suppose moving chess pieces over a path isn’t much different than moving a print head. It is certainly a novel use of GCode.

Continue reading “Play Chess Like Harry Potter”