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”

A Homebrew Gas Chromatograph That Won’t Bust Your Budget

Chances are good that most of us will go through life without ever having to perform gas chromatography, and if we do have the occasion to do so, it’ll likely be on a professional basis using a somewhat expensive commercial instrument. That doesn’t mean you can’t roll your own gas chromatograph, though, and if you make a few compromises, it’s not even all that expensive.

At its heart, gas chromatography is pretty simple; it’s just selectively retarding the movement of a gas phase using a solid matrix and measuring the physical or chemical properties of the separated components of the gas as they pass through the system. That’s exactly what [Markus Bindhammer] has accomplished here, in about the simplest way possible. Gas chromatographs generally use a carrier gas such as helium to move the sample through the system. However, since that’s expensive stuff, [Markus] decided to use room air as the carrier.

The column itself is just a meter or so of silicone tubing packed with chromatography-grade silica gel, which is probably the most expensive thing on the BOM. It also includes an injection port homebrewed from brass compression fittings and some machined acrylic blocks. Those hold the detectors, an MQ-2 gas sensor module, and a thermal conductivity sensor fashioned from the filament of a grain-of-wheat incandescent lamp. To read the sensors and control the air pump, [Markus] employs an Arduino Uno, which unfortunately doesn’t have great resolution on its analog-to-digital converter. To fix that, he used the ubiquitous HX7111 load cell amplifier to read the output from the thermal conductivity sensor.

After purging the column and warming up the sensors, [Markus] injected a sample of lighter fuel and exported the data to Excel. The MQ-2 clearly shows two fractions coming off the column, which makes sense for the mix of propane and butane in the lighter fuel. You can also see two peaks in the thermal conductivity data from a different fuel containing only butane, corresponding to the two different isomers of the four-carbon alkane.

[Markus] has been on a bit of a tear lately; just last week, we featured his photochromic memristor and, before that, his all-in-one electrochemistry lab.

Continue reading “A Homebrew Gas Chromatograph That Won’t Bust Your Budget”

A Flip Digit Clock, Binary Style

Flip digit clocks are a prized piece of consumer electrical ephemera, providing as they do a digital display without significant electronics. Making your own flip digit display involves some drudgery in the production of all those flip cards, but how would it seem if the complexity was reduced? Go from base 10 to base 2 for example, and a binary flip digit display can be made from flip dot display parts. [Marcin Saj] has done just that, resulting in a timepiece that’s a few bits out of the ordinary.

Under the hood though it’s slightly more conventional, with the trusty ATmega328 and Arduino bootloader, whose software drives the dot electromagnets via a set of MOSFET drivers. It’s a nice project which if you want there’s a Kickstarter to buy one, but the files are also available from a GitHub repository if you’d like to have a go for yourself. Meanwhile you can see it in action in the video below the break.

We like this clock, as it’s different from the norm in Arduino clocks. It’s not however the first flip dot clock we’ve seen, this one has a full dot matrix display.

Continue reading “A Flip Digit Clock, Binary Style”

Quake In 276 KB Of RAM

Porting the original DOOM to various pieces of esoteric hardware is a rite of passage in some software circles. But in the modern world, we can get better performance than the 386 processor required to run the 1993 shooter for the cost of a dinner at a nice restaurant — with plenty of other embedded systems blowing these original minimum system requirements out of the water.

For a much tougher challenge, a group from Silicon Labs decided to port DOOM‘s successor, Quake, to the Arduino Nano Matter Board platform instead even though this platform has some pretty significant limitations for a game as advanced as Quake.

To begin work on the memory problem, the group began with a port of Quake originally designed for Windows, allowing them to use a modern Windows machine to whittle down the memory usage before moving over to hardware. They do have a flash memory module available as well, but there’s a speed penalty with this type of memory. To improve speed they did what any true gamer would do with their system: overclock the processor. This got them to around 10 frames per second, which is playable, but not particularly enjoyable. The further optimizations to improve the FPS required a much deeper dive which included generating lookup tables instead of relying on computation, optimizing some of the original C programming, coding some functions in assembly, and only refreshing certain sections of the screen when needed.

On a technical level, Quake was a dramatic improvement over DOOM, allowing for things like real-time 3D rendering, polygonal models instead of sprites, and much more intricate level design. As a result, ports of this game tend to rely on much more powerful processors than DOOM ports and this team shows real mastery of their hardware to pull off a build with a system with these limitations. Other Quake ports we’ve seen like this one running on an iPod Classic require a similar level of knowledge of the code and the ability to use assembly language to make optimizations.

Thanks to [Nicola] for the tip!