Is That a Brew-ray Disc?

This coffee machine uses Edge Impulse and a Raspberry Pi to detect the format of an optical disc and choose a player with an A/V switcher.

nickbild
over 1 year ago Home Automation
This coffee machine detects the format of optical discs (📷: BorisDigital)

The technology may be outdated these days, but not so long ago optical discs were the go-to solution for mass storage and audio and video playback. Because of their large capacities and digital storage, these discs exploded in popularity as they replaced older, lower-density analog storage options. And as this happened, dozens of different disc formats appeared on the market to encode everything from audio to text, video, images, and more.

These different formats could only be read by certain types of players — one may read DVDs and Blu-ray discs, while another may play audio CDs, CD+G, and photo CDs. So if you have a stack of mixed optical discs and a corresponding stack of media players, how can you tell what type of disc you have, and what player can decode it?

Running an inference with an Edge Impulse model (📷: BorisDigital)

I, for one, might use the old trick of looking with my eyes to see what logo is on a disc, then matching that up with a player that recognizes the same format. YouTuber Alan Boris has no time for that sort of nonsense, so he did the next most obvious thing and built a coffee machine that detects the format of a disc using computer vision, then interacts with an A/V switcher to select the correct player from five available options. And for good measure, the device also includes an infrared transceiver to send a code to the proper player that opens its disc tray.

This may seem like serious overengineering (because it is!), but if you simply cannot wait another second to blast some MC Hammer or get caught up in the alternate timeline of Sky Captain and the World of Tomorrow, there may be no better way to go.

The build is housed inside of a gutted coffee machine that now contains entirely new electronics. The heating element has been replaced by a CD/DVD spindle motor, and a camera is positioned to look down on the disc spinning on this motor. Images are processed by a Raspberry Pi 5 computer that is running an object detection model that was created using Edge Impulse. It was trained to look for telltale markings on a disc to predict its specific format. When a known format is recognized, the system communicates with the A/V switcher via the local network to switch it to the correct player.

The computer is also connected to a Raspberry Pi Pico, which uses an infrared transceiver module to blast the tray open signal to the selected player. All that is left to do is lift the disc off the detection machine and put it in the player’s tray.

There are a lot of nice touches included in this build. The coffee machine’s original buttons and LEDs, for example, were co-opted to control running inferences, programming the infrared transceiver, and collecting training data. Boris also installed a new OLED display to show relevant information to the user.

Is a coffee machine disc detector really necessary, even when you own twenty types of disc formats and five players? No. But is it a fun build? Absolutely! And as Boris pointed out, this project was really about education. It was a great opportunity to learn more about machine learning, computer vision, and electronics. And what more reason does anyone need for building a project?

nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles