OmniVision camera sensors are very common in the embedded imaging domain. Sensors like OV7670, OV2640, OV5640, etc are extensively used in robotics and low end image processing applications. Using an LED flash with OV2640 or similar camera sensors can be a necessity in applications where bright lighting is required but only for image capture.
If you need to implement a bar code scanner or an automatic image capture device for quality inspection, you might want to operate an infrared or red LED flash. Desktop bar code scanners or readers are a good example where you need to use an LED flash because you cannot just keep the lights on all the time.
LED Flash - How it Works
LED flash design can vary a lot based on the specific application requirement. Many applications such as videography or motion detection triggered designs may need to use a “video mode” flash and “momentary bright flash” for image capture.
To achieve high brightness with LEDs, the LED is pulsed at a higher-than-normal operating current. This pulse does not cause damage to the LED if it lasts for a short duration. LED datasheets will usually specify how long you can subject it to high operating current.
For example, here is a look at an LED datasheet parameters. This can be used for adding LED flash to OV2640.
While these LEDs are usually small and rated for low current of 350mA (1 watt) or similar, they an be pulsed to 1.5A or 5 watts for high momentary brightness. That is what an LED flash does.
However, the momentary flash must be synchronized with the shutter of the camera sensor for the auto-exposure and exposure to work correctly.
The figure above shows a clear relationship between the low current 350mA mode and high current 1500mA flash.
The luminous flux from a flash is more than 3 times the normal flux for the LED. Granted that the heat dissipation will be higher, but it should not matter if the flash operation only takes place for a brief period of time.
LED Flash Driver Design
In most cases, you would need a driver design that can
- Constantly operate the LED at a relatively low current for “video” use
- Flash the LED at highest possible current for a very short while
- Allow for brightness control of the flash via high frequency PWM to allow for accurate exposure
Here is a simple circuit that I have used before to add LED flash to OV2640. We often develop camera sensor based embedded designs, and in one such case we had an OV2640 connected to an STM32 and the flash was required to operate in variable brightness flash mode.
The above circuit uses a highly integrated and efficient boost LED driver chip, the SY7807 from Silergy. The boost converter uses high frequency switching and a small 2.2uH inductor to produce the output voltage necessary.
When this relatively high, internally feedback regulated forward current is applied to the LED, it lights up with very high brightness for a short period of time. The forward voltage is only applied momentarily, and can be controlled by pulsing the ENF pin high. The SY7807 contains built-in protections to turn the flash current off after a “timeout” period to prevent damaging the high power LED.
Some points worth mentioning are:
- You can apply PWM frequency of up to 200 kHz to control brightness of both flash and torch modes.
- The ENM pin can be made high for torch or video mode, where the LED stays on at 300mA. The ENM is grounded in the schematic because torch mode was not used.
- Requires minimal components and no cooling at all. Input voltage can range from 2.7V to 5.5V. Therefore, this solution can be powered from a Li-Po cell.
Synchronize LED Flash with OV2640
Synchronizing the LED flash operation with OV2640 or any other camera module’s shutter is important for correct exposure. Improper timing can result in partially exposed photos from the digital “rolling shutter” effect.
OmniVision camera modules offer a STROBE pin for operating an external flash controller. This STROBE pin is optional, but can be set up to output an active high or active low signal for flash control.
Note that the flash is only turned on briefly during the exposure phase of the shutter open period. Newer and more advanced camera sensors like the OV5640 offer much better control over flash operation mode and behavior.
If flash is an important part of your application, you may want to switch to one of the newer and better OmniVision camera sensors.
Feel free to ask away via the Quick Contact form in the sidebar, or leave a comment below.
Change Log
- Initial Release: 23 September 2021
References
- Reference 1: Samsung High Power LED Series – LH351
- Reference 2: Silergy SY7807 Datasheet
- Reference 3: OV2640 Datasheet
- Reference 4: OV5640 Datasheet
1 comment
Hi, can you please tell me how to enable strobe pin in ov2640 and make it high during exposure time.