Farming Items With RasPi-Modified Joycons

The Pokémon games have delighted legions of Nintendo gamers over the years, and show no signs of slowing down any time soon. Despite its popularity, there are certain aspects of the games that are unarguably about simply grinding your way to success. For [Mori Bellamy], this simply wouldn’t do – yet their thirst for gold bottlecaps was insatiable. What to do? Automate it, of course.

The first step was to hack the Joycons from the Nintendo Switch. A DG333A analog switch IC was hooked up to the buttons inside, and controlled by the GPIO pins of a Raspberry PI. The joystick was then controlled with an MCP4725 DAC, allowing the system to fully emulate control inputs to the console.

With the console now under control by the Raspberry Pi, the next step was to add intelligence. Google’s Tesseract OCR platform was combined with a helping of Python code. This allows the script to read dialog boxes from the game, and use this data to determine which buttons to press to farm items.

[Mori] has provided the code on GitHub for others to use, noting that it should be generalizable to other games with a little work. Fundamentally, the underlying hardware could readily be repurposed to other controllers, too. There’s plenty of other ways to automate the drudgery of gaming, even if you have to use a touch screen. Video after the break.

Continue reading “Farming Items With RasPi-Modified Joycons”

Magnetic Bearings Might Keep This Motor Spinning For Millennia

We see our share of pitches for perpetual motion machines in the Hackaday tips line, and we generally ignore them and move along. And while this magnetic levitation motor does not break the laws of thermodynamics, it can be considered a perpetual motion machine, at least for certain values of perpetuity.

The motor that [lasersaber] presents in the video below is unconventional, to say the least. It’s not a motor that can do any useful work, spinning at a stately pace beneath its bell-jar enclosure as it does. The design is an extension of [lasersaber]’s “EZ-Spin” motor, which we’ve featured before, and has the same basic layout – a ring of coils wired in series forms the stator, while a disc bearing permanent magnets forms the rotor. The coils, scavenged from those dancing flowerpot solar ornaments, are briefly energized by the rotor passing over a reed switch, giving the rotor a little boost.

The difference here is that rather than low-friction sapphire bearings, this motor uses zero-friction magnetic levitation using pyrolyzed graphite discs. The diamagnetic material hovers above a rare-earth ring magnet, supporting a slender vertical shaft that holds the rotor and another magnetic bearing at the top. It’s fussy to adjust, but once it’s stable, the only friction in the system should be the drag caused by air in the bell jar. [lasersaber]’s current measurements of the motor running at slow speed are hard to believe – 150 nanoamps – leading to an equally jaw-dropping calculated run-time on a single AA battery of 89 millennia.

[lasersaber] is the first to admit that he’s not confident with his measurements, but it seems clear that his motor will likely outlive any chemical battery used to power it. Whatever the numbers are, we like the styling of the thing, and the magnetic bearings are cool too.

Continue reading “Magnetic Bearings Might Keep This Motor Spinning For Millennia”

Grabbing The Thread: Spinlocks Vs Mutexes

Getting into the weeds of operating systems is daunting work. Especially when the operating system involved is a fully featured modern PC operating system with millions of lines of code all working together to integrate hardware and software seamlessly. One such operating system “weed” is figuring out how to handle simultaneous tasks when the processor can only really handle one thing at time. For that, you’ll be looking at the difference between spinlocks and mutexes.

Both of these are methods of making sure that the processor completes a task sufficiently before moving on to the next task. Modern computers are so fast (even ignoring multiple cores) that it seems as if they are doing many things at once. In order to maintain this illusion, tasks need ways of locking the processor to that specific task for a certain amount of time. Of course the queue for performing the next task can get complicated as there are often many tasks waiting to use processor time. Spinlocks are a simple way of holding the processor and mutexes are a slightly more complicated way, but which one is the most efficient use of system resources isn’t that straightforward.

If you’ve ever been interested in operating system details, this one goes deep into the intricacies of features most of us have never even considered the existence of. It’s definitely worth a read, though, and is very well written by someone who is clearly an expert. If you want an operating system challenge, you can build your own operating system as well.

Polar Platform Spins Out Intricate String Art Portraits

We have semi-fond memories of string art from our grade school art class days. We recall liking the part where we all banged nails into a board, but that bit with wrapping the thread around the nails got a bit tedious. This CNC string art machine elevates the art form far above the grammar school level without all the tedium.

