Posts with «arduino hacks» label

Mini Meters Monitor Microprocessor Maximization

[Lex] over at Computing: The Details loves to make fun projects. Recently, he’s created a hardware CPU monitor that allows him to see how well his PC is parallelizing compile tasks at a glance. The monitor is built from 14 analog meters, along with some WS2812 RGB LEDs.

Each meter represents a core on [Lex]’s CPU, while the final two meters show memory and swap usage. The meters themselves are low-cost 5 mA devices. Of course, the original milliamps legends wouldn’t do much good, so [Lex] designed and printed graduations that glue over the top. The RGB LED strip is positioned so two LEDs fit under each meter. The LEDs allow a splash of color to draw attention to the current state of the machine. The whole bank going red would sure get our attention!

The system is controlled by an Arduino Mega, with the meters driven using the PWM pins. The only extra part is a 1 K resistor. The Arduino wrangles the LEDs as well. Sadly [Lex] did not include his software. He did describe it though. Basically he’s using a Rust program to call systemstat, obtaining the current CPU utilization data in Linux. A bit of math converts this into pointer values and LED colors. The data is then sent via USB-serial to the Arduino Mega. The software savvy will say it’s pretty easy to replicate, but the hardware only hackers among us might need a bit of help.

This isn’t the first custom meter we’ve seen on Hackaday. Your author’s first project covered by Hackaday was for a meter created using an automotive gauge stepper motor. I didn’t include source code either – but only because [Guy Carpenter]’s Switec X25 library had me covered.

Thanks for the tip, [TubeTime]!

Watch Time Roll By On This Strange, Spiral Clock

[Build Some Stuff] created an unusual spiral clock that’s almost entirely made from laser-cut wood, even the curved and bendy parts.

The living hinge is one thing, but getting the spacing, gearing, and numbers right also takes work.

The clock works by using a stepper motor and gear to rotate the clock’s face, which consists of a large dial with a spiral structure. Upon this spiral ramp rolls a ball, whose position relative to the printed numbers indicates the time. Each number is an hour, so if the ball is halfway between six and seven, it’s 6:30. At the center of the spiral is a hole, which drops the ball back down to the twelve at the beginning of the spiral so the cycle can repeat.

The video (embedded below) demonstrates the design elements and construction of the clock in greater detail, and of particular interest is how the curved wall of the spiral structure consists of a big living hinge, a way to allow mostly rigid materials to flex far beyond what they are used to. Laser cutting is well-suited to creating living hinges, but it’s a technique applicable to 3D printing, as well.

Thanks to [Kelton] for the tip!

Hack a Day 13 Nov 16:30

Arduino Sticker Dispenser Saves Time

What’s the worst part about packaging up a whole lot of the same basic thing? It might just be applying the various warning stickers to the outside of the shipping box. Luckily, [Mr Innovative] has built an open-source automatic sticker dispenser that does the peeling for you, while advancing the roll one at a time quite satisfyingly.

This tidy build is made primarily of 20×20 extruded aluminium and stainless steel smooth rod. All the yellow bits are 3D printed. The brains of this operation is an Arduino Nano, with an A4988 stepper motor driver controlling a NEMA17.

Our favorite part of this build is the IR sensor pair arranged below the ready sticker. It detects when a sticker is removed, then the stepper advances the roll by one sticker height. The waste is collected on a spool underneath.

Between the video and the instructions, [Mr Innovative] has made it quite simple to build one for yourself. Definitely check this one out after the break.

[Mr Innovative] may as well go by [Mr. Automation]. Check out this automated wire prep machine from a few years ago.

Servo Claw Game Puts Your Muscles to the Test

As fun as claw games are, the jaws are always disappointingly weak, and you usually end up with bupkis. What if the jaws were completely within your  control? That’s the idea behind [Upside Down Labs]’ muscle-controlled servo claw game.

While electromyography (EMG) is great for identifying neuro-muscular abnormalities and allows for amazing prosthetic limbs to work, it can also be used for fun. As you’ll see in the video after the break, accurate block-stacking (and possible candy-grabbing) depends on teamwork and tensed muscles.

Though the user provides the muscle, the brains behind this operation is an Arduino Uno with a Muscle BioAmp shield stacked on top, which [Upside Down Labs] also created. This shield makes it ridiculously easy to connect EMG sensors and other I²C devices like screens and, well, servo claws. From there, it’s really just a matter of printing the claw, connecting it to a 9g servo, and using an accompanying kit to prepare the skin and connect the muscles to the Arduino. Be sure to check it out in tense block-stacking action after the break.

If you want to listen in on your muscles, look no further than the BioAmp EMG Pill.

Pour One Out for This Bottle-Playing Robot

If you have an iota of musicality, you’ve no doubt noticed that you can play music using glass bottles, especially if you have several of different sizes and fill them with varying levels of water. But what if you wanted to accompany yourself on the bottles? Well, then you’d need to build a bottle-playing robot.

First, [Jens Maker Adventures] wrote a song and condensed it down to eight notes. With a whole lot of tinkling with a butter knife against their collection of wine and other bottles, [Jens] was able to figure out the lowest note for a given bottle by filing it with water, and the highest note by emptying it out.

With the bottle notes selected, the original plan was to strike the bottles with sticks. As it turned out, 9g servos weren’t up to the task, so he went with solenoids instead. Using Boxes.py, he was able to parameterize a just-right bottle holder to allow for arranging the bottles in a circle and striking them from the inside, all while hiding the Arduino and the solenoid driver board. Be sure to check it out after the break.

Don’t have a bunch of bottles lying around? You can use an Arduino to play the glasses.

Simple Hack Lets Smartphone Take Resin Printer Time-Lapses

With how cheap they’re getting, everyone seems to be jumping on the resin printer bandwagon. They may not be able to fully replace your trusty old FDM printer, but for certain jobs, they just can’t be beaten. Sadly though, creating those smooth time-lapse videos of your prints isn’t quite as easy to do as it is on their filament-based counterparts.

Not as easy, perhaps, but not impossible. [Fraens] found a way to make time-lapses on any resin printer, and in a wonderfully hacky way. First, you need to find a smartphone, which shouldn’t be too hard, given how often we all tend to upgrade. [Fraens] recommends replacing the standard camera app on the phone with Open Camera, to prevent it from closing during the long intervals with nothing happening. The camera is triggered by any readily available Bluetooth dongle, which is connected via a simple transistor circuit to an Arduino output. To trigger the shutter, a light-dependent resistor (LDR) is connected to one of the microcontroller’s inputs. The LDR is placed inside the bed of the resin printer — an Anycubic Photon in this case — where light from the UV panel used to cross-link the resin can fall on it. A simple bit of Arduino code triggers the Bluetooth dongle at the right moment, capturing a series of stills which are later stitched together using DaVinci Resolve.

The short video below shows the results, which look pretty good to us. There are other ways to do this, of course, but we find the simplicity of this method pleasing.

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.

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