Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Research about the ESP32-S2 Camera Interface

Research about the ESP32-S2 Camera Interface

I am very interested in the ESP32-S2's camera port and the possibility of using it for a variety of MicroPython\CircuitPython projects. My hope is that the ESP32-S2 will the ability to do do things similiar to what is possible on the Raspberry Pi. Today there is no ESP32-S2 board available which exposes this port, and no camera modeles, but I wanted to understand the hardware capabilities to understand what might be possible and just as important, what is not.

This write up is based on solely on a morning's worth of research. If there are errors let me know. tx!

ESP32-S2 Data Sheet

I²S Interface

ESP32-S2 includes a standard I²S interface. It can operate in main or secondary mode, in full-duplex andhalf-duplex communication modes, and can be configured to operate with an 8-/16-/24-/32-/48-/64-bitresolution as an input or output channel. BCK clock frequency, from 10 kHz up to 40 MHz, is supported.The I²S interface has a dedicated DMA controller. PCM interface is supported.

Camera Interface

ESP32-S2 supports one 8 or 16-bit DVP image sensor, with clock frequency of up to 40 MHz. The camera interface is implemented by using the hardware resources of I²S.

Raspberry Pi Data Sheet

Camera and Display Interfaces

The RPi4B has 1x Raspberry Pi 2-lane MIPI CSI Camera and 1x Raspberry Pi 2-lane MIPI DSI Display connector. These connectors are backwards compatible with legacy Raspberry Pi boards, and supportall of the available Raspberry Pi camera and display peripherals.

What are the DVP and MIPI Interfaces?

MIPI Camera Serial Interface 2 (MIPI CSI-2)

https://www.mipi.org/specifications/csi-2

NOTE: "Companies must be members of MIPI Alliance to employ its specifications, however non-member companies benefit whenever they procure and implement components that use its specifications."

Digital Video Port (DVP)

https://electronics.stackexchange.com/questions/4363/what-is-a-digital-video-port "...there is no DVP spec but the pinout seems to be something of a de facto standard, even though part manufacturers doesn't always call it DVP. That is, there is a pixel clock, some sort of horizontal sync, some sort of vertical sync, and however many data lines."

DVP vs. MIPI

https://electronics.stackexchange.com/questions/308935/dvp-vs-mipi-camera-interface "CMOS image sensor interface divided into two catalogs, one is DVP (Digital Video Port) interface, the other is MIPI Mobile Industry Processor Interface. The main difference between DVP and MIPI is that DVP is parallel interface and the MIPI interface is high speed differential serial interface. MIPI interface provide higher data band width than DVP interface and support higher resolution and frame rate. "

Summary

The key difference is the ESP32-S2 has a DVP interface and the Raspberry Pi a MIPI interface. In theory, this means the Raspberry Pi's MIPI port is more capable at the higher-end than the DVP port on the ESP32-S2. What does this look like in the marketplace of available sensors? Which suport MIPI, DVP and what are their specs?

If you look at OmniVision's site, you will notice that DVP is only available on 1080p\2MP sensors. Above 2MP and up to 13MP MIPI only or MIPI+LVDS are supported and above 13MP only MIPI.

Follow-up Items

  • How would you add a more robust port to a CP or MP Board via a shield or a wing on a feather?

Additional Information

@askpatrickw

This comment has been minimized.

Copy link
Owner Author

@askpatrickw askpatrickw commented Jul 25, 2020

More exploration....

The datasheet says: "The camera interface is implemented by using the hardware resources of I²S."
CP 3.0+ supports I2S: "CircuitPython 3.0 and higher has I2S built in", but it does not appear to be for every board.
see: https://learn.adafruit.com/adafruit-i2s-stereo-decoder-uda1334a/circuitpython-wiring-test

Question: Does the FeatherS2 expose I2S to CP?
Answer: from Unexpected Maker (in discord), I2S is exposed on pins 23 & 24 and are labeled as DAC1, DAC2
https://discordapp.com/channels/605621786616528915/699857241506971660/736427749740249189

@askpatrickw

This comment has been minimized.

Copy link
Owner Author

@askpatrickw askpatrickw commented Aug 27, 2020

Feather Wing Specs

https://learn.adafruit.com/adafruit-feather/feather-specification#feather-and-wing-sizes-2861831-2

  • .9" x 2.0" with 0.1" holes at each corner
  • one 16-pin breakout strip on the bottom side, centered 1.0" from the left edge
  • one 12-pin breakout strip on the top side, 1.2" from the left side
  • Strips are spaced 0.8" apart

image

@askpatrickw

This comment has been minimized.

Copy link
Owner Author

@askpatrickw askpatrickw commented Jun 23, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment