Digital Circuit Design and Its Application
Digital Circuit Design and Its Application
APPLICATION
PROJECT TOPIC :
BLUETOOTH CONTROL OF LAMP USING ARDUINO
NANO
GROUP MEMBERS:
PRIYANKA M S(20CS059)
RAKSHITHA D(20CS064)
SWATHI S B(20CS087)
CSE 3rd SEM
B section
CONTENTS
1.Components
2.Introduction to Arduino nano
• What is Arduino Nano
• Arduino Nano pinout
• Arduino Nano Pin description
• Arduino Nano can perform some functions similar to other boards available in the
market, however, it is smaller in size and is a right match for projects requiring less
memory space and fewer GPIO pins to connect with.
• This unit features 14 digital pins which you can use to connect with external
components, while 6 analog pins of 10-bit resolution each, 2 reset pins, and 6 power
pins are integrated on the board.?
• The board supports a USB interface and Arduino Nano Pinout
it uses a mini USB port, unlike most
Arduino boards that use the standard USB port
•Digital Pins: There are 14 digital pins on board which is used to connect external
component.
•Analog Pins: 6 analog pins on board that is used to measure voltage in a range from 0 to
5V.
•LED: The unit comes with a built-in LED connected to pin 13 on the board.
•VIN: This is an input voltage to the Arduino board when using an external power source (6-
12V).
•5V: Regulated power supply used to power up the controller and other components on
board.
•AREF: It is an Analog Reference that is applied to the unit as a reference voltage from
an external power supply.
•Reset: Two reset pins are integrated on the board. These pins are used to reset the
controller internally through software.
•External Interrupts: Pin 2 and 3 are used to trigger external interrupts. These pins are
used in case of emergency.
•USART: The board supports USART serial communication that carries two pins i.e.
Rx which is used for receiving the serial data and Tx which is a transmission pin used
to transmit serial data.
• SPI: The device also supports SPI
(serial peripheral interface)
communication protocol where four
pins (SS, MISO, MOSI, SCK) are
used for this communication. This
protocol is used to transfer data
between the microcontroller and
other peripheral devices.
• I2C: The unit comes with an I2C communication protocol where two pins SDA and SCL
are used to support this communication. SDA is a serial data line that carries the data
while SCL is a serial clock line used for data synchronization between the devices on the
I2C bus. The Wire Library of Arduino Software can be accessed to use the I2C bus.
HC-05 BLUETOOTH MODULE
HC-05 Bluetooth Module is a simple Wireless
Communication device based on the
Bluetooth Protocol.
The HC-05 is a popular module which can add
two-way wireless functionality to the
project. It is used to communicate
between two microcontrollers like Arduino or
communicate with any device with Bluetooth
functionality like a Phone or Laptop.?
Pin Description
• EN: It is the enable pin. When this pin is floating or connected to 3.3V, the
module is enabled. If this pin is connected to GND, the module is disabled.
• +5V: This is the supply pin for connecting +5V. As the Module has on-board
3.3V regulator, you can provide +5V supply.
• GND: It is the ground pin.
• TX: It is the Transmitter pin of the UART Communication.
• RX: It is the Receive Pin of UART.
• STATE: This is a status indicator pin. This pin goes LOW when the module is
not connected to any device. When the module is paired with any device, this
pin goes HIGH.
HOW TO USE THE HC-05 BLUETOOTH MODULE
The HC-05 has two operating modes, one is the Data mode in which it can send and
receive data from other Bluetooth devices and the other is the AT Command mode where
the default device settings can be changed. We can operate the device in either of these
two modes by using the key pin.
• Name: HC-05
• Password: 1234 (or 0000)
• Mode: Data
5V SINGLE-CHANNEL RELAY MODULE
What is a relay and how does it work?
A relay is a switch that is electrically operated by an
electromagnet. This relay has two channels. This means
it can control two high voltage devices. The relay has
two sides. One connects to the high voltage device and
the other side connects to the Arduino. The side that
controls the high voltage device has 3 pins. The common
pin (COM), normally open pin (NO), and normally
closed pin (NC).
COM: The common pin
NC (Normally Closed): The normally closed configuration is used when
you want the relay to be closed by default, this means that the current is
flowing unless you send a signal from the Arduino to open the circuit.
The Arduino Nano and Bluetooth module (HC-05) are fixed to the breadboard .
The connection between Arduino Nano and Bluetooth(HC-05)
Arduino Nano pins Bluetooth pins
GND - - - -> GND
5V - - - - > VCC
D2 - - - -> TXD
The connection between single relay module and Arduino
Nano using jumper wire
Relay module pins Arduino Nano pins
IN - - - -> D 10
GND - - - -> GND
VCC - - - -> 5V
The connection between the relay module and
bulb
We take a wire from the light bulb and cut it
so that we have two separate wires just like it
is shown in the picture above. Then we put one
wire into the NO (normally open) pin of the
relay, and the other wire into the COM
(common) pin of the relay. With this
configuration, the circuit is broken and the
current is not flowing unless you send a signal
from the Arduino to close the circuit.
UPLOADING OF CODE TO THE ARDUINO
NANO
USING ARDUINO IDE(version 1.8.19)
After completing the connection, the Arduino Nano is connected to the laptop
using USB. The steps to get started with the Arduino Nano are listed below:
if(serialData == '1')
{
digitalWrite(Relay, HIGH);
}
else if(serialData == '0')
{
digitalWrite(Relay, LOW);
}
}
• Select the tools >>board>>Arduino Nano.
• Click on tools and select serial plotter then select COM3.
• Now, upload and run the written code.
• Within a few seconds after the compile and run of code, the RX and TX
light present on the Arduino board will flash.
• The ’Done Uploading ‘ message will appear after the code is
successfully uploaded>the message will be
• Visible in the status bar
CIRCUIT DIAGRAM
PAIRING OF BLUETOOTH MODULE (HC-05) TO ANDROID
(SERIAL BLUETOOTH TERMINAL APP)
• After uploading the code to Arduino Nano, when the connection is completely
finished. The Arduino Nano is connected to the power supply(power bank). the plug is
connected to the socket.
• In Android, the Bluetooth is turned on and it is paired with Bluetooth(HC-05), in the
app click on device pair there also
• Bluetooth module(HC-05) works on serial communication, the android app Serial
Bluetooth terminal is used to send serial data to Bluetooth module.
• The Bluetooth module at Open the serial monitor and
the other end receives watch the received data
the data and sends it to
Arduino through the TX
pin of the
Bluetooth module(RX
pin of Arduino). The
Code fed to Arduino
checks the received data
and compares it. If
received data is 0 the
LED turns on, turns OFF
when received data is 1
THANK
YOU