Manual Focus

The OV7670 is a fixed-focus camera — it can’t automatically compensate for near or far subjects. From the factory, it seems to work best about 1 meter (3 feet) from a subject. Anything farther or closer (especially closer) will be progressively more blurry. But we can manually tweak that.

There’s a tiny set screw on the side of the camera. Use a correspondingly tiny jeweler’s screwdriver to loosen this screw a couple turns.

The lens is threaded and can be turned now.

Turning clockwise (looking at the lens) will tune this to focus on more distant subjects.

Turning counterclockwise will help focus on closer subjects.

A couple of full counterclockwise turns and the camera can do incredible close-ups, just a few millimeters in front of it! This could even be used for a simple “video microscope,” if the subject is adequately lit.

Pinhole Version

There’s also an incredibly tiny (7mm square) “pinhole” version of the OV7670. Costs a bit more, focus isn’t so adjustable, but it’s so tiny. This version often comes installed on a similar carrier board.

If you make the same power and resistor changes on the carrier board, this version is interchangeable with the larger camera. There are two extra pins…it still fits in the Grand Central 2-row header, those extra pins just aren’t used right now.

Although the extra pins are labeled D0 and D1 (with the usual other 8 being D2 through D9), that’s not really true…D2-D9 are really the PCC D0-D7 pins. Not certain, but this might be a “FIFO” variant of the camera, which could allow capturing images larger than will fit in RAM…though the library doesn’t support this yet.

This guide was first published on Jul 28, 2020. It was last updated on Jul 28, 2020.

This page (Other Hardware Notes) was last updated on Aug 03, 2020.

Text editor powered by tinymce.