0% found this document useful (0 votes)
10 views

Project Document

smartphone controlled toy car using arduino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Project Document

smartphone controlled toy car using arduino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Project Abstract

on
Smartphone Controlled Car Using Arduino and Bluetooth
Submitted to

State Board Of Technical Education And Training Vijayawada, A.P.


in partial fulfillment of requirements for the award of the degree of

DIPLOMA IN ELECTRONICS AND COMMUNICATION


ENGINEERING
by
M. Sujitha 20291EC033
C. Sruthi 20291EC008
M.Hemasai 20291EC037
N.Jaswanth 20291EC040
A. Pavani 20291EC001
G.Pavan Kalyan 20291EC020

under the esteemed guidance of

Ms. CH RAJESWARI,M.Tech
Assistant Professor

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


SREE VIDYANIKETHAN ENGINEERING COLLEGE
(2ND SHIFT POLYTECHNIC)
(Affiliated to SBTET-AP, VIJAYAWADA)
A.RANGAMPET,TIRUPATI – 517 102
INDIA
2022-2023
Tentative Plan for Project Work
Batch-1 Year:(2022-2023)

Plan of Action Dates Remarks


Commencement of project
work
Collection of literature

Submission of project work


Abstract
Project work review-I

Project work review-II

Submission of project work


Thesis
Project work viva-voce
examination
LIST OF CONTENT
CHAPTER NO NAME OF THE TOPIC PAGE NO
CHAPTER-1 INTRODUCTION 5
1.1 Introduction 5

CHAPTER-2 INTRODUCTION TO BLOCK 6-23


DIAGRAM
2.1 Block diagram 6
2.2 Components description 7-23
2.2.0 Components required 7
2.2.1 Arduino Uno 8-12
2.2.2 Bluetooth Module 12-15
2.2.3 300RPM motors 15-16
2.2.4 Motor Driver 16-18
2.2.5 18650 Lithium Batteries 18-20
2.2.6 Switch 20-21
2.2.7 Jumper Wires 21-23

CHAPTER-3 WORKING OF SMARTPHONE 24-27


CONTROLLED CAR
CHAPTER-4 ADVANTAGES OF SMARTPHONE 29
CONTROLLED CAR

CHAPTER-5 CONCLUSION 30

CHAPTER-6 REFERENCES 31
LIST OF FIGURES

FIGURE NO NAME OF THE FIGURE


Block diagram of smartphone-controlled car

Arduino UNO

Early production board

Communication of Arduino UNO with computer

Arduino UNO Reset

Bluetooth module

Pins of Bluetooth module

Bluetooth communication between devices

300RPM motors

Dimentions of RPM motors,inner mechanism of 300RPM


motors
Block diagram of L293D motor drive

L293 motor drive

Lithium batteries

Switch

Jumper wires

Jumper wire connections

Male-Male jumper wires

Female-Female jumper wires

Male-Female jumper wires

Circuit diagram of smartphone-controlled car

Circuit diagram
ABSTRACT
In this modern world, the smart phone is becoming a mean to control most of our day-to-day
activities, either directly or indirectly. We’re becoming more and more dependent on smart
phone for controlling various day to day objects near and around us, some of which include
lights, televisions, sound systems, air conditioners etc. So in such a time where people are
migrating to a smart phone based life, exercising control over things near and around them ,our
project is aimed at developing a smartphone controlled car to which can be controlled through a
smart phone app. Making best use of the high end byte crushing processors in their hands, the
app facilitates the user can control the car by connecting Bluetooth to our smartphone which
attracts the child, plays with the child and also packs some additional features for entertainment
of the user. We’re using Arduino Uno, motor driver and a mobile application to get the things
done in our project.
Keywords: Arduino Uno, motor driver, Bluetooth, mobile applications.
CHAPTER-1
INTRODUCTION

