Posts with «arduino» label

Upgraded Toy Guitar Plays Music

Getting the finishing details on a Halloween costume completed is the key to impressing friends and strangers alike on the trick-or-treat rounds. Especially when it comes to things like props, these details can push a good Halloween costume to great with the right touches. [Jonathan]’s friend’s daughter will be well ahead of the game thanks to these additions to a toy guitar which is part of her costume this year.

The toy guitar as it was when it arrived had the capability to play a few lackluster sound effects. The goal here was to get it to play a much more impressive set of songs instead, and to make a couple upgrades along the way as well. To that end, [Jonathan] started by dismantling the toy and investigating the PCBs for potential reuse. He decided to keep the buttons in the neck of the guitar despite their non-standard wiring configuration, but toss out the main board in favor of an ESP32. The ESP32 is tasked with reading the buttons, playing a corresponding song loaded on an SD card, and handling the digital to analog conversion when sending it out to be played on the speaker.

The project doesn’t stop there, though. [Jonathan] also did some custom mixing for the songs to account for the lack of stereo sound and a working volume knob, plus he used the ESP32’s wireless capabilities to set the guitar up as a local file server so that songs can be sent to and from the device without any wires. He also released the source code on the project’s GitHub page for anyone looking to use any parts of this project. Don’t forget there’s a Halloween contest going on right now, so be sure to submit the final version of projects like these there!

Hack a Day 26 Oct 00:00

Framework Motherboard Turned Cyberdeck

The beauty of a modular ecosystem lies in how it allows individuals to repurpose components in unconventional ways. This is precisely what [Ben Makes Everything] has achieved by using a Framework laptop’s motherboard and battery to create a slab-style cyberdeck. (Video, embedded below.)

The Framework motherboard presents an excellent choice for custom portable computer projects due to its relatively compact size and built-in modular I/O port options, all based on USB-C. Framework even released additional documentation to support this use-case. It’s significantly more powerful than the standard Raspberry PI, which is typically employed in similar projects. Ben chose a 2400 x 900 IPS display that can draw power and video through a single USB-C cable. For user input, he opted for an Apple keyboard and an optical trackball with a PS2 interface. He utilized a Arduino Pro Micro as a PS2-to-USB adaptor, using the remaining pins on the Arduino as a versatile interface for electronic projects.

The enclosure is crafted from machined aluminum plates with 3D printed spacers to secure all components. The screen can be tilted up to 45 degrees for more ergonomic desktop use. The Framework motherboard is equipped with four USB-C ports for peripheral devices; [Ben] allocated one for the display and another for a USB hub which connects the keyboard, Arduino, and external USB and HDMI connectors. The remaining USB-C ports are still available for original Framework expansion cards.

The completed project not only looks fantastic but may also be highly functional. It would have been a great entry in our recent Cyberdeck Challenge.

Humble Arduino As PLC

On the surface, a programmable logic controller (PLC) might seem like nothing more than a generic microcontroller, perhaps outfitted to operate in industrial settings with things like high temperatures or harsh vibrations. While this is true to some extent, PLCs also have an international standard for their architecture and programming languages. This standard is maintained by the International Electrotechnical Commission, making it so that any device built under these specifications will be recognizable to control engineers and maintenance personnel worldwide. And, if you use this standard when working with certain Arduinos, this common platform can become a standard-compliant PLC as well.

The IDE itself supports programming ladder diagrams, functional block diagrams, and other programming systems covered under the IEC 61131-3 standard. Not only that, it allows the combination of these types of PLC programming with Arduino sketches. The system offers many of the perks of PLC programming alongside the familiar Arduino platform, and supports a number of protocols as well including CANOpen, Modbus RTU, and Modbus TCP. It can also be used for monitoring a PLC system, essentially adding IoT capabilities to existing systems, enabling continuous monitoring, debugging, and program updates.

While not every Arduino is a great platform to build a PLC around, there are a few available for those looking for a system a little less proprietary and a little more user-friendly than typical PLC systems tend to be. There’s a reason that PLCs are built around an international standard and generally have certain hardware in mind to run it, though, and this comparison of a Raspberry Pi with an off-the-shelf PLC goes into detail about why certain components aren’t good choices for PLCs.

Simple Circuit Keeps Process Control Loops in Tune

