15
SUMMER TRAINING REPORT ON EMBEDDED SYSTEM Submitted by Dibash Kumar Baishya (11/531) Dipjyoti Das (11/532) Luit Bor Kalita (11/533) Nabajit Pathak (11/534) Sanjay Kalita (11/535) Assam Engineering College

Obstacle Detecting Wireless Robot1

Embed Size (px)

Citation preview

Page 1: Obstacle Detecting Wireless Robot1

SUMMER TRAINING REPORT

ON

EMBEDDED SYSTEM

Submitted byDibash Kumar Baishya (11/531)

Dipjyoti Das (11/532)

Luit Bor Kalita (11/533)

Nabajit Pathak (11/534)

Sanjay Kalita (11/535)

Assam Engineering College

Jalukbari, Ghy-13

ACKNOWLEDGEMENT

Page 2: Obstacle Detecting Wireless Robot1

First of all, we would like

Contents1 Session Report

Page 3: Obstacle Detecting Wireless Robot1

1.1 Introduction . 5 1.2 MICROCONTROLLER 5

1.2.1 Definition 5 1.3 EAB-Embedded Application Board 6

1.3.1 Description 61.3.2 Applications 71.3.3 Characteristics 7

1.4 ON BOARD MICROCONTROLLER 91.4.1 Description 9

1.5 SENSOR CARD 101.5.1 Description 101.5.2 Accelerometer 101.5.3 Magnetometer 111.5.4 Static pressure sensor 111.5.5 Gyroscope 11

1.6 Software 111.6.1 Introduction 111.6.2 Features Of MPLAB C18 Compiler for PIC18 MCUs 121.6.3 Ds30Loader 12

1.7 Base Conversion 13 1.8 Bitwise Operators 13 1.9 Logical Shift Operation 15

1.9.1 Tutorial 161.10 TIMER AND OSCILLATOR 19

1.10.1 Timer 191.10.2 Oscillator 19

1.11 Configuring Oscillator 191.11.1 System Clock selection 191.11.2 Configuration bits 201.11.3 Configuration registers 201.11.4 OSCCON: OSCILLATOR CONTROL REGISTER 201.11.5 OSCCON2: OSCILLATOR CONTROL REGISTER 231.11.6 OSCTUNE: OSCILLATOR TUNING REGISTER 24

1.12 Configuring Timer 251.12.1 T0CON: TIMER0 CONTROL REGISTER 251.12.2 Timer0 Interrupt 261.12.3 Tutorial 27

1.13 INTERRUPT AND ISR 291.13.1 Interrupt 291.13.2 Configuring Interrupt 291.13.3 INTCON: INTERRUPT CONTROL REGISTER 301.13.4 INTCON2: INTERRUPT CONTROL 2 REGISTER 321.13.5 INTCON3: INTERRUPT CONTROLS 3 REGISTER 33

1.13.6 PIR1: PERIPHERAL INTERRUPT REQUES(FLAG)REGISTERS 34 1.13.7PIR3:PERIPHERALINTERRUPT(FLAG)REGISTER 35 1.13.8 Interrupt Service Routine 36

Page 4: Obstacle Detecting Wireless Robot1

1.13.9 Configuring Interrupt 371.13.10Tutorial 38

1.14 UART 391.14.1 Serial Communication 401.14.2 About UART 411.14.3 UART configuration 421.14.4 UART Transmitter 421.14.5 UART Receiver 441.14.6 Hterm 451.14.7 Tutorial 46

1.15 Global Positioning System Card 511.15.1 About GPS 511.15.2 How GPS works 511.15.3 Applications of GPS 52

1.15.4 GPS card 541.15.5 How to use it with EAB 551.15.6 Tutorial 55

1.16 Xbee Module 581.16.1 About wireless communication 58

1.16.2 Capabilities 581.16.3 Parameters 581.16.4 Modes 591.16.5 Applications 591.16.6 Xbee card 601.16.7 xbee extension card 601.16.8 How to use it with EAB 611.16.9 Tutorial 61

1.17 Analog to Digital Converter 64 1.17.1 Configure the ADC 64

1.17.2 ADC block diagram 651.17.3 Tutorial 65

1.18 DC Motor 681.18.1 DC Motor 691.18.2 Tutorial 69

1.19 I2C communication 731.19.1 I2C Protocol 731.19.2 Understanding the Inter-IC chat 73

1.19.3 I2C Write 741.19.4 I2C Read 741.19.5 Advantages . 74

1.20 SPI communication 761.20.1 SPI Signals 761.20.2 SPI Data Transfer 76

2.0 Project Report

Page 5: Obstacle Detecting Wireless Robot1

2.1 Introduction 77

2.2 Overview of Project 78

2.3 Block Diagram 79

2.4 Schematic Diagram 80

2.5 Components Used 81

2.5.1 Embedded Application Board 81

2.5.2 Xbee module 82

2.5.3 Ultrasonic sensors. 82

2.5.4 H bridge circuit 83

2.5.5 Motors. 83

2.5.6 Robot Kit 83

2.6 Flow chart. 84

2.7 Program of the project. 86

2.8 Picture of the Robot 87

2.9 Advantages, Disadvantages and Applications 88

3.0 Future prospect 89

3.0 Conclusion 90

Page 6: Obstacle Detecting Wireless Robot1

1.0 INTRODUCTION

The purpose of this project is to design a obstacle detecting wireless robot. In this project the designed robot senses the obstacle ahead with the help of ultrasonic sensor. The XBEE module forward the distance between the obstacle and the robot. The robot is manually controlled by us depending upon the data received i.e. if the distance is less than 20 inch than we stop the robot or change its direction and vice versa. XBee is the brand name from Digi International for a family of form factor compatible radio modules. It is used for wireless communication. The XBee radios can all be used with the minimum four numbers of connections power (3.3V), ground,

Page 7: Obstacle Detecting Wireless Robot1

data in and data out (UART), with other recommended lines being reset and Sleep. Ultrasonic sensors (also known as transceivers when they both send and receive, but more generally called transducers) work on a principle similar to radar or sonar which evaluates attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object. Systems typically use a transducer which generates sound waves in the ultrasonic range, above 18,000 hertz, by turning electrical energy into sound, then upon receivingthe echo turns the sound waves into electrical energy which can be measured and displayed.

2.0 OVERVIEW OF THE PROJECT

In this project, we used two Embedded Application Board (EAB). The EAB board contains PIC18 microcontroller, 22 and 16 pins header, voltage regulator IC, serial to parallel converter IC, USB port, adapter port, reset pin etc. One of the EAB is connected with robot while the other is connected to laptop. The EAB connected to laptop is designed as a transmitter which transmits data to the EAB board of the robot. Depending on this received data by the microcontroller of the robot’s EAB will determine its directions of motion. A pair of Xbee card is used for wireless

Page 8: Obstacle Detecting Wireless Robot1

communication between laptop and robot, each of the Xbee card is connected to the 22 pin header of the EABs. This robot is manually controlled by a user using laptop. An ultrasonic sensor is connected to the robot‘s microcontroller, which sends a continuous data to detect the distance of any obstacle in front of robot. Depending on this received data a user can know of any presence of obstacle in front and user can change its direction to avoid collision.

3.0 BLOCK DIAGRAM

Page 9: Obstacle Detecting Wireless Robot1

4.0 SCHEMATIC DIAGRAM

Page 10: Obstacle Detecting Wireless Robot1