Nowadays smart phones are becoming more powerful with reinforced processors, larger
storage capacities, richer entertainment function and more communication methods. Bluetooth
is mainly used for data exchange; add new features to smart phones. Bluetooth
technology, created by telecom vendor Ericsson in 1994, shows its advantage by integrating
with smart phones. It has changed how people use digital device at home or office, and has
transferred traditional wired digital devices into wireless devices. A host Bluetooth device is
capable of communicating with up to seven Bluetooth modules at same time through one
link. Considering its normal working area of within eight meters, it is especially useful in
home environment. Thank for Bluetooth technology and other similar techniques, with
dramatic increase in Smartphone users, smart phones have gradually turned into an all-
purpose portable device and provided people for their daily use. In recent years, an open-
source platform Android has been widely used in smart phones. Android has complete
software package consisting of an operating system, middleware layer and core applications.
Different from other existing platform like iOS (iPhone OS), it comes with software
development kit (SDK), which provides essential tools and Application. Using a Smartphone
as the “brain” of a car is already an active research field with several open opportunities
and promising possibilities. In this project we present a car controlled by mobile phone and
discuss a control systems using mobile devices.
As most of the work in this area has been done regarding the Arduino & its application, what
left out most of the time is the Android controller. In this project we are trying to exploit the
android open accessory Bundle so that we can give more realistic experience to the user, better
connectivity to the Arduino Chip.
The smartphone has an Android app through which the user can send commands directly to the
car. The car can move forward, backward, left, and right.The Arduino’s Bluetooth-controlled car
is interfaced with a Bluetooth module. We can give specific commands to the car through an
Android app installed on the phone. At the receiving side, a Bluetooth transceiver module
receives the commands and forwards them to the Arduino, and thus the robotic car is controlled.
The Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 Analog inputs, a 16 MHz quartz
crystal, a USB connection, a power jack, an ICSP header and a reset button. The L293 is an
integrated monolithic circuit in a 15- lead Multi-watt and PowerSO20 packages. It is a high
voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and
drive inductive loads such as relays, solenoids, DC and stepping motors.

CHAPTER-2
BLOCK DIAGRAM OF SMARTPHONE CONTROLLED CAR

FIG: Block diagram of smartphone-controlled car

COMPONENTS REQUIRED
S.NO APPARATUS RANGE QUANTITY

1. Arduino Uno 5V,40mA, 1


3.3DC current,50mA
2. Bluetooth module Power supply: +3.3VDC 50mA 1
Frequency: 2.4GHZ HC-05
3. 300 RPM motors Voltage:3 ~ 12 4
Current:40-180mA
no load :40-180mA.
4. Motor drive Voltage:4.5-36V 1
Current:600mA
5. 18650 Lithium batteries 3.6/3.7 volts 2
2,300 to 3,600 mwah
6. Lithium battery holder - 1

7. Wheels - 4
8. Switch - 1
9. Jumper wires - As per
requirement
10. PVC Sheets - As per
requirement
COMPONENTS DESCRIPTION
1.ARDUINO UNO:
The Arduino Uno is an open-source microcontroller board based on the Microchip
ATmega328P microcontroller and developed by Arduino.cc and initially released in 2010. The
board is equipped with sets of digital and Analog input/output (I/O) pins that may be interfaced
to various expansion boards (shields) and other circuits. The board has 14 digital I/O pins (six
capable of PWM output), 6 Analog I/O pins, and is programmable with the Arduino IDE
(Integrated Development Environment), via a type B USB cable. It can be powered by the USB
cable or by an external 9-volt battery, though it accepts voltages between 7 and 20 volts.

FIG: Arduino UNO


It is similar to the Arduino Nano and Leonardo. The hardware reference design is distributed
under a Creative Commons Attribution Share-Alike 2.5 license and is available on the Arduino
website. Layout and production files for some versions of the hardware are also available.
The word "uno" means "one" in Italian and was chosen to mark the initial release of Arduino
Software. The Uno board is the first in a series of USB-based Arduino boards; it and version 1.0
of the Arduino IDE were the reference versions of Arduino, which have now evolved to newer
releases.
The ATmega328 on the board comes pre-programmed with a bootloader that allows uploading
new code to it without the use of an external hardware programmer.
While the Uno communicates using the original STK500 protocol, it differs from all preceding
boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it uses the
Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
FIG: Early production board

Technical Specifications:
• Microcontroller: Microchip ATmega328P
• Operating Voltage: 5 Volts
• Input Voltage: 7 to 20 Volts
• Digital I/O Pins: 14
• PWM Pins: 6 (Pin # 3, 5, 6, 9, 10 and 11)
• UART: 1
• I2C: 1
• SPI: 1
• 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 bootloader
• SRAM: 2 KB
• EEPROM: 1 KB
• Clock Speed: 16 MHz
• Length: 68.6 mm
• Width: 53.4 mm
• Weight: 25 g
• ICSP Header: Yes
• Power Sources: DC Power Jack, USB Port and the VIN pin (+5 volt only)
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 is off.
• VIN: The input voltage to the Arduino/Genuino board when it is 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.
• IOREF: This pin on the Arduino/Genuino board provides the voltage reference with
which the microcontroller operates. A properly configured shield can read the IOREF pin
voltage and select the appropriate power source, or enable voltage translators on the
outputs to work with the 5V or 3.3V.
• Reset: Typically used to add a reset button to shields that 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,
under software control (using pin Mode (), Digital Write (), and Digital Read () functions). They
operate at 5 volts. Each pin can provide or receive 20 mA as the recommended operating
condition and has an internal pull-up resistor (disconnected by default) of 20-50K ohm. A
maximum of 40mA must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller. The Uno has 6 Analog inputs labelled A0 through A5; each provides 10 bits of
resolution (i.e., 1024 different values). By default, they measure from ground to 5 volts, though it
is possible to change the upper end of the range using the AREF pin and the Analog Reference ()
function.
In addition, some pins have specialized functions:
• Serial / UART: 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): pins 3, 5, 6, 9, 10, and 11. Can provide 8-bit PWM
output with the Analog Write () function.
• SPI :(Serial Peripheral Interface): pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK).
These pins support SPI communication using the SPI library.
• TWI (two-wire interface) / I²C: pin SDA (A4) and pin SCL (A5). Support TWI
communication using the Wire library.
• AREF (Analog reference): Reference voltage for the Analog inputs.
Communication:
The Arduino/Genuino Uno has a number of facilities for communicating with a computer,
another Arduino/Genuino 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 .inf file is required. 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.

