0% found this document useful (0 votes)
38 views26 pages

Digital Circuit Design and Its Application

Uploaded by

Swathi SB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views26 pages

Digital Circuit Design and Its Application

Uploaded by

Swathi SB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

DIGITAL CIRCUIT DESIGN AND ITS

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

3.HC-05 Bluetooth Module


• Pin Description
• How to Use the HC-05 Bluetooth module
• Default Settings of HC-05 Bluetooth Module

4. 5V single-channel Relay module


• What is a relay and how does it work?
• Pin description
5.Breadboad
6.Jumper wires
7.Procedure
• The connection between Arduino Nano and Bluetooth(HC-05)
• The connection between single relay module and Arduino
• The connection between relay module and bulb

8. Uploading of code to the Arduino Nano using ARDUINO IDE(version


1.8.19)
9. Pairing of Bluetooth module(HC-05) to Android(SERIAL BLUETOOTH
TERMINAL APP)
COMPONENTS
• Arduino nano
• HC-05 Bluetooth module
• 5V single channel relay module
• Breadboard
• Jumper wires
• Bulb
• ARDUINO IDE(version 1.8.19)
• Serial bluetooth terminal Android App
INTRODUCTION TO
ARDUINO NANO
What is Arduino Nano?

• Arduino Nano is a small, compatible open-source electronic development board


based on an 8-bit AVR microcontroller. Two versions of this board are available, one
is based on ATmega328p, and the other on Atmega168.

• 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

• Device is bread-board friendly in nature


means you can connect this unit with
breadboards and make a range of
electronic projects.

• The flash memory is used to store


the program and the flash memory of
Atmega168 is 16KB used for the and
the flash memory of Atmega328 is 32KB.
ARDUINO NANO PIN DESCRIPTION

•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).

•3.3V: It is a minimum voltage produced by the voltage regulator on the board.

•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.

•GND: Two ground pins are available on the board.

•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.

Default Settings of HC-05 Bluetooth Module


The following is a list of few of the default settings of the HC-05 Bluetooth Module.

• 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.

NO (Normally Open): The normally open configuration works the


other way around: the relay is always open, so this means that the
circuit is broken and the current is not flowing unless you send a
signal from the Arduino to close the circuit (this is the configuration
we will use).
Ground pin: 0V reference.
Single pin: It is used to control the relay. This pin can be active low or
active high. In case of active low, the relay will activate when we apply
an active low signal to the signal pin. On the contrary, in the case of an
active high, the relay will activate when we apply an active high signal
to the signal pin.
Vcc pin: As its name suggests, it is a 5V relay. That means it requires 5V
DC to operate. Hence, connect the 5v DC power supply to this pin.
BREADBOARD

A Breadboard is simply a board for


prototyping or building circuits on. It
allows you to place components and
connections on the board to make
circuits without soldering. The holes
in the breadboard take care of the
connections by physically holding
onto parts or wires where you put
them and electrically connect them
inside the board.
JUMPER WIRE

Jumper wires are simply wires


that have connector pins at each end,
allowing them to be used to connect
two points to each other without
soldering. Jumper wires are typically
used with breadboards and other
prototyping tools in order to make it
easy to change a circuit as needed.
PROCEDURE:

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:

Open the Arduino IDE, click on file>>new.


write the code.
#include<SoftwareSerial.h>
#define Relay 10
SoftwareSerial BTSerial(2,3);
char serialData;
void setup()
{
Serial.begin(9600);
BTSerial.begin(9600);
pinMode(Relay, OUTPUT);
digitalWrite(Relay, LOW);
}
void loop()
{
if(BTSerial.available())
{
serialData = BTSerial.read();
Serial.println(serialData);
delay(15);
}

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy