This user guide describes the detail operation of ArduCAM USB2 camera shield. The latest device driver, SDK library and examples can be downloaded from the
Figure1. Arducam USB2 Camera Shield
2. Hardware Installation
Figure 2. Interface Diagram
There are two different camera interface provided on the USB camera shield, but only one camera interface can be used at a time.
2.1. MIPI Camera Interface
The MIPI camera interface is used for the 22 pin MIPI camera breakout board.
Table 3 P1 Connector Pin Definition
|Pin No.||PIN NAME||TYPE||DESCRIPTION|
|2||D0_N||Input||MIPI DATA0 N|
|3||D0_P||Input||MIPI DATA0 P|
|5||D1_N||Input||MIPI DATA1 N|
|6||D1_P||Input||MIPI DATA1 P|
|8||C_N||Input||MIPI CLOCK N|
|9||C_P||Input||MIPI CLOCK P|
|11||D2_N||Input||MIPI DATA2 N|
|12||D2_P||Input||MIPI DATA2 P|
|14||D3_N||Input||MIPI DATA3 N|
|15||D3_P||Input||MIPI DATA3 P|
|17||PWEN||Output||MIPI Power En(active HIGH)|
|18||VCC||POWER||3.3v Power supply|
|20||SCL||Input||Two-Wire Serial Interface Clock|
|21||SDA||Bi-directional||Two-Wire Serial Interface Data I/O|
|22||VCC||POWER||3.3v Power supply|
2.2. DVP Camera Interface
The DVP camera interface is used for the camera breakout board with 30pin ribbon cable.
Table 4 HDC1 Connector Pin Definition
(Connector Part Number: Hirose FH28D-30S-0.5SH(05))
|Pin No.||PIN NAME||TYPE||DESCRIPTION|
|3||Trigger||Output||Exposure synchronization input|
|4||VSYNC||Input||Active High: Frame Valid; indicates active frame|
|5||HREF||Input||Active High: Line/Data Valid; indicates active pixels|
|6||DOUT11||Input||Pixel Data Output 11 (MSB)|
|7||DOUT10||Input||Pixel Data Output 10|
|8||DOUT9||Input||Pixel Data Output 9|
|9||DOUT8||Input||Pixel Data Output 8|
|10||DOUT7||Input||Pixel Data Output 7|
|11||DOUT6||Input||Pixel Data Output 6|
|12||DOUT5||Input||Pixel Data Output 5|
|14||DOUT4||Input||Pixel Data Output 4|
|15||DOUT3||Input||Pixel Data Output 3|
|16||DOUT2||Input||Pixel Data Output 2|
|17||DOUT1||Input||Pixel Data Output 1|
|18||DOUT0||Input||Pixel Data Output 0(LSB)|
|20||PCLK||Input||Pixel Clock output from sensor|
|21||SCL||Input||Two-Wire Serial Interface Clock|
|22||SDA||Bi-directional||Two-Wire Serial Interface Data I/O|
|23||RST_N||Output||Sensor reset signal, active low|
|26||STANDBY||Output||Standby-mode enable pin (active HIGH)|
|27~30||VCC||POWER||3.3v Power supply|
3. Device Driver Installation
Please download the device driver from github. The Windows device driver is located in Drivers folders like WinXP, Win7 or Win10. In each driver folder, there are x64 and x86 folders for 64bit and 32bit systems respectively. When installing the driver on Windows, you might need to disable the Windows driver signature by following the two video below:
Plug in the USB cable to the camera and the host PC USB port, there is a notification from the lower right of the taskbar. The auto-installation of the driver will fail, so we have to install the USB camera driver manually.
Go to Start->Settings->Control-Panel->Device Manager, right-click the unknown device and select “Update Driver Software”.
Select the “Browse my computer for driver software”,
Select “Let me pick from a list of device drivers on my computer”.
Select “Show All Devices”.
Press the “Have Disk” button.
Enter the path to the ArduCAM USB2 driver, where you save the downloaded file from github.
Confirm the installation of the driver by pressing “Yes”. Confirm the installation again by pressing “Install”.
You will successfully install the driver like this.
4. Demo Code
The demo code is provided in source code form to help the user to understand the operation of the ArduCAM USB camera and SDK library. It is created with Microsoft Visual Studio 2010 and based on MFC framework.
4.1. Run Program
The Windows demo code is located in
../Winodws/GUI/USBTest folder and the release executable software is located in
4.2. Scan Cameras
Click the 【scan】 button, the drop down list will show all supported cameras with serial number, user can select one of them to open.
4.3. Load the Camera Settings
There are several preset of the camera settings in the ../Config folder,
- Confirm the board number of the circuit board,
- Click the 【File】-【Open】 button, select the config folder, then select the folder corresponding to the board number and interface, and select the required camera configuration file,
- Click 【load】 to load the setting. The camera type, width, height, bits, format, I2CAddr, I2CMode will be loaded with the correct values.
4.4. Open the Camera
Click 【Open】 to initialize the camera. There will be a prompt in the text area after initialization.
4.5. View Hardware Version Number
After open the camera, you can click the 【About】 button to view the hardware version number.
Before viewing the hardware version number, be sure to click Open, Otherwise, the version number cannot be displayed.
4.6. Play the Video
Click the 【Play】 to capture and display the video in real-time.
The lower left corner will show the number of frames.
4.7. Stop the Video
Click the 【Stop】 button to stop the video capture and display.
4.8. Take a Snapshot
When play the video, you can click the 【Shot】 to take BMP image to files. The picture is stored in the ../ Winodws/GUI/USBTest/x64/Release/Shot folder.
4.9. Sensor Register Read/Write
This is very useful to access the sensor register in order to adjust the sensor settings on the fly. For example you want to manually change the exposure settings you can input the exposure register address and value then click write, you can video how the brightness changes from the video.
4.10. RAW Mode Selection
There are four combination of the RAW format R-G, G-R, B-G, G-B. It is predefined for tested camera, you can also changes the mode match your target sensor RAW display order.
After confirming the raw mode online, you can modify the settings in the configuration file.
4.11. Camera Control
4.11.1. Fit to Window
To fit the captured image to the GUI windows size. If this is unselected, user can use mouse scroll wheel to zoom in and out the real-time video, or drag the mouse cursor to move the video position.（【Fit to window】 is selected by default.）
4.11.2. Force Display
Force display is useful to debug the problem by force displaying the wrong video data which is mismatch with the camera preset values.
For a example, as shown in the figure above, we first modified the configuration file, change the CFG_MODE value to 0, and reload the configuration file. In this way, the Width and Height of the interface are editable. Then change the Height value from 3684 to 3680. After clicking 【play】, because the resolution doesn’t match, the text area will prompt “bad frame received”, and the image cannot be displayed. Then select 【Force Display】, the image will be forced to display.
It can be used to manual control extra motorized IRCUT filter for both daylight and night vision.
4.11.4. Frame Rate Information
The frame rate information show the capture frame rate (Capt) and GUI display frame rate (Read). These two values might be mismatched, due to the performance of the demo GUI software and computer hardware.
4.12. Image Save Options
There are several options for saving image files and format.
- The 【Display】 option doesn’t save any file just real-time display the video from the camera.
- The 【Save Data】 option is used to save the continuous images in the same format as the camera output like RAW, RGB, YUV or JPEG.
- The 【Save Image】 option is used to save the BMP images.
- The 【Save Video】 options is used to save the AVI format video.
Except the 【Display】 option, when checking other options, the video is not updated on the display region. All the saved file are located in the Record folder. The files is stored in the ../ Winodws/GUI/USBTest/x64/Release/Record folder.