Spare a moment’s pity for the process engineer, whose job it is to keep industrial automation running no matter what. These poor souls seem to be forever on call, fielding panicked requests to come to the factory floor whenever the line goes down. Day or night, weekends, vacations, whatever — when it breaks, the process engineer jumps.

The pressures of such a gig can be enormous, and seem to have weighed on [Tom Goff] enough that he spent a weekend building a junk bin analog signal generator to replace a loop calibrator that he misplaced. Two process control signaling schemes were to be supported — the 0 to 10 VDC analog signal, and the venerable 4-20 mA current loop. All that’s needed for both outputs is an Arduino and an LM358 dual op-amp, plus a few support components. The 0-10 V signal starts as a PWM output from the Arduino, with its 0-5 V average amplified by one of the op-amps set up as a non-inverting amp with a gain of 2. With a little filtering, the voltage output is pretty stable, and swings nicely through the desired range — see the video below for that.

The current loop output is only slightly more complicated. An identical circuit on a separate Arduino output generates the same 10 V max output, but a code change limits the low end of the range to 1 V. This output of the op-amp is fed through a 500-Ω trimmer pot, and the magic of Ohm’s Law results in a 4-20 mA current. The circuit lives on a piece of perf board in a small enclosure and does the job it was built for — nothing fancy needed.

And spoiler alert: [Tom] found the missing loop calibrator — after he built this, of course. Isn’t that always the way?

Noble Graphs: Displaying Data With Neon Like Its 1972

In the days before every piece of equipment was an internet-connected box with an OLED display, engineers had to be a bit more creative with how they chose to communicate information to the user. Indicator lights, analog meters, and even Nixie tubes are just a few of the many methods employed, and are still in use today. There are, however, some more obscure (and arguably way cooler) indicators that have been lost to time.

[Aart Schipper] unearthed one such device while rummaging around in his father’s shed: a pair of Burroughs Bar Graph Glow-Transfer Displays. These marvelous glowing rectangles each have two bars (think the left and right signals on an audio meter, which is incidentally what they were often used for), each with 201 neon segments. Why 201, you may ask? The first segment on each bar is always illuminated, acting as a “pilot light” of sorts. This leaves 200 controllable segments per channel. Each segment is used to “ignite” its neighboring segment, something the manufacturer refers to as the “Glow-Transfer Principle.” By clever use of a three-phase clock and some comparators, each bar is controlled by one analog signal, keeping the wire count reasonably low.

Don’t get us wrong, the warm, comforting glow of Nixie tubes will always have a special place in our hearts, but neon bar graphs are just hard to beat. The two do have a similar aesthetic though, so here’s hoping we see them used together in a project soon.

Thanks to [Jan] for the tip!

Hack a Day 18 Oct 03:00
arduino  neon  nixie  parts  retro  

Full Self-Driving, on a Budget

Self-driving is currently the Holy Grail in the automotive world, with a number of companies racing to build general-purpose autonomous vehicles that can get from point A to point B with no user input. While no one has brought one to market yet, at least one has promised this feature and had customers pay for it, but continually moved the goalposts for delivery due to how challenging this problem turns out to be. But it doesn’t need to be that hard or expensive to solve, at least in some situations.

The situation in question is driving on a single stretch of highway, and only focuses on steering, so it doesn’t handle the accelerator or brake pedal input. The highway is driven normally, using a webcam to take images of the route and an Arduino to capture data about the steering angle. The idea here is that with enough training the Arduino could eventually steer the car. But first some math needs to happen on the training data since the steering wheel is almost always not turning the car, so the Arduino knows that actual steering events aren’t just statistical anomalies. After the training, the system does a surprisingly good job at “driving” based on this data, and does it on a budget not much larger than laptop, microcontroller, and webcam.

Admittedly, this project was a proof-of-concept to investigate machine learning, neural networks, and other statistical algorithms used in these sorts of systems, and doesn’t actually drive any cars on any roadways. Even the creator says he wouldn’t trust it himself, but that he was pleasantly surprised by the results of such a simple system. It could also be expanded out to handle brake and accelerator pedals with separate neural networks as well. It’s not our first budget-friendly self-driving system, either. This one makes it happen with the enormous computing resources of a single Android smartphone.

2023 Halloween Hackfest: A Spooky Muscle-Brain Interface

