Arduino, Accelerometer, And TensorFlow Make You A Real-World Street Fighter

A question: if you’re controlling the classic video game Street Fighter with gestures, aren’t you just, you know, street fighting?

That’s a question [Charlie Gerard] is going to have to tackle should her AI gesture-recognition controller experiments take off. [Charlie] put together the game controller to learn more about the dark arts of machine learning in a fun and engaging way.

The controller consists of a battery-powered Arduino MKR1000 with WiFi and an MPU6050 accelerometer. Held in the hand, the controller streams accelerometer data to an external PC, capturing the characteristics of the motion. [Charlie] trained three different moves – a punch, an uppercut, and the dreaded Hadouken – and captured hundreds of examples of each. The raw data was massaged, converted to Tensors, and used to train a model for the three moves. Initial tests seem to work well. [Charlie] also made an online version that captures motion from your smartphone. The demo is explained in the video below; sadly, we couldn’t get more than three Hadoukens in before crashing it.

With most machine learning project seeming to concentrate on telling cats from dogs, this is a refreshing change. We’re seeing lots of offbeat machine learning projects these days, from cryptocurrency wallet attacks to a semi-creepy workout-monitoring gym camera.

Continue reading “Arduino, Accelerometer, And TensorFlow Make You A Real-World Street Fighter”

A 3D Printed Micro:Bit Nunchuk

As [Paul Bardini] explains on the Thingiverse page for his “Micro:Bit Hand Controller”, the Bluetooth radio baked into the BBC’s educational microcontroller makes it an ideal choice for remotely controlling things. You just need to give it a nice enclosure, a joystick, a couple of buttons, and away you go. You can even use the integrated accelerometer as another axis of control. This is starting to sound a bit familiar, especially to gamers.

While it might not come with the Official Nintendo Seal of Quality, the 3D printable enclosure [Paul] has come up with for the Micro:Bit certainly takes more than a little inspiration from the iconic Wii “Nunchuck” controller. He’s jostled around the positions of the joystick and momentary buttons a bit, but it still has that iconic one-handed ergonomic styling.

In a particularly nice touch, [Paul] has built his controller around a Micro:Bit breakout board from SparkFun that allows you to plug the microcontroller in via its edge connector. This means you can pull the board out and still use it in other projects. The only other connection to the controller leads to the battery, which uses a two pin JST-PH plug that can easily be removed.

Thanks to this breakout board, the internal wiring is exceptionally simple. The joystick (the type used in a PS2 controller) and the buttons are simply soldered directly to pins on the breakout board. No passives required, just a few short lengths of flexible wiring to snake through the printed enclosure.

The Thingiverse page only has the STLs for the two halves of the controller, and no source code for the Micro:Bit itself. But it shouldn’t be terribly hard to piece together the basic functionality with example code that’s floating around out there. Especially since you can run Python on them now. Of course, you could also add Bluetooth to the original Wii version if you’re not looking to reinvent the wheel nunchuck.

Fly A Pi On Your Next Model Rocket

From time to time, we see electronics projects for model rocket instrumentation. Those who have been involved in the hobby for many years may remember when 8-bit microcontrollers like the PIC16F84 were the kind of hardware you might fly on a mission. These days, however, there’s little reason not to send a high-powered processor. This is exactly what [Mohamed Elhariry] has done with his PiX project, which turns a Raspberry Pi Zero W into a neat little flight data recorder.

The hardware has what you might expect from a flight recorder, including accelerometer, gyroscope, and pressure sensor. In addition, it carries temperature and humidity sensors, and of course, a camera. A 64 GB microSD card provides the storage, while a LiPo SHIM board allows the whole thing to run from a 150 mAh battery. All of the components are off-the-shelf breakouts, which makes assembly as easy as soldering a few connections and securing the modules with a little tape.

The project is in GitHub, including python code, schematics for the hardware, and detailed instructions. If you ever wanted to get started with instrumenting a model rocket, this looks like a great resource. Also in the repo is a captured video from an actual flight [34 MB GIF] if you just want to see the view from one launch.

Using commercial modules seems pretty convenient, but if custom hardware is more your thing, check out these 22 mm round PCBs designed to fit inside rockets.

Add Scroll Wheels And Buttons To Smartphones With 3D-Printed Widgets Read By Accelerometer

The first LED digital wristwatches hit the market in the 1970s. They required a button push to turn the display on, prompting one comedian to quip that giving one to a one-armed man would be in poor taste. While the UIs of watches and other wearables have improved since then, smartphones still present some usability challenges. Some of the touch screen gestures needed to operate a phone, like pinching, are nigh impossible when one-handing the phone, and woe unto those with stubby thumbs when trying to take a selfie.

