In each column, the top label (e.g., G, SDA, etc) applies to both the top and center rows of pins. The bottom label (e.g., 3V, SCL, etc) is for the bottom row of pins. As noted on the Assembly page, depending how you will install the module you will either be using the two outermost rows of pins, or the two bottom rows of pins.
Camera Lens
This OV5640 camera has a 120° wide-angle lens. Its focusing distance can't be adjusted. When shipped, it has an opaque lens cap on it. Remove the cap to capture images, unless you really like the color black.
The camera module requires a well-regulated 3.3v supply in order to operate.
- G (GND): Connect to microcontroller GND
- 3V (3.3V): Connect to microcontroller +3.3V supply
- PD (powerdown): Optional connection to microcontroller GPIO. When pulled HIGH the camera module is put into power-down mode. When released or pulled LOW the camera is powered on. This pin can also be pulsed HIGH as a way to reset the camera.
- RT (reset): Optional connect to microcontroller GPIO. Pull the pin LOW to reset the camera module and release it or pull it HIGH to enter operating mode.
Both pins have built-in pull resistors, so by default the camera is powered on and allowed to exit reset mode.
When powered on, this LED will light. To disable the LED, cut the small trace between the two pads of the solder jumper. To re-enable it, bridge the two pads with a blob of solder.
The camera module must be configured using I2C.
- SDA: Connect to microcontroller SDA
- SCL: Connect to microcontroller SDL
Adafruit's OV5640 camera module has built-in pull ups, so you don't need to add external ones. But note that many modules from other vendors do not have these pull-ups.
- XC (external clock): When the XCLK jumper is set to "EXT" (the default), this pin must be driven with a 24MHz square wave from the microcontroller or other source. When the jumper is changed to "INT", then an on-board clock generator is used instead. In this case, the XC pin should not be driven by the microcontroller and may be left unconnected.
- PC (pixel clock) tells the microcontroller when image data is available. This may need to be connected to a specific microcontroller pin.
- VS and HS are synchronization signals, which tell the microcontroller when a new frame (VS) or row (HS) of data begins. These may need to be connected to specific microcontroller pins.
The OV5640 Camera Breakout includes an on-board 24MHz crystal oscillator. To use this as the OV5640 clock, cut the jumper from the center pad to EXT then solder between the center pad and INT. In this mode, any input on the XC pin is ignored and XC may be left unconnected.
The 8 data pins (numbered from D2 to D9 because reasons) carry data out of the camera into the microcontroller.
Depending on mode, these 8 data bits can be half of a 16-bit pixel value, or one byte of JPEG data.
While the camera supplied with the OV5640 Camera Breakout does not have an auto-focus motor, some compatible camera modules include a "voice coil" motor for auto-focus.
If you install such a module, close the VM jumper with a blob of solder. Internally, this connects the 3.3V supply to the camera module on its D1 connection.
Page last edited March 08, 2024
Text editor powered by tinymce.