FIG: Communication of Arduino UNO with computer


Automatic (software) reset:
Rather than requiring a physical press of the reset button before an upload, the Arduino/Genuino
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 100nf capacitor. When this line is asserted (taken low),
the reset line drops long enough to reset the chip.

FIG: Arduino UNO Reset


This setup has other implications. When the Uno is connected to 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 bootloader 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.
2.BLUETOOTH MODULE:
•It is used for many applications like wireless headset, game controllers, wireless mouse,
wireless keyboard and many more consumer applications.
•It has range up to <100m which depends upon transmitter and receiver, atmosphere, geographic
& urban conditions.
•It is IEEE 802.15.1 standardized protocol, through which one can build wireless Personal Area
Network (PAN). It uses frequency-hopping spread spectrum (FHSS) radio technology to send
data over air.
•It uses serial communication to communicate with devices. It communicates with
microcontroller using serial port (USART).
HC-05 Bluetooth Module:
•HC-05 is a Bluetooth module which is designed for wireless communication. This module can
be used in a master or slave configuration.

FIG: Bluetooth module

Pin Description:

FIG: Pins of Bluetooth module


Bluetooth serial modules allow all serial enabled devices to communicate with each other using
Bluetooth.
It has 6 pins,
• Key/EN: It is used to bring Bluetooth module in AT commands mode. If Key/EN pin is
set to high, then this module will work in command mode. Otherwise by default it is in
data mode. The default baud rate of HC-05 in command mode is 38400bps and 9600 in
data mode.
HC-05 module has two modes,
• Data mode: Exchange of data between devices.
• Command mode: It uses AT commands which are used to change setting of HC-05.
To send these commands to module serial (USART) port is used.
• VCC: Connect 5 V or 3.3 V to this Pin.
• GND: Ground Pin of module.
• TXD: Transmit Serial data (wirelessly received data by Bluetooth module transmitted out
serially on TXD pin)
• RXD: Receive data serially (received data will be transmitted wirelessly by Bluetooth
module).
• State: It tells whether module is connected or not.
HC-05 module Information:
• HC-05 has red LED which indicates connection status, whether the Bluetooth is
connected or not. Before connecting to HC-05 module this red LED blinks continuously
in a periodic manner. When it gets connected to any other Bluetooth device, its blinking
slows down to two seconds.
• This module works on 3.3 V. We can connect 5V supply voltage as well since the module
has on board 5 to 3.3 V regulator.

• As HC-05 Bluetooth module has 3.3 V level for RX/TX and microcontroller can detect
3.3 V level, so, no need to shift transmit level of HC-05 module. But we need to shift the
transmit voltage level from microcontroller to RX of HC-05 module.
Bluetooth communication between Devices:
E.g., Send data from Smartphone terminal to HC-05 Bluetooth module and see this data on PC
serial terminal and vice versa.
To communicate smartphone with HC-05 Bluetooth module, smartphone requires Bluetooth
terminal application for transmitting and receiving data. You can find Bluetooth terminal
applications for android and windows in respective app store.

FIG: Bluetooth communication between devices


So, when we want to communicate through smartphone with HC-05 Bluetooth module, connect
this HC-05 module to the PC via serial to USB converter.
Before establishing communication between two Bluetooth devices, 1st we need to pair HC-05
module to smartphone for communication.
Pair HC-05 and smartphone:
• Search for new Bluetooth device from your phone. You will find Bluetooth device with
“HC-05” name.
• Click on connect/pair device option; default pin for HC-05 is 1234 or 0000.
After pairing two Bluetooth devices, open terminal software (e.g., Tera term, Real term etc.) in
PC, and select the port where we have connected USB to serial module. Also select default baud
rate of 9600 bps.
In smart phone, open Bluetooth terminal application and connect to paired device HC-05.
It is simple to communicate, we just have to type in the Bluetooth terminal application of
smartphone. Characters will get sent wirelessly to Bluetooth module HC-05. HC-05 will
automatically transmit it serially to the PC, which will appear on terminal. Same way we can
send data from PC to smartphone.

