
















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















































nd
Sid Gaddam 04/22/ 1
With more and more people choosing to use wireless technology (GSM, CDMA, 802.11, Bluetooth, etc) for their daily communication needs, thus enabling them to be extremely mobile, more and more interesting and increasingly useful devices are flooding the market that make use of the above mentioned technologies. In order to have a closer understanding on the way these ubiquitous technologies work, I have decided to focus on one technology and incorporate it into the main design of the robot that I will be working on this semester. Hence, my proposal is to design a Bluetooth Enabled Autonomous Mobile Robot (BEAMR) that has navigational capabilities with the smarts to avoid collisions with obstacles in its path, thereby creating a mobile Bluetooth network. Using a Bluetooth v2.0 transceiver, BEAMR will be able to communicate with any other Bluetooth enabled device in its range. BEAMR can be used to communicate with a nearby Bluetooth enabled cell phone in order to transmit photo/video images taken by an on-board camera. With the help of low voltage motors, I wish to make the robot navigate through any path. Standard push button switches and IR proximity sensors will be used for implementing collision avoidance techniques. Sid Gaddam 04/22/ 4
BEAMR, or the Bluetooth Enabled Autonomous Mobile Robot, is a sophisticated robot that takes pictures using its on-board camera and transmits the visual data to a nearby Bluetooth enabled device. BEAMR’s Bluetooth v2.0 transceiver is a power Class 1 radio with a 100m range. Using AT serial commands, a connection is established with a nearby Bluetooth device (cell phone, laptop, etc). The Atmel Mega128, which is the host microcontroller, interfaces with the camera serially using one of the UART ports. Upon power up, the microcontroller commands the camera to take a snapshot. The image data is then transmitted to the Mega128 from the camera. This data is then re-routed to the Bluetooth transceiver using the UART port. Once the data reaches the transceiver, the information is broadcasted across the Bluetooth network. As a connection with another Bluetooth device was already established at the start, the image data is received by the Bluetooth device. The image data, which is already in JPEG format, can be viewed using any picture viewing software installed on the device. At the same time, the Mega128 microcontroller navigates the robot by driving two low voltage motors. The microcontroller also reads two IR sensors using its ADC module and four push button switches, which aid in collision detection and avoidance. Sid Gaddam 04/22/ 5
The following parts and resources will be used in order to help bring this project to a successful conclusion: Microcontroller Board: MAVRIC-IIB Development Board Microcontroller: Atmel Atmega128 MCU Memory: 128K Program Flash, 4K Static RAM, 4K EEPROM Bluetooth Transceiver: Bluetooth v2.0 DIP module by Blue Radios C328-7640 JPEG Compression VGA Camera Module Two 3V Mabuchi Low Voltage Motors Pololu’s Low Voltage Dual Motor Serial Controller Two Sharp GP2Y0A21YK/ GP2Y0D21YK IR Proximity Sensors Xiamen Ocular 2x16 LCD Module Tamiya Twin Motor Gearbox Assembly Two Circular Chassis, Two Rubber Tires, One Ball Caster SteelTec steel frames kit 3x2 and 1x1 AA battery pack for power source Two LM317T Adjustable Voltage Regulators AVR JTAG In-Circuit Emulator with USB Interface Programming Interface: AVR Studio with WinAVR C compiler
BEAMR having the ability to navigate autonomously and also avoiding any obstacles in it’s path Using BEAMR to establish a Bluetooth connection with another Bluetooth enabled device Sid Gaddam 04/22/ 7
Transfer visual data captured by the on-board camera on BEAMR to a cellular phone using the established Bluetooth network
The BEAMR integrated system is best described by the following illustration. Figure 1 BEAMR System Level Block Diagram The above diagram highlights all the interactions between the various sub-systems of BEAMR. The microcontroller manages the various interactions effectively using various methods such as polling and interrupt service routines. The interactions occur through various interfaces. Here is a list of the type of interface between the various sub-systems: MCU – Camera: UART MCU – Bluetooth Transceiver: UART MCU – Motor Controller: UART MCU – IR: ADC Sid Gaddam 04/22/ 8
Figure 2 The BEAMR Mobile Platform Sid Gaddam 04/22/ 10
For actuation, the BEAMR is using two 3V Mabuchi motors. These motors are encased in the gearbox assembly. The gearbox itself is assembled in a 203:1 low speed ratio. This configuration was chosen in order to improve the picture taking clarity. The two motors are driven Pololu’s Low Voltage Dual Motor Serial Controller (LVDMSC). The LVDSMC responds to serial commands from the microcontroller. The controller circuit itself is nothing but an H-bridge used to control the two motors and their direction. Pulse Width Modulation (PWM) logic is implemented on the controller to driver the motors at various user specified speeds. In order to improve the transmission and reduce the noise, 0.1uF caps are placed between the motor pins. LVDSMC is driven using UART0. To configure the device, three bytes of data are sent through the transmitter after power up. To control the device, four bytes of data are sent specifying information such as the motor number, direction and speed. Figure 3 Gearbox Assembly Sid Gaddam 04/22/ 11
microcontroller guides BEAMR away from the obstacle. This way, the BEAMR will not move in the direction of the obstacle is thus saving the sub-systems from damage.
The main function of the IR proximity sensors is to detect the distance of an object from the sensor using a infra red beam that it emits. I have mounted two Sharp GP2Y0A21YK proximity sensors at a 45 degree angle facing away from each other. This way, the two sensors can cover a wider range. The length or distance limit range for this Sharp sensor is 10cm to 80cm. This is an analog sensor. Hence, the analog output voltage of the sensor has to be converted to a digital signal using the A2D conversion module on the MAVRIC II board. The ADC sampling frequency is 115. KHz and the voltage reference is 5V with a 10-bit resolution. Figure 4 IR Proximity Sensors and Front Bump Sensor
Sid Gaddam 04/22/ 13
I am using the Bluetooth BR-SC40N Class 1 module made by Blue Radios as my Bluetooth transceiver. This device interfaces serially with the microcontroller using an AT command set. The Hayes AT protocol is a modern communication protocol widely used in telephone modems. It has a defined command set that allows the microcontroller to send commands to the transceiver via the RS-232 port. It has a 100m range, powers up at 3.3V and draws typically 90mA. Figure 5 Blue Radios Bluetooth Transceiver Bluetooth is wireless networking standard (IEEE 802.15.1) that works at the physical level in the form of a radio-frequency standard and it provides agreement at the protocol level, where devices have to agree on when bits are sent, how many will be sent at a time, and how the parties in a conversation can be sure that the message received is the same as the message sent. Bluetooth 2.0 can achieve data rates of 3 Mbps. However, as we are interfacing serially, our data rate will be limited by the baud rate of the serial connection. Sid Gaddam 04/22/ 14
The Logical Link Layer handles multiplexing, segmentation and reassembly of large packets and device discovery. For the Audio layer, the audio data is directly mapped to the baseband layer. The Bluetooth protocol allows up to eight devices to connect simultaneously. To avoid interference between the devices, Bluetooth uses a technique called frequency hopping spread-spectrum (FHSS) that makes it rare for more than one device to be transmitting on the same frequency at the same time. In this technique, a device uses 79 individual, randomly chosen frequencies within a designated range (in the ISM band), changing from one to another on a regular basis. As the transmitters change frequencies so many times every second, more devices can make complete use of a pre defined limited slice of the radio spectrum. Since every Bluetooth transmitter uses spread-spectrum transmitting automatically, it’s unlikely that two transmitters will be on the same frequency at the same time. Figure 7 FHSS graphically explained Each BT frame consists of a transmit packet and a receive packet. Each packet may have either 1, 3 or 5 slots of 625ùs. All units have a unique global ID(BD_Addr) address( 48 bits) using which devices establish connection and communicate with one Sid Gaddam 04/22/ 16
another. The unit that initializes the connection is assigned as the master which controls the traffic of the connection. A master can simultaneously connect upto seven slaves. The master/slave roles can be swapped using the appropriate commands. The very first command that the protocol executes is to identify the device it wants to connect to. It does this by looking for a unique device address that helps the transmitter identify the receiver. This way, even if there are several Bluetooth devices in an area, a unique connection can be established between any two or more without interfering with the others Bluetooth networks or piconets. There are two kinds of links possible in a Bluetooth protocol. An Asynchronous Connectionless Link (ACL) is a packet switched link between a master and slave. It supports both isochronous and asynchronous data. A Synchronous Connection Oriented (SCO) is a point to point full duplex link that is typically used for voice data. These packets do not use CRC and are not retransmitted. An ACL type link needs to be first established in order to set up SCO. The Bluetooth protocol supports two Error Correction schemes: Forward error correction (1/3 and 2/3) and Automatic Repeat Request scheme.
The C328 JPEG compression module performs as a video camera or a JPEG compressed still camera. Users can send out a snapshot command from the host in order to capture a full resolution single-frame still picture. The picture is then Sid Gaddam 04/22/ 17
The GPIO pins on PORTB are enabled as inputs. Their pull-up resistors are enabled too. In the infinite while loop in the main function, the microcontroller checks to see if any of the buttons have been pressed in each iteration. In the event of collision detection, the microcontroller checks to see which of the buttons has been pushed. Based on that, it calls the motor control functions to get away from the obstacle.
The two IR sensors are read using the ADC channel. After initializing the ADC module, the ADC channels 0 and 1 are sampled at a frequency of 115.2 KHz. The ADC values are read from the ADC buffer. Several values can be read on a single channel and averaged out in order to give a truer picture of the value. But in our case, as we need it only for collision avoidance, once sample is enough. In the infinite while loop in the main function, the IR values are read in each iteration. If the IR value shows that the sensor is less than 30 cm from any object, the motor control functions are called and collision avoidance action is taken.
The transceiver needs 3.3V to power up. Typically, it draws about 90mA in normal usage. In order to configure the Bluetooth transceiver, serial AT commands are used. The first step in this direction is to power up the transceiver using 3.3V. Then, a Sid Gaddam 04/22/ 19
Bluetooth Dongle is attached to a PC. Using the dongle software on the PC, the on-board transceiver device is found and paired with the dongle. A hyperterminal window is then opened up using the default 9600/8/n/1 setting on the COM port where the connection was made. In my case, it is COM41 (This is assigned by Windows OS). Figure 9 Setting up hyperterminal link using PuTTY Sid Gaddam 04/22/ 20