You are on page 1of 10

ECE 2002 ANALOG ELECTRONIC CIRCUITS

Project title
Bluetooth Controlled Car

Referred by
Dr. Rajesh Kumar V

Project done by
R. Yeswanth Raman 18BEC0457
B. Ruthwik 18BEC0101
N. Sai Sreekar 18BEC0179
Abstract:
Our project is to build a Bluetooth controlled car without a motor
driver chip using Arduino. We used 2N2222 transistor and a basic
diode instead of the motor driver chip. As most of these projects
include motor drivers, we wanted to simplify the circuit by adding
basic analog electronic components. Our project restricts to only one
direction of the car. We give serial inputs to change the motor speed.

We used basic Bluetooth wireless technology by introducing HC-05


module in the circuit. The controller is a basic android mobile where
we have to install a Bluetooth serial controller application from play
store. We used a 3-wheel car chassis for building the project where 2
wheels are connected to 2 different motors and other wheel is free to
move in any direction. We used Arduino UNO for coding through
Arduino IDE.

Material used:
-1x Arduino UNO
- 1x Transistor capable of 400MA+ current (We used 2N2222)
- 2x 3v DC motor
- 1x 330 Ohm resistor
- 1x diode (IN4001)
- 4x 1.5V AA battery
- 1x car chassis with 3-wheels
- 1x Arduino Bluetooth module HC-05
- 1x Small breadboard and jumper wires
Arduino Uno:
The Arduino Uno is an open-source microcontroller board based on
the Microchip ATmega328P microcontroller and developed by
Arduino.cc. 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.
Technical Specs:
• Microcontroller: Microchip ATmega328P [7]
• Operating Voltage: 5 Volts
• Input Voltage: 7 to 20 Volts
• Digital I/O Pins: 14 (of which 6 can 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 bootloader
• SRAM: 2 KB
• EEPROM: 1 KB
• Clock Speed: 16 MHz
• Length: 68.6 mm
• Width: 53.4 mm
• Weight: 25 g

2N2222A transistor:
The 2N2222 is a common NPN bipolar junction transistor (BJT) used
for general purpose low-power amplifying or switching applications. It
is designed for low to medium current, low power, medium voltage,
and can operate at moderately high speeds. It was originally made in
the TO-18 metal can as shown in the picture.
The 2N2222 is considered a very common transistor, and is used as an
exemplar of an NPN transistor. It is frequently used as a small-signal
transistor, and it remains a small general-purpose transistor of
enduring popularity.

IN 4007 diode:
The 1N400x (or 1N4001 or 1N4000) series is a family of popular
1 A general-purpose silicon rectifier diodes commonly used in AC
adapters for common household appliances. Its blocking
voltage varies from 50 volts (1N4001) to 1000 volts (1N4007).

HC-05 Bluetooth module:


HC‐05 module is an easy to use Bluetooth SPP (Serial Port Protocol)
module, designed for transparent wireless serial connection setup.
The HC-05 Bluetooth Module can be used in a Master or Slave
configuration, making it a great solution for wireless communication.
This serial port Bluetooth module is fully qualified Bluetooth
V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with complete
2.4GHz radio transceiver and baseband. It uses CSR Blue core 04‐
External single chip Bluetooth system with CMOS technology and with
AFH (Adaptive Frequency Hopping Feature).

Hardware Features:

• Typical ‐80dBm sensitivity.


• Up to +4dBm RF transmit power.
• 3.3 to 5 V I/O.
• PIO(Programmable Input/Output) control.
• UART interface with programmable baud rate.
• With integrated antenna.
• With edge connector.

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.

Basic Circuit Diagram:


Main Connections:
• The schematic shows what we are trying to achieve. The basic
idea of the circuit is to have the batteries supply power to the
transistor’s collector pin via the motor. Then when the Arduino
outputs a logical high it will allow the current to flow from the
batteries through the transistor to ground making the motor
spin.
• Our batteries will act as our power source in this circuit with the
Arduino just used for control. The batteries need to be chained
together to give an output of 3V. Simply connected the chained
batteries positive terminal to the positive power rail and the
negative to the ground rail.
• Connecting motor and diode:

-Connect power bar to diode terminal with the stripe on it

-Connect one of the motor terminals to the same diode terminal

-Connect the other motor terminal to the other diode terminal

-The diode is used to provide a safe path for current to flow


when there is a sudden change in current.
• Connecting transistor:

- Connect the transistors collector pin to the diode terminal


without the stripe on it

- Connect the base pin to the 330Ohm resistor then connect that
resistor to pin 3 of the Arduino

- Connect the emitter pin to the ground rail

- Finally, we must connect the ground pin of the Arduino to the


ground rail so both batteries and the Arduino share a common
ground
-In this circuit our transistor acts like a switch allowing current to
flow from the collector to the emitter when there is current
going into the base pin. This allows us to use the pin of the
Arduino to control our motor without needing to power our
motor with the Arduino itself.

Arduino Code:
Sketch and results:
Our sketch is fairly simple we read a number from serial then output
that number to our pin. The higher the value the faster the motor will
spin. Our project relies on the fact that the analog pins are actually
PWM pins on the Arduino.

If the pin output value for the pin is 100 then the pin will be high for
about 40% each cycle (100/255*100). This is why the motor will spin
faster if the value is higher.

Adding Bluetooth:
We have a circuit that we can control via serial now we need to replace
the serial connection from our computer with the Bluetooth module.-

-Module VCC to Arduino 5V

- Module GND to Arduino GND

- Module RX to Arduino TX

- Module TX to Arduino RX

Connecting via Bluetooth:


First, we have to power the Arduino using battery supply and switch
on the Bluetooth serial controller application and should connect to
the HC-05 module. Next, we have to give ASCII values from 0 to 255
which decides the speed of the motors and hence the car moves.

You might also like