Command Mode:
• When we want to change settings of HC-05 Bluetooth module like change password for
connection, baud rate, Bluetooth device’s name etc.
• To do this, HC-05 has AT commands.
• To use HC-05 Bluetooth module in AT command mode, connect “Key” pin to High
(VCC).
• Default Baud rate of HC-05 in command mode is 38400bps.
• Following are some AT command generally used to change setting of Bluetooth module.
• To send these commands, we have to connect HC-05 Bluetooth module to the PC via
serial to USB converter and transmit this command through serial terminal of PC.
3.300 RPM MOTORS:
These motors are simple DC Motors featuring gears for the shaft for obtaining the optimal
performance characteristics. They are known as Center Shaft DC Geared Motors because their
shaft extends through the center of their gearbox assembly.These standard size DC Motors are
very easy to use. Also, you don’t have to spend a lot of money to control motors with an Arduino
or compatible board. The L298N H-bridge module with an onboard voltage regulator motor
driver can be used with this motor that has a voltage of between 5 and 35V DC.

FIG: 300 RPM MOTOR


This DC Motor – 300 RPM – 12 Volts can be used in all-terrain robots and a variety of robotic
applications. These motors have a 3 mm threaded drill hole in the middle of the shaft thus
making it simple to connect it to the wheels or any other mechanical assembly.

FIG : DIMENSIONS OF RPM MOTOR


300RPM Centre Shaft Economy Series DC Motor is high quality low cost DC geared motor. It
has steel gears and pinions to ensure longer life and better wear and tear properties. The gears are
fixed on hardened steel spindles polished to a mirror finish. The output shaft rotates in a plastic
bushing. The whole assembly is covered with a plastic ring. Gearbox is sealed and lubricated
with lithium grease and require no maintenance. The motor is screwed to the gear box from
inside.
Although motor gives 300 RPM at 12V but motor runs smoothly from 4V to 12V and gives wide
range of RPM, and torque. Tables below gives fairly good idea of the motor’s performance in
terms of RPM and no load current as a function of voltage and stall torque, stall current as a
function of voltage.

FIG: Inside view of Centre Shaft Economy Series DC Motor


SPECIFICATIONS:
• DC supply: 4 to 12V
• RPM: 300 at 12V
• Total length: 46mm
• Motor diameter: 36mm
• Motor length: 25mm
• Brush type: Precious metal
• Gear head diameter: 37mm
• Gear head length: 21mm
• Output shaft: Centred
• Shaft diameter: 6mm
• Shaft length: 22mm
• Gear assembly: Spur
• Motor weight: 90gms
FEATURES:
• 300RPM 12V DC motors with Gearbox
• 3000RPM base motor
• 6mm shaft diameter with internal hole
• 125gm weight
• Same size motor available in various rpm
• 0.35kgcm torque
• No-load current = 60 mA(Max), Load current = 300 mA(Max)
• It comes with High-Quality Metal Gears.
• The metal gears have better wear and tear properties.
• The gearbox is sealed and lubricated with lithium grease and requires no maintenance.
• Although the motor gives 300 RPM at 12V, the motor runs smoothly from 4V to 12V
and gives a wide range of RPM, and torque.
• The shaft has a hole for better coupling.
4. L293D MOTOR DRIVE :
This Motor Driver Board is designed to Work with L293D IC. The L293D is a popular motor
driver IC designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5
V to 36 V. With Terminal Blocks for connecting motors & power supply and Berg Sticks for
control signals from microcontroller. This can control 2 DC Motors, their direction using control
lines and their speed using PWM.

FIG:L293D MOTOR DRIVER


L293D is basically a motor driver or controller. It has two builtin H-bridge circuits which are
able to control two DC motors simultaneously in both clockwise and counter clockwise
direction. It acts as an current high amplifier because it take low current signal at its input and
provides higher current signal at the output in order to drives different load e.g stepper motor &
DC motors. Its features include large inpu voltage supply range, large output current high noise
immunity input signals etc. Its common real life applications include stepping motor drivers,
relay drivers, DC motor drivers etc. L-293D motor driver/controller is shown in the figure given
below.

FIG:PIN DIAGRAM OF L293D


L-293D has sixteen (16) pins, having different individual functions.All of these sixteen pins
along with their serial no, are given in the table shown below.L 293D each pin has different tasks
to perform when they are in working condition.The tasks assigned to each pin are given in the
table shown below.Pinout diagram of any device presents the pins configuration through a
completely labelled diagram.

FIG:L293 PACKAGES DIMENSIONS


L-293D has two types of packages and both of them are PDIP (16).Both of these packages along
with their respective part number are given in the table shown below.L 293D each package has
he same dimensions.L-293D packages along with their typical dimensions and SI unit.A logic
diagram presents an internal logic followed by an equipment.

