A Report on
WALL CLIMBING SURVEILLANCE ROBOT Submitted by
SHIPRA SINGH SHIWANY PAREEK MONOMITA MANDAL NEHA GUPTA
16900314099 16900314100 16900314063 16900314067
A report submitted submitted in partial fulfilment of the requirement requirement of FINAL YEAR PROJECT for the award of the degree of
BACHELOR OF TECHNOLOGY IN ELECTRONICS AND COMMUNICATION ENGINEERING from
ACADEMY OF TECHNOLOGY Under the guidance of
PROF. SANJIB MITRA
Academy of Technology Aedconagar, Hooghly –712121
1
ACKNOWLEDGEMENT I take this opportunity to express my profound gratitude and deep regards to my faculty Prof. Sanjib Mitra for his exemplary guidance, monitoring monitoring and constant encouragement throughout throughout the course of this project. The blessing, help and guidance given by him time to time shall carry me a long way in the journey of life life on which I am about to embark.
Finally I must say that no height is ever achieved without some sacrifices made at some point of time and it is here I owe my special debt to my parents and family members for showing their love and constant support throughout this period of time.
Prof. Sanjib Mitra (Assistant Professor) Academy Of Technology
Shipra Singh Shiwany Pareek Monomita Mandal Neha Gupta
2
ACKNOWLEDGEMENT I take this opportunity to express my profound gratitude and deep regards to my faculty Prof. Sanjib Mitra for his exemplary guidance, monitoring monitoring and constant encouragement throughout throughout the course of this project. The blessing, help and guidance given by him time to time shall carry me a long way in the journey of life life on which I am about to embark.
Finally I must say that no height is ever achieved without some sacrifices made at some point of time and it is here I owe my special debt to my parents and family members for showing their love and constant support throughout this period of time.
Prof. Sanjib Mitra (Assistant Professor) Academy Of Technology
Shipra Singh Shiwany Pareek Monomita Mandal Neha Gupta
2
ABSTRACT
This is a report on Wall Climbing Surveillance Robot using Arduino, motor board, ducted fan, LIPO battery, voltage divider, ESC, LED, micro motor, voltage regulator e.t.c . It contains basic working of Arduino UNO board and its programming environment, that is, to understand the pin configuration of Arduino UNO board and how to execute basic instructions to develop your own program and interfacing of few sensors as given in the content. The main objective of this project .
3
TABLE OF CONTENTS
Certificate...............................................................................................(2) Acknowledgement..................................................................................(3) Abstract..................................................................................................(5) Introduction on Wall Climbing Robot......................................................(6-7) Introduction on Arduino......................................................................(8-9) Benefits of ...............................................................................(12) Applications of Arduino........................................................................(13) Programs using Arduino..................................................................(14-53) Sensor design Projects.....................................................................(54-66) Mini Projects...................................................................................(67-75) Advantages of Embedded System.........................................................(76) Disadvantages of Embedded System.....................................................(77) Future Scope of Arduino.......................................................................(78) Conclusion............................................................................................(79) References/ Bibliography......................................................................(80)
4
INTRODUCTION ON WALL CLIMBING ROBOT An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular kind of application device. An embedded system is a dedicated computer system designed for one or two specific functions. This system is embedded as a part of a complete device system that includes hardware, such as electrical and mechanical components. The embedded system is unlike the general-purpose computer, which is engineered to manage a wide range of processing tasks. Industrial machines, automobiles, medical equipment, cameras, household appliances, airplanes, vending machines and toys (as well as the more obvious cellular phone and PDA) are among the myriad possible hosts of an embedded system. Modern embedded systems are often based on microcontrollers (i.e. CPUs with integrated memory or peripheral interfaces), but ordinary microprocessors (using external chips for memory and peripheral interface circuits) are also common, especially in more-complex systems. In either case, the processor(s) used may be types ranging from general purpose to those specialised in certain class of computations, or even custom designed for the application at hand. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Properties typical of embedded computers when compared with general-purpose ones are low power consumption, small size, rugged operating ranges and low per-unit cost. Because an embedded system is engineered to perform certain tasks only, design engineers may optimize size, cost, power consumption, reliability and performance. Embedded systems are typically produced on broad scales and share functionalities across a variety of environments and applications. 5
Embedded systems are managed by single or multiple processing cores in the form of microcontrollers or digital signal processors (DSP), field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC) and gate arrays. These processing components are integrated with components dedicated
to
handling
electric
and/or
mechanical
interfacing.
An embedded system's key feature is dedication to specific functions that typically require strong general-purpose processors. For example, router and switch systems are embedded systems, whereas a general-purpose computer uses a proper OS for routing functionality. However, embedded routers function more efficiently than OS-based computers for routing functionalities. Commercial embedded systems range from digital watches and MP3 players to giant routers and switches. Complexities vary from single processor chips to advanced units with multiple processing chips.
6
INTRODUCTION ON ARDUINO Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing. Arduino is a hardware and software company, project, and user community that designs and manufactures computer open-source hardware, open-source software, and microcontroller-based kits for building digital devices and interactive objects that can sense and control physical devices.
The project is based on microcontroller board designs, produced by several vendors, using various microcontrollers. These systems provide sets of digital and analog Input/output (I/O) pins that can interface to various expansion boards (termed shields) and other circuits. The boards feature serial communication interfaces, including Universal Serial Bus (USB) on some models, for loading programs from personal computers. For programming the microcontrollers, the Arduino project provides an integrated development environment (IDE) based on a programming language named Processing, which also supports the languages C and C++. The first Arduino was introduced in 2005, aiming to provide a low cost, easy way for novices and professionals to create devices that interact with their environment using sensors and actuators. Common examples of such devices intended for beginner hobbyists include simple robots, thermostats, and motion detectors. Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up 7
to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.
Arduino Uno:
Pin Diagram :
8
INTRODUCTION ON ATMEGA-328 The ATmega328 is a single-chip microcontroller created by Atmel and belongs to the megaAVR series. Specifications:
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory with read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare modes, internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator, and five software selectable power saving modes. The device operates between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS per MHz. ATmega328 is commonly used in many projects and autonomous systems where a simple, low-powered, low-cost micro-controller is needed. Perhaps the most common implementation of this chip is on the popular Arduino development platform, namely the Arduino Uno and Arduino Nano models. Features:
Microcontroller – ATmega-328 Operating Voltage – 5V Input Voltage(recommended) – 7-12V Input Voltage(limits) – 6-20V Digital I/O Pins – 14 (of which 6 provide PWM pins) Analog Input Pins – 8 DC Current per I/O Pin – 40mA DC Current for 3.3V pins – 50mA Flash Memory – 32KB (of which 2KB used for bootloader) SRAM – 2KB EEPROM – 1KB Clock Speed – 16 MHz 9
Pin Diagram:
10
BENEFITS OF ARDUINO-UNO There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers. Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows. Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works. Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to. Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.
11
APPLICATIONS OF ARDUINO
Light Control Home Automation Robotics Networking Xoscillo, an open-source oscilloscope Scientific equipment such as the Chemduino Arduinome, a MIDI controller device that mimics the Monome OBDuino, a trip computer that uses the on-board diagnostics interface found in most modern cars Ardupilot, drone software and hardware ArduinoPhone, a do-it-yourself cellphone GertDuino, an Arduino mate for the Raspberry Pi Water quality testing platform Homemade CNC using Arduino and DC motors with close loop control by Homofaciens DC motor control using Arduino and H-Bridge.
12
Circuit to blink the Default LED present in Arduino
13
PROGRAMS 01. Program to blink the Default LED present in Arduino void setup() { pinMode(13,OUTPUT); } void loop() { digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); delay(1000); }
14
Circuit to glow multiple LEDs present in the breadboard using arduino 02.Program to glow multiple LEDs present in the breadboard using Arduino int red=11,green=10,blue=9; void setup() { pinMode(red,OUTPUT); pinMode(green,OUTPUT); pinMode(blue,OUTPUT); } void loop() { digitalWrite(red,HIGH); delay(500); digitalWrite(red,LOW);
15
delay(500); digitalWrite(green,HIGH); delay(500); digitalWrite(green,LOW); delay(500); digitalWrite(blue,HIGH); delay(500); digitalWrite(blue,LOW); delay(500); digitalWrite(green,HIGH); delay(500); digitalWrite(green,LOW); }
16
Circuit to glow multiple LEDs using switch(button) as input
03.Program to glow multiple LEDs using switch(button) as input int red=11,green=10,blue=9,switch=12; void setup() { pinMode(red,OUTPUT); pinMode(green,OUTPUT); pinMode(blue,OUTPUT); pinMode(switch,INPUT); Serial.begin(9600); } 17
void loop() { int value=digitalRead(switch); Serial.println(value); if(value==1) { digitalWrite(red,HIGH); delay(500); digitalWrite(red,LOW); digitalWrite(green,HIGH); delay(500); digitalWrite(green,LOW); digitalWrite(blue,HIGH); delay(500); digitalWrite(blue,LOW); digitalWrite(green,HIGH); delay(500); digitalWrite(green,LOW); } else { digitalWrite(red,LOW); digitalWrite(green,LOW); digitalWrite(blue,LOW); } }
18
Circuit to turn on multiple LEDs when the button is pressed and let it on when the button is released
04.Program to turn on multiple LEDs when the button is pressed and let it on when the button is released int red=11,green=10,blue=9,switch=12,cnt=0; void setup() { 19
pinMode(red,OUTPUT); pinMode(green,OUTPUT); pinMode(blue,OUTPUT); pinMode(switch,INPUT); Serial.begin(9600); } void loop() { int btst=digitalRead(switch); Serial.println(btst); if(btst==1) { cnt=cnt+1; switch(cnt) { case 1: digitalWrite(red,HIGH); digitalWrite(green,LOW); digitalWrite(blue,LOW); break; case 2: digitalWrite(green,HIGH); digitalWrite(blue,LOW); digitalWrite(red,LOW); break; case 3: digitalWrite(blue,HIGH); digitalWrite(red,LOW); digitalWrite(green,LOW); break; 20
case 4: digitalWrite(green,HIGH); digitalWrite(red,LOW); digitalWrite(blue,LOW); break; } delay(500); if(cnt>=4) { cnt=0; } } else { cnt=0; digitalWrite(red,LOW); digitalWrite(green,LOW); digitalWrite(blue,LOW); } }
21
Circuit to fade up and fade down an LED
05.Program to fade up and fade down an LED int i,j,level,red=9; void setup() { } void loop() { for(i=0;i<=255;i++) 22
{ level=i; analogWrite(red,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(red,level); delay(10); } }
Circuit to fade up and fade down multiple LEDs
23
06.Program to fade up and fade down multiple LEDs int i,j,level,red=11,green=10,blue=9; void setup() { } void loop() { for(i=0;i<=255;i++) { level=i; analogWrite(red,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(red,level); delay(10); } for(i=0;i<=255;i++) { level=i; analogWrite(green,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(green,level); delay(10); } for(i=0;i<=255;i++) { level=i; analogWrite(blue,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(blue,level); delay(10); } }
24
Circuit to fade up an LED using potentiometer
7.Program to fade up an LED using potentiometer int i,j,red=9; void setup() { Serial.begin(9600); } void loop() 25
{ i=analogRead(A5); Serial.print(i); j=map(i,0,1023,0,255); Serial.print('\t'); Serial.print(j); Serial.println(); analogWrite(red,j); }
26
Circuit to blink LED and produce sound of the buzzer of an ambulance
8. Program to blink LED and produce sound of the buzzer of an ambulance int red=10,green=9,buz=8; void setup() { pinMode(buz,OUTPUT); pinMode(red,OUTPUT); pinMode(green,OUTPUT);
} 27
void loop() { tone(buz,500); digitalWrite(red,HIGH); digitalWrite(green,LOW); delay(500); tone(buz,700); digitalWrite(green,HIGH); digitalWrite(red,LOW); delay(500); }
Circuit to produce the sound of siren
28
9.Program to produce the sound of siren int freq,buz=8; void setup() { pinMode(buz,OUTPUT); } void loop() { for(freq=500;freq<=1500;freq+=10) { tone(buz,freq); delay(10); } for(freq=1500;freq>=500;freq-=10) { tone(buz,freq); delay(10); } }
29
Circuit to fade up and fade down an LED using switch button and let it on the same intensity when the switch is released
10.Program to fade up and fade down an LED using switch button and let it on the same intensity when the switch is released int i=0,flag=1,red=9,switch=12,btst; void setup() { pinMode(red,OUTPUT); pinMode(switch,INPUT); Serial.begin(9600); } void loop() { btst=digitalRead(switch); 30
Serial.println(btst); if(btst==1) { if(flag==1) { i++; if(i==255) { flag=0; } } else { i--; if(i==0) flag=1; } } analogWrite(red,i); delay(10); }
31
Circuit to fade up and fade down multiple LEDs using switch button and let it on the same intensity when the switch is released.
11.Program to fade up and fade down multiple LEDs using switch button and let it on the same intensity when the switch is released. int i=0,flag=1,btst,cnt=0; int bulb[]={11,10,9,10}; void setup() { pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(11,OUTPUT); pinMode(12,INPUT); 32
Serial.begin(9600); } void loop() { btst=digitalRead(12); if(btst==1) { if(flag==1) { i++; if(i==255) { flag=0; } } else { i--; if(i==0) { flag=1; cnt++; digitalWrite(bulb[cnt-1],LOW); } } } Serial.print(btst); Serial.print(‘\t’); Serial.println(i); delay(10); analogWrite(bulb[cnt],i); if(cnt==4) { cnt=0; } }
33
Circuit to spin the DC motor using potentiometer
12.Program to spin the DC motor using potentiometer int i,mtr; void setup() { Serial.begin(9600); } 34
void loop() { i=analogRead(A5); Serial.print(i); mtr=map(i,0,1023,0,255); Serial.print('\t'); Serial.print(i); Serial.println(); analogWrite(A4,mtr); }
35
Circuit to display Hello World on the screen of LCD
13.Program to display Hello World on the screen of LCD #include LiquidCrystal lcd(12, 8, 7, 4, 3, 2); void setup() { lcd.begin(16, 2); 36
lcd.print("hello, world!"); } void loop() { lcd.setCursor(0,1); lcd.print(millis() / 1000); }
37
Circuit of tank level indicator using potentiometer
14.Program to design tank level indicator using potentiometer int value,level,i,j,freq,red=11,green=10,blue=9,buz=8; void setup() { pinMode(red,OUTPUT); pinMode(green,OUTPUT); pinMode(blue,OUTPUT); pinMode(buz,OUTPUT); Serial.begin(9600); 38
Serial.println(); Serial.print("Value"); } void loop() { Serial.println(); value=analogRead(A5); Serial.print(value); Serial.print('\t'); noTone(buz); if(value<=10) { Serial.print("Empty"); digitalWrite(red,HIGH); tone(buz,700); digitalWrite(green,LOW); digitalWrite(blue,LOW); } if(value>10&&value<=200) { Serial.print("Low Level"); digitalWrite(red,HIGH); tone(buz,700); delay(500); digitalWrite(red,LOW); noTone(buz); delay(500); digitalWrite(green,LOW); digitalWrite(blue,LOW); } if(value>200&&value<=450) { Serial.print("Low Medium"); for(i=0;i<=255;i++) { level=i; analogWrite(blue,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(blue,level); delay(10); } digitalWrite(red,LOW); digitalWrite(green,LOW); 39
} if(value>450&&value<=550) { Serial.print("Medium"); digitalWrite(green,HIGH); digitalWrite(red,LOW); digitalWrite(blue,LOW); } if(value>550&&value<=800) { Serial.print("Upper Medium"); for(i=0;i<=255;i++) { level=i; analogWrite(blue,level); delay(10); } for(j=255;j>=0;j--) { level=j; analogWrite(blue,level); delay(10); } digitalWrite(green,HIGH); digitalWrite(red,LOW); } if(value>800&&value<=1000) { Serial.print("High Level"); digitalWrite(red,HIGH); digitalWrite(green,HIGH); tone(buz,700); delay(500); digitalWrite(red,LOW); digitalWrite(green,LOW); noTone(buz); delay(500); digitalWrite(blue,LOW); } if(value>1000) { Serial.print("Full"); digitalWrite(red,HIGH); for(freq=500;freq<=900;freq+=10) { tone(buz,freq); delay(10); } for(freq=900;freq>=500;freq-=10) { 40
tone(buz,freq); delay(10); } digitalWrite(green,LOW); digitalWrite(blue,LOW); } }
41
Circuit to sweep the Servo Motor
15.Program to sweep the Servo Motor #include Servo myservo; int pos = 0; void setup() 42