Sie sind auf Seite 1von 67

FABRICATION OFHEXAPOD ROBOT

A Project

Submitted in the partial fulfillment of the requirements for

The award of the degree of`

BACHELOR OF TECHNOLOGY
In
DEPARTMENT OF MECHANICAL ENGINEERING
Submitted By

P.GOPI KRISHNA (15471A03B2)

P.PAVAN KUMAR (15471A03A2)

T.PAVAN KUMAR (15471A0357)

G.KIREETI (15471A0359)

SK.AFREED (15471A03A5)

G. SRINIVASULA REDDY (15471A0382)

Under the Guidance of

CH.SEKHAR, M.Tech

DEPARTMENT OF MECHANICAL ENGINEERING


Narasaraopeta Engineering College (Autonomous)
Narasaraopet – 522 601, Andhra Pradesh, India
APRIL - 2019
Certificate

This is to certify that the Project entitled “FABRICATION OF HEXAPOD ROBOT” is


being submitted by us; in partial fulfillment for the award of B.Tech in Mechanical engineering
to the Jawaharlal Nehru Technological University-Kakinada, Kakinada is a record of bonafide
work carried out by him/her under our guidance.

The results embodied in this thesis have not been submitted to any other University or Institute
for the award of any degree or diploma.

Signature of the Guide Signature of Head of the Department

Mr. Ch. Sekhar Dr.D. Suneel M.tech, Ph.D,


Associate professor, Dept. of Mechanical Engineering
Dept. of Mechanical Engineering

Internal Examiner External Examiner

2
Declaration

The project entitled “HEXAPOD ROBOT”is a record of bonafide work carried out by us,
submitted in partial fulfillment for the award of B.Tech in Mechanical engineering to the
Jawaharlal Nehru Technological University-Kakinada, Kakinada. The results embodied in this
project have not been submitted to any other University or Institute for the award of any degree
or diploma.

Signature of the Candidates

P. Gopi Krishna (15471A03B2)


P. Pavan Kumar (15471A03A2)
T. Pavan Kumar (15471A0357)
G. Kireeti (15471A0359)
SK. Afreed (15471A03A5)
G. Srinivasula Reddy (15471A0382)

3
ACKNOWLEDGEMENT

Firstly we would like to thanks our Guide Ch. Sekhar for his valuable suggestion to
complete the project. He took interest in checking all minute bugs in our project report and
guided us throughout the project duration.

Our deep and most sincere feeling of gratitude to our H.O.D. Dr.D. Suneel, who has
kindly allowed us to work on this topic and for his valuable guideline to us.

We convey our special thanks to beloved principle Dr.M. SREENIVASA KUMAR and
to our college management for providing excellent lab facilities for the smooth completion of
the project.

We also want to thank our classmates for their motivation. Finally we would like to
express our thanks to all of those who helped us directly or indirectly in this project work.

4
ABSTRACT

Six-legged robots, also referred to as hexapods, can have very complex locomotion
patterns and provide the means of moving on terrain where wheeled robots might fail. This thesis
demonstrates the approach of using Model-Based Design to create control of such a hexapod.
The project comprises the whole range from choosing of hardware, creating CAD models,
development in MATLAB/Simulink and code generation. By having a computer model of the
robot, development of locomotion patterns can be done in a virtual environment before tested on
the hardware.
Leg movement is implemented as algorithms to determine leg movement order, swing
trajectories, body height alteration and balancing. Feedback from the environment is
implemented as a internal measurement unit that measures body angles using sensor fusion.
The thesis has resulted in successful creation of a hexapod platform for locomotion development
through Model-Based Design. Both a virtual hexapod in SimMechanics and a hardware hexapod
is created and code generation to the hardware from the development environment is fully
supported. Results include successful implementation of hexapod movement and the walking
algorithm has the ability to walk on a flat surface, rotate and alter the body height.
Implementation also contains a successful balancing mode for the hexapod whereas it is able to
keep the main body level while the floor angle is altered.

5
CONTENTS

DESCRIPTION PAGE NO
1. INTRODUCTION 10
1.1 BACKGROUND OF HEXAPOD 10
1.2 THE HEXAPOD 11
1.3 OUTLINE OF THE THESIS 11
2. LITERATURE SURVEY 13
3. METHODOLOGY 15
3.1 PROPOSED WORKING PRINCIPLE 15
3.2 FLOWCHART OF THE MODEL 16
4. COMPONENTS OF THE HEXAPOD 17
4.1 ARDUINO MICROCONTROLLER 17
4.2 ARDUINO UNO BOARD DESCRIPTION 25
4.3 SERVO 27
4.4 LEGS 28
4.5 SCREW DRIVER 29
4.6 NUTS & BOLTS 29
4.7 DOUBLE SIDE TAP 30
4.8 WOODEN CHASIS 31
4.9 DC POWER JACK 32
4.10 BATEERY CONNECTORS 32
4.11 BREAD BOARD 33
4.12 WIRE STRIPPER 34
4.13 ARDUINO UNO USB CABLE 34
4.14 PIN CONNECTORS 35
4.15 9V BATTERY 37
4.16 INSULATION TAPE 37
4.17 HC-05 BLUETOOTH MODULE 38
5. FABRICATION OF HEXAPOD ROBOT 42
5.1 HEXAPOD- SERVO MOUNTING 42
5.2 HEXAPOD- FIXING SERVO’S TO LEGS 43
5.3 ASSEMBLY OF HEXAPOD ROBOT 44

6
6. ARDUINO SOFTWARE INSTALLATION 47
7. ARDUINO PROGRAMMING 52
7.1 GRAPHICAL PROGRAMMING FOR BEGINNERS 52
7.2 BASIC PROGRAM 53
7.3 ARDUINO CODE AND SYNTAX REVIEW 59
8. TROUBLESHOOTING AND FUTURE SCOPE 60
9. CONCLUSION 62
10. REFERENCE 63
GROUP PHOTO 63

7
LIST OF FIGURS

FIGURE NO PAGE NO
3.1 BLOCK DIAGRAM OF THE ROBOT 15
3.2 FLOWCHART OF THE ENTIRE SYSTEM 16
4.1 ARDUINO BOARD CONTROLLER 17
4.2 ARDUINO DESCRIPTION 26
4.3 SERVO MOTORS 28
4.4 LEGS 28
4.5 SCREWDRIVER 29
4.6 NUTS & BOLTS 30
4.7 DOUBLE SIDED TAPE 30
4.8 WOODEN CHASIS 31
4.9 DC POWER JACK 32
4.10 9V BATEERY CONNECTOR 33
4.11 BREAD BOARD 33
4.12 WIRE STRIPPER 34
4.13 ARDUINO UNO USB CABLE 34
4.14 PIN CONNECTORS 35
(a) FEMALE TO FEMALE CONNECTORS 35
(b) MALE TO MALE CONNECTORS 35
4.15 9V BATEERY 36
4.16 INSULATION TAPE 37
4.17 HC-05 BLUETOOTH MODULE 39
(a) CONNECTING OF BLUETOOTH TO ARDUINO 39
(b) CONNECTING OF BT MODULE TO ARDUINO USING 40
A SET OF JUMPER WIRES AND CONNECTOR
5.1 SERVO MOUNTING 42
(a) U-CLAMPS 42
(b) MULTIPLE SERVOS 43
5.2 FIXING SERVOS TO LEGS 43

8
5.3 ASSEMBLY OF HEXAPOD 44
(a) MOUNTING ARDUINO AND POWER CIRCUIT 45
(b) BLOCK DIAGRAM OF POWER SUPPLY 46
6.1 UNZIP THE FILE 47
6.2 INSTALLING OF ARDUINO APPLICATION 48
6.3 CREATING OF NEW PROJECT 48
6.4 SELECTING THE ARDUINO 49
6.5 SELECTING THE SERIAL PORT 50
6.6 UPLOADING THE PROGRAM TO ARDUINO BOARD 51
6.7 REFER FIGURE 6.6 51

9
CHAPTER - 1
INTRODUCTION
1.1 Background
A common workflow today for developing control systems is using Model-Based Design.
An interesting way of testing the limitations of Model-Based Design is to use it in different
projects. Combine Control Systems AB in Lund has shown interest in using this method to
develop control of a hexapod. By using it to develop locomotion and movement patterns for a
hexapod it will be possible to evaluate the benefits of such an approach in robotics. If results are
positive, Combine can then use the developed system to showcase the business idea of Model-
Based Design.
Combine Control Systems AB has business partners in software development such as
Math Works and National Instruments. The nature of their business model presents them with
several opportunities to attend technical fairs where they showcase their business idea.
A hexapod (from the Greek hex for "six" and pous for "foot") refers to a six legged robot.
Hexapods have recently become increasingly popular and are now available to fairly cheap
prices. Combine has previously shown videos of existing thesis work [Ohlsson and Stahl, 2013]
on a hexacopter. Due to the dangers of having high speed rotating blades close to people the
hexacopter could never be brought to fairs. This is one of the reasons Combine has shown
interest in a safer system like a hexapod.
Due to the novelty of the project, no hardware existed at Combine prior to this work.
Therefore part of the thesis involves choosing a hexapod platform. A hexapod platform usually
consists of the six legged robot, a micro-controller, a wireless handheld commander and an open
source control program. Model-Based Design and automatic code-generation is to be used in
order to replace the supplied control algorithm and thus be representative of modern control
implementation. Combine Control Systems AB has a lot of cooperation with Math Works and as
such plenty of knowledge and support on their software. Simulink and Embedded Coder have
good support for code-generation to micro-controllers such as Arduino, Raspberry Pi and
BeagleBone Black. This provides good opportunities to develop control algorithms in Simulink
and use SimMechanics for a visual representation.
One of the strengths of walking hexapods is their potential to handle uneven terrain. With
good and adaptive control they have an advantage over wheeled vehicles in hard-to-manoeuvre
areas. An algorithm for handling terrain is to be developed and tested based on accelerometers
and gyroscope placed on the hexapod body.

10
1.2 The Hexapod:-

It is developed by Interbotix Labs and is a second revision of their hexapod PhantomX.


Using one servos per pair of leg up to a total of 3 servos all together the PhantomX provides 18
degrees of freedom. The processing unit is an Arduino based board called ArbotiX-M using a
16MHz ATmega644p processor. The ArbotiX-M communicates with the 18 Dynamixel AX-12A
Servos over a half-duplex UART serial communication channel. This communication is
specified to 1 Mbit per second but can be scaled down. A handheld remote called ArbotiX
Commander communicates wireless with the hexapod using XBee modules. These XBee
modules can also be used to communicate with the robot through a computer with a virtual
remote.
The retailer, Trossen Robotics recommends an open source software engine for the
hexapod called NUKE. It is a fairly small (17.41 kb) program written I C/C++ that can be
downloaded to the processor through the Arduino IDE. Full functionality is provided to the
hexapod with the NUKE Engine. Forward/backwards mobility, sidestep; turning and changing
locomotion pattern (also called gait) can be controlled from the handheld remote. The different
gaits that can be chosen are movement using one, two or three legs simultaneously.

1.3 Outline Of The Thesis:-


The main goal of the thesis is to program a walking hexapod robot using Model Based
Design. This is supposed to highlight the strengths of working with a computer model as a first
testing stage. In today’s industry it is a lot more cost and time efficient to test control methods on
a computer model of a plant before testing on a real plant [Ahmadian et al., 2005]. By having
both a computer running the modeland the real hexapod at a fair, Combine will be able to show
their business modelin an advantageous way. Therefore, the visual aspect of the computer model
is of importance as well.
Since the project was started from scratch the first milestone was to find a suitable
hexapod platform. Criteria for a good hexapod platform are several. It is preferred for the
processing unit to have good support through Simulink and Embedded Coder. The hexapod is
preferred to be visually similar to an arthropod and for it to be able to navigate terrain a high
ground clearance is important. In order to avoid limiting the control, servos with higher speed
and update frequency were desired.

11
As generated code is fairly unreadable, a processing unit that offers debugging during
execution is highly preferred. To avoid unnecessary system-latency, as few hardware
components as possible were preferred. This will also facilitate further thesis work on the
platform.
In order to visualize the model in SimMechanics a CAD model of the hexapod were
constructed using Solid Works. Control for the hexapod movement created in Simulink could
then be used on both the computer model and the hardware platform. Since the same controller
runs on both model and hardware, verification of the model could be done by applying the same
input to both and comparing the results.
As a scientific challenge, a final aim was to have the end product hexapod navigate
uneven terrain. With help of on-board accelerometer, gyroscope and magnetometer the
movement and orientation of the main body is to be measured. From this measurement the
possibility to identify objects and walls may exist. Utilizing this information the walking pattern
could adapt to the environment.

CHAPTER – 2
12
LITERATURE SURVEY

Robots can be found everywhere. One of the most important part of a robot is its chassis.
There are several basic chassis types: wheeled, tracked and legged chassises. Wheeled chassises
are fast, but not suitable for rough terrain. Tracked chassises are slower, but more suitable to
rugged terrain. Legged chassises are quite slow and more difficult to control, but extremely
robust in rough terrain. Legged chassises are capable to cross large holes and can operate even
after losing a leg. [1] Many researches were performed in this field in past few years, because of
its large potential. Legged chassises are especially ideal for space missions [2, 3]. There are also
several projects in military research [4, 5, 6]. I aim to create a cheap legged platform, which
would allow research and testing of walking chassises. Create a system with many sensors that
allows the chassis any movement or behavior. The robot should be driven from wirelessly
connected computer and should send all available data from sensors, which will be displayed on
the computer in the user interface program. This platform should be universal, anyone could
connect to the robot and drive it and anyone may connect and send his own data to the user
interface program of the control computer. Part of the problem is the design and implementation
of hexapod gait algorithms such as tripod, wave or ripple (Figure 2) [3]. It is also important to
create and program a system into the microcontroller unit (MCU) [7] of the robot, which would
be able to perform given algorithm by adjusting the servomotor angle at the right time. There are
several companies, which are producing hexapod robot models and platforms. Name
Lynxmotion [8] or Trossen Robotics [9]. Both companies offer a variety of hobby and research
level robot kits and parts. They also offer several types of hexapods. These robots differ in the
body shape and leg construction. All robots come with software, which provides control of
servomotors using inverse kinematics and creating custom gaits. Robot kits are sold for about $
1,000, depending on the version. Although several solutions already exist and have great
potential, each one of them has some disadvantage. The first one is price, which is quite high,
about $ 1,000 a piece. Another disadvantage is equipment of the robots. Most of the available
robots have limited expansion options, like missing foot sensors, which are difficult to install
later, or servomotor type with insufficient power or features. Also the batteries are often built in
the body and it is difficult or even impossible to remove them.

Because of these disadvantages, I decided to build a new robot. This new robot is capable
of the same movements like commercial versions and tries to remove their negatives. Robot is
made of aluminium profiles, because of their easy availability and sufficient strength. Unlike
13
commercial versions, this hexapod has also a wide variety of sensors and equipment, like
ultrasonic sonars, LCD display, encoders, foot sensors or camera. All the information from the
sensors are sent to the computer and displayed in the UI program. It is also possible to use a
library, which allows reading of all the data from the robot and sending commands to it. This
robot can walk using tripod, wave or ripple gait and is also capable of rotation. Each leg is
equipped with a force-sensitive resistor to detect ground and each servomotor has an encoder to
determine joint’s current position. Sonars are able to detect obstacles to avoid collisions. All
events and information can be monitored in Hexapod Control Room.

CHAPTER – 3

14
METHODOLOGY

3.1 Proposed working principle


The hexapod robot acts as a rescue robot in a targeted arena. We will place the robot at a
place where human are not able to go further. We will have the full control of the robot. We will
control the robots movements and send it inside the disaster area. We will get a live camera feed
from the robot over WIFI. As we control the movements of the robot, the robot itself will also
adapt its movements by detecting obstacles in front of it by an ultrasonic sensor.
The proposed model of the Hexapod robot should have an industrial grade lightweight
material to build the body. For the model one-piece that constituting the main body is
lightweight composite materials. It is comfortable and cost material in terms of process ability
Fig. 1 shows the block diagram of the robot.

Fig:3.1 Block Diagram of the Robot.

3.2Flow Chart of the model


15
Once the power switch is turned on, the robot will be ready for its task. Firstly, an
android device is needed to be paired with the robot. Once the pairing is done, the robot will be
ready for controlling through the specially designed robot-controlling app [9].Then the robot will
wait for instructions from the app. All the 6 legs of the robot can be controlled separately.
Moreover, the robot can be navigated to forward, backward, left and right directions. The speed
of these movements can also be controlled. There is a dedicated command which triggers the
robot into detective mode. In this mode, the robot takes input from the temperature sensor. The
readings will be sent to Arduino for processing. The camera will capture images or video and
provide live feed to the android app. using the camera feed, user will be able to locate if there is
anyone stuck inside the destroyed building structure [8]. Moreover, there is a Semi-autonomous
mode that will turn on the sonar sensor. If the sonar detects any obstacle in its way, the robot will
automatically avoid the obstacle by moving beside it.

Fig:3.2 Flowchart Of The Entire System.

16
CHAPTER – 4
COMPONENTS OF HEXAPOD

4.1 Arduino Micro Controllers:-


The Arduino Uno is a microcontroller board based on the atmega328 (datasheet). It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz ceramic resonator, a USAB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer with
a USB cable or power it with a AC-to-DC adapter or battery to get started.

Fig:4.1 Arduino board controller

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as
a USB-to-serial converter."Uno" means one in Italian and is named to mark the upcoming
release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino,
moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference
model for the Arduino platform; for a comparison with previous versions, see the index of
Arduino boards. Arduino board designs use a variety of microprocessors and controllers. The
boards are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced
to various expansion boards or Breadboards (shields) and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models, which are
also used for loading programs from personal computers. The microcontrollers are typically
programmed using a direct of features from the programming languages C and C++.

In addition to using traditional compiler tool chains, the Arduino project provides
an integrated development environment (IDE) based on the Processing language project.
17
TECHNICAL SPECIFICATIONS:

 Microcontroller: ATmega328P
 Operating Voltage: 5v
 Input Voltage: 7-20v
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 20 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used by boot loader
 SRAM: 2 KB
 EEPROM: 1 KB
 Clock Speed: 16 MHz
 Length: 68.6 mm
 Width: 53.4 mm
 Weight: 25 g

PIN DESCRIPTION:

General Pin functions

 LED: There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
 VIN: The input voltage to the Adriano/Genuino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 20V), the USB connector (5V), or
the VIN pin of the board (7-20V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage the board.
 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.

 GND: Ground pins.

18
 IOREF: This pin on the Adriano/Genuine board provides the voltage reference with
which the microcontroller operates. Reset: Typically used to add a reset button to shields
which block the one on the board.

SPECIAL PIN FUNCTIONS:

Each of the 14 digital pins and 6 Analog pins on the Uno can be used as an input or
output, using pin Mode (), digital Write(), and digital Read () functions. They operate at 5 volts.
Each pin can provide or receive 20 mA as recommended operating condition and has an internal
pull-up resistor (disconnected by default) of 20-50k ohm. A maximum of 40mA is the value that
must not be exceeded on any I/O pin to avoid permanent damage to the micro controller. The
19
Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though is it possible to
change the upper end of their range using the AREF pin and the analog Reference() function.

In addition, some pins have specialized functions:

 Serial: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial
chip.

 External Interrupts: pins 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value.
 PWM (Pulse Width Modulation) 3, 5, 6, 9, 10, and 11 Can provide 8-bit PWM output
with the analog Write () function.

SPI (Serial Peripheral Interface Bluetooth or other methods). When used with traditional


microcontroller tools, instead of the Adriano IDE, standard AVR in-system programming (ISP)
programming is used.

The Adriano board exposes most of the microcontroller's I/O pins for use by other
circuits. The Diecimila, Duemilanove, and current Uno provide 14 digital I/O pins, six of which
can produce pulse-width modulated signals, and six analog inputs, which can also be used as six
digital I/O pins. These pins are on the top of the board, via female 0.1-inch (2.54 mm) headers.
Several plug-in application shields are also commercially available. The Adriano Nano, and
Adriuno-compatible Bare Bones Board and arduino boards may provide male header pins on the
underside of the board that can plug into solder less breadboards.

Many Arduino-compatible and Arduino-derived boards exist. Some are functionally


equivalent to an Arduino and can be used interchangeably. Many enhance the basic Arduino by
adding output drivers, often for use in school-level education, to simplify making buggies and
small robots. Others are electrically equivalent but change the form factor, sometimes retaining
compatibility with shields, sometimes not. Some variants use different processors, of varying
compatibility.

20
The Arduino Family:

Arduino makes several different boards, each with different capabilities. In addition, part
of being open source hardware means that others can modify and produce derivatives of Arduino
boards that provide even more form factors and functionality. If you’re not sure which one is
right for your project, check this guide for some helpful hints. Here are a few options that are
well-suited to someone new to the world of Arduino.

Arduino Uno (R3):

The Uno is a great choice for your first Arduino. It’s got everything you need to get
started, and nothing you don’t. It has 14 digital input/output pins (of which 6 can be used as
PWM outputs), 6 analog inputs, a USB connection, a power jack, a reset button and more.

It contains everything needed to support the microcontroller; simply connect it to a


computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.

 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication


using the SPI library.
 TWI (Two Wire Interface): A4 or SDA pin and A5 or SCL pin. Support TWI
communication using the Wire library.
 AREF (Analog Reference): Reference voltage for the analog inputs.

Communication:

The Arduino/Genuine Uno has a number of facilities for communicating with a


computer, another Arduino/Genuine board, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX).
An ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The 16U2 firmware uses the standard USB COM
drivers, and no external driver is needed. However, on Windows, a file is required. The Arduino
Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from
the board. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1). A Software Serial library allows serial communication on any of the Uno's digital
pins.
21
Automatic (Software) Reset:

Rather than requiring a physical press of the reset button before an upload, the
Arduino/Genuine Uno board is designed in a way that allows it to be reset by software running
on a connected computer. One of the hardware flow control lines (DTR) of the
ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad
capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the
chip.

 This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB).
For the following half-second or so, the boot loader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened.

Hardware:

 Arduino is open-source hardware. The hardware reference designs are distributed under
a Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino
website. Layout and production files for some versions of the hardware are also available.
The source code for the IDE is released under the GNU General Public License, version
2 Nevertheless, an official Bill of Materials of Arduino boards has never been released by
Arduino staff.

 Although the hardware and software designs are freely available under copy left licenses, the
developers have requested the name Arduino to be exclusive to the official product and not
be used for derived works without permission. The official policy document on use of the
Arduino name emphasizes that the project is open to incorporating work by others

 Into the official product. Several Arduino-compatible products commercially released have


avoided the project name by using various names ending in –Arduino.

 Most Arduino boards consist of an Atmel 8-bit AVR microcontroller (ATmega8,


ATmega168, ATmega328, ATmega1280, ATmega2560) with varying amounts of flash
memory, pins, and features  The 32-bit Arduino Due, based on the Atmel SAM3X8E was
introduced in 2012. The boards use single or double-row pins or female headers that facilitate
connections for programming and incorporation into other circuits. These may connect with
add-on modules termed shields. Multiple and possibly stacked shields may be individually

22
addressable via an I²C serial bus. Most boards include a 5 V linear regulator and a
16 MHz crystal

 Oscillator or ceramic resonator. Some designs, such as the Lily Pad, run at 8 MHz and
dispense with the onboard voltage regulator due to specific form-factor restrictions.

 Arduino microcontrollers are pre-programmed with a boot loader that simplifies uploading of


programs to the on-chip flash memory.

 The default boot loader of the Arduino UNO is the optiboot boot loader. Boards are loaded
with program code via a serial connection to another computer. Some serial Arduino boards
contain a level shifter circuit to convert between RS-232 logic levels and transistor–transistor
logic(TTL) level signals.

 Current Arduino boards are programmed via Universal Serial Bus (USB), implemented using
USB-to-serial adapter chips such as the FTDI FT232. Some boards, such as later-model Uno
boards, substitute the FTDI chip with a separate AVR chip containing USB-to-serial
firmware, which is reprogrammable via its own ICSP header. Other variants, such as the
Arduino Mini and the unofficial arduino, use a detachable USB-to-serial adapter board or
cable.

Software And Programming Tools:

 A program for Arduino may be written in any programming language with compilers that


produce binary machine code for the target processor. Atmel provides a development
environment for their microcontrollers, AVR Studio and the newer Atmel Studio.

 The Arduino project provides the Arduino integrated development environment (IDE),


which is a cross-platform application written in the programming language Java. It
originated from the IDE for the languages Processing and Wiring. It includes a code
editor with features such as text cutting and pasting, searching and replacing text,
automatic indenting, brace matching, and syntax highlighting, and provides simple one-
click mechanisms to compile and upload programs to an Arduino board. It also contains a
message area, a text console, a toolbar with buttons for common functions and a
hierarchy of operation menus.

23
 A program written with the IDE for Arduino is called a sketch. Sketches are saved on the
development computer as text files with the file extension.ino. Arduino Software (IDE)
pre-1.0 saved sketches with the extension.pde.

 The Arduino IDE supports the languages C and C++ using special rules of code


structuring. The Arduino IDE supplies a software library from the Wiring project, which
provides many common input and output procedures. User-written code only requires
two basic functions, for starting the sketch and the main program loop, that are compiled
and linked with a program stub main() into an executable cyclic executive program with
the GNU tool chain, also included with the IDE distribution.

 The Arduino IDE employs the program argued to convert the executable code into a text
file in hexadecimal encoding that is loaded into the Arduino board by a loader program in
the board's firmware.

 The open-source nature of the Arduino project has facilitated the publication of many
free software libraries that other developers use to augment their projects.

4.1.2 Pin Descriptions table:-


VCC
Digital supply voltage.
GND
Ground.
Port B (PB [7:0]) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can
be used as input to the inverting Oscillator amplifier and input to the internal clock operating
circuit. Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock
source, PB [7:6] is used as TOSC [2:1] input for the Asynchronous Timer/Counter2 if the AS2
bit in ASSR is set.
Port C (PC [5:0])

24
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The PC [5:0] output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is
unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the
minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are
not guaranteed to generate a Reset. The various special features of Port C are elaborated in the
Alternate Functions of Port C section.

Port D (PD) [7:0])


Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes
active, even if the clock is not running.

AVCC
AVCC is the supply voltage pin for the A/D Converter, PC [3:0], and PE[3:2]. It should
be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be
connected to VCC through a low-pass filter. Note that PC [6:4] use digital supply voltage, VCC.

AREF
AREF is the analog reference pin for the A/D Converter.

ADC [7:6] (TQFP and VFQFN Package Only)

25
In the TQFP and VFQFN package, ADC [7:6] serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC channels.

4.2 Arduino Uno Board Descriptions


We will learn about the different components on the Arduino board. We will
study the Arduino UNO board because it is the most popular board in the Arduino board
family. In addition, it is the best board to get started with electronics and coding. Some
boards look a bit different from the one given below, but most Arduinos have majority of
these components in common.

Fig:4.2 Arduino Description

4.2.1 Power USB:


Arduino board can be powered by using the USB cable from computer. All we need to do
is connect the USB cable to the USB connection (1).

26
4.2.2 Power (Barrel Jack):
Arduino boards can be powered directly from the AC mains power supply by connecting
it to the Barrel Jack (2).
4.2.3 Voltage Regulator:
The function of the voltage regulator is to control the voltage given to the Arduino board
and stabilize the DC voltages used by the processor and other elements.
4.2.4 Crystal Oscillator:
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top of the
Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz

4.2.5 Arduino Reset:


We can reset were Arduino board, i.e., start wear program from the beginning. We can
reset the UNO board in two ways. First, by using the reset button (17) on the board. Second, we
can connect an external reset button to the Arduino pin labeled RESET (5).
4.2.6 Pins (3.3, 5, GND, VIN):
 3.3V (6) − Supply 3.3 output volt
 5V (7) − Supply 5 output volt
 Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
 GND (8) (Ground) − There are several GND pins on the Arduino, any of which can be
used to ground circuit.
 VIN (9) − this pin also can be used to power the Arduino board from an external power
source, like AC mains power supply.

4.2.7 Analog pins:

The Arduino UNO board has five analog input pins A0 through A5. These pins can read
the signal from an analog sensor like the humidity sensor or temperature sensor and convert it
into a digital value that can be read by the microprocessor
4.3 Servo:

Servo motors are DC motors that allows for precise control of angular position. They are
actually DC motors whose speed is slowly lowered by the gears. The servo motors usually have

27
a revolution cutoff from 90° to 180°. A few servo motors also have revolution cutoff of 360° or
more. But servo motors do not rotate constantly. Their rotation is limited in between the fixed
angles. The servo motor is actually an assembly of four things: a normal DC motor, a gear
reduction unit, a position-sensing device and a control circuit. The DC motor is connected with a
gear mechanism which provides feedback to a position sensor which is mostly a potentiometer.
From the gear box, the output of the motor is delivered via servo spline to the servo arm. For
standard servo motors, the gear is normally made up of plastic whereas for high power servos,
the gear is made up of metal.

FIG:4.3 Sevo Motors

4.4 Legs:
As per the above description Hexapod is six legged robot. Each leg has three joints so
each leg has three degrees of freedom. Because of having three degrees of freedom the leg can
move anywhere in three dimension up to certain extent. Total it has six legs so by summing all
the hexapod has eighteen degrees of freedom and that’s why we can have various motions in 3D.
It can perform various very complex steps like crawling and walking by synchronizing all six
legs and eighteen joints. It is more likely a mimic of spider. A spider having six legs!!!Like a
spider in the figure we can compare the hexapod in the next figure. The mechanical body frame
and locomotion style is totally inspired from the spider.
Like spider the hexapod synchronizes the motion of all its servo motors and moves or
walk accordingly. The joints of the Hexapod are made of servo motors (servo motors can rotate
generally between 0 to 180 degrees as per the requirement with constant rate.

28
No matter how much external torque you apply up to certain limit and the limit is that of
the rating of the servo motor) and they control the phi, theta and radius of the particular leg.

Fig:4.4 Legs

4.5 Screwdriver:

A screwdriver is a tool, manual or powered, for screwing and unscrewing (inserting and
removing) screws. A typical simple screwdriver has a handle and a shaft, ending in a tip the user
puts into the screw head before turning the handle. The shaft is usually made of tough steel to
resist bending or twisting. The tip may be hardened to resist wear, treated with a dark tip coating
for improved visual contrast between tip and screw or ridged or treated for additional 'grip'.
Handles are typically wood, metal, or plastic and usually hexagonal, square, or oval in cross-
section to improve grip and prevent the tool from rolling when set down. Some manual
screwdrivers have interchangeable tips that fit into a socket on the end of the shaft and are held
in mechanically or magnetically. These often have a hollow handle that contains various types
and sizes of tips, and a reversible ratchet action that allows multiple full turns without
repositioning the tip or the user's hand.

29
Fig:4.5 Screwdriver

4.6 Nut and bolts:

A nut is a type of fastener with a threaded hole. Nuts are almost always used in


conjunction with a mating bolt to fasten multiple parts together. The two partners are kept
together by a combination of their threads' friction (with slight elastic deformation), a
slight stretching of the bolt, and compression of the parts to be held together.

In applications where vibration or rotation may work a nut loose, various locking
mechanisms may be employed: lock washers, jam nuts, specialist adhesive thread-locking
fluid such as Loctite, safety pins (split pins) or lock wire in conjunction with castellated nuts,
nylon inserts (nylon), or slightly oval-shaped threads.

Fig:4.6 Nuts And Bolts

4.7 Double Sided Tape:

Double-sided tape is any pressure-sensitive tape that is coated with adhesive on both


sides. It is designed to stick two surfaces together, often in a way which is not visible in the end
product, due to it being in between the objects rather than overlaying them. This allows for
neater-looking projects and better craftsmanship. Double-sided tape can be either thin or
dimensional. Dimensional tape is thicker, and is of particular use to retail and signage uses where
it can be used to allow signs or displays to stand out with a 3-D effect.

Double-sided tape is created by applying a thin adhesive layer to each side of a carrier
material. For example, double-sided tissue tape, an easy-to-rip double-sided tape, is created by
applying adhesive to two sides of tissue paper, which is then wound with a siliconed paper to
avoid it sticking to itself. Most adhesive tapes are manufactured in log form, such as a large 1 to

30
3 meter wide roll, and then an adhesive tape converter is used to slit the rolls into the required
widths.

One type of double-sided tape, known as lingerie tape, secures clothing to skin, and is
used with strapless dresses or loose skirts, and as a temporary fix for fallen hems and other
clothing imperfections.

Fig:4.7 Double Sided Tape

4.8 Wooden Chassis (With Out Holes):

Over recent years we have been monitoring the condition of all the wooden chassis cars
that have been through our workshops. The reason for this is to be able to advise owners of these
early cars what to watch for as far as the woodwork is concerned. We have all heard the
“woodworm and dry rot” jokes and I am for ever being asked about the longevity and problems
experienced with a wooden chassis, so here is a qualified report on what I have discovered with
cars up to 36 years old .The main problem is the “cowboy repair” and I quote one owner I
confronted (who must remain anonymous). “I thought it would be stronger with steel plates
either side of the wood ".Do not try to improve the wooden chassis, it is a masterpiece, it works
extremely well as it is (you wouldn’t flare the wheel arches on a Ferrari 275 GTB4!). So the
moral here is if you have Damage to the chassis,- repair as per original. The most common
reason for damage to the chassis is the fitting of oversize wheels and tyres, and too much power.
The chassis was designed to cope with up to aprox 125 bhp delivered through 175x13 tyres,
which limits the torque reaction set up in the chassis to the adhesion of the tyre in contact with
the road surface. If this ratio is altered then problems will occur. Increase the power output by all
means but limit the forces transmitted through the chassis by keeping the tyre size to a minimum.
The wooden chassis Marcos is a finely balanced instrument and will not adapt kindly to “gross
appendages” (wheels).
31
Fig:4.8 Wooden Chasis

4.9 Dc Power Jack:


There are two ways to power your Arduino: you can use the USB connector to
connect to a computer or portable power pack or you can plug into a wall adapter. USB can
be used to power and program. DC can only be used for power - but it's great for when you
want to connect your Arduino and leave it plugged in for a long term project.
The technical specification for the jack is 2.1mm inner diameter, 5.5mm outer
diameter with Positive Tip. That's just the mechanical size of the plug in case you're
looking to match it up. It's an extremely common power plug size, so it isn't too hard to
find a matching power plug. Sometimes they're just referred to as "2.1mm DC Plug"
You can use a wall adapter like this:

Fig:4.9 Dc Power jack

32
You can use any adapter that is Center Positive and 7 to 12VDC output - we
recommend 9V DC if possible. Check the following photo for the symbol that indicates
Center Positive and for the 9V output text. The Arduino is fairly rugged and can survive
plugging in the wrong adapter as long as the voltage isn't higher than 20V but it's 'stressful'
to the 'Aurdino and you should aim for 9V!
4.10 9V Battery Connectors:

The battery has both terminals in a snap connector on one end. The smaller circular
(male) terminal is positive, and the larger hexagonal or octagonal (female) terminal is the
negative contact. The connectors on the battery are the same as on the connector itself; the
smaller one connects to the larger one and vice versa. The same snap-style connector is used on
other battery types in the Power Pack (PP) series. Battery polarization is normally obvious since
mechanical connection is usually only possible in one configuration.

Fig:4.10 Battery Connectors

A problem with this style of connector is that it is very easy to connect two batteries
together in a short circuit, which quickly discharges both batteries, generating heat and possibly
a fire. Because of this hazard, 9-volt batteries should be kept in the original packaging until they
are going to be used. An advantage is that several nine-volt batteries can be connected to each
other in series to provide higher voltages.

4.11 Bread board:

33
Fig:4.11 Bread Board
A breadboard is a construction base for prototyping of electronics. Originally it was literally a
bread board, a polished piece of wood used for slicing bread. In the 1970s the solder less
breadboard became available and nowadays the term "breadboard" is commonly used to refer to
these. Because the solder less breadboard does not require soldering, it is reusable. This makes it
easy to use for creating temporary prototypes and experimenting with circuit design. For this
reason, solder less breadboards are also extremely popular with students and in technological
education. Older breadboard types did not have this property.

A strip board and similar prototyping printed circuit boards, which are used to build
semi-permanent soldered prototypes or one-offs, cannot easily be reused. A variety of electronic
systems may be prototyped by using breadboards, from small analog and digital circuits to
complete central processing units (CPUs).

4.12 Wire Stripper:


A wire stripper is a small, hand-held device used to strip the electrical insulation from
electric wires.

Fig:4.12 Wire Stripper

4.13 Arduino Uno USB Cable:


It is used to connect Arduino Uno, Arduino Mega 2560, Arduino 101 or any
board with the USB female a port of your computer.  Cable length is
approximately178cm. Cable color and shape may vary.

34
This is a standard issue USB 2.0 cable. This is the most common A to B Male/Male type
peripheral cable, the kind that’s usually used for printers. Compatible with most SFE designed
USB boards as well as USB Arduino boards like the Uno.
It is also called as USB 2.0 A-B cable. The cable is as shown below.

Fig:4.13 Arduino Uno Cable

4.14 Pin Connectors:

Fig:4.14 (a) Female To Female Connectors


A female connector is a connector attached to a wire, cable, or piece of hardware, having
one or more recessed holes with electrical terminals inside, and constructed in such a way that a
plug with exposed conductors (male connector) can be inserted snugly into it to ensure a reliable
physical and electrical connection . A female connector is also known as a jack, outlet, or
receptacle. This type of connector can be recognized by the fact that, when it is disconnected or
removed, the electrical conductors are not directly exposed, and therefore are not likely to make
accidental contact with external objects or conductors.
The most common female connector is a two- or three-prong electrical outlet, also known
as a wall outlet. Other often-encountered examples include telephone jacks , the jacks for
headsets, the chassis connectors for coaxial cable, and some D-shell connectors for

35
computer serial and parallel ports. A gender changer is a type of hardware device that converts a
female connector to male.

Fig:4.14 (b) Male To Male Connectors

A male connector is a connector attached to a wire, cable, or piece of hardware, having


one or more exposed, unshielded electrical terminal s, and constructed in such a way that it can
be inserted snugly into a receptacle ( female connector ) to ensure a reliable physical and
electrical connection . This type of connector is also known as a plug. A male connector can be
recognized by the fact that, when it is disconnected or removed, the unshielded electrical prongs
are plainly visible.
The most common male connector is a two- or three-prong plug attached to the end of the cord
for an electrical appliance. Other common examples include the plugs for headsets, most
connectors on the ends of lengths of coaxial cable , and the edge connectors on some printed
circuit cards. D-shell connectors for computer serial and parallel ports can also be male.
A gender changer is a hardware device used to convert a male connector to a female connector,
or vice versa

4.15 9V Battery:

Fig:4.15 9v Battery

36
9-volt battery is a common size of battery that was introduced for the early transistor
radios. It has a rectangular prism shape with rounded edges and a polarized snap connector at the
top. This type is commonly used in walkie-talkies, clocks and smoke detectors.

The nine-volt battery format is commonly available in primary carbon-zinc and alkaline
chemistry, in primary lithium iron disulfide, and in rechargeable form in nickel-cadmium, nickel-
metal hydride and lithium-ion. Mercury-oxide batteries of this format, once common, have not
been manufactured in many years due to their mercury content. Designations for this format
include NEDA 1604 and IEC 6F22 (for zinc-carbon) or MN1604 6LR61 (for alkaline). The size,
regardless of chemistry, is commonly designated PP3 - a designation originally reserved solely
for carbon-zinc - or in some countries, E or E-block.

Most nine-volt alkaline batteries are constructed of six individual 1.5V LR61 cells
enclosed in a wrapper. These cells are slightly smaller than LR8D425 AAAA cells and can be
used in their place for some devices, even though they are 3.5 mm shorter.

Carbon-zinc types are made with six flat cells in a stack, enclosed in a moisture-resistant
wrapper to prevent drying. Primary lithium types are made with three cells in series.

In 2007, 9-volt batteries accounted for 4% of alkaline primary battery sales in the US. In
Switzerland in 2008, 9-volt batteries totally 2% of primary battery sales and 2% of secondary
battery sales. Early transistorized radios and other equipment needed a suitable voltage miniature
battery. Early transistor radios required a 22 1⁄2 volt battery. Although the transistors would
theoretically operate from lower voltages, in 1954, the point contact transistors had to be
operated very close to their VCB0 limit in order to get the required frequency response.

4.16 Insulation Tape:


Electrical tape (or insulating tape) is a type of pressure-sensitive tape used to insulate
electrical wires and other materials that conduct electricity. It can be made of many plastics, but
vinyl is most popular, as it stretches well and gives an effective and long lasting insulation.
Electrical tape for class H insulation is made of fiberglass cloth.
According to a Popular Mechanics article in 1973, "Plastic tape is also known as
electrical tape."[1] A wide variety of electrical tapes is available; some for highly specialized
purposes. "The primary tapes used in electrical applications are vinyl, rubber, mastic, and
varnished cambric."[2] Electricians generally use only black tape for insulation purposes.

37
The other colours are used to indicate the voltage level and phase of the wire. (In fact, the
coloured tape is referred to as "phasing tape".) This is done on large wire which is available only
in black insulation. When wires are phased, a ring of tape is placed on each end near the
termination so that the purpose of the wire is obvious.

Fig.4.16 Insulation Tape

4.17 HC-05 Bluetooth Module:


This is a class-2 Bluetooth module with Serial Port Profile, which can configure as either
Master or Slave. We can use it simply for a serial port replacement to establish a connection
between MCU, PC to your embedded project and etc.
An Android smart phone, a Bluetooth transceiver, and an Arduino. HC 05/06 works on
serial communication. The Android app is designed to send serial data to the Arduino Bluetooth
module when a button is pressed on the app ... You can open the serial monitor and watch the
received data while connecting.

Fig:4.17 Hc05 Bluetooth


Android studio isn't really required here, since I will provide you with the Android
application that I made. You can install the given .apk file to use the application. There are three
main parts to this project. An Android smart phone, a Bluetooth transceiver, and an Arduino

38
Software Features

 Slave default Baud rate: 9600, Data bits: 8, Stop bit: 1, Parity: No parity.
 Auto‐connect to the last device on power as default.
 Permit pairing device to connect as default
 Auto‐pairing PINCODE:”1234” as default

Pin description:

The HC-05 Bluetooth Module has 6pins. They are as follows:

Enable:
When enable is pulled LOW, the module is disabled which means the module will not
turn on and it fails to communicate. When enable is left open or connected to 3.3V, the module is
enabled i.e. the module remains on and communication also takes place.
VCC:
Supply Voltage 3.3V to 5V
GND:
Ground pin
TXD & RXD:
These two pins acts as an UART interface for communication
STATE:
It acts as a status indicator. When the module is not connected to / paired with any other
blue tooth device, signal goes Low. At this low state, the led flashes continuously which denotes
that the module is not paired with other device. When this module is connected to/paired with
any other Bluetooth device, the signal goes high. At this high state, the led blinks with a constant
delay say for example 2s delay which indicates that the module is paired.
BUTTON SWITCH:
This is used to switch the module into AT command mode. To enable AT command
mode, press the button switch for a second. With the help of AT commands, the user can change
the parameters of this module but only when the module is not paired with any other BT device.

39
If the module is connected to any other blue tooth device, it starts to communicate with that
device and fails to work in AT command mode.

Fig:4.17(a) Connecting Of Bluetooth Module To Arduino

HC 05/06 works on serial communication. The Android app is designed to send serial
data to the Arduino Bluetooth module when a button is pressed on the app. The Arduino
Bluetooth module at the other end receives the data and sends it to the Arduino through the TX
pin of the Bluetooth module (connected to RX pin of Arduino). The code uploaded to the
Arduino checks the received data and compares it. If the received data is 1, the LED turns ON.
The LED turns OFF when the received data is 0. You can open the serial monitor and watch the
received data while connecting. This circuit is simple and small. There are only four connections
to be made between the Arduino and Bluetooth module!
Arduino Pins                Bluetooth Pins

RX (Pin 0)     ———>      TX


TX (Pin 1)      ———>      RX
5V                  ———>       VCC
GND              ———>       GND
Connect an LED positive to pin 13 of the Arduino through a resistance (valued between
220Ω–1KΩ). Connect its negative to GND, and you're done with the circuit!

40
Fig:4.17 (b) Connecting A Bluetooth Module To Arduino Using A Set Of Jumper Wires And
Connector

HC-05 Specification:
 Bluetooth protocol Bluetooth Specification v2.0 EDR
 Frequency: 2.4GHz ISM band
 Modulation: GFSK(Gaussian Frequency Shift Keying)
 Emission power: ≤4dBm, Class 2
 Sensitivity: ≤-84dBm at 0.1% BER
 Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
 Security: Authentication and encryption
 Profiles: Bluetooth serial port
 Power supply: 3.3VDC 50mA
 Working temperature: -20 ~ 75Centigrade
 Dimension: 26.9mm x 13mm x 2.2 mm

Hardware features

 Typical - 80dBm sensitivity


 Up to +4dBm RF transmit power
 Low Power 1.8V Operation ,1.8 to 3.6V I/O
 PIO control

41
 UART interface with programmable baud rate
 With integrated antenna
 With edge connector

Software features
 Default Baud rate:38400, Data bits: 8, Stop bit: 1, Parity: No parity, Data control: has
Supported baud rate: 9600,19200,38400,57600,115200,230400,460800.
 Given a rising pulse in PIO0, device will be disconnected.
 Status instruction port PIO1: low-disconnected, high- connected
 PIO10 and PIO11 can be connected to red and blue led separately. When master and
slave are paired, red and blue led blinks 1time/2s in interval, while disconnected only
blue led blinks 2times/s.
 Auto-connect to the last device on power as default.
 Permit pairing device to connect as default.
 Auto-pairing PINCODE:”0000” as default Auto-reconnect in 30 min when disconnected
as a result of beyond the range of connection.

CHAPTER – 5
FABRICATION OF HEXAPOD
5.1 Hexapod - Servo Mounting:
Each limb of the robot has three servo motors each for providing specific degree of
freedom. A servo motor has the special characteristic that it can be moved to a specific angle as
per defined by the microcontroller. In this way by setting each servo at a specific configuration
we can define a particular orientation for the limb. Limb basically consists of 2 U-shaped
brackets, 3 servo mounting brackets and 2 leg pieces.

42
Fig.5.1 Sevo Mounting

These U shaped brackets are connected to the


servo mounting bracket with the help of bolt fitted
with bearing on one side and servo head on
another so as to provide the limb joint a friction
free motion. Limb has 3 high torque metal geared
servos each having torque specific to task. Two
servos at the two ends have a torque of 14.9 kg-cm
and central servo has a torque of 19.6 kg-cm. This
combination of servos provides it a smooth
locomotion. The brown colored bracket houses the Fig.5.1(a) U-Clamps
servo. It is made of acrylic sheet 3.5mm thick. The bracket is be constructed by first creating 2D
objects using the laser cutter at the 4i- lab and then joining them using chloroform. Chloroform
acts as a solvent for the acrylate and if it is applied to two surfaces of acrylic they fuse to form
one whole surface.

Fig.5.1(b) Multiple Servos

The gear of the servo will be joint with the servo head that comes with the servo. The
head will be in turn joined to the bracket 2 with screws. We will also attach a ball bearing joint
between the 2 brackets directly opposite the servo shaft so that the servo moves freely.
5.2 Hexapod - Fixing Servos to Legs:

43
Fig.5.2 Fixing Sevos To Legs

As per the above description Hexapod is six legged robot. Each leg has three joints so
each leg has three degrees of freedom. Because of having three degrees of freedom the leg can
move anywhere in three dimension up to certain extent. Total it has six legs so by summing all
the hexapod has eighteen degrees of freedom and that’s why we can have various motions in 3D.
It can perform various very complex steps like crawling and walking by synchronizing all six
legs and eighteen joints. It is more likely a mimic of spider. A spider having six legs!!!Like a
spider in the figure we can compare the hexapod in the next figure. The mechanical body frame
and locomotion style is totally inspired from the spider. Like spider the hexapod synchronizes
the motion of all its servo motors and moves or walk accordingly. The joints of the Hexapod are
made of servo motors (servo motors can rotate generally between 0 to 180 degrees as per the
requirement with constant rate. No matter how much external torque you apply up to certain
limit and the limit is that of the rating of the servo motor) and they control the phi, theta and
radius of the particular leg.

5.3 Assembly of Hexapod:

Fig.5.3 Assembly Of Hexapod

5.3.1 CHASSIS:
The chassis is the circular part which has 6 protruding parts through which has all the
limbs are attached. The lid houses the electronic components and batteries. The material used is
acrylic because of its light weight and strength. We first created a shape of the chassis on
44
Autodesk inventor. Then the CAD file was fed into the Laser Cutter machine and we will get the
required structure on an acrylic sheet. The upper and lower parts of the chassis were spaced by
12 beams of equal size placed perpendicular to each other. This gave the body strength for all
motions. The battery and switches were to be placed on a lid present at the top.
5.3.2 Limbs:
Each limb of the robot has three servo motors each for providing specific degree of
freedom. A servo motor has the special characteristic that it can be moved to a specific angle as
per defined by the microcontroller. In this way by setting each servo at a specific configuration
we can define a particular orientation for the limb. Limb basically consists of 2 U-shaped
brackets, 3 servo mounting brackets and 2 leg pieces.

5.3.3 Mounting of Arduino & Power Circuit:

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54
digital input/output, 16 analog inputs, 4 UARTs, a 16 MHz crystal oscillator, a USB connection,
a power jack and a reset button.
While designing a circuit, our main purpose was to control 6 different legs synchronously
through it. In order to achieve so, we used Serial Peripheral Interface (SPI) mode of
communication. In this mode we have a master controller which communicates with its slaves.
Data is been sent by the master to the slave and slave reflects back a response to the master.

Fig.5.3(a) Mounting Arduino And Power Circuit

45
After we switched to the Arduino platform, we decided to make modules to control the
legs. The Arduino board helped us in generating 18 different PWM signals. The modules are
basically meant for distribution of power and PWM signals. Three PWM signal connections
were drawn from the Arduino board for each of the six modules. These 3 signals were divided
and given to three connectors along with VCC and GND pins. The module has four IC 7806 for
power and has a switch to turn a leg ON or OFF. Three servo motors are attached to one module.
5.3.4 Power Supply:

One of the most important aspects of running any circuit is power. Required voltage and
current to the components should be provided so that proper functioning of them could be
achieved. For running 18 servo motors we needed a lot of current. Also, the voltage rating of the
supply should also meet the voltage ratings of different components on the circuit. We used
SMPS supply for running the electronics. A switched-mode power supply (SMPS) is an
electronic power supply that incorporates a switching regulator in order to be highly efficient

in the conversion of electrical power. Like other types of power supplies, an SMPS transfer’s
power from a source like the electrical power grid to a load while converting voltage and current
characteristics.
This unit was supplied 220V AC power supply normally present in our distribution
supply. The output was a DC voltage supply of 12 V which was connected to the power modules
of the limbs and the arduino motherboard.
Block diagram:

ANDRIOD
FRONT, REAR,
LEFT,
SIGNALS
MOBILE APP RIGHT

BLUETOOTH SERVO FRONT


HC-05
AURDINO
BOARD SERVO LIFT

46
SERVO REAR
POWER SUPPLY

(BATTERY, LAPTOP OR POWER BANK)

Fig.5.3(b) Block Diagram Of Power Supply

CHAPTER - 6
ARDIUNO SOFTWARE INSTALLATION

In thise we will get know of the process of installation of Arduino IDE and connecting
Arduino uno to Arduino IDE.
Step 1
First we must have our Arduino board (we can choose our favorite board) and a USB
cable. In case we use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560, or
Diecimila, we will need a standard USB cable (A plug to B plug), In case we use Arduino Nano,
we will need an A to Mini-B cable..
Step 2
Download Arduino IDE Software. We can get different versions of Arduino IDE from
the Download page on the Arduino Official website. We must select wer software, which is
compatible with wer operating system (Windows, IOS, or Linux).
After wer file download is complete, unzip the file.

47
Fig.6.1 Unzip The File
Step 3 − Power up our board.
The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power
from either, the USB connection to the computer or an external power supply. If we are using an
Arduino Diecimila, we have to make sure that the board is configured to draw power from the
USB connection. The power source is selected with a jumper, a small piece of plastic that fits
onto two of the three pins between the USB and power jacks. Check that it is on the two pins
closest to the USB port.

Connect the Arduino board to wer computer using the USB cable. The green power LED
(labeled PWR) should glow.

48
Fig.6.2 Installing Of Arduino Application

After our Arduino IDE software is downloaded, we need to unzip the folder. Inside the
folder, we can find the application icon with an infinity label (application.exe). Doubleclick the
icon to start the IDE.
Step 4 − Open our first project.

Once the software starts, we have two options:

* Create a new project:-

Fig.6.3 Creating Of New Project

* Open an existing project example.


To create a new project, select File → New.
To open an existing project example, select File → Example → Basics → Blink.
Here, we are selecting just one of the examples with the name Blink. It turns the LED on
and off with some time delay. We can select any other example from the list.
Step 5 − Select our Arduino board.

49
Fig.6.4 Selecting The Arduino
To avoid any error while uploading wer program to the board, we must select the correct
Arduino board name, which matches with the board connected to wer computer.
Go to Tools → Board and select wer board.
Here, we have selected Arduino Uno board according to our tutorial, but we must select
the name matching the board that we are using.

Step 6 − Select serial port.

50
Fig.6.5 Selecting Serial Port

Select the serial device of the Arduino board. Go to Tools → Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports).
To find out, we can disconnect wer Arduino board and re-open the menu, the entry that
disappears should be of the Arduino board. Reconnect the board and select that serial port.

Step 7 − Upload the program to Arduinoboard.

Before explaining how we can upload our program to the board, we must demonstrate the
function of each symbol appearing in the Arduino IDE toolbar.

51
Fig.6.6 Uploading The Program To Arduino

A − Used to check if there is any compilation error.


B − Used to upload a program to the Arduino board.
C − Shortcut used to create a new sketch.
D − Used to directly open one of the example sketch.
E − Used to save wer sketch.
F − Serial monitor used to receive serial data from the board and send the serial data to the
board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; we will
see the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.
Note − If we have an Arduino Mini, NG, or other board, we need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino Software.

Fig.6.7 (Refer Fig No:6.5)

CHAPTER – 7

52
ARDUINO PROGRAMMING

7.1 Graphical Programming For Beginners:-

readMovement()
If move == forward,
moveForward();
Else If move == backward,
moveBackward();
Else If move == left,
moveLeft();
Else If move == right,
moveRight();
end
For moveForward()
Move three alternate legs 30 degree clockwise
Move other three alternate legs 30 degree anti-clockwise
For moveBackward()
Move three alternate legs 30 degree clockwise
Move other three alternate legs 30 degree anti-clockwise
For moveLeft()
Move all legs 30 degree anti-clockwise
For moveRight()
Move all legs 30 degree clockwise
End

7.2 Basic Program:-

53
#include<Servo.h>
#include<SoftwareSerial.h>
SoftwareSerial BT (12, 13); //TX, RX respectively
Servo lift;
Servo front;
Servo rear;
String response;
int state;
Void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
BT.begin (9600);

lift.attach(10);
rear.Attach(11);
front.attach(9);

lift.write(90);
rear.write(90);
front.write(90);
delay(2000);
}

Void loop()
{

54
// put your main code here, to run repeatedly:
serialRead();
switch(state)
{ // Determine which mode we are currently in
case 1:
forward(); // Call the function to walk forward
break;
case 2:
backward(); // Call the function to walk backward
break;
case 3:
left(); // Call the function to turn left
break;
case 4:
right(); // Call the function to turn right
break;
case 5:
Stop();
break;
}

}
void serialRead()
{
while (BT.available())
{

char c = BT.read();
response += c;
if(response.length()>0)

55
{
Serial.println(response);
if(response == "w")
{
state = 1;
}
else if( response == "b")
{
state = 2;
}
else if(response == "l")
{
state = 3;
}
else if(response == "r")
{
state = 4;
}

else if(response == "s")


{
state = 5;
}
}
response ="";
}
}

void forward()
{

56
lift.write(120);
delay(100);
front.write(60);
rear.write(60);
delay(100);
lift.write(90);
delay(100);

lift.write(60);
delay(100);
front.write(90);
rear.write(90);
delay(100);
lift.write(90);
delay(100);
}

void backward()
{
lift.write(120);
delay(100);
front.write(120);
rear.write(120);
delay(100);
lift.write(90);
delay(100);

lift.write(60);

57
delay(100);
front.write(90);
rear.write(90);
delay(100);
lift.write(90);
delay(100);
}

Void left()
{
lift.write(120);
delay(100);
front.write(120);
rear.write(60);
delay(100);
lift.write(90);
delay(100);

lift.write(60);
delay(100);
front.write(90);
rear.write(90);
delay(100);
lift.write(90);
delay(100);
}

void right()
{

58
lift.write(120);
delay(100);
front.write(50);
rear.write(130);
delay(100);
lift.write(90);
delay(100);

lift.write(60);
delay(100);
front.write(90);
rear.write(90);
delay(100);
lift.write(90);
delay(100);
}
void Stop()
{
lift.write(90);
delay(100);
front.write(90);
delay(100);
rear.write(90);
delay(100);

7.3 Arduino Code & Syntax Overview:

59
As you learned in Module 01, IDE stands for Integrated Development Environment.
Pretty fancy sounding, and should make you feel smart any time you use it. The IDE is a text
editor-like program that allows you to write Arduino code.

When you open the Arduino program, you are opening the IDE. It is intentionally
streamlined to keep things as simple and straightforward as possible. When you save a file in
Arduino, the file is called a sketch – a sketch is where you save the computer code you have
written.

The coding language that Arduino uses is very much like C++ (“see plus plus”), which is
a common language in the world of computing. The code you learn to write for Arduino will be
very similar to the code you write in any other computer language – all the basic concepts remain
the same – it is just a matter of learning a new dialect should you pursue other programming
languages.

Loops:

void loop()
{   //this curly brace opens
//way cool program here
}    //this curly brace closes

8. TROUBLESHOOTING AND FUTURE SCOPE

60
TROUBLE SHOOTING:

After the completion of our prototype hexapod, while we tried to run the robot we faced
power failure as we did not powered up the servo motors properly. Moreover, the robot was
carrying a lot of weights. As a result, it was not able to stand in its feet. Besides, the ration of
each part of legs was not balanced, so the leg movements were not smooth. All these drawbacks
led us to develop the second version of the hexapod. In this updated version, we made all the
parts smaller. We also used a servo controller to make sure the power issue has been taken care
of. Moreover, we replaced the power bank with cell phone batteries to reduce the overall weight
of the robot.
After these modifications, the robot is currently able to stand in its feet and move
forward, Backward, left and right. We have tested this movement both in plain surface and
irregular Surface. The robot performs a perfect movement in the plain surface. However, it faces
some Challenges moving in any surface with a slope. We increased the grip of each leg and it
shows slightly better performance. We tried to move the robot in stairs but it is still not capable
of doing so.

Future Scope:
A lot of things can be improved upon the hexapod and the controller implemented. This
section will cover some of the ideas that were never carried out due to lack of time.
 With more time the controller would be developed further with more functionality.
Implementation of balancing would be further developed to combine walking and balancing
simultaneously. By changing the floor’s current angle this could probably be achieved.
Implementing a function that could identify if a leg is placed on ground or not would help
developing terrain handling. By utilizing either the servo feedback or the IMU data,
identification of ground contact would allow for the swing phase to end when the swung leg
gets in contact with the terrain. In that manner walking would not have to be done on a flat
surface.
 The current walking contains a lot of errors. By creating a more advanced algorithm that
incorporates the effects of leg constraints, balance, power consumption and visual aspect the
resulting locomotion would be more reliable. An option could be a weighting function

61
that takes into account the cost in power and balance when deciding to lift a leg into swing
phase.

 The option to use a camera for navigation was fully dismissed in this work due to the lack of
time and our limited knowledge of image analysis. Though the Beagle Bone Black supports
the usage of a camera and Simulink already contain support for incorporating a camera feed
into the controller without having to create additional block-sets.

 The current state of the hexapod looks a bit like a temporary solution for wiring on the upper
deck. Wires could be drawn in a more organised manner and the creation of a body shell
would improve a lot upon the visual aspect of the hexapod. This would also protect the open
electronics from being damaged.

 An easy solution to the identification of ground contact for the legs could be to exchange the
rubber feet to rubber buttons.

62
CHAPTER - 9
CONCLUSION:
This work presented hybrid control architecture for the Weaver hexapod, combining
reactive and proactive control paradigms to enhance the performance in rough terrain in terms of
reduced COT and increased body stability. Weaver’s controller adapts the locomotion
parameters using stereo-vision based perception of the terrain. In addition, this work extends the
control architecture with a navigation system that uses a high-level abstraction of the robot’s
path. There active controller complemented with the adaptive controller handles the low-level
autonomy on rough terrain. This avoids the use of complex planning algorithms based on
detailed maps of the environment. The experimental results illustrate that Weaver is capable of
autonomously man euvering onun even terrain in an effective manner. Moreover, Weaver’s
current configuration is self-contained in terms of processing and energy (i.e. tether free) making
it suitable for fully autonomous operation. This lends itself to applications such as short distance
exploration tasks in remote and challenging environments, extending the scope and utility of
legged robots. However, stereo vision may lead to wrong estimations from conditions such as
walking in high grass, bad illuming-nation, motion blur, or dynamic scenes. The authors aim to
address this by adding proprioceptive sensing in future work.

63
CHAPTER - 10
REFERENCE:

[1]. Filipp Seljanko (2013), “Fault Detection Algorithm for Legged Walking Robot”
IEEE International conference on Mechatronics and automation, pp 1211-1216.

[2]. "Rise robot". Carnegie Mellon University.

[3]. "ATHLETE". JPL.

[4]. E. Burkus and P. Odry, “Autonomous Hexapod Walker Robot”, Polytechnical


Engineering College, (2008), pp. 69-85.

[5]. D. Belter and P. Skrzypczynski, “A Biologically Inspired Approach To Feasible Gait


Learning For A Hexapod Robot”, Pozna’n University of Technology, Poland,
(2009), pp. 1-16.

[6]. Polulu Corporation, “Sample project: Simple Hexapod Project”, Pololu


Corporation, (2010), pp. 1-21.

[7]. E. Z. Moore, “Leg Design and Stair Climbing Control for the RHex Robotic
Hexapod”, McGill University of Canada, (2002), pp. 1-91.

[8]. X. Duan, W. Chen, S. Yu and J. Liu, “Tripod Gaits Planning and Kinematics
Analysis of a Hexapod Robot”, IEEE International Conference, (2009), pp. 1850-1855.

[9]. M. M. Billah, M. Ahmed and S. Farhana, “Walking Hexapod Robot in Disaster


Recovery: Developing Algorithm for Terrain Negotiation and Navigation”, World
Academy of Science, Engineering and Technology, (2008), pp. 1-6.

[10]. P. Birkmeyer, K. Peterson and R. S. Fearing, “DASH: A Dynamic 16g Hexapedal


Robot”, University of California, Berkeley, (2009), pp. 1-7.

64
[11]. William A.Lewinger, H.MartinReekie (2011)”A hexapod robot modeled on the
stick insect, carausiusmorosus”, in the 15th international conference on advanced
robotics, Tallinn, 2011.

[12]. G.M.Nelson, R.D.Quinn (1997)”Design & simulation of a cockroach like-Hexapod


robot” in proceedings of the IEEE international conference on Robotics & automation,
New Mexico (1997)

Group Photo:-

Fig. Group Photo

65
66
67

Das könnte Ihnen auch gefallen