FIG:LOGIC DIAGRAM
Functional diagram of a device shows the steps followed by that device in order to perform some
action to give output.
FIG:FUNCTIONAL BLOCK DIAGRAM
FEATURS:
• High output current up to 1A/channel.
• Wide voltage supply range ranging from 4.5V to 36V.
• Peak output current up to 2A/channel.
• Internal Electrostatic Discharge (ESD) protection.
• A separate input supply.
• Inputs having large noise immunity.
APPLICATIONS:
• DC motor drivers.
• Relay drivers.
• Stepper motor drivers.
• Two phase motor driver, block diagram of L 293D application for two phase motor.
5.18650 LITHIUM BATTERIES:

FIG: Lithium batteries

A lithium-ion battery or Li-ion battery is a type of rechargeable battery composed of cells in


which lithium ions move from the negative electrode through an electrolyte to the positive
electrode during discharge and back when charging .Li-ion cells use an intercalated lithium
compound as the material at the positive electrode and typically graphite at the negative
electrode .Li-ion batteries have a high energy density ,no memory effect and low self –discharge
.Cells can be manufactured to prioritize either energy or power density .They can however , be a
safety hazard since they contain flammable electrolytes and , if damage or incorrectly charged ,
can lead to explosions and fires.
An 18650 battery is a lithium-ion battery. The name derives from the battery’s specific
measurements: 18mm x 65 mm. the 18650 battery has a voltage of 3.6v and has between
2600mAh and 3500mAh. 18650 batteries are considered as “High drain battery”. This means
that the battery is designed to generate high output voltage and current to meet the power
demands of the portable device in which it being used.
DIFFERENT TYPES OF LITHIUM-ION BATTERIES:
1.Lead acid replacement battery
• 12.8v lithium-ion phosphate battery
• 12.8v lithium-ion battery
• 24v lithium-ion battery

2.E-Bike Lithium Battery


• Small Silver Fish water bottle 24v lithium battery
• Rear rack 48v lithium battery
• 48v lithium battery
• Silver fish 52v lithium battery for electric bikes

3.Lights lithium battery

• 3.2V Lithium-ion battery


• 9.6v lithium-ion battery,

4.Energy storage lithium battery

DESIGN:

Generally, the negative electrode of a conventional lithium-ion cell is made from carbon The
positive electrode is typically a metal oxide. The electrolyte is a lithium salt in
an organic solvent. The electrochemical roles of the electrodes reverse between anode and
cathode, depending on the direction of current flow through the cell.
The most common commercially used anode (negative electrode) is graphite, which in its fully
litigated state of LiC6 correlates to a maximal capacity of 1339 C/g (372 mAh/g). The positive
electrode is generally one of three materials: a layered oxide (such as lithium cobalt oxide),
a polyanion (such as lithium iron phosphate) or a spinel (such as lithium manganese
oxide). More experimental materials include graphene-containing electrodes, although these
remain far from commercially viable due to their high cost.
6.SWITCH:

FIG: Switch
A switch is an electrical component that can disconnect or connect the conducting path in an
electrical circuit, interrupting the electric current or diverting it from one conductor to another.
There are many designs of switches, common type switch is toggle or tumbler, switch is widely
used in home lighting and other applications.
The oil switch has its live parts immersed in oil to reduce arcing. The aggregate of switching or
circuit breaking equipment for a power station or a transforming station, frequently located in an
outdoor yard beside the station, is usually regarded as switchgear.
A switch is used in a wired network to connect to other devices using Ethernet cables. The
switch allows each connected device to talk to the others. Wireless only networks do not use
switches because devices such as wireless routers and adapters communicate directly with the
another one.
Switches are key building blocks for any network. They connect multiple devices, such as
computers, wireless access points, printers, and servers; on the same network within a building
or campus. A switch enables connected devices to share information and talk to each other.
An Unmanaged network switch is designed so that you can simply plug them in and they work,
no configuration required. Unmanaged switches are typically for basic connectivity. You will
often see them used in home networks or wherever a few more ports are needed, such as at your
desk, in a lab, or in a conference room.
Managed switches give your greater security and more features and flexibility because you can
configure them to custom-fit network. With this greater control, you can better protect your
network and improve the quality of service for those who access the network.
A network hub is central connection point for devices in a local area network, or LAN. But there
is a limit to the amount of bandwidth users can share on a hub-based network. The more devices
are added to the network hub, the longer it takes data to reach its destination. A switch avoids
these and other limitations of network hubs.
A large network may include multiple switches, which connect different groups of computer
systems together. These switches are typically connected to a router that allows connected
devices to access the internet. While switches allow different devices on a network
communicate, routers allow different networks to communicate.
A router is a networking device that routers data packets between computer networks. A router
can connect networked computers to the internet, so multiple users can share a connection.
Routers help connect networks within organization or connect the networks of multiple branch
locations. And a router works as a dispatcher. It directs data traffic, choosing the best route for
information to travel across the network, so that it’s transmitted as efficiently as possible.
You may find that you need to increase the number of ports that can plug into your router, so you
can setup a network switch connects with your router. Your network switch connects to the
router through one of the ports on the router, extending the number of devices in your small
office network, such as desktop computers, printers, laptops, etc. that have wired connection to
the internet.
7.JUMPER WIRES:

