OV5640 Camera Bard (B) OV5640 Camera Bard (B) USER MANUAL OVERVIEW The mdule OV5640 Camera Bard (B) cntains is a vide camera based n vide sensr OV5640 (CMOS), takes 5 Megapixel image in QSXGA mde (2592x1944), uses DVP data interface and SCCB cntrl interface. It supprts RGB565\RGB555\RGB444, YUV(422/420), YCbCr422 and JPEG pixel/image frmats. The mdule can adjust white balance, saturatin, hue, sharpness, and gamma crrectin. The reslutin and frame rate are adjustable as well. The view angle is 170 that is suitable fr security mnitring. FEATURES Number f pixels: 5M Highest reslutin: 2592x1944 Vide sensr: OV5640 uses 1.4 x 1.4 um pixels OmniBSI technlgy, high sensitivity, lw crsstalk and nise supprts autmatic expsure, white balance, eliminatin f light stripes, black level calibratin, band pass filter, and ther autmatic functins supprts adjustment f saturatin, hue, gamma crrectin, sharpness, and lens calibratin, etc supprts zm, windw parallel translatin and windw settings Camera: CCD size: 1/4 inches Aperture (F): 3.0 Fcal Length: 3.8mm View angle (diagnal): 170 degrees Output mdes: YUV (422/420)/YCbCr422 Versin: V1.0 Dec.10 2017 1
OV5640 Camera Bard (B) RGB565/555/444 CCIR656 RAW RGB Cmpressed Data Operating vltage: 3.3V Cntrl interface: SCCB (cmpatible with I2C) Data interface: DVP 8-bits Size: 35.70 mm 23.90 mm INTERFACE DESCRIPTION OV5640 Camera Bard (B) Pin descriptins 3.3V Pwer input 3.3V GND Grund SIOC SCCB clck signal SIOD SCCB data signal VSYNC Frame synchrnizatin signal HREF Line synchrnizatin signal PCLK Pixel clck XCLK External scillatr clck input D0 ~ D7 Pixel data utput RST Reset (active lw) PWDN Save energy mde (high effective) Versin: V1.0 Dec.10 2017 2
OV5640 Camera Bard (B) SCCB CONTROL INTERFACE SCCB (Serial Camera Cntrl Bus) is a serial cntrl bus f a camera. SCCB is similar t I2C, because start and stp signals are same as in I2C, SCCB defines basic data transfer unit (phase), each phase f data transfer takes ne byte. SCCB cntains nly three kinds f transmissin cycle: 1) 3-phase write transmissin cycle 3-phase cycle includes: device address, register address, data 2) 2-phase write transmissin cycle 2-phase cycle includes: device address, register address 3) 2-phase write transmissin cycle 2-phase cycle includes: device address, data While writing: use 3-phase write cycle directly While Reading: first use 2-phase write cycle, then use 2-phase read cycle Mre detailed infrmatin abut SCCB prtcl see in OmniVisin Technlgies Serial Camera Cntrl Bus (SCCB) Specificatin Versin: V1.0 Dec.10 2017 3
OV5640 Camera Bard (B) DVP DATA INTERFACE The mdule OV5640 uses DVP data transfer interface, because camera driver interface (DCMI) in ur STM32F407\429\746 bards nly supprts DVP. OV5640 sensr has 10-bits DVP interface, but we usually use 8-bits data prcessing. Fr example, in the fllwing picture there are: OV5640 8 highest bits at the left side cnnected t 8 bits f STM32F407\429\746 bard at the right site. DVP interface timing diagram: DCMI INTERFACE DCMI (Digital camera media interface) is digital camera interface, integrated int STM32F4xx, F7xx series f MCU. DCMI is synchrnus parallel interface, capable receive 8-, 10-, 12- r 14-bits data stream frm CMOS camera mdule. It can supprt varius data mdes: YCbCr422, RGB565 and cmpressed data (JPEG). Versin: V1.0 Dec.10 2017 4
OV5640 Camera Bard (B) DCMI interface can supprt input data stream speed up t 54 MB/s. The interface cntains 14 data pins (D13-D0) and pixel clck pin (PIXCLK). The pixel clck plarity can be prgrammed and therefre data can be caught at the rising r falling frnt. These data cme t 32-bit register (DCMI_DR), and then are transmitted via DMA. The image buffer is cntrlled by DMA, nt by camera interface. Data received frm camera can be restred t riginal image lines f frames (YUB/RGB mdes) r series f JPEG files. T enable receiving JPEG images the JPEG bit (the 3rd DCMI_CR bit) must be set t 1. Data stream can be synchrnized by HSYNC (hrizntal synchrnizatin) signal and VSYNC (vertical synchrnizatin) signal, therwise by synchrnizatin signals embedded int the data stream. DCMI blck diagram: Tp-level blck diagram: Versin: V1.0 Dec.10 2017 5
OV5640 Camera Bard (B) The DMA interface active when the CAPTURE bit f DCMI_CR is set t 1. Every time the camera receive full 32-bits blck will trigger a DMI request. Mre detailed infrmatin abut SCCB prtcl see in datasheet USAGE DESCRIPTION This mdule prvides STM32F407\429\746 rutines, here are demnstratin examples fr Waveshare Open746I-C develpment bard: 1. Cnnect the mdule t DCMI prt f the develpment bard, cnnect USB-t-serial adapter t USART1 serial prt n the bard and t USB prt n cmputer. 2. Open UartDisplay (camera data receiving sftware) n yur cmputer, set number f prt and its rate 921600, and the pen the prt. 3. Dwnlad the prgram int the bard, push RESET buttn and after sme initializatin perid it shws fllwing data: 4. Push WAKE UP buttn and the bard will start t sent cntinuusly JPEG images via serial prt and UartDisplay will shw them. Versin: V1.0 Dec.10 2017 6
OV5640 Camera Bard (B) 5. Push middle key f the bard s jystick and OV5640 mdule will keep image n LCD screen in RGB565 mde cntinuusly Open746I-C+7inch LCD Versin: V1.0 Dec.10 2017 7
OV5640 Camera Bard (B) Open746I-C+4.3inch LCD Open407V-C+3.2inch LCD Versin: V1.0 Dec.10 2017 8