Close
0%
0%

Bitluni's ESP32 Video Tricks Hack Chat

NTSC, PAL, and VGA for Espressif Microcontrollers

Wednesday, March 27, 2019 12:00 pm PDT Local time zone:
Hack Chat
Similar projects worth following

bitluni will be hosting the Hack Chat on Wednesday, March 27, 2019 at noon PDT.

Time zones got you down? Here's a handy time converter!

Join Hack Chat

We've featured quite a few of bitluni's projects over the last couple of years, and 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, turn 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?

  • Hack Chat Transcript Part 3

    Lutetium03/27/2019 at 20:13 0 comments

    Dave Blundell1:00 PM
    even QSPI isn't close to frame buf territory

    bitluni1:00 PM
    you can use it for audio I guess and some background data

    Dave Blundell1:00 PM
    my application is non-video so the speed wasn't a huge concern. Fastest communication was WiFi / CAN

    erik pax1:00 PM
    can the spi be overclocked, or bitbanged faster with i2s?

    Dave Blundell1:00 PM
    having the RAM was a godspeed

    Dave Blundell1:01 PM
    I think for my application I'm going to have to sit down with the scope.

    andrew.michael.johnson1:01 PM
    @bitluni if you wanted to try and bitbang SDI to a sdi to hdmi chip for HD I would look at TI's datasheets for their serialzer/deserializer SDI chips.

    Dave Blundell1:02 PM
    I hadn't thought to use the I2S for what I was doing but now see how it can be used to DMA data out really fast.

    morgan1:02 PM
    what is the actually bottlenck with PSRAM? my understanding was PSRAM itself is simply slow, or is it in fact SPI?

    Dave Blundell1:02 PM
    I had looked harder at MCPWM

    Dave Blundell1:02 PM
    have a feeling that I'm going to need to just try to make some waveforms and have scope hooked up.

    bitluni1:02 PM
    @andrew.michael.johnson thanks :-) another neat clue on the quest for HDMI for the esp32

    andrew.michael.johnson1:03 PM
    http://www.ti.com/product/LMH0041 LCD screen anyone? lol

    andrew.michael.johnson1:03 PM
    You get SDI working and things open up quite a BIT

    andrew.michael.johnson1:03 PM
    lol

    Dave Blundell1:03 PM
    @morgan, it's quad-SPI. bottleneck = SPI bus speed, bus width, protocol overhead. You can get many Mb/second but not anywhere near Gb/sec. I didn't benchmark it because I didn't need the speed. Also, I think it may share the bus with the QSPI dataflash for program memory

    morgan1:04 PM
    ok, good to know

    Dan Maloney1:05 PM
    So we're well over an hour now and going strong. I don't want to end the fun, but bitluni has been very generous with his time and expertise, and he may need to get back to real life. If so, I just want to say thanks for coming along, this was great!

    morgan1:06 PM
    yeah! thank @bitluni

    andrew.michael.johnson1:06 PM
    SDI-3G (3gbs) is the base standard for SDI but lower resolutions I believe can be achieved at lower speeds.. The issue is SDI is generally uncompressed video. I think it can be compress but I am not entirely sure.

    morgan1:06 PM
    thanks....

    Dan Maloney1:06 PM
    And I just want to drop a pitch for next week's Hack Chat, Python and the IoT with the Adafruit CircutPython team:https://hackaday.io/event/164062-python-and-the-internet-of-things-hack-chat

    bitluni1:06 PM
    I check the math back then when I was implementing camera support. psram it was not fast enough for qvga. It would work if you buffered half the frame in sram and the other half in the psram :-D

    sfrias11:06 PM
    Really interesting @bitluni , Regards to @Dan Maloney and everybody.

    Dan Maloney1:07 PM
    pt, LadayAda, and a whole bunch of other devs and folks from the CircuitPythn team will be here, plus we'll be doing a giveaway...

    Dave Blundell1:07 PM
    thanks @bitluni!

    bitluni1:07 PM
    it went quite low level

    bitluni1:07 PM
    yw

    Dave Blundell1:07 PM
    Appreciate the novel idea for I2S abuse.

    Dave Blundell1:07 PM
    :)

  • Hack Chat Transcript Part 2

    Lutetium03/27/2019 at 20:11 0 comments

    bitluni12:24 PM
    the i2s has a maximum data rate it supports

    bitluni12:24 PM
    the base clock can be like 40MHz

    bitluni12:25 PM
    but the pipeline itself is a bit finicky

    bitluni12:26 PM
    it simply stops working at certain clock rate that's around 20Mhz

    bitluni12:26 PM
    DVI specs have lowest clock at 25.175 MHz

    Nicolas Tremblay12:27 PM
    Any link for an FPGA upscaler?

    Dan Maloney12:28 PM
    What would you recommend as a good ESP32 dev board to start out with? And what kind of toolchain to support it?

    erik pax12:28 PM
    would an external serializer IC mean the esp32 would only need 2.5175Mhz gpio speed for DVI?

    bitluni12:29 PM
    @Nicolas Tremblay the new arduino FPGA board support hdmi.. I would look into that and clone it

    bitluni12:30 PM
    @Dan Maloney tkae something with many pins that's cheap and goes on a bread board. Arduino IDE with ESP32 integration is the simplest tool chain

    morgan12:31 PM
    I like TTGO boards, a lot of them include battery charging on board and are small enough to embed in even small portable projects. See #SatNOGS On Air O

    bitluni12:31 PM
    @erik pax not sure.. could be :-) you know any ones that does that?

    erik pax12:32 PM

    https://hackaday.io/project/164325-neon816

    HACKADAY

    Neon816

    This project is about the design of an 8-bit/16-bit nostalgia motherboard using currently in-production parts, and designed to interface primarily with modern peripherals. Features based on modern peripherals: - 2 Atari or Sega-style joystick ports. Should work with 6-button Genesis controllers, and many compatible controllers are currently in production.

    Read this on Hackaday

    bitluni12:32 PM
    @morgan I am using them, too. but they always want shipping :-D

    andrew.michael.johnson12:32 PM
    What I was wanting to do is use the ESP8266 to control a RX5808 Analog receiver, 8 input 1 output ic switch and generate a NTSC output to switch the video output to. an overlay would also be nice using something like a MAX7456 chip.. The problem is 2 fold CPU power and enough CS lines..

    morgan12:33 PM
    yeah... I just buy a dozen or so at a time

    morgan12:33 PM
    also, custom WROOM/WROVER is pretty straight forward, in the future I'll be making more of my own custom devboards

    andrew.michael.johnson12:34 PM
    without doing something tarded like hang a bunch of 328P's off it via I2C and have them manage the individual SPI's..

    Nicolas Tremblay12:34 PM
    heard of the Frog Board ?

    https://www.tindie.com/products/fred_IOT/esp8266-frog-board-frogo-pins-esp-12e-dev-board/

    bitluni12:34 PM
    @erik pax is it serializing using the fpga?

    bitluni12:36 PM
    @andrew.michael.johnson :-D sounds neat... multi processing at its best

    bitluni12:36 PM
    @Nicolas Tremblay nice.. that's even cheaper than the one from aliexpress that I got

    erik pax12:37 PM
    I think the serializer is a sepperate chip

    bitluni12:37 PM
    I have to look into it, that might be the best hint I got so far :-)

    bitluni12:38 PM
    what I'm currently in is checking out ICs that do VGA conversion to HDMI

    bitluni12:38 PM
    analog devices has some encoders

    andrew.michael.johnson12:38 PM
    I have a handful of NodeMCU's I use with breadboards... Have done a lot with arduinos, STM32 and TEENSY stuff but have not had the time to take the ideas I have in my head and start programming and breadboarding hardware for it yet.

    bitluni12:38 PM
    but they are dicks since you have to have an HDMI license to get the ICs from them

    Dan Maloney12:39 PM
    Really? That seems wrong.

    bitluni12:39 PM
    ADV7513 is the IC I have hhere now

    bitluni12:39 PM
    actually you are not allowed to use the word HDMI if you are not licensed

    erik pax12:40 PM
    I think you can just fake the HDMI signal over DVI

    bitluni12:40 PM
    the smallest license you can get is 5k/year and somewhat like 1$ /device

    [ E C C 0 ]12:40 PM
    What are you supposed to call it then?? XD

    Dan Maloney12:41...

    Read more »

  • Hack Chat Transcript Part 1

    Lutetium03/27/2019 at 20:10 0 comments

    bitluni11:39 AM
    what is the KiCON?

    bitluni11:39 AM
    KiCAD convention?

    morgan11:39 AM

    https://kicad-kicon.com/

    KICON 2019

    Home - KiCon 2019

    KiCon is a KiCad user focused conference.Held for the first time ever, April 2019 in Chicago IL.

    Read this on KiCon 2019

    bitluni11:40 AM
    any hints what you project is about

    bitluni11:40 AM
    ?

    bitluni11:41 AM
    all the cool conventions are in the US. I'm already saving vor the flight to the next supercon

    morgan11:41 AM
    yeah! supercon is the best

    morgan11:41 AM
    hint: 3D PCBs

    morgan11:41 AM
    and dying batteries

    bitluni11:41 AM
    nice

    morgan11:42 AM
    oh, and spooky noises if I can figure out i2s

    bitluni11:42 AM
    just take the example form the esp32 docs

    bitluni11:42 AM
    there is everything how to play sounds over i2s

    bitluni11:43 AM
    all the code works from arduino as well

    bitluni11:44 AM
    Ask Dan Maloney he is also working on a super secret audio project :-D

    morgan11:45 AM
    yeah I've got that stuff working, I can play samples, but I'm trying to push into tone generation and/or sequencnig of some sort

    morgan11:45 AM
    chip tunes, effectively

    bitluni11:46 AM
    did you see my old videos by any chance?

    bitluni11:46 AM
    I build an arduino midi device with some sinthesis

    bitluni11:46 AM
    adsr etc

    morgan11:47 AM
    oh cool, I'll check that out this evening

    bitluni11:47 AM
    the pov light saber project I did for electromaker has also the hum synthesized

    David Galloway11:48 AM
    Has anyone done bluetooth MIDI out of an ESP32? I'd like to make a wireless MIDI device using my ESP32.

    bitluni11:48 AM
    that was necessary since the pitch is controlled by the accelerometer

    bitluni11:49 AM
    @David Galloway that would be an awesome project. windows doesn't support bt midi

    bitluni11:49 AM
    that was the reason I didn't look into that yet

    David Galloway11:49 AM
    Oh that's too bad. I am also on Windows.

    bitluni11:51 AM
    maybe that changed since the last time I checked

    bitluni11:51 AM
    I bought the midi keyboard that support bt and found out that way

    morgan11:53 AM
    No MIDI for me yet but a lot of BLE lately

    morgan11:53 AM
    I've been putting the NiBLE feature branch through its paces

    bitluni11:54 AM
    are you doing it on the esp32? which lib are you using for ble?

    sfrias111:55 AM
    Hi everybody. From Tarragona, Catalonia (ES)

    morgan11:55 AM
    @bitluni yes, there's a new NiBLE feature branch now

    David Galloway11:55 AM
    Here are the specs. From a quick search it looks like some manufacturers are writing their own Windows drivers (Korg). https://www.midi.org/specifications/item/bluetooth-le-midi

    Dan Maloney11:56 AM
    Hola, @sfrias1

    bitluni11:56 AM
    nice

    morgan11:56 AM
    way easier to use than the Bluedroid stack

    morgan11:56 AM
    uses less resources in addition

    bitluni11:57 AM
    can't find NiBLE

    morgan11:57 AM

    https://github.com/espressif/esp-idf/tree/feature/nimble-preview

    GITHUB

    espressif/esp-idf

    Espressif IoT Development Framework. Official development framework for ESP32. - espressif/esp-idf

    Read this on GitHub

    bitluni11:57 AM
    nice

    morgan11:58 AM
    provides the port but the API is plain nimble

    bitluni11:58 AM
    nice

    Niek van der Maas joined  the room.11:58 AM

    sfrias111:58 AM
    NimBLE. ;-)

    bitluni11:59 AM
    need that for some game controllers, mouse and keyboard

    morgan11:59 AM
    me too, I'll be building a controller in the very near future

    morgan11:59 AM
    I'm plan to copy this controller,

    morgan11:59 AM
    but replace the arduino/nrf with an ESP32

    Dan Maloney12:00 PM
    So it looks like we're well underway - I'll have to dial back a ways to capture all this good stuff for the transcript. But let's call an official start to the ESP332 Video Tricks Hack Chat with bitluni. He's already online and chatting, but when you get a chance, can you tell us a little about your background?...

    Read more »

View all 3 event logs

Enjoy this event?

Share

Discussions

Wayneaswell wrote 07/30/2022 at 18:02 point

Better late than never.  Here are a few more options, that now considering the RiscV version of the esp32 also hasn't a basic little tiny video circuit, might help.

There are a number of HDMI over USB protocols, even compressed.  So, that might be a way, where, with the right drivers, you plug a HDMI adaptor in.

There is an Intel motherboard video bus, that sends the signal to the bus digitally where the interface converts it to the video format.

Another option is Miracast on the wifi equipped boards.  With divers, maybe the latency can be reduced.

Thanks a lot for the effort.  I had the same problem with a microcontroller I had previously considered using a controller rated at 96 billion instructions a second , as the world's record holder for low energy per instruction, but not a graphic mode, a memory bus that was basically a software controlled parralel port, and hardly any memory.  But, they still managed to run 16 colour vga through it, all in software, and a whole system, with those billions of instructions a second.  Of course, it was the GA144.

  Are you sure? yes | no

Interested in attending?

Become a member to follow this event or host your own