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.
Our 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.
The cathode-ray tube ruled the display world from the earliest days of TV until only comparatively recently, when flat-screen technology began to take over. CRTs just kept getting bigger over that time until they reached a limit beyond which the tubes got just too bulky to be practical.
But there was action at the low end of the CRT market, too. Tiny CRTs popped up in all sorts of products, from camcorders to the famous Sony Watchman. One nifty CRT from this group, a flat(tish) tube from a video intercom system, ended up in [bitluni]’s lab, where he’s in the process of turning it into a retro Game Boy clone with a CRT display. The display, which once showed the video from a door-mounted camera, was a gift from a viewer. Date codes on the display show it’s a surprisingly recent device; were monochrome TFT displays that hard to come by in 2007? Regardless, it’s a neat design, with the electron gun shooting upward toward a curved phosphor screen. With a little Google-assisted reverse engineering, [Bitluni] was able to track done the video connections needed to use his retro game console, which uses an ESP32 that outputs composite video. He harvested the intercom speaker for game audio, added a temporary Nintendo gamepad, and soon he was playing Tetris in glorious monochrome on the flat screen.
The video below is only the first in a series where the prototype will be stuffed into one nice tidy package. It certainly still needs some tweaking, but it’s off to a great start. We can’t wait to see the finished product.
Continue reading “Unique Flat-Screen Display Put to Use in CRT Game Boy”
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”
When you acquired your first oscilloscope, what were the first waveforms you had a look at with it? The calibration output, and maybe your signal generator. Then if you are like me, you probably went hunting round your bench to find a more interesting waveform or two. In my case that led me to a TV tuner and IF strip, and my first glimpse of a video signal.
An analogue video signal may be something that is a little less ubiquitous in these days of LCD screens and HDMI connectors, but it remains a fascinating subject and one whose intricacies are still worthwhile knowing. Perhaps your desktop computer no longer drives a composite monitor, but a video signal is still a handy way to add a display to many low-powered microcontroller boards. When you see Arduinos and ESP8266s producing colour composite video on hardware never intended for the purpose you may begin to understand why an in-depth knowledge of a video waveform can be useful to have.
The purpose of a video signal is to both convey the picture information in the form of luminiance and chrominance (light & dark, and colour), and all the information required to keep the display in complete synchronisation with the source. It must do this with accurate and consistent timing, and because it is a technology with roots in the early 20th century all the information it contains must be retrievable with the consumer electronic components of that time.
We’ll now take a look at the waveform and in particular its timing in detail, and try to convey some of its ways. You will be aware that there are different TV systems such as PAL and NTSC which each have their own tightly-defined timings, however for most of this article we will be treating all systems as more-or-less identical because they work in a sufficiently similar manner.
Continue reading “Know Your Video Waveform”
The Apple 1 was one of the three big hobbyist computers that burst onto the scene in 1977. Unlike the PET 2001 and the TRS-80, only a couple hundred Apple 1s were ever produced, and with only a handful in existence today, you’ll have to fork out some serious money to get a Wozniak original for yourself.
The Apple 1 experience is easily emulated, of course, but this ESP8266 emulates the Apple 1 on hard mode. Dubbed the Espple by its creator [Hrvoje Cavrak], it emulates the 6502-based original in all its 1-MHz glory, while providing 20-kB of RAM, a considerable upgrade over the 4-kB standard. The complete original character set is provided for that old-timey feel, and there’s a BASIC interpreter ready to go. The kicker here, though, is that the emulator is completely wireless. You telnet into the 8266 rather than connecting a keyboard directly, and video is transmitted over-the-air using a GPIO pin as a 60-MHz PAL transmitter. A short length of wire is all you need to transmit to an analog PAL TV on channel 4; the video below shows a little BASIC code running and a low-res version of Woz himself.
You’ll find Apple emulators aplenty around these parts, everything from an Apple ][ on an Arduino Uno to a tiny Mac on an ESP32. There hasn’t been much in the way of Apple 1 emulations, though, at least until now.
Continue reading “Espple: A Wireless Apple 1 on an ESP8266”
By the time colour TV came to the United Kingdom, it was old news to Americans. Most of the viewing public on the Western side of the Atlantic had had the opportunity to see more than black-and-white images for years when in 1967 the BBC started transmitting its first colour channel, BBC2.
For Americans and continental Europeans, the arrival of colour TV had been an incremental process, in which the colour subcarrier had been added to their existing transmission standard. Marketed as “compatible color” to Americans, this ensured that their existing black-and-white TV sets had no need for replacement as the new transmissions started.
The United Kingdom by contrast had been one of the first countries in the world to adopt a television standard in the 1930s, so its VHF 405-line positive-modulation black-and-white services stood alone and looked extremely dated three decades later. The BBC had performed experiments using modified round-CRT American sets to test the feasibility of inserting an NTSC colour subcarrier into a 405-line signal, but had eventually admitted defeat and opted for the Continental 625-line system with the German PAL colour encoding. This delivered colour TV at visibly better quality than the American NTSC system, but at the expense of a 15-year process of switching off all 405-line transmitters, replacing all 405-line sets, and installing new antennas for all viewers for the new UHF transmissions.
Such a significant upgrade must have placed a burden upon the TV repair and maintenance trade, because as part of the roll-out of the new standard the BBC produced and transmitted a series of short instructional animated films about the unfamiliar technology, which we’ve placed below the break. The engineer is taken through the signal problems affecting UHF transmissions, during which we’re reminded just how narrow bandwidth those early UHF Yagis must have been, then we are introduced to the shadowmask tube and all its faults. The dreaded convergence is introduced, as these were the days before precision pre-aligned CRTs, and we briefly see an early version of the iconic Test Card F. Finally we are shown the basic procedure for achieving the correct white balance. There is a passing reference to dual-standard sets, as if convergence for colour transmissions wasn’t enough of a nightmare a lot of the early colour sets incorporated a bank of switches on their PCB to select 405-line or 625-line modes. The hapless engineer would have to set up the convergence for both signals, something that must have tried their patience.
The final sequence looks at the hand-over of the new set to the customer. In an era in which we are used to consumer electronics with fantastic reliability we would not be happy at all with a PAL set from 1967. They were as new to the manufacturers as they were to the consumers, so the first generation of appliances could hardly have been described as reliable. The smiling woman in the animated film would certainly have needed to call the engineer again more than once to fix her new status symbol.
Continue reading “Retrotechtacular: Information From The Days When Colour TV Was New”
Ever wonder why analog TV in North America is so weird from a technical standpoint? [standupmaths] did, so he did a little poking into the history of the universally hated NTSC standard for color television and the result is not only an explanation for how American TV standards came to be, but also a lesson in how engineers sometimes have to make inelegant design compromises.
Before we get into a huge NTSC versus PAL fracas in the comments, as a resident of the US we’ll stipulate that our analog color television standards were lousy. But as [standupmaths] explores in some depth, there’s a method to the madness. His chief gripe centers around the National Television System Committee’s decision to use a frame rate of 29.97 fps rather than the more sensible (for the 60 Hz AC power grid) 30 fps. We’ll leave the details to the video below, but suffice it to say that like many design decisions, this one had to do with keeping multiple constituencies happy. Or at least equally miserable. In the end [standupmaths] makes it easy to see why the least worst decision was to derate the refresh speed slightly from 30 fps.
Given the constraints they were working with, that fact that NTSC works as well as it does is pretty impressive, and quite an epic hack. And apparently inspiring, too; we’ve seen quite a few analog TV posts here lately, like using an SDR to transit PAL signals or NTSC from a microcontroller.
Continue reading “Never Twice the Same Color: Why NTSC is so Weird”