Project Design

Android Developer Portal

Android Developer Website

Concept Design

Bluetooth:

Bluetooth communication will be used to send data from the Freescale car’s camera to a smartphone device. In our case we will be using an Android platform and user friendly application on the smartphone to display the camera data. The main reason for picking bluetooth communication for this project is because its low power, the module itself can be small/compacted, easy to program for, and most all smartphones have built in bluetooth capability. The packet size of the data being transferred is also not very huge, so transfer rates shouldn’t cause much lag between for viewing camera data from the car.

Nine-Volt Batteries:

Instead of using the car’s battery for powering our device, we will be using an external battery. Using the car’s battery might cause interference with communication from the motors of the car. This battery will power the bluetooth module and the microcontroller that will processes camera data. The battery will be a nine-volt battery which will be able to connect and disconnect from the project whenever the camera is on or off. It was initially the plan to use a rechargeable battery to power the project. Rechargeable batteries were first going to be used to save cost on battery purchases. Since a nine-volt battery was chosen to be used, rechargeable became a more complicated task due to the fact that it is not very simple or inexpensive to buy a nine-volt battery charger. Because of this change from a AA to nine-volt battery, rechargeable batteries became less of an option.

Shield:

We wanted our device to easily be connect and detach from the car without problems for the user. The whole device is going to be a small shield that will have two ports. One port will be connected to the camera and the other port will be connected to the cars microcontroller.

Inline Connection:

Inline connection means that our module will be in between the camera and the car’s microcontroller. The microcontroller on our module will recieve data from the camera. The data will then be copied and go to both the bluetooth module and then to the car’s microcontroller.

Video and Student Overlay:

The video and student overlay will be done on the Android app. The video will be the gray scale of each of the 128 pixels that come from the camera. The line of pixels will then be duplicated down the screen for easier viewing for the user. Black or very dark pixels should show where the line is.

Code

The arduino code was worked on in two sections. The first section worked on was the section of code that was for the Android device. This code created the grey scale viewer to see where the black line is in comparison to the white floor. The viewer is black where the black line is and white elsewhere. A line graph was also created with the viewer to see how the grey scale changes across the viewer. It can be either pure black (high), pure while (low), or any grey in between.

The second section of code involved programming the Arduino to get data from the camera on the robot, read that data, then transmit that data via Bluetooth to the Android app. The general code used for getting and transmitting that data can be viewed using the following link:

Arduino Code

Overall Final Layout

The layout of the project turned out to be quite simple. The project itself is a single unit. The unit is printed like a box using a 3-D printer. There is a section of box where a sliding cover is used to cover the spot where the microcontroller/Bluetooth unit are placed. The oposite side of the box has a small section where the nine-volt battery slides into. One end of the project contains pins to connect to the robot itself and to where the camera on the robot is connected. The final project sits directly on top of the robot and is approximately the size of two nine-volt batteries stacked on top of each other.