SlideShare uma empresa Scribd logo
1 de 24
INTRODUCTION
In this project our aim is to interface OV7670 camera module with ATmega based
Arduino Microcontroller board. Camera modules are widely used in the world of
electronics. Our aim is to show how to connect, configure and get a test image
using a small program on java, it will be an excellent starting point for further
experiments. Currently ov7670 camera is the affordable image acquisition module
for embedded applications.
Our goal is to interface the camera with Arduino which are much
efficient, low cost easily available and easy to configure. These are the major
reasons for which here an Arduino is used. In spite of the following advantages
there are some disadvantages too, that are:
o Very limited I/O pins
o Limited memory capacity
o Slow Processing speed
The above disadvantages are the challenges in interfacing the camera
with an Arduino and these are to be overcome by applying some Data handling
and manipulation techniques. The OV7670 Camera module talks over a modified
I2C protocol that is known as SCCB (Serial Camera Control Bus). This protocol is
intended to be used with OmniVision’s camera modules.
This project is intended to provide a low cost and easily configurable image
capturing solution, that can be used in real-time Time-lapse photography, image
acquisition systems or as security cameras.
The camera module is accessed by SCCB (I2C) protocol by the Arduino.
The Data sent by the camera is parallel over data channel D0-D7, Data received by
the Arduino is sent to the computer over serial communication and this follows the
rule of sending pixel data of one row at a time. This help to overcome the problem
of slow processing and slow data transmission rate of the Arduino boards
1
Figure 1: Block diagram for Camera-Arduino interface
2
OV7670
camera
module
Arduino UNOI2C
COMPUTER Seri
al
HARDWARE
2.1 CAMERA MODULE (OV7670)
The camera module has an onboard CMOS sensor designed for mobile application
where low power consumption and small size are of utmost importance.
Proprietary sensor technology utilizes advanced algorithms to cancel Fixed Pattern
Noise (FPN), eliminate smearing, and drastically reduce blooming. All required
camera functions are programmable through the Serial Camera Control Bus
(SCCB) interface.
The device can be programmed to provide image output in various fully
processed and encoded formats.
Resolution
VGA (640 x 480); - QVGA (320 x 240); - CIF (352 x 240); -
QCIF (176 × 144)
Transfer rate up to 30 fps
Image encoding RGB 565/555, YUV / YCbCr 4: 2: 2
Interface I2C interface interaction / SCCB
Table 1: Camera module Specification
2.2 Two Wire SCCB Interface
The modified 2-wire implementation allows for a SCCB master device to interface
with only one Slave device. This 2-wire application is implemented in the camera
chip reduced pin package products where the SCCB_E signal is not available
externally.
Figure 2: Two Wire SCCB Interface
3
2.3 Pin Functions
Signal Name Signal Type Description
SCCB_Ea Output Master drives SCCB_E at logical 1
When the bus is idle. Drives at logical 0 when
the master asserts Transmissions or the
system is in Suspend mode.
SIO_C Output Master drives SIO_C at logical 1 when The
bus is idle. Drives at logical 0 and 1 when
SCCB_E is driven At 0. Drives at logical 0
when the system is Suspend mode.
SIO_D I/O Serial I/O Signal 0 Input and Output -
remains floating when the bus is idle and
drives to logical 0 when the system is in
Suspend Mode.
Table-2: Master Device Pin Descriptions
Signal Name Signal Type Description
SCCB_Ea Input Input pad can be shut down when the System
is in Suspend mode.
SIO_C Input Input pad can be shut down when the System
is in Suspend mode.
SIO_D I/O Serial I/O Signal 0 Input and Output - input
pad can be shut down When the system is in
Suspend mode.
Table-3: Slave Device Pin Descriptions
2.4 Application
Some of the applications of camera module are: PC Camera, and Cellular phones,
Video conference equipment, Machine vision, Security camera, Biometrics,
Digital Still Cameras
4
2.5 ARDUINO
Arduino is an open-source platform used for building electronics projects. Arduino
consists of both a physical programmable circuit board (often referred to as
a microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code
to the physical board.
Microcontroller ATmega 328-p
Operating Volts 5V
Input Voltage 7-20v
Digital I/O Pins 14
Analog Input 6
PWM pins 6
Flash Memory 32 Kb
SRAM 2 Kb
EEPROM 1 Kb
Clock Speed 16 MHz
Current 50 mA
DC Current at Digital I/O 20 mA
Table 4: Arduino UNO Specification
5
CAMERA-ARDUINO INTERFACING CIRCUIT
For interfacing the camera module with the Arduino we need a circuit that will
provide the mount points as well as the voltage Pull-up and Pull-down facilities.
below is a Typical Block representation of the hardware connection between
OV7670 and Arduino UNO. Oscillator used here is optional, we will be Arduino’s
onboard crystal oscillator is being used to generate the XCLK.
3.1 Block diagram for Arduino-Camera interfacing
Arduino
Figure 3: Block representation of Connection
6
Camera
Module
SCL, SDA
HREF, VSYNC
DATA
PCLK
PWDN
+3.3V, GND
Oscillator
XCLK
3.2 Pin Configuration
Pin configuration is one of the most important data that must be kept in mind
while designing the interfacing circuit and must be followed to ensure proper
communication Arduino and Camera Module.
Pin Type Description
VDD Supply Power supply
GND Supply Ground level
SDIOC Input SCCB clock
SDIOD Input/output SCCB data
VSYNC Output Vertical synchronization
HREF Output Horizontal synchronization
PCLK Output Pixel clock
XCLK Input System clock
D0-D7 Output Video parallel output
RESET Input Reset (Active low)
PWDN Input Power down (Active high)
Table 5: Arduino Pin Configuration
7
3.3 Circuit Diagram
The Arduino is rated for 5V and the camera module is of 3.3V. Hence, the voltage
divider for the XCLK will be used (two resistors of 4.7KΩ) to pull down the
voltage to ~3V. Furthermore, OV7670 does not provide output voltages higher
than 3.3V which is a quite low for Arduino to reads the input as high (5V), so we
will connect pull-up resistors.
Here external signal is provided to D12 to capture image and to D8 for
image to PDF conversion, both are active high with 0.3 sec high pulse.
Figure 4: Circuit Diagram for OV7670-Arduino Interfacing [Source: privateblog.info]
PROGRAM FLOW FOR INTERFACING
8
OV7670 camera module captures image during LOW at VSYNC and sends out
row data during the HIGH at HREF. The Arduino receives the parallel data input
from camera module image sensor and converts it to the serial data and also
provides initialization to the registers of the OV7670 Module.
Figure 5: Typical Data flow diagram
Basic steps in the code are:
1. Generation of PWM
2. Start I2C Communication
3. Write default register values
4. Receive data from camera
9
Arduino
Figure 6: Flow diagram for initialization of camera module
4.1 Configure Arduino that will give 8 MHz at Pin D11
DDRB | = (1 << 3); // pin 11,
The ASSR & = ~ (_BV (EXCLK) | _BV (the AS2));
TCCR2A = (1 << COM2A0) | (1 << WGM21) | (1 WGM20 <<);
TCCR2B = (1 << WGM22) | (CS20 1 <<);
OCR2A = 0; // (F_CPU) / (2 * (X + 1))of d0 of low-
DDRC & = ~ 15; // d3 camera
DDRD & = ~ 252; // d7-d4 and interrupt pins
10
4.2 Configure I2C interface
TWSR & = ~ 3; // preset for the disable the TWI
TWBR = 72; // set to 100 kHz
Figure 7: Flow Diagram of I2C communication
4.3 Initialization of Camera Module
Figure 8: Write default Register values
11
ARDUINO
Write Default register
Values with I2C Camera Module
WrReg (0x12, 0x80);
_delay_ms (100);
wrSensorRegs8_8 (ov7670_default_regs);
WrReg (REG_COM10, 32); // PCLK does not HBLANK Locality toggle on.
4.4 Receiving Image bytes
The camera module sends parallel image data bytes where it is buffered till receiving full
row data then this data is sent over serial communication to the pc as shown in figure 9.
Figure 9: Receiving Image Bytes
12
OV7670
camera
Module
Arduino UNO
ComputerParallel Data Serial Data
MUX
Buff
er
RAM
OV7670 MODULE DATA TRANSFER
The SIO_C signal is a single-directional, active-high, control signal that must be
driven by the master device. It indicates each transmitted bit. The master must
drive SIO_C at logical 1 when the bus is idle. A data transmission starts when
SIO_C is driven at logical 0 after the start of transmission as shown in figure 10 &
11. A logical 1 of SIO_C during a data transmission indicates a single transmitted
bit. Thus, SIO_D can occur only when SIO_C is driven at 0.
5.1 Timing Diagram
Figure 10: SCCB Timing Diagram
Figure 11: Horizontal Timing Diagram
13
Camera module sends row data between every HSYNC LOW and during each
HSYNC HIGH, the HREF follows the HIGH and both of this occurs between the
two HIGH of the VSYNC signal as shown in figure 12, that means all the row data
is sent over the VSYNC at LOW.
Figure 12: VGA Frame Timing
14
PIXEL DATA BYTE TO IMAGE CONVERSION
For this purpose a java program is being used, that will grab the serial input data
(bits) stream from Arduino at specific COM port that will generate a valid BMP
image from it , the code works as illustrated below in figure 13.
6.1 Program Work Flow
Figure 13: Algorithm of data to image generation
15
6.2 COM Port selection (JAVA)
if(!enumeration.hasMoreElements())
break;
portId = (CommPortIdentifier)enumeration.nextElement();
if(portId.getPortType() == 1)
{
System.out.println((new StringBuilder()).append("Port name:
").append(portId.getName()).toString());
SimpleRead simpleread;
if(portId.getName().equals("COM5"))
simpleread = new SimpleRead();
6.3 Port parameters (JAVA)
serialPort = (SerialPort)portId.open("SimpleReadApp", 1000);
inputStream = serialPort.getInputStream();
serialPort.setSerialPortParams(0xf4240, 8, 1, 0);
int i = 0;
6.4 Waiting for an (data stream) input from Arduino (JAVA)
do // infinite loop starts here
{
System.out.println("started the if else ");
16
while(!isImageStart(inputStream, 0))
// image Generation code goes here
} while(true);
}
catch(Exception exception)
6.5 Image generation from received data stream (JAVA)
17
Figure 14: Algorithm for image generation from received data steam
while(!isImageStart(inputStream, 0))
{
System.out.println("Looking for image");
System.out.println((new StringBuilder()).append("Found image:
").append(i).toString());
for(int j = 0; j < 240; j++)
{
for(int l = 0; l < 320; l++)
{
int j1 = read(inputStream);
ai[j][l] = (j1 & 0xff) << 16 | (j1 & 0xff) << 8 | j1 &0xff;
}
}
for(int k = 0; k < 240; k++)
{
for(int i1 = 0; i1 < 320; i1++)
ai1[i1][k] = ai[k][i1];
}
BMP bmp = new BMP();
bmp.saveBMP((newStringBuilder()).append("c:/out/").append(i+
+).append(".bmp").toString(), ai1); System.out.println((new
StringBuilder()).append("Saved image: ").append(i).toString());
18
}
HANDLING MULTIPLE SCANS (CMD)
It is sometime needed to perform multiple scans. That means the scanning
mechanism is provided input for scan again and again, then this program as shown
in figure 15 proves to be useful it takes the user inputs to perform a certain number
of scans and then control the Arduino or any other microcontroller to perform the
scanning and PDF conversion till it reaches the provided number of scans.
Figure 15: Algorithm to handle multiple Scans
19
IMAGE TO PDF CONVERSION (CMD)
Now after generating the images we need to convert those images to a PDF file for
which we will use the software ConvertITP.EXE. following is the algorithm for
Image to PDF conversion.
Figure 16: Algorithm Image to PDF generation
8.1 Code for the Image to PDF conversion
@echo off
echo by somnath
echo .
20
set CITP="%ProgramFiles%Softinterface, IncConvert Image To
PDFConvertITP.EXE"
set InputFolder=C:out
set OutputFolder=C:out
REM Convert from JPG to PDF
%CITP% /S%InputFolder%*.bmp /T%OutputFolder%all_img.PDF /F0 /+
ren %InputFolder%all_img.PDF all_img-%date:~10,4%%date:~7,2%
%date:~4,2%_%time:~0,2%%time:~3,2%.pdf
mkdir %InputFolder%original_images_%date:~10,4%%date:~7,2%
%date:~4,2%_%time:~0,2%%time:~3,2%
move /Y %InputFolder%*.bmp %InputFolder%original_images_%date:~10,4%
%date:~7,2%%date:~4,2%_%time:~0,2%%time:~3,2%
echo `
echo DONE!
echo .
exit
21
SOFTWARE SETUP GUIDE
-Extract the Extra.zip file. Then copy:
"win32com.dll" to "..jdk1.8.0_74jrebin” Directory.
the "comm.jar" in "...jdk1.8.0_74jrelibext"
"javax.comm.properties" in "...jdk1.8.0_74jrelib"
Copy “out” folder to C: Drive
Install the software “Installme.exe”
Double click on SCAN.bat from c:out folder
It will start the program
22
CONCLUSION
Interfaced the OV7670 Camera module with Arduino at 8 MHz XCLK pulse
which is generated by the Arduino board itself. Arduino talk to the camera module
using I2C to write/read camera registers. Frames are read one by one in a brute-
force manner. Currently the camera module is configured to work with QCIF
(176x144) format in order to eliminate timing issues. Pixels of a given frame are
stored in the java program and on completion of whole row data the JAVA
program generates the valid BMP image.
The most challenging task for interfacing Arduino &Camera is the low
memory capacity of Arduino microcontroller due to which we are unable to store a
full image at once, to overcome this the JAVA program is implemented that
receive the Data Bits of one row at a time.
It has also to be noted that there are microcontrollers out there that
actually have dedicated peripherals/devices for interfacing with camera modules
such as the OV7670, but the interface of OV7670 Camera Module with Arduino
Microcontroller provides us a easy to use, maintain, low cost and a configurable
system that can be used in various fields of image acquisition.
23
References
[1] N. Sriskanthan and Tan Karand. “Bluetooth Based Home Automation System”.
Journal of Microprocessors and Microsystems, Vol. 26, pp.281-289, 2002.
[2] Al-Ali, Member, IEEE & M. AL-Rousan,“Java-Based Home Automation System R.”
IEEE Transactions on Consumer Electronics, Vol. 50, No. 2, MAY 2004
[3] The Java Tutorials: All About Sockets [Online]. Available:
http://docs.oracle.com/javase/tutorial/networking/sockets, March
2013
[4] L. Lo Presti, M. La Cascia, “Real-Time Object Detection in Embedded Video
Surveillance Systems,” Ninth International Workshop on Image Analysis for Multimedia
Interactive Services, 7-9 May 2008, pp. 151-154.
[5] http://arduino.cc/en/Main/ArduinoBoardADK
[6] https://forum.arduino.cc/index.php?topic=211741.0
[7] http://www.dejazzer.com/coen4720/labs/lab11_camera.pdf
24

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Introduction to Node MCU
Introduction to Node MCUIntroduction to Node MCU
Introduction to Node MCU
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Robo wireless controll
Robo wireless controllRobo wireless controll
Robo wireless controll
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Arduino
ArduinoArduino
Arduino
 
Arduino
ArduinoArduino
Arduino
 
Embedded systems presentation
Embedded systems presentationEmbedded systems presentation
Embedded systems presentation
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
VTU ECE 7th sem VLSI lab manual
VTU ECE 7th sem VLSI lab manualVTU ECE 7th sem VLSI lab manual
VTU ECE 7th sem VLSI lab manual
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Audio Amplifier
Audio AmplifierAudio Amplifier
Audio Amplifier
 
Arduino uno
Arduino unoArduino uno
Arduino uno
 
Ir sensor
Ir sensorIr sensor
Ir sensor
 

Destaque

SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICESMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
ASHOKKUMAR RAMAR
 
KPI measurement
KPI measurementKPI measurement
KPI measurement
kpphelu
 
Rapport projet Domotique
Rapport projet DomotiqueRapport projet Domotique
Rapport projet Domotique
ts4riadhoc
 

Destaque (20)

final_report
final_reportfinal_report
final_report
 
Arduino & Internet of Things - First Step
Arduino & Internet of Things - First StepArduino & Internet of Things - First Step
Arduino & Internet of Things - First Step
 
Home automation
Home    automationHome    automation
Home automation
 
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICESMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
 
Cours0 presentation carte arduino
Cours0   presentation carte arduinoCours0   presentation carte arduino
Cours0 presentation carte arduino
 
Presentation arduino
Presentation arduinoPresentation arduino
Presentation arduino
 
Présentation Arduino par Christian, F5HOD
Présentation Arduino par Christian, F5HODPrésentation Arduino par Christian, F5HOD
Présentation Arduino par Christian, F5HOD
 
Projet de fin d'etude :Control d’acces par empreintes digitale
Projet de fin d'etude :Control d’acces par empreintes digitaleProjet de fin d'etude :Control d’acces par empreintes digitale
Projet de fin d'etude :Control d’acces par empreintes digitale
 
Ardui no
Ardui no Ardui no
Ardui no
 
CV Jenhani 2015
CV Jenhani 2015CV Jenhani 2015
CV Jenhani 2015
 
Cours4 allumer une led sur la carte arduino
Cours4   allumer une led sur la carte arduinoCours4   allumer une led sur la carte arduino
Cours4 allumer une led sur la carte arduino
 
KPI measurement
KPI measurementKPI measurement
KPI measurement
 
War Field Spying Robot with Fire Fighting Alarm.
War Field Spying Robot with Fire Fighting Alarm.War Field Spying Robot with Fire Fighting Alarm.
War Field Spying Robot with Fire Fighting Alarm.
 
Cours16 ressources pour arduino
Cours16   ressources pour arduinoCours16   ressources pour arduino
Cours16 ressources pour arduino
 
Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting Call Setup Success Rate Definition and Troubleshooting
Call Setup Success Rate Definition and Troubleshooting
 
AUTOMATED METAL DETECTOR ROBOTIC VEHICLE WITH MANUAL CONTROL USING BLUETOOTH
AUTOMATED METAL DETECTOR ROBOTIC VEHICLE WITH MANUAL CONTROL USING BLUETOOTHAUTOMATED METAL DETECTOR ROBOTIC VEHICLE WITH MANUAL CONTROL USING BLUETOOTH
AUTOMATED METAL DETECTOR ROBOTIC VEHICLE WITH MANUAL CONTROL USING BLUETOOTH
 
Présentation de projet de fin d’études
Présentation de projet de fin d’étudesPrésentation de projet de fin d’études
Présentation de projet de fin d’études
 
Metal Detector : A Working Model
Metal Detector : A Working ModelMetal Detector : A Working Model
Metal Detector : A Working Model
 
presentation projet domotique
presentation projet domotiquepresentation projet domotique
presentation projet domotique
 
Rapport projet Domotique
Rapport projet DomotiqueRapport projet Domotique
Rapport projet Domotique
 

Semelhante a OV7670 Camera interfacing-with-arduino-microcontroller

Cameratrainingsergiopublic 120904235733-phpapp02(2)
Cameratrainingsergiopublic 120904235733-phpapp02(2)Cameratrainingsergiopublic 120904235733-phpapp02(2)
Cameratrainingsergiopublic 120904235733-phpapp02(2)
KASIM DUDEKULA
 
Developing an avr microcontroller system
Developing an avr microcontroller systemDeveloping an avr microcontroller system
Developing an avr microcontroller system
nugnugmacmac
 

Semelhante a OV7670 Camera interfacing-with-arduino-microcontroller (20)

Intel galileo gen 2
Intel galileo gen 2Intel galileo gen 2
Intel galileo gen 2
 
Mini project
Mini projectMini project
Mini project
 
mini project
mini projectmini project
mini project
 
Design and Development of a prototype of AGV
Design and Development of a prototype of AGVDesign and Development of a prototype of AGV
Design and Development of a prototype of AGV
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
Mobile robotic platform to gathering real time sensory data in wireless perso...
Mobile robotic platform to gathering real time sensory data in wireless perso...Mobile robotic platform to gathering real time sensory data in wireless perso...
Mobile robotic platform to gathering real time sensory data in wireless perso...
 
Cameratrainingsergiopublic 120904235733-phpapp02(2)
Cameratrainingsergiopublic 120904235733-phpapp02(2)Cameratrainingsergiopublic 120904235733-phpapp02(2)
Cameratrainingsergiopublic 120904235733-phpapp02(2)
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using Arduino
 
Automatic Enable and Disable Speed Breaker
Automatic Enable and Disable Speed BreakerAutomatic Enable and Disable Speed Breaker
Automatic Enable and Disable Speed Breaker
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
 
Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller
 
Am044253258
Am044253258Am044253258
Am044253258
 
Developing an avr microcontroller system
Developing an avr microcontroller systemDeveloping an avr microcontroller system
Developing an avr microcontroller system
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
E010132736
E010132736E010132736
E010132736
 

Último

在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
ougvy
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
ehyxf
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
wpkuukw
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
uodye
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
uodye
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
wpkuukw
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
drmarathore
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
wpkuukw
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
Rishabh332761
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
tufbav
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
wpkuukw
 
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
oopacde
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
ehyxf
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
uodye
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 

Último (20)

Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 
Hilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptxHilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptx
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
 

OV7670 Camera interfacing-with-arduino-microcontroller

  • 1. INTRODUCTION In this project our aim is to interface OV7670 camera module with ATmega based Arduino Microcontroller board. Camera modules are widely used in the world of electronics. Our aim is to show how to connect, configure and get a test image using a small program on java, it will be an excellent starting point for further experiments. Currently ov7670 camera is the affordable image acquisition module for embedded applications. Our goal is to interface the camera with Arduino which are much efficient, low cost easily available and easy to configure. These are the major reasons for which here an Arduino is used. In spite of the following advantages there are some disadvantages too, that are: o Very limited I/O pins o Limited memory capacity o Slow Processing speed The above disadvantages are the challenges in interfacing the camera with an Arduino and these are to be overcome by applying some Data handling and manipulation techniques. The OV7670 Camera module talks over a modified I2C protocol that is known as SCCB (Serial Camera Control Bus). This protocol is intended to be used with OmniVision’s camera modules. This project is intended to provide a low cost and easily configurable image capturing solution, that can be used in real-time Time-lapse photography, image acquisition systems or as security cameras. The camera module is accessed by SCCB (I2C) protocol by the Arduino. The Data sent by the camera is parallel over data channel D0-D7, Data received by the Arduino is sent to the computer over serial communication and this follows the rule of sending pixel data of one row at a time. This help to overcome the problem of slow processing and slow data transmission rate of the Arduino boards 1
  • 2. Figure 1: Block diagram for Camera-Arduino interface 2 OV7670 camera module Arduino UNOI2C COMPUTER Seri al
  • 3. HARDWARE 2.1 CAMERA MODULE (OV7670) The camera module has an onboard CMOS sensor designed for mobile application where low power consumption and small size are of utmost importance. Proprietary sensor technology utilizes advanced algorithms to cancel Fixed Pattern Noise (FPN), eliminate smearing, and drastically reduce blooming. All required camera functions are programmable through the Serial Camera Control Bus (SCCB) interface. The device can be programmed to provide image output in various fully processed and encoded formats. Resolution VGA (640 x 480); - QVGA (320 x 240); - CIF (352 x 240); - QCIF (176 × 144) Transfer rate up to 30 fps Image encoding RGB 565/555, YUV / YCbCr 4: 2: 2 Interface I2C interface interaction / SCCB Table 1: Camera module Specification 2.2 Two Wire SCCB Interface The modified 2-wire implementation allows for a SCCB master device to interface with only one Slave device. This 2-wire application is implemented in the camera chip reduced pin package products where the SCCB_E signal is not available externally. Figure 2: Two Wire SCCB Interface 3
  • 4. 2.3 Pin Functions Signal Name Signal Type Description SCCB_Ea Output Master drives SCCB_E at logical 1 When the bus is idle. Drives at logical 0 when the master asserts Transmissions or the system is in Suspend mode. SIO_C Output Master drives SIO_C at logical 1 when The bus is idle. Drives at logical 0 and 1 when SCCB_E is driven At 0. Drives at logical 0 when the system is Suspend mode. SIO_D I/O Serial I/O Signal 0 Input and Output - remains floating when the bus is idle and drives to logical 0 when the system is in Suspend Mode. Table-2: Master Device Pin Descriptions Signal Name Signal Type Description SCCB_Ea Input Input pad can be shut down when the System is in Suspend mode. SIO_C Input Input pad can be shut down when the System is in Suspend mode. SIO_D I/O Serial I/O Signal 0 Input and Output - input pad can be shut down When the system is in Suspend mode. Table-3: Slave Device Pin Descriptions 2.4 Application Some of the applications of camera module are: PC Camera, and Cellular phones, Video conference equipment, Machine vision, Security camera, Biometrics, Digital Still Cameras 4
  • 5. 2.5 ARDUINO Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board. Microcontroller ATmega 328-p Operating Volts 5V Input Voltage 7-20v Digital I/O Pins 14 Analog Input 6 PWM pins 6 Flash Memory 32 Kb SRAM 2 Kb EEPROM 1 Kb Clock Speed 16 MHz Current 50 mA DC Current at Digital I/O 20 mA Table 4: Arduino UNO Specification 5
  • 6. CAMERA-ARDUINO INTERFACING CIRCUIT For interfacing the camera module with the Arduino we need a circuit that will provide the mount points as well as the voltage Pull-up and Pull-down facilities. below is a Typical Block representation of the hardware connection between OV7670 and Arduino UNO. Oscillator used here is optional, we will be Arduino’s onboard crystal oscillator is being used to generate the XCLK. 3.1 Block diagram for Arduino-Camera interfacing Arduino Figure 3: Block representation of Connection 6 Camera Module SCL, SDA HREF, VSYNC DATA PCLK PWDN +3.3V, GND Oscillator XCLK
  • 7. 3.2 Pin Configuration Pin configuration is one of the most important data that must be kept in mind while designing the interfacing circuit and must be followed to ensure proper communication Arduino and Camera Module. Pin Type Description VDD Supply Power supply GND Supply Ground level SDIOC Input SCCB clock SDIOD Input/output SCCB data VSYNC Output Vertical synchronization HREF Output Horizontal synchronization PCLK Output Pixel clock XCLK Input System clock D0-D7 Output Video parallel output RESET Input Reset (Active low) PWDN Input Power down (Active high) Table 5: Arduino Pin Configuration 7
  • 8. 3.3 Circuit Diagram The Arduino is rated for 5V and the camera module is of 3.3V. Hence, the voltage divider for the XCLK will be used (two resistors of 4.7KΩ) to pull down the voltage to ~3V. Furthermore, OV7670 does not provide output voltages higher than 3.3V which is a quite low for Arduino to reads the input as high (5V), so we will connect pull-up resistors. Here external signal is provided to D12 to capture image and to D8 for image to PDF conversion, both are active high with 0.3 sec high pulse. Figure 4: Circuit Diagram for OV7670-Arduino Interfacing [Source: privateblog.info] PROGRAM FLOW FOR INTERFACING 8
  • 9. OV7670 camera module captures image during LOW at VSYNC and sends out row data during the HIGH at HREF. The Arduino receives the parallel data input from camera module image sensor and converts it to the serial data and also provides initialization to the registers of the OV7670 Module. Figure 5: Typical Data flow diagram Basic steps in the code are: 1. Generation of PWM 2. Start I2C Communication 3. Write default register values 4. Receive data from camera 9 Arduino
  • 10. Figure 6: Flow diagram for initialization of camera module 4.1 Configure Arduino that will give 8 MHz at Pin D11 DDRB | = (1 << 3); // pin 11, The ASSR & = ~ (_BV (EXCLK) | _BV (the AS2)); TCCR2A = (1 << COM2A0) | (1 << WGM21) | (1 WGM20 <<); TCCR2B = (1 << WGM22) | (CS20 1 <<); OCR2A = 0; // (F_CPU) / (2 * (X + 1))of d0 of low- DDRC & = ~ 15; // d3 camera DDRD & = ~ 252; // d7-d4 and interrupt pins 10
  • 11. 4.2 Configure I2C interface TWSR & = ~ 3; // preset for the disable the TWI TWBR = 72; // set to 100 kHz Figure 7: Flow Diagram of I2C communication 4.3 Initialization of Camera Module Figure 8: Write default Register values 11 ARDUINO Write Default register Values with I2C Camera Module
  • 12. WrReg (0x12, 0x80); _delay_ms (100); wrSensorRegs8_8 (ov7670_default_regs); WrReg (REG_COM10, 32); // PCLK does not HBLANK Locality toggle on. 4.4 Receiving Image bytes The camera module sends parallel image data bytes where it is buffered till receiving full row data then this data is sent over serial communication to the pc as shown in figure 9. Figure 9: Receiving Image Bytes 12 OV7670 camera Module Arduino UNO ComputerParallel Data Serial Data MUX Buff er RAM
  • 13. OV7670 MODULE DATA TRANSFER The SIO_C signal is a single-directional, active-high, control signal that must be driven by the master device. It indicates each transmitted bit. The master must drive SIO_C at logical 1 when the bus is idle. A data transmission starts when SIO_C is driven at logical 0 after the start of transmission as shown in figure 10 & 11. A logical 1 of SIO_C during a data transmission indicates a single transmitted bit. Thus, SIO_D can occur only when SIO_C is driven at 0. 5.1 Timing Diagram Figure 10: SCCB Timing Diagram Figure 11: Horizontal Timing Diagram 13
  • 14. Camera module sends row data between every HSYNC LOW and during each HSYNC HIGH, the HREF follows the HIGH and both of this occurs between the two HIGH of the VSYNC signal as shown in figure 12, that means all the row data is sent over the VSYNC at LOW. Figure 12: VGA Frame Timing 14
  • 15. PIXEL DATA BYTE TO IMAGE CONVERSION For this purpose a java program is being used, that will grab the serial input data (bits) stream from Arduino at specific COM port that will generate a valid BMP image from it , the code works as illustrated below in figure 13. 6.1 Program Work Flow Figure 13: Algorithm of data to image generation 15
  • 16. 6.2 COM Port selection (JAVA) if(!enumeration.hasMoreElements()) break; portId = (CommPortIdentifier)enumeration.nextElement(); if(portId.getPortType() == 1) { System.out.println((new StringBuilder()).append("Port name: ").append(portId.getName()).toString()); SimpleRead simpleread; if(portId.getName().equals("COM5")) simpleread = new SimpleRead(); 6.3 Port parameters (JAVA) serialPort = (SerialPort)portId.open("SimpleReadApp", 1000); inputStream = serialPort.getInputStream(); serialPort.setSerialPortParams(0xf4240, 8, 1, 0); int i = 0; 6.4 Waiting for an (data stream) input from Arduino (JAVA) do // infinite loop starts here { System.out.println("started the if else "); 16
  • 17. while(!isImageStart(inputStream, 0)) // image Generation code goes here } while(true); } catch(Exception exception) 6.5 Image generation from received data stream (JAVA) 17
  • 18. Figure 14: Algorithm for image generation from received data steam while(!isImageStart(inputStream, 0)) { System.out.println("Looking for image"); System.out.println((new StringBuilder()).append("Found image: ").append(i).toString()); for(int j = 0; j < 240; j++) { for(int l = 0; l < 320; l++) { int j1 = read(inputStream); ai[j][l] = (j1 & 0xff) << 16 | (j1 & 0xff) << 8 | j1 &0xff; } } for(int k = 0; k < 240; k++) { for(int i1 = 0; i1 < 320; i1++) ai1[i1][k] = ai[k][i1]; } BMP bmp = new BMP(); bmp.saveBMP((newStringBuilder()).append("c:/out/").append(i+ +).append(".bmp").toString(), ai1); System.out.println((new StringBuilder()).append("Saved image: ").append(i).toString()); 18
  • 19. } HANDLING MULTIPLE SCANS (CMD) It is sometime needed to perform multiple scans. That means the scanning mechanism is provided input for scan again and again, then this program as shown in figure 15 proves to be useful it takes the user inputs to perform a certain number of scans and then control the Arduino or any other microcontroller to perform the scanning and PDF conversion till it reaches the provided number of scans. Figure 15: Algorithm to handle multiple Scans 19
  • 20. IMAGE TO PDF CONVERSION (CMD) Now after generating the images we need to convert those images to a PDF file for which we will use the software ConvertITP.EXE. following is the algorithm for Image to PDF conversion. Figure 16: Algorithm Image to PDF generation 8.1 Code for the Image to PDF conversion @echo off echo by somnath echo . 20
  • 21. set CITP="%ProgramFiles%Softinterface, IncConvert Image To PDFConvertITP.EXE" set InputFolder=C:out set OutputFolder=C:out REM Convert from JPG to PDF %CITP% /S%InputFolder%*.bmp /T%OutputFolder%all_img.PDF /F0 /+ ren %InputFolder%all_img.PDF all_img-%date:~10,4%%date:~7,2% %date:~4,2%_%time:~0,2%%time:~3,2%.pdf mkdir %InputFolder%original_images_%date:~10,4%%date:~7,2% %date:~4,2%_%time:~0,2%%time:~3,2% move /Y %InputFolder%*.bmp %InputFolder%original_images_%date:~10,4% %date:~7,2%%date:~4,2%_%time:~0,2%%time:~3,2% echo ` echo DONE! echo . exit 21
  • 22. SOFTWARE SETUP GUIDE -Extract the Extra.zip file. Then copy: "win32com.dll" to "..jdk1.8.0_74jrebin” Directory. the "comm.jar" in "...jdk1.8.0_74jrelibext" "javax.comm.properties" in "...jdk1.8.0_74jrelib" Copy “out” folder to C: Drive Install the software “Installme.exe” Double click on SCAN.bat from c:out folder It will start the program 22
  • 23. CONCLUSION Interfaced the OV7670 Camera module with Arduino at 8 MHz XCLK pulse which is generated by the Arduino board itself. Arduino talk to the camera module using I2C to write/read camera registers. Frames are read one by one in a brute- force manner. Currently the camera module is configured to work with QCIF (176x144) format in order to eliminate timing issues. Pixels of a given frame are stored in the java program and on completion of whole row data the JAVA program generates the valid BMP image. The most challenging task for interfacing Arduino &Camera is the low memory capacity of Arduino microcontroller due to which we are unable to store a full image at once, to overcome this the JAVA program is implemented that receive the Data Bits of one row at a time. It has also to be noted that there are microcontrollers out there that actually have dedicated peripherals/devices for interfacing with camera modules such as the OV7670, but the interface of OV7670 Camera Module with Arduino Microcontroller provides us a easy to use, maintain, low cost and a configurable system that can be used in various fields of image acquisition. 23
  • 24. References [1] N. Sriskanthan and Tan Karand. “Bluetooth Based Home Automation System”. Journal of Microprocessors and Microsystems, Vol. 26, pp.281-289, 2002. [2] Al-Ali, Member, IEEE & M. AL-Rousan,“Java-Based Home Automation System R.” IEEE Transactions on Consumer Electronics, Vol. 50, No. 2, MAY 2004 [3] The Java Tutorials: All About Sockets [Online]. Available: http://docs.oracle.com/javase/tutorial/networking/sockets, March 2013 [4] L. Lo Presti, M. La Cascia, “Real-Time Object Detection in Embedded Video Surveillance Systems,” Ninth International Workshop on Image Analysis for Multimedia Interactive Services, 7-9 May 2008, pp. 151-154. [5] http://arduino.cc/en/Main/ArduinoBoardADK [6] https://forum.arduino.cc/index.php?topic=211741.0 [7] http://www.dejazzer.com/coen4720/labs/lab11_camera.pdf 24