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”

Arduino VGA, The Old Fashioned Way

Making a microcontroller speak to a VGA monitor has been a consistent project in our sphere for years, doing the job for which an IBM PC of yore required a plug-in ISA card. Couldn’t a microcontroller talk to a VGA card too? Of course it can, and [0xmarcin] is here to show how it can be done with an Arduino Mega.

The project builds on the work of another similar one which couldn’t be made to work, and the Trident card used couldn’t be driven in 8-bit ISA mode. The web of PC backwards compatibility saves the day though, because many 16-bit ISA cards also supported the original 8-bit slots from the earliest PCs. The Arduino is fast enough to support the ISA bus speed, but the card also needs the PC’s clock line to operate, and it only supports three modes:  80 x 25, 16 colour text, 320 x 200, 256 colour graphics, and 640 x 480, 16 colour graphics.

Looking at this project, it serves as a reminder of the march of technology. Perhaps fifteen years or more ago we’d have been able to lay our hands on any number of ISA cards to try it for ourselves, but now eight years after we called the end of the standard, we’d be hard placed to find one even at our hackerspace. Perhaps your best bet if you want one is a piece of over-the-top emulation.

Hear A Vintage Sound Chip Mimic The Real World

Sound chips from back in the day were capable of much more than a few beeps and boops, and [InazumaDenki] proves it in a video recreating recognizable real-world sounds with the AY-3-8910, a chip that was in everything from arcade games to home computers. Results are a bit mixed but it’s surprising how versatile a vintage sound chip that first came out in the late 70s is capable of, with the right configuration.

Recreating a sound begins by analyzing a spectrograph.

Chips like the AY-3-8910 work at a low level, and rely on being driven with the right inputs to generate something useful. It can generate up to three independent square-wave tones, but with the right approach and setup that’s enough to get outputs of varying recognizability for a pedestrian signal, bird call, jackhammer, and referee’s whistle.

To recreate a sound [InazumaDenki] begins by analyzing a recording with a spectrogram, which is a visual representation of frequency changes over time. Because real-world sounds consist of more than just one frequency (and the AY-3-8910 can only do three at once), this is how [InazumaDenki] chooses what frequencies to play, and when. The limitations make it an imperfect reproduction, but as you can hear for yourself, it can certainly be enough to do the job.

How does one go about actually programming the AY-3-8910? Happily there’s a handy Arduino AY3891x library by [Andreas Taylor] that makes it about as simple as can be to explore this part’s capabilities for yourself.

If you think retro-styled sound synthesis might fit into your next project, keep in mind that just about any modern microcontrollers has more than enough capability to do things like 80s-style speech synthesis entirely in software.

Continue reading “Hear A Vintage Sound Chip Mimic The Real World”

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.

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]

An Arduino Triggers A Flash With Sound

To capture an instant on film or sensor with a camera, you usually need a fast shutter. But alternately a flash can be triggered with the scene in the dark and the shutter wide open. It’s this latter technique which PetaPixel are looking at courtesy of the high-speed class at Rochester Institute of Technology. They’re using a cheap sound sensor module and an Arduino to catch instantaneous photographs, with students caught in the act of popping balloons.

Continue reading “An Arduino Triggers A Flash With Sound”

A keyboard built into a commercial foot rest.

Floorboard Is A Keyboard For Your Feet

Whether you have full use of your hands or not, a foot-operated keyboard is a great addition to any setup. Of course, it has to be a lot more robust than your average finger-operated keyboard, so building a keyboard into an existing footstool is a great idea.

When [Wingletang]’s regular plastic footrest finally gave up the ghost and split in twain, they ordered a stronger replacement with a little rear compartment meant to hold the foot switches used by those typing from dictation. Settling upon modifiers like Ctrl, Alt, and Shift, they went about designing a keyboard based on the ATmega32U4, which does HID communication natively.

For the switches, [Wingletang] used the stomp switches typically found in guitar pedals, along with toppers to make them more comfortable and increase the surface area. Rather than drilling through the top of the compartment to accommodate the switches, [Wingletang] decided to 3D print a new one so they could include circuit board mounting pillars and a bit of wire management. Honestly, it looks great with the black side rails.

If you want to build something a little different, try using one of those folding stools.