You’d think that the fleet of sensors and the raw computing power on board would afford better ways to control phones. And you’d be right, if the modular mechanical input widgets described in a paper from Columbia University catch on. Dubbed “Vidgets” by [Chang Xiao] et al, the haptic devices are designed to create characteristic acceleration profiles on a phone’s inertial measurement unit (IMU) when actuated. Vidgets take various forms, from push buttons to scroll wheels, each of a similar size and shape and designed to dock into one of eight positions on the back of a 3D-printed phone case. Once trained, the algorithm watches for the acceleration signature caused by actuating a Vidget, and sends commands to the phone to mimic the corresponding gestures. The video below demonstrates a couple of use cases, of which the virtual saxophone is our favorite.

This is really clever stuff, and ventures deep into “Why didn’t I think of that?” territory. Need to get ahead of the curve on IMUs to capitalize on what they can do? You could start with [Al Williams]’ primer on micro-electromechanical systems, or MEMS.

Continue reading “Add Scroll Wheels And Buttons To Smartphones With 3D-Printed Widgets Read By Accelerometer”

Door Springs And Neopixels Demonstrate Quantum Computing Principles

They may be out of style now, and something of a choking hazard for toddlers, but there’s no denying that spring doorstops make a great sound when they’re “plucked” by a foot as you walk by. Sure, maybe not on a 2:00 AM bathroom break when the rest of the house is sleeping, but certainly when used as sensors in this interactive light show.

The idea behind [Robin Baumgarten]’s “Quantum Garden” is clear from the first video below: engaging people through touch, sound, and light. Each of the 228 springs, surrounded by a Neopixel ring, is connected to one of the 12 inputs on an MPR121 capacitive touch sensor. The touch sensors and an accelerometer in the base detect which spring is sproinging and send that information to a pair of Teensies. A PC then runs the simulations that determine how the lights will react. The display is actually capable of some pretty complex responses, including full-on games. But the most interesting modes demonstrate principles of quantum computing, specifically stimulated Raman adiabatic passage (STIRAP), which describes transfers between quantum states. While the kids in the first video were a great stress test, the second video shows the display under less stimulation and gives a better idea of how it works.

We like this because it uses a simple mechanism of springs to demonstrate difficult quantum concepts in an engaging way. If you need more background on quantum computing, [Al Williams] has been covering the field for a while. Need the basics? Check out [Will Sweatman]’s primer.

Continue reading “Door Springs And Neopixels Demonstrate Quantum Computing Principles”

A Coin Cell Powers This Tiny ESP32 Dev Board

Just for the challenge, just for fun, just for bragging rights, and just to do a little showing off – all perfectly valid reasons to take on a project. It seems like one or more of those are behind this tiny ESP32 board that’s barely larger than the coin cell that powers it.

From the video below, [Mike Rankin] has been working down the scale in terms of powering and sizing his ESP32 builds. He recently completed a project with an ESP32 Pico D4 and an OLED display that fits exactly on an AA battery holder, which he populated with a rechargeable 14550. Not satisfied with that form factor, he designed another board, this time barely larger than the LIR2450 rechargeable coin cell in its battery holder. In addition to the Pico D4, the board sports a USB charging and programming socket, a low drop-out (LDO) voltage regulator, an accelerometer, a tiny RGB LED, and a 96×16 OLED display. Rather than claim real estate for switches, [Mike] chose to add a pair of pads to the back of the board and use them as capacitive touch sensors. We found that bit very clever.

Sadly, the board doesn’t do much – yet – but that doesn’t mean we’re not impressed. And [Mike]’s no stranger to miniaturization projects, of course; last year’s Open Hardware Summit badge was his brainchild.

Continue reading “A Coin Cell Powers This Tiny ESP32 Dev Board”

Anti-Lock Brakes For Bike Might Make Rides A Little Safer

Crashing one’s bike is a childhood rite of passage, one that can teach valuable lessons in applied physics. Assuming the kid is properly protected and the crash is fairly tame, scrapes and bruises are exchanged for the wisdom to avoid sand and gravel patches, and how to avoid a ballistic dismount by not applying the front brakes harder than or before the rear brakes.

But for many of us, those lessons were learned long ago using a body far more flexible than the version we’re currently in, and the stakes are higher for a bike ride that includes braking mistakes. To help with that, [Tom Stanton] has been working on anti-lock brakes for bicycles, and in the process he’s learned a lot about the physics and engineering of controlled deceleration.

It seems a simple concept – use a sensor to detect when a wheel is slipping due to decreased friction between the tire and the roadway, and release braking force repeatedly through an actuator to allow the driver or rider to maintain control while stopping. But that abstracts away a ton of detail, which [Tom] quickly got bogged down in. With a photosensor on the front wheel and a stepper motor to override brake lever inputs, he was able to modulate the braking force, but not with the responsiveness needed to maintain control. Several iterations later, [Tom] hit on the right combination of sensors, actuators, and algorithms to make a decent bike ABS system. The video below has all the details of the build and testing.

[Tom] admits bike ABS isn’t much of an innovation. We even covered an Arduino-instrumented bike that was to be an ABS testbed a few years back. But it’s still cool to see how much goes into anti-lock systems.

Continue reading “Anti-Lock Brakes For Bike Might Make Rides A Little Safer”