Youngster’s ESP32 Jukebox Uses RFID To Queue Tunes

Though kids today have an incredible knack for figuring out modern phones and tablets, there’s still something to be said for offering a simple physical user interface for little hands. To that end, [Martin Hierholzer] has put together a whimsical jukebox that his two year old daughter can use to listen to her favorite songs. With just a few simple buttons, no display to read, and the ability to stop and start songs using RFID tags embedded into 3D printed figures, it’s a perfect interface for tiny humans just getting the hang of interacting with technology.

While the Raspberry Pi might have been the more obvious choice to base this project around, [Martin] decided to go the ESP32 route for improved energy efficiency. The popular microcontroller is more than powerful enough to play MP3s, and its integrated WiFi connectivity allows the player to download new tracks from the network occasionally. He added a micro SD slot to provide some mass storage, a PCM5102 I2S DAC with a PAM8403 amplifier to handle the audio side of things, and a MFRC522 RFID receiver that can pick up tags placed on the top of the player. Power is provided by parts salvaged from a USB battery bank, and everything is housed on a custom PCB.

The relatively low power requirements of the ESP32 means the jukebox can keep the party going for many hours (perhaps even days) when in active use. When the RFID token is removed and there are no songs to play, some clever coding kicks the chip into low-power mode to greatly extend the player’s standby time. [Martin] says it can sleep for months without having to be recharged, and considering some of the impressive feats of battery-sipping we’ve previously seen from the ESP32, we don’t doubt it.

Even if you don’t have any young music lovers at home, the documentation [Martin] has put together for this project is absolutely worth a look. Whether its how he configures the server side to push songs and firmware updates to the player, how he wrangled the ESP32’s Ultra-Low Power coprocessor (ULP), or the woodworking tips used to produce the charming enclosure, you’re sure to pick up a trick or two.

The children of hackers and makers always seem to get the coolest stuff, and we’re looking forward to seeing what [Martin] comes up with next. After all, kids grow up fast and pretty soon his daughter is going to need something new to entertain her.

“Alexa, Stop Listening To Me Or I’ll Cut Your Ears Off”

Since we’ve started inviting them into our homes, many of us have began casting a wary eye at our smart speakers. What exactly are they doing with the constant stream of audio we generate, some of it coming from the most intimate and private of moments? Sure, the big companies behind these devices claim they’re being good, but do any of us actually buy that?

It seems like the most prudent path is to not have one of these devices, but they are pretty useful tools. So this hardware mute switch for an Amazon Echo represents a middle ground between digital Luddism and ignoring the possible privacy risks of smart speakers.  Yes, these devices all have software options for disabling their microphone arrays, but as [Andrew Peters] relates it, his concern is mainly to thwart exotic attacks on smart speakers, some of which, like laser-induced photoacoustic attacks, we’ve previously discussed. And for that job, only a hardware-level disconnect of the microphones will do.

To achieve this, [Andrew] embedded a Seeeduino Xiao inside his Echo Dot Gen 2. The tiny microcontroller grounds the common I²S data line shared by the seven (!) microphones in the smart speaker, effective disabling them. Enabling and disabling the mics is done via the existing Dot keys, with feedback provided by tones sent through the Dot speaker. It’s a really slick mod, and the amount of documentation [Andrew] did while researching this is impressive. The video below and the accompanying GitHub repo should prove invaluable to other smart speaker hackers.

Continue reading ““Alexa, Stop Listening To Me Or I’ll Cut Your Ears Off””

ESP32 Becomes Music Player In Under 40 Lines Of Code

The demo code for [XTronical]’s ESP32-based SD card music player is not even 40 lines long, though it will also require a few economical parts before it all works. Nevertheless, making a microcontroller play MP3s (and other formats) from an SD card is considerably simpler today than it was years ago.

Part of what makes this all work is I2S (Inter-IC Sound), a format for communicating PCM audio data between devices. Besides the ESP32, at the heart of it all is an SD card reader breakout board and the MAX98357A, which can be thought of as a combination I2S decoder and Class D amplifier. The ESP32 reads audio files from the SD card and uses an I2S audio library to send the I2S data stream to the MAX98357A (or two of them for stereo.) From there it is decoded automatically and audio gets pumped though attached speakers.

A few economical components, and only a handful of connections between them.

It’s amazing how much easier audio is to work with when one can take advantage of shuffling audio data around digitally, and the decoder handles multiple formats with an amplifier built in. You can see [XTronical]’s ESP32 player in action in the video embedded below.

Continue reading “ESP32 Becomes Music Player In Under 40 Lines Of Code”

