1. Home
  2. Docs
  3. Camera breakout board
  4. 18MP AR1820HS
  5. Software Guide

Software Guide

Introduction

This page describle the basic control over the sensor registers using Arducam camera breakout board, it might not be able to cover all the detail register operations, but give you an insight how to adjust these settings.

Sensor I2C Slave Address

The AR1820HS camera I2C 8-bit slave address is fixed to 0x6E. With 16bit regsiter address, and 16bit register value.

There is a ” chip_version_reg ” register (0x0000) which can help diagnose if the I2C bus is accessable and distinguish the camera models.

Camera Model chip_version_reg register ( 0x0000 )
AR1820HS 0x50

Sensor Initialization

You need a basic settings to bring up the sensor and make it working in normal streaming mode. Please contact us for the config file for the Window GUI.

Manual Exposure Control

The integration (exposure) time of the AR1820HS is controlled by the coarse_integration_time register. The limits for the coarse integration time are defined by:

coarse_integration_time_min ≤ coarse_integration_time

The actual integration time is given by:

It is required that: coarse_integration_time < = (frame_length_lines – coarse_integration_time_max_margin) Note: For AR1820HS, “coarse_integration_time_max_margin” should be 1.

If this limit is broken, the frame time will automatically be extended to (coarse_integration_time + coarse_integartion_time_max_margin) to accommodate the larger integration time. In binning mode, frame_length_lines should be set larger than coarse_integration_time by at least 3 to avoid column imbalance artifact.

Given the pixel clock is 80MHz, line_length_pck_ register (0x300c) is 0xA3FC. In order to simplify the testing purpose, we only set the coarse_integration_time_ registe(0x3012).

Exposure = 52.4ms, RegAddr = 12306 (0x3012), Value = 100

Exposure = 157.5ms, RegAddr = 12306 (0x3012), Value = 300

Exposure = 262.4ms, RegAddr = 12306 (0x3012), Value = 500

Manual Gain Control

Gain settings are like the ISO settings in most digital cameras. The gain is divided into analog and digital gain, and there are separate gain settings for four color-specific gains. There is also global gain setting to change all the four color-specific gains.

Here we demonstrate how to change the gain through the global_gain register (0x305E in hex). Given the exposure register 0x3012(12306) is 10.

RegAddr = 0x305E, Value = 0x2001

RegAddr = 0x305E, Value = 0x2002

RegAddr = 0x305E, Value = 0x2003

White Balance Control

The AR1820HS sensor output is RAW bayer format, each RGB channel gain is controlled by corresponding gain regsiter.

There are 5 registers related to color gain settings which can be used for control white balance.

RegisterDescription
0x305E global_gain
0x3056 green1_gain
0x3058 blue_gain
0x305A red_gain
0x305C green2_gain

The global gain is used to set all color gain value at one time. The other 4 registers control GR, B, R, GB respectively.

Tips: GR, GB should be set equally, and Red, Blue gain can be set higher than GR/GB gain to get better color represent. Automatic software whtie balance is also possible with proper AWB algorithm to set these gain settings automatically.

Was this article helpful to you? Yes No

How can we help?