What could be better than a Halloween decoration? Something more perennial, or even something that could also be found in a classroom or lab. Something like [Markus Bindhammer]’s spooky muscle-brain interface. It was inspired by a series called “Tales From the Loop” in which a character’s muscle electrical activity is measured in preparation to adjust his prosthetic hand.

Essentially, it does what you think it does: attach the sensors to your muscles, move them around, and watch the brain light up. [Markus] started with a children’s learning kit that involves molding the brain and discs out of red rubbery goop, the vertebrae out of plaster, and then assembling the whole thing.

Instead, [Markus] molded the brain and vertebrae in two-part silicone for durability, and used two-component colored epoxy for the discs.

As the inspiring series is set in the 80s (we assume the brown, dingy 80s and not the fun, neon 80s), [Markus] gave the enclosure/stand an appropriate color scheme. Inside that box there’s an Arduino Pro Micro, a Grove EMG detector, and a mini step-up converter module. And of course, under the brain, there’s a NeoPixel ring. Don’t miss the build and demo video after the break.

There are a ton of things you can do with blinkenlights for Halloween. How about a light-up candy slide, or a bucket that seems them coming?

This 3D Printable Soldering Air Filter Really Sucks

If you solder (and we know you do), you absolutely need ventilation, even for that lead-free stuff. Fortunately, [tinyboatproductions] has gotten into air quality lately and is here to help you with their snappy 3D printed air-filtering design.

At the heart of this build is a 120 mm notoriously-quiet Noctua fan coupled with a carbon filter. It does what you’d think — position the fan the right way and it sucks the air through the filter, which catches all those nasty particles.

The only problem is that the Noctua uses PWM, so there’s no governing it with a just potentiometer. To get around this, [tinyboatproductions] introduced an Arduino Nano and a buck converter, both of which were admittedly a bit overkill. Now the speed can be controlled with a pot.

Once control of the fan was sorted, [tinyboatproductions] decide to add an OLED display to show the fan speed and power condition, which is a nice touch. Be sure to check out the build video after the break.

If this doesn’t have quite enough features for you, here’s one that’s battery powered.

Because You Can: Linux On An Arduino Uno

There are a few “Will it run” tropes when it comes to microcontrollers, one for example is “Will it run Doom?“, while another is “Will it run Linux?”. In one of the lowest spec examples of the last one, [gvl610] has got an up-to-date Linux kernel to boot on a vanilla Arduino Uno. And your eyes didn’t deceive you, that’s a full-fat kernel rather than the cut-down μClinux for microcontrollers.

Those of you who’ve been around a while will probably have guessed how this was done, as the ATmega328 in the Uno has no MMU and is in to way powerful enough for the job. It’s running an emulator, in this case just enough RISC-V to be capable, and as you’d imagine it’s extremely slow. You’ll be waiting many hours for a shell with this machine.

The code is written in pure AVR C, and full instructions for compilation are provided. Storage comes from an SD card, as the ATmega’s meagre 32k is nowhere near enough. If you’re having a bit of deja vu here we wouldn’t blame you, but this one is reputed to be worse than the famous 2012 “Worst PC Ever“, which emulated ARM instead of RISC-V.

Thanks [Electronics Boy] for the tip!

Hack a Day 14 Oct 06:00

Screech Owl is a Tribute to The Eowave Persephone

The Eowave Persephone was a beautiful thing—a monophonic ribbon synth capable of producing clean, smoothly varying tones. [Ben Glover] used to own a nice example that formerly belonged to Peter Christopherson, but lost it in the shifting sands of time. His solution was to build one of his own from scratch.

It’s a simple build, but the final result puts out a nice pleasant sound.

Known as the Screech Owl, the build is based around a custom shield designed to suit the Arduino Leonardo. The primary control interface is a Softpot 500 mm membrane potentiometer, layered up with a further thin film pressure sensor which provides aftertouch control. The Leonardo reads these sensors and synthesizes the appropriate frequencies in turn.

All the electronics is wrapped up inside a tidy laser-cut enclosure that roughly approximates the design of the original Eowave device. [Ben] noted the value of services like Fiverr and ChatGPT for helping him with the design, while he also enjoyed getting his first shield design professionally manufactured via JLCPCB.

It’s a tidy build, and in [Ben’s] capable hands, it sounds pretty good, too. We’ve seen some other great ribbon controlled synths before, too. Video after the break.