Skip to main content
Arduino

Return to Revisions

2 of 7
added 245 characters in body

How many FPS I can theoritically get for streaming frame from OV7670 with this setup?

Here is my setup:

OV7670 -> STM32F103... --USART--> ESP01 --UDP--> Gateway --> Internet --> Server

I want to aim to real-time experience.

Here is my calculation and analyze given known this information:

  • According OV7670 datasheet, it claims 30 FPS for ×ばつ480 image.

  • According esp8266 (esp01) datasheet, using built-in firmware AT command. I can use transparent mode of UART-WIFI passthrough with UDP. Which means, for any incoming data from MCU through UART, it will directly forwarded into server through UDP.

  • The datasheet also stated, AT command can change baud rate with maximum ×ばつ40 Baud. If one baud is represented as 9 bit (including 1-stop bit), then the bit rate is theoritically about 40Mb/s !!!.

  • Since I use UDP as transport, I need to limit UDP buffer size. Inspired from Youtube video stream that also use UDP with 1357 bytes as packet size, roughly about 10856 bits when I analyzed with wireshark. So, I choose such number.

  • If I use OV7670 with RGB555 (15-bit) format, then 1 pixel = 16-bits = 2 bytes. Hence, there is unused 1-bit at MSB of first byte.

  • To maximize unused 1-bit, I will used it as flag to indicate whether pixel is beginning of frame. If set to zero, the pixel is not a beginning of frame, if set to one, the pixel is beginning of frame.

  • With this bytestream, MCU job as frame buffer is only forwarding any byte from camera (including setting metadata of flag frame indicator) into USART.

  • Let the server reconstruct that bytestream into image frame since the server know this custom protocol.

  • If the resolution per frame is ×ばつ240 then ×ばつ2 bytes or 1.2288 Mbit per frame. Therefore, 30 FPS = 36.864 Mb/s. There is more bandwidth space for esp8266 USART-WIFI UDP passthrough which is 40Mb/s.

So, is there something I miss with my setup?

AltStyle によって変換されたページ (->オリジナル) /