Bitluni Brings All The ESP-32 Multimedia Hacks To Supercon

Of all the people I was looking forward to meeting at Supercon, aside from my Hackaday colleagues with whom I had worked for five years without ever meeting, was a fellow from Germany named Matthias Balwierz. The name might not ring a bell, but he’ll certainly be familiar to Hackaday readers as Bitluni, the sometimes goofy but always entertaining and enlightening face of “Bitluni’s Lab” on YouTube.

I’d been covering Bitluni’s many ESP32 hacks over the years, and had struck up a correspondence with him, swapping ideas and asking for advice on the many projects I start but somehow never finish. Luckily for us, Bitluni is far better on follow-through than I am, and he brought that breadth and depth of experience to the Design Lab stage for that venue’s last talk of the 2019 Superconference, before the party moved next door for the badge-hacking presentations.

Continue reading “Bitluni Brings All The ESP-32 Multimedia Hacks To Supercon”

All You Need To Know About I2S

Last month we marked the 40th birthday of the CD, and it was as much an obituary as a celebration because those polycarbonate discs are fast becoming a rarity. There is one piece of technology from the CD age that is very much still with us though, and it lives on in the standard for sending serial digital audio between chips. The protocol is called I2S and comes as a hardware peripheral on many microcontrollers. It’s a surprisingly simple interface that’s quite easy to work with and thus quite hackable, so it’s worth a bit of further investigation.

It’s A Simple Enough Interface

Don’t confuse this with the other Philips Semiconductor protocol: I2C. Inter-Integrated Circuit protocol has the initials IIC, and the double letter was shortened to come up with the “eye-squared-see” nomenclature we’ve come to love from I2C. Brought to life in 1982, this predated I2S by four years which explains the somewhat strange abbreviation for “Inter-Integrated Circuit Sound”.

The protocol has stuck around because it’s very handy for dealing with the firehose of serial data associated with high-quality digital audio. It’s so handy that you’ve likely heard of it being used for other purposes than audio, which I’ll get to in a little bit. But first, what does I2S actually do?

Continue reading “All You Need To Know About I2S”

Back To Video Basics With An ESP32 VGA Display

In a world where standards come and go with alarming speed, there’s something comforting about VGA. It’s the least common denominator of video standards, and seeing that chunky DB15 connector on the back of a computer means that no matter what, you’ll be able to get something from it, if you can just find a VGA cable in your junk bin.

But that’s the PC world; what about microcontrollers? Can you coax VGA video from them? Yes, you can, with an ESP32, a handful of resistors, and a little bit of clever programming. At least that’s what [bitluni] has managed to do in his continuing quest to push the ESP32 to output all the signals. For this project, [bitluni] needed to generate three separate signals – red, green, and blue – but with only two DACs on board, he had to try something else. He built external DACs the old way using R/2R voltage divider networks and addressed them with the I2S bus in LCD mode. He needed to make some compromises to fit the three color signals and the horizontal and vertical sync pulses into the 24 available bits, and there were a few false starts, but the video below shows that he was able to produce a 320×240 signal, and eventually goosed that up to a non-native 460×480.

It’s a pretty impressive hack, and we learned a lot about both the ESP32 and the VGA standard by watching the video. He’s previously used the ESP32 to build an AM radio station and to output composite PAL video, and even turned his oscilloscope into a vector display with it. They’re all great learning projects too.

Continue reading “Back To Video Basics With An ESP32 VGA Display”

Software Defined Television On An ESP32

Composite video from a single-board computer? Big deal — every generation of Raspberry Pi has had some way of getting composite signals out and onto the retro monitor of your choice. But composite video from an ESP32? That’s a thing now too.

There are some limitations, of course, not least of which is finding a monitor that can accept a composite input, but since [bitluni]’s hack uses zero additional components, we can overlook those. It really is as simple as hooking the monitor up to pin 25 and ground because, like his recent ESP32 AM radio station, the magic is entirely in software. For video, [bitluni] again uses his I²S tweaks to push a lot of data into the DAC really fast, reproducing the sync and image signals in the 0-1 volt range of the PAL composite standard. His code also supports the NTSC standard, but alas because of frequency limitations in the hardware it’s monochrome only for both standards, at least for now. He’s also got a neat trick to improve performance by running the video signal generation and the 3D-rendering on separate cores in the ESP32. Check out the results in the video below.

It looks like the ESP32 is getting to be one of those “Is there anything it can’t do?” systems. Aside from radio and video, we’ve seen audio playback, vector graphics, and even a Basic interpreter easter egg.

Continue reading “Software Defined Television On An ESP32”