FIG: Jumper wires

Wire jumpers sometimes referred to as panel switch jumpers are premade sections of wire
used to interconnect the back of an electrical panel or similar piece of equipment. Oftentimes,
when wiring the of the back of the panel, you need short runs of wire that offer the same
protection as longer run world.
FIG: Jumper wire connections
There are three types of jumper wires:

MALE-MALE JUMPER WIRES:


The cable is an electrical wire or group of them in a cable with a connecter or pins at each end,
which is normally for interconnecting the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering.

FIG: Male-Male jumper wires


ES: - Male ends have a pin protruding and can plug into things, while female ends do not and are
used to plug things into. Male to male jumper wires is the most common and what you likely will
use most often. When connecting two ports on a breadboard, a male-to-male wire is what you
will need.
A male connector is a connector attached to a wire, cable, or piece or hardware, having one or
more exposed, unshielded electrical terminals, 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.
FEMALE-FEMALE JUMPER WIRES:
Jumper wires are small wire ducts that can be used to connect components to each other on
bread boards or elsewhere. The female and female heads of this product, with plastic heads, can
provide easier connection without need to soldering.

FIG: female-Female jumper wires


A female connector is a connector attached to a wire, cable, or piece of hardware, having one or
more recessed such a way that a plug with exposed conductors (male connector) can be inserted
snugly into it to ensure a reliable physical and electrical.

MALE-FEMALE JUMPER WIRES:

FIG: Male-Female jumper wires

Jumper wires typically come in three versions: male to male, male to female and female to
female. The difference between each is in the end point of the wire. Male ends have a pin
protruding and can plug into things, while female ends do not and are used to plug things into.
These are male to female jumper wires used in connecting the female header pin of any
development boards having a male connector pin at each end allowing them to be used to
connect two points each other.
A male connector is commonly referred to as a plug and has a solid pin for a centre conductor. A
female connector is commonly referred to as a jack and has a centre conductor with a hole in it to
accept the male pin.
CHAPTER-3
CIRCUIT DIAGRAM

Fig: Circuit Diagram Smartphone Controlled Car


The above diagram shows the circuit diagram of the smartphone-controlled car.
1.Arduino uno
2. Bluetooth Module
3. 300 RPM motors
4. Motor Driver
5. 18650 Lithium Batteries
6. Switch
7. Jumper Wire
WORKING

FIG: Circuit diagram


Make the necessary connections and upload the code to Arduino. Two rechargeable batteries as
supply is used which is connected to motor driver and Arduino respectively. When the circuit is
energized, we will have to first pair the android phone with the Bluetooth module through the
phones Bluetooth setting the default password of the Bluetooth module will be 1234. Once the
phone gets paired open the application CAR BLUETOOTH RC.
In the Android App, I have used 5 keys as Forward, Reverse, Left, Right. The corresponding
data associated with each key is as follows:
• Forward – 1
• Reverse – 2
• Left – 3
• Right – 4
When we type in text form , the corresponding data is transmitted to the Bluetooth Module from
the Phone over Bluetooth Communication. In the Arduino code, the Arduino UNO receives any
of this data from the Bluetooth Module (as per the key pressed) and performs a simple switch
case operation, where each case associated with appropriate instructions to the Motor Driver
Input Pins.
For example, if we type forword (or) front in the Android Phone, then ‘1’ is transmitted.
Arduino will then make IN1 and IN3 as HIGH and IN2 and IN4 as LOW to achieve a forward
motion. Similarly, other keys correspond to appropriate setting of IN1 – IN4 pins.
The RXD pin of the Bluetooth module is for receiving commands from the Android devices and
sends to Arduino through this pin and the TXD is for transmitting or sending data or information.

