Hacking Multiplication With Karatsuba’s Algorithm

People tend to obsess over making computer software faster. You can, of course, just crank up the clock speed and add more processors, but often the most powerful way to make something faster is to find a better way to do it. Sometimes those methods are very different from how a human being would do the same task, but it suits the computer’s capabilities. [Nemean] has a video explaining a better multiplication algorithm known as Karatsuba’s algorithm and it is actually quite clever. You can see the video below.

To help you understand the algorithm, the video shows a simple two-digit by two-digit multiplication. You can see that the first and last digits are essentially the result of one multiplication. It is all the intermediate digits that add together. The only thing that might change the first digit is a carry.

Continue reading “Hacking Multiplication With Karatsuba’s Algorithm”

Quick And (Not Very) Dirty Negative Voltage Supply

There comes a time in every hardware hacker’s career during which they first realize they need a negative voltage rail in their project. There also comes a time, usually ~10ms after realizing this, when they reach for the Art of Electronics to try and figure out how the heck to actually introduce subzero voltages into their design. As it turns out, there are a ton of ways to get the job done, from expensive power supplies to fancy regulators you can design, but if you’re lazy (like I am) you might just want a simple, nearly drop-in solution.

[Filip Piorski] has got you covered there. In a recent video, he demonstrates how to turn a “China Special” $1 buck converter from Ebay into a boost-buck converter, capable of acting as a negative voltage supply. He realized that by swapping around the inputs and outputs of the regulator you can essentially invert the potential produced. There are a few caveats, of course, including high start-up current and limited max. voltages, but he manages to circumvent some of them with a little clever rewiring and a bit of bodge work.

Of course, if you have strict power supply requirements you probably want to shell out the cash for a professionally-built one, or design one yourself that meets your exact needs. For the majority of us, a quick and easy solution like this will get the job done and allow us to focus on other aspects of the design without having to spend too much time worrying about the power supply. Of course, if power electronics design is your thing, we’ve got you covered there, too.

Continue reading “Quick And (Not Very) Dirty Negative Voltage Supply”

Jigglypuff Sensor Breathes CO2 So You Don’t Have To

We’ve seen a lot of environmental monitoring projects here at Hackaday. Seriously, a lot. They usually take the form of a microcontroller, a couple sensors, and maybe a 3D printed case to keep it all protected. They’re pretty similar functionally as well, with the only variation usually coming in the protocol used to communicate their bits of collected data.

But even when compared with such an extensive body of previous work, this Jigglypuff IoT environmental monitor created by [Kutluhan Aktar] is pretty unusual. Sure, the highlights are familiar. Its MH-Z14A NDIR CO2 sensor and GP2Y1010AU0F optical dust detector are read by a WiFi-enabled microcontroller, this time the Arduino Nano RP2040 Connect, which ultimately reports its findings to the user via Telegram bot. There’s even a common SSD1306 OLED display on the unit to show the data locally. All things we’ve seen in some form or another in the past.

Testing the electronics on a bread board.

So what’s different? Well, it’s all been mounted to a huge Pokémon PCB, obviously. Even if you aren’t a fan of the pocket monsters, you’ve got to appreciate that bright pink solder mask. Honestly, the whole presentation is a great example of the sort of PCB artwork we rarely see outside of the BadgeLife scene.

Admittedly, there’s a lot easier ways to get notified about the air quality inside your house. We’re also not saying that haphazardly mounting your electronics onto a PCB designed to look like a character from a nearly 20+ year old Game Boy game is necessarily a great idea from a reliability standpoint. But if you were going to do something like that, then this project is certainly the one to beat.

Binaural Hearing Modeled With An Arduino

You don’t have two ears by accident. [Stoppi] has a great post about this, along with a video you can see below. (The text is in German, but that’s what translation is for.) The point to having two ears is that you receive audio information from slightly different angles and distances in each ear and your amazing brain can deduce a lot of spatial information from that data.

For the Arduino demonstration, cheap microphone boards take the place of your ears. A servo motor points to the direction of sound. This would be a good gimmick for a Halloween prop or a noise-sensitive security camera.

Continue reading “Binaural Hearing Modeled With An Arduino”

Microplastics Are Everywhere: Land, Sea And Air

Plastics took off in the 20th century, with the new class of materials finding all manner of applications that metal, wood and paper simply couldn’t deliver on. Every field from electronics to the packaging of food found that plastics could play a role.

Now, over 150 years since the development of Parkesine in 1867, we’re now realizing that plastics come with more than a few drawbacks. They don’t break down well in nature, and now microplastics are beginning to appear all over the Earth, even in places where humans rarely tread. It seems they may even spread via the air, so let’s take a look at this growing problem and what can be done about it.

Continue reading “Microplastics Are Everywhere: Land, Sea And Air”

3D Printed Marble Music Machine Looking Good Already

Inspired by the enormous marble music machines from the staggeringly talented [Wintergatan] and the marble run builds by [Daniel de Bruin], [Ivan Miranda] has been busy again building a largely 3D printed contraption to test his ideas around building his own marble music machine from scratch. (Video, embedded below.)

Leveraging his recent experiences with resin printing and his own giant 3D printer, he had no difficulty in producing everything he needed from his workshop, even if the design work apparently took ages.

The build shows how early in development this project is, as there are clearly quite a few issues to be dealt with, but progress looks encouraging so far. To be clear, plans are to ‘go big’ and this little eight-channel testbed is just to explore this issues around ball guiding, transport and ball release onto the first audio test device, a Korg Nano Pad 2.

Some significant teething problems were identified, such as when [Ivan] designed the ball lifter, he intended the balls to load from the rear, but then needed to switch it to load from the front. No big deal, simply reverse the motor direction to load balls on the opposite side of the mechanism. Sadly, that also meant the directly coupled note drum was now also rotating the wrong way to release the balls. Oops. A quick hack later and [Ivan] was back in business. Various parts needed shimming up with plates, but with 3D printers on the bench, knocking those out took little time or effort. This just shows how darn useful 3D printers can be, allowing you to iterate in a short time and feed your hacks back into the final version.

[Ivan] is clearly going to have a lot of ‘fun’ with this one, as [Wintergatan] will surely testify, these big musical marble machine builds are quite some undertaking. We shall definitely be tuning in later on to see where this one goes!

While we’re on the subject of the [Wintergatan] marble machines, here’s a mini homage to the latest Marble Machine X, and if you’re in the need for a 3D printed marble clock, then try this one for starters.

Continue reading “3D Printed Marble Music Machine Looking Good Already”

Tech In Plain Sight: Eyeglasses

Glasses wearers, try a little experiment. Take off your glasses and look at this page or, at least, at something you can’t see well without your glasses. Now imagine if you lived in a time where there was nothing to be done about your vision. If you wear contacts or you have good vision — perhaps you had surgery — then congratulations. But for most of us, vision changes with age are a fact of life. Even many young people need glasses or some other intervention to get good eyesight. At first glance, you might think eyeglasses are an obvious invention, but it turns out we didn’t get real glasses for quite some time and modern glasses are truly a piece of high tech that hides — quite literally — right in front of your face.

Continue reading “Tech In Plain Sight: Eyeglasses”