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.

21 thoughts on “Software Defined Television on an ESP32

  1. The ESP32 looks really cool, but it seems like if you wanted to do random cool things with embedded systems, you’d be better off choosing an ARM Cortex-M core.

    They can scale between tens of MHz with low power usage and minimal features, up to hundreds of MHz with onboard display drivers and even graphical accelerators. And you’d be using the same general instruction set.

    But the ESP32’s core is proprietary and ultimately you’re constrained by that one chip’s capabilities if it’s the core that you choose to learn about in depth.

    1. FWIW: Imo, if all you do is C programming, the core doesn’t really matter that much. Not all people do only C programming, however, and we feel the proprietary-ness of the Xtensa core also is a downside of the thing; we actually are looking into using more open cores, but as with all chip design things, this unfortunately is not a quick process. (Although you may already see the first glimmers of it in our next chip…)

      1. Wild speculation ofc, and I don’t expect neither confirm or deny any time soon :) But “looking into using more open cores” sure smells like a RISC-V proposition to me.
        I, for one, certainly wouldn’t mind if that comes to pass.

    2. I find it kind of amusing that this thread is about cores, but both of Bitluini’s recent hacks have nothing to do with a core, and everything to do with a fast DMA controller and DAC…and which, BTW, use practically undocumented features of said proprietary core to set that up…Sure, I’d prefer open source but it’s not like ARM is fully open, for example as used on Raspi (graphics). Because it’s not just about the core – the days of a chip having just a CPU like a Z-80 are long gone.

      1. “the days of a chip having just a CPU like a Z-80 are long gone.”

        They’re not as far gone as you might think. There is still a market for non-SoC devices but it’s ‘rather specialised’ :)

    1. Hm, at 80MHz SPI and a 8 clocks per DAC, should be able to bitbang CVBS at 10MHz, and that should be just enough to fit even PAL’s chroma frequency.

      Although maybe the math becomes annoying?

      I feel like SECAM is the last uncharted frontier for silly CVBS tricks, but maybe I just haven’t been looking in the right place.

  2. I think its great, someone pushing (and proving) the limits to accomplish a task, yes, could have been done with other hardware, but, it was done with this, something never meant to be used in this form of fashion. Useful? Depends. Better than some of the articles and hacks that have been presented recently here and around the net.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.