Using A Smartphone As A Touchscreen For Arduino

If you want a good display and interface device for an embedded project, it’s hard to look past an old smartphone. After all, you’ve got an excellent quality screen and capacitive touch interface all in the same package! [Doctor Volt] explains how to easily set up your old smartphone to work as a touchscreen for your Arduino.

[Doctor Volt] demonstrates the idea with a 2018 Samsung Galaxy A8, though a wide variety of Android phones can be put to use in this way. The phone is connected to the Arduino via a USB-to-serial converter and an OTG cable. Using a USB-C phone with Power Delivery is ideal here, as it allows the phone to be powered while also communicating with the Arduino over USB.

The RemoteXY app is built specifically for this purpose. It can be installed on an Android phone to allow it to communicate effectively with Arduino devices, which run the RemoteXY library in turn. Configuring the app is relatively straightforward, with a point-and-click wizard helping you designate what hardware you’re using and how you’ve got it hooked up. [Doctor Volt] does a great job of explaining how to hook everything up, and how to build some simple graphical interfaces.

There are a ton of display and interface options in the embedded space these days, many of which can be had cheaply off the shelf. Still, few compete with the resolution and quality of even older smartphones. It’s a neat project that could come in very handy for your next embedded build! Video after the break.

Continue reading “Using A Smartphone As A Touchscreen For Arduino”

An homemade automated air freshener dispenser

GPS Enabled Pumpkin Spice Sprayer Knows When It’s PSL Season

Pumpkin spice, also known as allspice with better marketing, has found its way into a seemingly endless amount of products over the years. It goes beyond the obvious foodstuffs of pies and cakes; because there are plenty of candles, deodorants, and air fresheners ready to add a little more spice to your world. One such autumnal smell enthusiast, YouTube user [J-Knows], sought to automate the delivery mechanism with his 3D printed pumpkin spice aerosol sprayer.

The sprayer device uses an Arduino to rotate a small 3D printed arm that depresses the button on an air freshener cap. This design came as a result of multiple attempts to create a clip that would securely attach to a standard canister. When problems arose with the clip slipping out of place after the motor rotated, a pinch of sticky tack ended up being just the solution. With the proper amount of adhesion, the automated sprayer could now “pollute” any space it is in, as [J-Knows] described.

What took this project to another level is the addition of an Adafruit GPS module. It was coded to respond when it was within one mile of a Starbucks — arguably the organization responsible for the pumpkin spice craze. For some the company’s pumpkin spice latte (PSL) is synonymous with all things fall, and marks the beginning of the season when it is brought back to the coffee menu. Though not being a regular coffee drinker himself, [J-Knows] fully committed to the bit by taking his creation on a test trip to his local Starbucks for a PSL. Judging by the amount of pumpkin spice aerosol solution that ended up on his car dash, he is going to be smelling it into the next year.

Continue reading “GPS Enabled Pumpkin Spice Sprayer Knows When It’s PSL Season”

RFID From First Principles And Saving A Cat

[Dale Cook] has cats, and as he readily admits, cats are jerks. We’d use stronger language than that, but either way it became a significant impediment to making progress with an RFID-based sensor to allow his cats access to their litterbox. Luckily, though, he was able to salvage the project enough to give a great talk on RFID from first principles and learn about a potentially tragic mistake.

If you don’t have 20 minutes to spare for the video below, the quick summary is that [Dale]’s cats are each chipped with an RFID tag using the FDX-B protocol. He figured he’d be able to build a scanner to open the door to their playpen litterbox, but alas, the read range on the chip and the aforementioned attitude problems foiled that plan. He kept plugging away, though, to better understand RFID and the electronics that make it work.

To that end, [Dale] rolled his own RFID reader pretty much from scratch. He used an Arduino to generate the 134.2-kHz clock signal for the FDX-B chips and to parse the returned data. In between, he built a push-pull driver for the antenna coil and an envelope detector to pull the modulated data off the carrier. He also added a low-pass filter and a comparator to clean up the signal into a nice square wave, which was fed into the Arduino to parse the Differential Manchester-encoded data.

Although he was able to read his cats’ chips with this setup, [Dale] admits it was a long road compared to just buying a Flipper Zero or visiting the vet. But it provided him a look under the covers of RFID, which is worth a lot all by itself. But more importantly, he also discovered that one cat had a chip that returned a code different than what was recorded in the national database. That could have resulted in heartache, and avoiding that is certainly worth the effort too.

Continue reading “RFID From First Principles And Saving A Cat”

Artificial Intelligence Runs On Arduino

Fundamentally, an artificial intelligence (AI) is nothing more than a system that takes a series of inputs, makes some prediction, and then outputs that information. Of course, the types of AI in the news right now can handle a huge number of inputs and need server farms’ worth of compute to generate outputs of various forms, but at a basic level, there’s no reason a purpose-built AI can’t run on much less powerful hardware. As a demonstration, and to win a bet with a friend, [mondal3011] got an artificial intelligence up and running on an Arduino.

