Solving a Rubik’s Cube with Just Two Motors

We’ve all seen videos of Rubik’s cube champions who can solve the puzzle in less than 5 seconds. And there are cube-twisting robots that can solve the cube even faster, often in under a second. This Rubik’s cube solver is not one of those robots, but it’s still pretty cool.

The reason we like Dexter Industries’ “BricKuber” is not for its lightning speed — it takes a minute or two to solve the puzzle. What we like is the simplicity of the approach to manipulating the cube. Built from LEGO parts, including Mindstorms motors and a BrickPi controller, the BricKuber uses only two motors to work the cube. One motor powers a square turntable upon which the cube sits, while the other powers an arm that does double duty — it either clamps the cube so the turntable can rotate a layer, or it rakes the cube to flip it 90° on the turntable. With a Pi Cam overhead, the rig images all six faces, calculates a solution to the cube, and then flips and twists the cube to solve it. It’s simultaneously mind-boggling and strangely relaxing to watch.

All the code is open source, and we strongly suspect a similar and possibly faster robot could be built without the LEGO parts. You might even be able to build one with popsicle sticks and an Arduino.

Continue reading “Solving a Rubik’s Cube with Just Two Motors”

A Raspberry Pi Rain Man in the Making

We see a lot of Raspberry Pis used to play games, but this is something entirely different from the latest RetroPie build. This Raspberry Pi is learning how to read playing cards, with the goal of becoming the ultimate card counting blackjack player.

If [Taxi-guy] hasn’t named his project Rain Man, we humbly suggest that he does so. Because a Pi that can count into a six-deck shoe would be quite a thing, even though it would never be allowed anywhere near a casino. Hurdle number one in counting cards is reading them, and [Taxi-guy] has done a solid job of leveraging the power of OpenCV on a Pi 3 for the task. His description in the video below is very detailed, but the approach is simple: find the cards in a PiCam image of the playing field using a combination of thresholding and contouring. Then, with the cards isolated, compare the rank and suit in the upper left corner of the rotated card image to prototype images to identify the card. The Pi provides enough horsepower to quickly identify an arbitrary number of non-overlapping cards; we assume [Taxi-guy] will have to address overlapping cards and decks that use different fonts at some point.

We’re keen to see this Pi playing blackjack someday. As he’s coding that up, he may want to look at algorithmic approaches to blackjack strategies, and the real odds of beating the house.

Continue reading “A Raspberry Pi Rain Man in the Making”

Get Up Close to your Soldering with a Pi Zero Microscope

Do your Mark 1 Eyeballs no longer hold their own when it comes to fine work close up? Soldering can be a literal pain under such conditions, and even for the Elf-eyed among us, dealing with pads at a 0.4-mm pitch is probably best tackled with a little optical assistance. When the times comes for a little help, consider building a soldering microscope from a Pi Zero and a few bits and bobs from around the shop.

Affordable commercial soldering scopes aren’t terribly hard to come by, but [magkopian] decided to roll his own by taking advantage of the streaming capabilities of the Raspberry Pi platform, not to mention its affordability. This is a really simple hack — nothing is 3D-printed or custom milled. The stage base is a simple aluminum project box for heat resistance and extra weight, and the arm is a cheap plastic dial caliper. The PiCam is mounted to the sliding jaw of the caliper on a scrap of plastic ruler. The lens assembly of the camera needs to be hacked a little to change the focal length to work within 10 centimeters or so; alternatively, you could splurge and get a camera module with an adjustable lens. The Pi is set up for streaming, and your work area is presented in glorious, lag-free HDMI video.

Is [magkopian]’s scope going to give you the depth perception of a stereo microscope? Of course not. But for most jobs, it’ll probably be enough, and the fact that it can be built on the cheap makes it a great hack in our book.

Continue reading “Get Up Close to your Soldering with a Pi Zero Microscope”

Pi-Powered Anti-Cat Trap Soaks Felines and Other Animals

[Joshua] has a problem with cats. They like pooping in his garden. He decided to take action with this awesome automated and humane cat trap.

Now just to clarify, he did attempt a few other alternatives before going all out in cat defense – the easiest solution would be to get a cat of his own, but alas, he’s not a cat person.

The system uses a Raspberry Pi in a waterproofed housing with a PiCam. He’s written some rudimentary code to make use of the PiCam Python Library which also allows him to record pre-cat-trapping footage, much for our enjoyment. When motion is sensed, the Pi trips a 24VAC solenoid water valve, which turns on the sprinkler and quickly soaks the intruder.

Stick around after the break for quite a few videos catching the furry little buggers in the act!

Continue reading “Pi-Powered Anti-Cat Trap Soaks Felines and Other Animals”