In this demonstration we will illustrate how to transfer image wireless over Bluetooth with Arduino boards. To complete this demo we need an ArduCAM shield, a OV2640 Camera module, an Arduino UNO board or a Mega2560R3 board, and a Bluetooth TTL transceiver module.
Bluetooth is a kind of short range communication technology with high speed baud and widely used in audio and compressed video applications. BTM-5 Bluetooth module implements a PPP protocol once connected with Bluetooth master, it will be emulated as a serial port. Then we can send and receive data just like though a standard serial port.
Set the BTM-5 Bluetooth module
Before this demo user should to set the BTM-5 as a slave module, set the correct baud rate as 115200bps and paired with Notepad. User guide of BTM-5 module can be found from here.
Do the connection
The connection between BTM-5 module and Arduino board lists as follows. The Figure1 show the UNO board connection and Figure 2 show the Mega 2560 R3 board connection.
Arduino Uno bard only as one hardware serial port located in pin D0(RXD) and D1(TXD), but the D0~D7 are occupied by ArudCAM shield data bus. So we have to use software serial library to connect the free IO as UART with BTM-5 module. In the ArduCAM shield there are two IOs which are 3.3V alias of Uno pin D8(TXD) and D9(RXD).
Arduino Mega 2560 R3 as 4 hardware serial port, D0 and D1 in serial0 are used by ArduCAM shield data bus. We can use serial1 pin 18(TXD) and 19(RXD) to be connected to BTM-5 module RX and TX pins.
Load the sketch
In order to transfer a image as quick as we can, we have to use compress image to minimize the baud width. The Table 1 show the time required to transfer image over 115200bps baud rate with different resolution and format.
|Resolution||Image data size||Time required to transfer with 115.2kbps|
OV2640 camera module has embedded JPEG compress engine, so we have to configure the module to output JPEG image.
Arduino Uno board demo sketch download from here.
Arduino Mega 2560 R3 board demo sketch download from here.
Send capture command and receive image data
When all the connection is done, power up the Arduino board and wait few seconds for the green LED is ON which means the pair is successfully. Then open the Hyper-terminal software or something like that to send and receive data. Or you can use the Windows demo software ArduCAM-BT.exe to give a quick try. ArdCAM-BT software can be downloaded from here.
ArduCAM-BT software receive image data, playback on the dialog box and save the each image to a JPG file.
256 total views, 12 views today