A Brief Desciption

Our project, Image Scanning Robot, can run over the image to be scanned and create a pixel matrix of the whole image. In sensing whether the pixel is white or black, we have used an array of 24 IR Sensors. We divided the whole image into a 32×24 grid. As our robot moves over the image, these IR Sensor Array, positioned just at the front of our robot, collects information of the 24 adjacent pixels just below the array of sensors. On crossing the whole image, our robot stops for a while and transfers this pixel matrix via bluetooth to the Drawing Robot(links down below ) we are working in collaboration with. Then our robot moves to the front and takes a turn for about 45 degrees and then moves backward straightly and stops at the beginning of the next image to be scanned.

Design

A four wheel robot with four DC motors connected to each of the wheel

Movement

It can move forward and backward with any angle

Sensors

Using IR sensors to detect and scan an image

Communicate with other

Scan an image and send it to other robot using Bluetoth communication

REQUIRED EQUIPMENTS

For this whole project we used several electrical ICs, microcontroller and several other elements.

Microcontroller

Arduino Mega 2560

Sensors

1.5mm IR Sensors

Actuators

Four DC 12v Motors

Connection Module

Bluetooth HC - 05

Power Supplies

15v 3-Cell Lipo Battery with LM2596 Buck Module

Overall Setup Elements

Four wheels with tyres plus glass chasis for double deck robot layout

How it works

In this project Arduino Mega is used as microcontroller. We have used hc05 bluetooth module for communicating with drawing robot. At first bluetooth devices gets paired. Then the motor driver is initiated, and the robot moves forward. IR sensors are used for capturing black and white picture. When the robot is moving forward, the sensors capture black lines and take their reading. In Arduino Mega, there are 16 ADC pins and the robot has 24 analog sensors. So 16 sensors are connected directly to the ADC pins. For the rest 8 sensors, external analog to digital converter is used which converts 8 analog reading to 8 digital reading. All of the datas are saved in a data array, Which is further sent to the drawing robot via bluetooth. The drawing robot then draws the picture according to the data.

BLOCK DIAGRAM

The overall block diagram of our project is given below

ALGORITHM







       1.Start
                2.Bluetooth remains on and paired with drawing robot's bluetooth
                3.Initiate motor driver,data array
                    4.Move forward
                        5.Recieve Sensor values
                        6.If the recieved values are digital
                                    7.Update data array
                        8.Else if value>500
                                    9.Write 1 in data array
                        10.Else, write 0 in data array
                        11.End if
                    12.Format the data array according to protocol
                    13.Send data via bluetooth
                14.Move back to the next position
       15.end













PIN DIAGRAM

The overall Pin diagram of our project is given below

PROBLEM WE HAVE FACED

Memory Restriction

Our project demanded much memory to save the pixel matrix of the entire image. So, we used Arduino Mega instead of Arduino Uno, which offers more memory. Also, we needed 24 input pins for handling input from 24 IR Sensors from the Sensor Array. This was another reason for using Arduino Mega, which has more input/output pins to be used (No. of Digital I/O Pins - 54 (of which 15 provide PWM output) and No. of Analog Input Pins - 16 ) compared to Arduino Uno (No. of Digital I/O Pins - 14 (of which 6 provide PWM output) and No. of Analog Input Pins - 6).

Pixel Detection

IR produces an analog output, but we needed a digital output where 0 will indicate a black pixel and 1 will indicate a white one. So we used a thresholding value of 500. All readings <= 500 have been taken as '0' and all readings > has been considered as '1'.







Pin Restriction

We needed 24 analog I/O pins for the analog output from 24 IR sensors. But Arduino Mega provides 16 analog I/O pins. So we used 8 digital I/O pins for the remaining 8 IR sensors. But IR produces analog output, so we used an Analog-to-Digital converter to convert the output of these 8 IRs into digital output and then provided them as inputs to 8 digital I/O pins.




Memory Reservation

As we divided the entire image into a 32×24 grid, we took readings of intensity of total 32×24=768 pixels. If we stored these 768 values to a 768-size integer array, we would need a lot of memory. Instead, we used character array, and we inserted 8 readings on 8 bits of each character in the array. We had 24 IRs, and each IR scans 32 rows, so each IR will output 32/8=4 byte of data. So overall 24 IRs will output 96 byte of data, and so we took a 96-size character array. As a result, memory utilization has been achieved successfully.

Starting Problem

We didn't use any sensor to detect the end of the page during scanning. Instead, we used delay to determine when the IR's will stop readiing pixels. We have only taken readings from IRs when our robot moves forward till the end of the page has been reached, and didn't take any reading when the robot turns and returns to the next starting position.





Pixel Width FIxing

As the spacing between IR transmitter and receiver determines the area of the pixel it will take reading of, we tried to place them with minimum gap so that each pixels are precisely determined. But there is an unignorable gap, so we had to increase the width of each letter to be scanned so that the 24-IR Sensor Array can detect each transition perfectly. We determined this required width by repeated test-and-run.




Movement Precision

After reaching the end of the image, we turned the robot by approximately 45 degrees and moved it straight backward, and made it stop at the next starting position. To turn the robot at such an angle so that when moved backwards it follows a straight line was really crucial. We handled this by repeated testing and determining which values are to be provided to the right and left wheels of our robot and how delays are to be adjusted, so that the robot starts from the next image in the next run.

Bluetooth Communication

We faced a lot of problem integrating both bluetooth module of our project and the other project featuring drawing robot. We used delay to remove this problem, so that the data transferred by our robot is received well and then our robot can move back to the next starting position. .

Power Failure

We faced some problems regarding power management, because we had to accomodate adequate power for driving 4 gear motors, 24-IR Sensor Array, Motor Driver module, Bluetooth module and the buck module. Due to power mismanagement, our Arduino Mega got damaged and we had to use a new one.

Meet the team

GROUP - 1 A2

Nusrat Jahan Mozumder

1205061

Mahbub Alam

1205063

Himel Das Gupta

1205065

Ahmad Shadi Shaon

1205067

Ishita Haque

1205069

Course Teacher

Mohammad Saifur Rahman

Assistant Professor

Bangladesh University of Engineering and Technology

Md. Aashikur Rahman Azim

Lecturer

Bangladesh University of Engineering and Technology

Md. Iftekharul Islam Sakib

Lecturer

Bangladesh University of Engineering and Technology