A Power Switch For The Chromecast

Chromecasts are fantastic little products, they’re basically little HDMI sticks you can plug into any monitor or TV, and then stream content using your phone or computer as the controller. They are powered by a micro USB port in the back, and if you’re lucky, your TV has a port you can suck the juice off. But what if you want to turn it off while you use a different input on your TV so that your monitor will auto-sleep? You might have to build a power switch.

Now in all honesty, the Chromecast gets hot but the amount of power it draws when not in use is still pretty negligible compared to the draw of your TV. Every watt counts, and [Ilias] took this as an opportunity to refine his skills and combine a system using an Arduino, Bluetooth, and Android to create a robust power switch solution for the Chromecast.

The setup is rather simple. An HC-05 Bluetooth module is connected to an Attiny85, with some transistors to control a 5V power output. The Arduino takes care of a bluetooth connection and uses a serial input to control the transistor output. Finally, this is all controlled by a Tasker plugin on the Android phone, which sends serial messages via Bluetooth.

All the information you’ll need to make one yourself is available at [Ilias’] GitHub repository. For more information on the Chromecast, why not check out our review from almost three years ago — it’s getting old!

Pack Your Plywood Cuts With Genetic Algortihms

Reading (or writing!) Hackaday, we find that people are often solving problems for us that we didn’t even know that we had. Take [Jack Qiao]’s SVGnest for instance. If you’ve ever used a laser cutter, for instance, you’ve probably thought for a second or two about how to best pack the objects into a sheet, given it your best shot, and then moved on. But if you had a lot of parts, and their shapes were irregular, and you wanted to minimize materials cost, you’d think up something better.

SVGnest, which runs in a browser, takes a bunch of SVG shapes and a bounding box as an input, and then tries to pack them all as well as possible. Actually optimizing the placement is a computationally expensive proposition, and that’s considering the placement order to be fixed and allowing only 90 degree rotations of each piece.

Once you consider all the possible orders in which you place the pieces, it becomes ridiculously computationally expensive, so SVGnest cheats and uses a genetic algorithm, which essentially swaps a few pieces and tests for an improvement many, many times over. Doing this randomly would be silly, so the routine packs the biggest pieces first, and then back-fills the small ones wherever they fit, possibly moving the big ones around to accommodate.

That’s a lot of computational work, but the end result is amazing. SVGnest packs shapes better than we could ever hope to, and as well as some commercial nesting software. Kudos. And now that the software is written, as soon as you stumble upon this problem yourself, you have a means to get to the solution. Thanks [Jack]!