ESP32 composite library with LVGL demo. (Credit: aquaticus)

Generating Composite Video On ESP32 With LVGL GUI

RCA connector mounted to ESP32 board. (Credit: aquaticus)
RCA connector mounted to ESP32 board. (Credit: aquaticus)

Just because a microcontroller doesn’t have a dedicated video peripheral doesn’t mean it cannot output a video signal. This is demonstrated once again, this time on the ESP32 by [aquaticus] with a library that generates PAL/SECAM and NTSC composite signals. As a finishing touch on the hardware side, [aqaticus] added an RCA jack is an optional extra. The composite signal itself is generated on GPIO 25, with the selection from a wide number of PAL and NTSC resolutions.

In addition, LVGL support is integrated: this is an open-source library that provides a cross-platform way to provide graphical UIs for embedded platforms. Using this combination any ESP32 can generate a fully graphical UI on a monochrome or color display to add some extra flair and functionality to an ESP32 project.

Currently, this library does not support color output, but hopefully this will be added in the future. Even so, together with simple VGA output using a DAC, this library provides yet another way to add analog video output to ubiquitous MCUs like the ESP32. Even if these MCUs are not going to be decoding any video formats at a reasonable speed, adding a UI that’s more user-friendly than an HD44780-based display and a few buttons can really elevate the user experience.

ESP32 Clock Pushes Outrun Graphics Over Composite

We’ve covered plenty of clocks powered by the ESP32, but this one from [Marcio Teixeira] is really something special. Rather than driving a traditional physical display, the microcontroller is instead generating a composite video signal of an animated digital clock. This could be fed into whatever device you wish, but given the 80’s synthwave style it’s pumping out, you’ll probably want to find a suitably retro CRT to do it justice.

Specifically this is a variant of the “Dali” clock, where each digit seems to melt and morph into its successor. Though his version doesn’t necessarily share code with all the previous iterations, [Marcio] does credit the developers who have pulled off similar visual tricks going all the way back to 1979. Given the vintage of this particular animation, the neon skyline and infinite scrolling grid certainly feel like a perfect fit.

Want to add a little vaporwave vibe to your own workbench? Assuming you’ve already got a 80s style CRT, all you need is an ESP32 and two wires stuck into the composite video port. One goes to ground, and the other goes to the chip’s analog pin. Once everything is powered up, you’ll be able to configure the clock with a web-based interface. It doesn’t get much easier than that.

In the documentation, [Marcio] calls out a few open source projects which were instrumental to getting his clock off the ground. The pioneering work [bitluni] did to get video out of the ESP32 is something of a given, but he also sends a hat tip to [rossumur] for his collection of 8-bit game console emulators written for the microcontroller. Projects like this are a fantastic example of what’s possible when a community works together to truly push the envelope.

Continue reading “ESP32 Clock Pushes Outrun Graphics Over Composite”

ESPFLIX Brings Streaming Video To The World Of Microcontrollers

These days, if you’ve got a TV that’s a little too old to directly access streaming services, you’ve got plenty of options. Apple TV, Chromecast, and a cavalcade of Android boxes are available to help get content on your screen. However, if you’re really stuck in the past, ESPFLIX might just be for you.

Control of the system is achieved by an Apple TV remote.

Yes, that’s right – it’s an online streaming service running on an ESP32. [rossumur] has achieved this feat through a careful use of codecs, and some efficient coding strategies to make it all come together. Video is MPEG1, at just 352×192 resolution. Audio is via the SBC codec, originally intended for use with Bluetooth devices. It’s chosen here for its tiny sample buffers, making it easier to decode in the limited RAM of the ESP32. Output is via composite video, generated on the ESP32 itself.

The titles themselves consist of public domain content, running off an Amazon Web Services instance. With limited RAM on the ESP32, there’s not much buffering to be had, so [rossumur] is bankrolling an AWS Cloudfront instance which should make it possible to use ESPFLIX from most places around the world with a solid internet connection.

We’ve seen [rossumur]’s work before, with the ESP_8_BIT serving as a prelude to this project’s capabilities. Video after the break.

Continue reading “ESPFLIX Brings Streaming Video To The World Of Microcontrollers”

Run Your Favorite 8-bit Games On An ESP32

Here at Hackaday HQ we’re no strangers to vintage game emulation. New versions of old consoles and arcade cabinets frequently make excellent fodder for clever hacks to cram as much functionality as possible into tiny modern microcontrollers. We’ve covered [rossumur]’s hacks before, but the ESP_8-bit is a milestone in comprehensive capability. This time, he’s topped himself.

There isn’t much the ESP 8-bit won’t do. It can emulate three popular consoles, complete with ROM selection menus (with menu bloops). Don’t worry about building a controller, just connect any old (HID compliant) Bluetooth Classic keyboard or WiiMote you have at hand. Or if that doesn’t do it, a selection of IR devices ranging from joysticks from the Atari Flashback 4 to Apple TV remotes are compatible. Connect analog audio and composite video and the device is ready to go.

The system provides this impressive capability with an absolute minimum of components. Often a schematic is too complex to fit into a short post, but we’ll reproduce this one here to give you a sense for what we’re talking about. Come back when you’ve refreshed your Art of Electronics and have a complete understanding of the hardware at work. We never cease to be amazed at the amount of capability available in modern “hobbyist” components. With such a short BOM this thing can be put together by anyone with an ESP-32-anything.

There’s one more hack worth noting; the clever way [rossumur] gets full color NTSC composite video from a very busy microcontroller. They note that NTSC can be finicky and requires an extremely stable high speed reference clock as a foundation. [rossumur] discovered that the ESP-32 includes a PLL designed for audio work (the “APLL”) which conveniently supports fractional components, allowing it to be trimmed to within an inch of the desired frequency. The full description is included in the GitHub page for the project and includes detailed background of various efforts to get color NTSC video (including the names of a couple hackers you might recognize from these pages).

Continue reading “Run Your Favorite 8-bit Games On An ESP32”

ESP32 Video Tricks Hack Chat With Bitluni

Join us Wednesday at noon Pacific time for the ESP32 Video Tricks Hack Chat!

The projects that bitluni works on have made quite a few appearances on these pages over the last couple of years. Aside from what may or may not have been a street legal electric scooter, most of them have centered around making ESP32s do interesting tricks in the analog world. He’s leveraged the DACs on the chip to create an AM radio transmitter, turned an oscilloscope into a video monitor, and output composite video. That last one was handy for turning a Sony Watchman into a retro game console. He’s also found ways for the ESP32 to output VGA signals. Looks like there’s no end to what he can make the versatile microcontroller do.

Although the conversation could (and probably will) go anywhere, we’ll start with video tricks for the ESP32 and see where it goes from there. Possible topics include:

  • Tricks for pushing the ESP32 DACs to their limits;
  • When to use an external DAC;
  • Optimizing ESP32 code by running on separate cores; and
  • What about HDMI on the ESP32?

You are, of course, encouraged to add your own questions to the discussion. You can do that by leaving a comment on the ESP32 Video Tricks Hack Chat and we’ll put that in the queue for the Hack Chat discussion.

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, March 27, at noon, Pacific time. If time zones have got you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

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”