Inspired by a string art maker we recently feature, [Bart Dring] decided to tackle the problem without using an industrial robot to dispense the thread. Using design elements from his recent coaster-creating polar plotter, he built a large, rotating platform flanked by a thread handling mechanism. The platform rotates the circular “canvas” for the portrait, ringed with closely spaced nails, following G-code generated offline. A combination of in and out motion of the arm and slight rotation of the platform wraps the thread around each nail, while rotating the platform pays the thread out to the next nail. Angled nails cause the thread to find its own level naturally, so no Z-axis is needed. The video below shows a brief glimpse of an additional tool that seems to coax the threads down, too. Mercifully, [Bart] included a second fixture to drill the hundreds of angled holes needed; the nails appear to be inserted manually, but we can think of a few fixes for that.

We really like this machine, both in terms of [Bart]’s usual high build-quality standards and for the unique art it creates. He mentions several upgrades before he releases the build files, but we think it’s pretty amazing as is.

Continue reading “Polar Platform Spins Out Intricate String Art Portraits”

Love Inspires CD Player Hack

The heart is an impressive piece of hardware. It’s a rare pump that runs continuously for over 80 years in some cases. It’s also, for some reason or other, become a common human symbol of love and affection. In this vein, [Deepak Khatri] has built a beating electronic heart out of basic, readily available components.

The heart of the build (pun intended) is a lens assembly salvaged from a CD player, which uses a coil and permanent magnet to move the lens in order to read across a disc. In this case, the coil is instead fed pulses from an astable multivibrator circuit built with a hacker favourite, the 555 timer IC. It’s all assembled on a breadboard, which is a great way to build such projects that rely on experimentation through the swapping of component values.

The end result is rather satisfying. [Deepak] has also experimented with an Arduino driven version with a slightly different rhythm.

We haven’t seen too many projects using optical drive lens assemblies, but we’re sure there must be other applications. If you end up using one to agitate biological samples or build an awesome laser projector, be sure to hit up the tips line. Video after the break.

Continue reading “Love Inspires CD Player Hack”

Well-Loved Toy Turned Into Robotic Glockenspiel

If there’s a happier word ever imported into the English language than “Glockenspiel”, we’re not sure what it is. And controlling said instrument with a bunch of servos and an Arduino makes us just as happy.

When [Leon van den Beukel] found a toy glockenspiel in a thrift store, he knew what had to be done – Arduinofy it. His first attempt was a single hammer on a pair of gimballed servos, which worked except for the poor sound quality coming from the well-loved toy. The fact that only one note at a time was possible was probably the inspiration for version two, which saw the tone bars removed from the original base, cleaned of their somewhat garish paint, and affixed to a new soundboard. The improved instrument was then outfitted with eight servos, one for each note, each with a 3D-printed arm and wooden mallet. An Arduino runs the servos, and an Android app controls the instrument via Bluetooth, because who doesn’t want to control an electronic glockenspiel with a smartphone app? The video below shows that it works pretty well, even if a few notes need some adjustment. And we don’t even find the servo noise that distracting.

True, we’ve featured somewhat more accomplished robotic glockenspielists before, but this build’s simplicity has a charm of its own.

Continue reading “Well-Loved Toy Turned Into Robotic Glockenspiel”

A Genesis Inspired Synthesizer That Has Nothing To Do With Phil Collins

Chiptune is a musical genre built upon the creation of music through the use of chip-based sound synthesizers, found in early game consoles. The Commodore 64’s venerable SID chip and the Game Boy Sound System are the by far the most popular on the scene. However, the Sega Genesis took a different path at the end of the videogame chipmusic era, packing a YM2612 FM synthesis chip to deliver fat basslines and searing solos. [Thea] has always been a fan of these electric 90s sounds, and thus decided to build the Genesynth.

The synth initially allowed only for playback of existing video game scores, but its capability has been expanded as [Thea] took the project from breadboard to protoboard to custom PCBs – with anime artwork, to boot. The synth uses a Teensy 3.5 as the brains, speaking USB to enable the synth to receive MIDI commands from music software. All parameters are exposed over the interface, and [Thea] has several videos showing the Genesynth under control from an Ableton Push.

The sound capabilities of the YM2612 are of an entirely different character to most chiptunes, by virtue of the FM synthesis engine. FM synthesis is a little less intuitive then classical additive synthesis, but we still see it crop up now and then.