CODE:
#include <LiquidCrystal.h>
const int rs = 13, en = 12, d4 = 11, d5 = 10, d6 = 9, d7 = 8;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int buzzer=3;
int mic=13;
int fire=12;
int up1=8;
int up2=9;
int open1=10;
int open2=11;
int m1 = 7;
int m2 = 6;
int m3 = 5;
int m4 = 4;// select the pin for the LED
int x = 0; // variable to store the value coming from the sensor
int y = 0; // variable to store the value coming from the sensor
int z = 0; // variable to store the value coming from the sensor
String data;
void setup()
{
pinMode(buzzer, OUTPUT);
pinMode(fire, INPUT);pinMode(mic, INPUT);
pinMode(m1, OUTPUT);pinMode(m2, OUTPUT);pinMode(m3, OUTPUT);pinMode(m4,
OUTPUT);
pinMode(up1, OUTPUT);pinMode(up2, OUTPUT); pinMode(open1,
OUTPUT);pinMode(open2, OUTPUT);
digitalWrite(m1,LOW);digitalWrite(m2,LOW);digitalWrite(m3,LOW);digitalWrite(m4,LOW);
digitalWrite(up1,LOW);digitalWrite(up2,LOW);digitalWrite(open1,LOW);digitalWrite(open1,
LOW);
digitalWrite(buzzer,LOW);delay(1000);
Serial.begin(9600);
}
void front()
{
Serial.println("FRONT");delay(1000);
delay(1000);digitalWrite(m1, HIGH); digitalWrite(m2, LOW); digitalWrite(m3, HIGH);
digitalWrite(m4, LOW);delay(1000);

}
void back()
{
Serial.println("BACK");delay(1000);
delay(1000);digitalWrite(m1, LOW); digitalWrite(m2, HIGH); digitalWrite(m3, LOW);
digitalWrite(m4, HIGH);delay(1000);

void left()
{
Serial.println("LEFT");delay(1000);
delay(1000);digitalWrite(m1, HIGH); digitalWrite(m2,LOW); digitalWrite(m3, LOW);
digitalWrite(m4, HIGH);delay(1000);
stop1();
}

void right()
{
Serial.println("RIGHT");delay(1000);
delay(1000);digitalWrite(m1, LOW); digitalWrite(m2,HIGH); digitalWrite(m3, HIGH);
digitalWrite(m4, LOW);delay(1000);
stop1();
}
void stop1()
{
Serial.println("STOP");delay(1000);
digitalWrite(m1, LOW); digitalWrite(m2,LOW); digitalWrite(m3,LOW); digitalWrite(m4,
LOW);delay(1000);
}

void up()
{
Serial.println("up");delay(1000);
digitalWrite(up1, HIGH); digitalWrite(up2,LOW); delay(500); digitalWrite(up1,LOW);
digitalWrite(up2, LOW);delay(100);
}
void down()
{
Serial.println("down");delay(1000);
digitalWrite(up2, HIGH); digitalWrite(up1,LOW); delay(500); digitalWrite(up1,LOW);
digitalWrite(up2, LOW);delay(100);
}
void open11()
{
Serial.println("open");delay(1000);
digitalWrite(open1, HIGH); digitalWrite(open2,LOW); delay(1000); digitalWrite(open1,LOW);
digitalWrite(open2, LOW);delay(100);
}
void close1()
{
Serial.println("close");delay(1000);
digitalWrite(open2, HIGH); digitalWrite(open1,LOW); delay(1000); digitalWrite(open1,LOW);
digitalWrite(open2, LOW);delay(100);
}
void loop()
{
back:
Serial.println("i need voice command from bluetooth to start...");
while(1)
{

int fireval=digitalRead(fire); delay(10);


int micval=digitalRead(mic); delay(10);
if(fireval==LOW)
{
Serial.println("FIRE DETECTED");delay(100);stop1();
digitalWrite(buzzer,HIGH);delay(1000);digitalWrite(buzzer,LOW);delay(100);
digitalWrite(buzzer,HIGH);delay(1000);digitalWrite(buzzer,LOW);delay(100);
}
if(micval==LOW)
{
Serial.println("SOUND DETECTED");delay(100);stop1();
digitalWrite(buzzer,HIGH);delay(1000);digitalWrite(buzzer,LOW);delay(100);
digitalWrite(buzzer,HIGH);delay(1000);digitalWrite(buzzer,LOW);delay(100);
}

while(Serial.available())
{
data=Serial.readString();delay(100);Serial.println(data);delay(100);
if(data[0]=='f' )
{
data="";
front();
}
else if(data[0]=='f' && data[1]=='r' && data[2]=='o' && data[3]=='n' && data[4]=='t')
{
data="";
front();
}
else if(data[0]=='*' && data[1]=='f' && data[2]=='r' && data[3]=='o' && data[4]=='n' &&
data[5]=='t' && data[6]=='#')
{
data="";
front();
}

else if(data[0]=='b' )
{
data="";
back();
}
else if(data[0]=='b' && data[1]=='a' && data[2]=='c' && data[3]=='k' )
{
data="";
back();
}
else if(data[0]=='*' && data[1]=='b' && data[2]=='a' && data[3]=='c' && data[4]=='k' &&
data[5]=='#')
{
data="";
back();
}
else if(data[0]=='l' )
{
data="";
left();
}
else if(data[0]=='l' && data[1]=='e' && data[2]=='f' && data[3]=='t' )
{
data="";
left();
}
else if(data[0]=='*' && data[1]=='l' && data[2]=='e' && data[3]=='f' && data[4]=='t' &&
data[5]=='#')
{
data="";
left();
}
else if(data[0]=='r' )
{
data="";
right();
}
else if(data[0]=='r' && data[1]=='i' && data[2]=='g' && data[3]=='h' && data[4]=='t')
{
data="";
right();
}
else if(data[0]=='*' && data[1]=='r' && data[2]=='i' && data[3]=='g' && data[4]=='h' &&
data[5]=='t' && data[6]=='#')
{
data="";
right();
}

else if(data[0]=='s' )
{
data="";
stop1();
}
else if(data[0]=='s' && data[1]=='t' && data[2]=='o' && data[3]=='p' )
{
data="";
stop1();
}
else if(data[0]=='*' && data[1]=='s' && data[2]=='t' && data[3]=='o' && data[4]=='p' &&
data[5]=='#')
{
data="";
stop1();
}

if(data[0]=='u' )
{
data="";
up();
}
if(data[0]=='u' && data[1]=='p' )
{
data="";
up();
}
if(data[0]=='*' && data[1]=='u' && data[2]=='p' && data[3]=='#')
{
data="";
up();
}

if(data[0]=='d' )
{
data="";
down();
}
if(data[0]=='d' && data[1]=='o' && data[2]=='w' && data[3]=='n' )
{
data="";
down();
}
if(data[0]=='*' && data[1]=='d' && data[2]=='o' && data[3]=='w' && data[4]=='n' &&
data[5]=='#')
{
data="";
down();
}

if(data[0]=='o' )
{
data="";
open11();
}
if(data[0]=='o' && data[1]=='p' && data[2]=='e' && data[3]=='n' )
{
data="";
open11();
}
if(data[0]=='*' && data[1]=='o' && data[2]=='p' && data[3]=='e' && data[4]=='n' &&
data[5]=='#')
{
data="";
open11();
}
if(data[0]=='c' )
{
data="";
close1();
}
if(data[0]=='c' && data[1]=='l' && data[2]=='o' && data[3]=='s' && data[4]=='e')
{
data="";
close1();
}
if(data[0]=='*' && data[1]=='c' && data[2]=='l' && data[3]=='o' && data[4]=='s' &&
data[5]=='e' && data[6]=='#')
{
data="";
close1();
}

}
}
}
CHAPTER-4
ADVANTAGES
• It gives us wider range of control and more efficiency.
• It gives us the advantage of changing the remote anytime, meaning that we can use any
android devices including phones, tablets, computers.
• The connected vehicles come with an important security feature known as Geo-Fencing.
• Vehicle-to-vehicle connectivity technology allows connected vehicles to communicate
with each other.
• Connected vehicles come equipped with several critical security features such as real-
time location sharing/tracking, emergency SOS calls in case of an accident
CHAPTER-5
CONCLUSION
The project titled Bluetooth Car using Arduino is an application based on popular open-source
technology - Android and Arduino. The aim of the project was to create an Arduino integrated
car that has to be controlled through an application that runs on the android operating system.
The project has been completed with success with the utmost satisfaction.
The Arduino is an open-source device that has been the brain for numerous projects. The
Arduino has everything that is required by the user which includes its inbuilt converter, I /O pins
etc. With the combination of Arduino, and the Bluetooth Shield we can control over many other
things, like home Lightings, air conditioner and many more through our cell phones. The
Arduino can also contribute at large for the Smart Home system. By doing this Project we found
out a lot about the Arduino, and how it has made us easier to convert digital signals into physical
movements. One more advantage of Arduino is that once a program is burned we don‘t need to
worry about the program getting erased as long as it is not RESET. Arduino has also over all
other microcontroller because of its efficiency and user-friendly property.
CHAPTER-6
REFERENCES
[1] Design of a Bluetooth Enabled Android Application for a Microcontroller Driven Robot By
Vito M. Guardi, (May 2014).
[2] Introduction to Arduino A piece of cake! by Alan G. Smith September 30, 2011.
[3] 30 Arduino Projects for the Evil Genius Simon Monk, McGraw-Hill Companies Inc
[4] A. Sharma, J. Mondal, C. Pandey, R. Kumar and A. Bhattacharya, “IoT Based Home
Automation System”; Advances in Applied Science; Volume 2017; Article ID 100005, pp. 01-
06; Feb. 2017
[5] Arpit Sharma, Reetesh Verma, Saurabh Gupta and Sukhdeep Kaur Bhatia, “Android Phone
Controlled Robot Using Bluetooth”, International Journal of Electronic and Electrical
Engineering. Volume 7, Number 5 (2014), pp. 443- 448.
[6] P. D. Minns, Atmega32 for Arduino Microcontroller System. Author House, 2013
[7] https://www.arduino.cc/en/Tutorial/Foundations/AnalogInputPin

You might also like