This AI isn’t going to do anything as complex as generate images or write clunky preambles to every recipe on the Internet, but it is still a functional and useful piece of software. This one specifically handles the brightness of a single lamp, taking user input on acceptable brightness ranges in the room and outputting what it thinks the brightness of the lamp should be to match the user’s preferences. [mondal3011] also builds a set of training data for the AI to learn from, taking the lamp to various places around the house and letting it figure out where to set the brightness on its own. The training data is run through a linear regression model in Python which generates the function that the Arduino needs to automatically operate the lamp.

Although this isn’t the most complex model, it does go a long way to demonstrating the basic principles of using artificial intelligence to build a useful and working model, and then taking that model into the real world. Note also that the model is generated on a more powerful computer before being ported over to the microcontroller platform. But that’s all par for the course in AI and machine learning. If you’re looking to take a step up from here, we’d recommend this robot that uses neural networks to learn how to walk.

A Parts Bin MIDI Controller In 24 Hours

Part of the reason MIDI has hung on as a standard in the musical world for so long is that it is incredibly versatile. Sure, standard instruments like pianos and drums can be interfaced with a computer fairly easily using this standard, but essentially anything can be converted to a MIDI instrument with the right wiring and a little bit of coding. [Jeremy] needed to build a MIDI controller in a single day, and with just a few off-the-shelf parts he was able to piece together a musical instrument from his parts bin.

The build is housed in an off-brand protective case from a favorite American discount tool store, but the more unique part of the project is the choice to use arcade buttons as the instrument’s inputs. [Jeremy] tied eight of these buttons to an Arduino Uno to provide a full octave’s worth of notes, and before you jump to the comments to explain that there are 12 notes in an octave, he also added a button to the side of the case to bend any note when pressed simultaneously. An emergency stop button serves as a master on/off switch and a MIDI dongle on the other side serves as the interface point to a computer.

After a slight bit of debugging, the interface is up and running within [Jeremy]’s required 24-hour window. He’s eventually planning to use it to control a custom MIDI-enabled drum kit, but for now it was fun to play around with it in some other ways. He’s also posted the project code on a GitHub page. And, if this looks a bit familiar, this was not [Jeremy]’s first MIDI project. He was also the creator of one of the smallest MIDI interfaces we’ve ever seen.

Continue reading “A Parts Bin MIDI Controller In 24 Hours”

Make Your Own Remy The Rat This Halloween

[Christina Ernst] executed a fantastic idea just in time for Halloween: her very own Remy the rat (from the 2007 film Ratatouille). Just like in the film Remy perches on her head and appears to guide her movements by pulling on hair as though operating a marionette. It’s a great effect, and we love the hard headband used to anchor everything, which also offers a handy way to route the necessary wires.

Behind Remy are hidden two sub-micro servos, one for each arm. [Christina] simply ties locks of her hair to Remy’s hands, and lets the servos do the rest. Part of what makes the effect work so well is that Remy is eye-catching, and the relatively small movements of Remy’s hands are magnified and made more visible in the process of moving the locks of hair.

Originally Remy’s movements were random, but [Christina] added an MPU6050 accelerometer board to measure vertical movements of her own arm. She uses that sensor data to make Remy’s motions reflect her own. The MPU6050 is economical and easy to work with, readily available on breakout boards from countless overseas sellers, and we’ve seen it show up in all kinds of projects such as this tiny DIY drone and self-balancing cube.

Want to make your own Remy, or put your own spin on the idea? The 3D models and code are all on GitHub and if you want to see more of it in action, [Christina] posts videos of her work on TikTok and Instagram.

[via CBC]

DIY 3D-Printed Arduino Self-Balancing Cube

Self-balancing devices present a unique blend of challenge and innovation. That’s how [mircemk]’s project caught our eye. While balancing cubes isn’t a new concept — Hackaday has published several over the years — [mircemk] didn’t fail to impress. This design features a 3D-printed cube that balances using reaction wheels. Utilizing gyroscopic sensors and accelerometers, the device adapts to shifts in weight, enabling it to maintain stability.

At its core, the project employs an Arduino Nano microcontroller and an MPU6050 gyroscope/accelerometer to ensure precise control. Adding nuts and bolts to the reaction wheels increases their weight, enhancing their impact on the cube’s balance. They don’t hold anything. They simply add weight. The construction involves multiple 3D printed components, each requiring several hours to produce, including the reaction wheels and various mount plates. After assembly, users can fine-tune the device via Bluetooth, allowing for a straightforward calibration process to set the balancing points.

If you want to see some earlier incarnations of this sort of thing, we covered other designs in 2010, 2013, and 2016. These always remind us of Stewart platforms, which are almost the same thing turned inside out.

Continue reading “DIY 3D-Printed Arduino Self-Balancing Cube”