Bluetooth Technology: Wireless Communication

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which characteristic is a primary advantage of Bluetooth technology?

  • Elimination of cables for data transfer over short ranges (correct)
  • Need for cables or wires for data transfer
  • Ability to transfer data over long distances
  • Requirement for a direct line of sight between devices

In what frequency band does Bluetooth operate?

  • 2.4 to 2.485 GHz (correct)
  • 5.0 to 5.5 GHz
  • 3.0 to 3.085 GHz
  • 1.9 to 1.985 GHz

What is the purpose of FHSS in Bluetooth technology?

  • To minimize data interference. (correct)
  • To maximize the data transfer speeds.
  • To increase the range of data transmission.
  • To reduce power consumption of the device.

What is the range of a Class 3 Bluetooth radio?

<p>Up to 1 meter or 3 feet. (C)</p> Signup and view all the answers

Which class of Bluetooth radio is the most commonly used?

<p>Class 2 (B)</p> Signup and view all the answers

What is one of the drawbacks of using Bluetooth technology, related to Radio Frequency (RF)?

<p>Greater vulnerability to interception and attack (A)</p> Signup and view all the answers

What is the purpose of the 'Command Mode' in the HC-05 Bluetooth module?

<p>To configure the module using AT commands (A)</p> Signup and view all the answers

What is the default mode of the HC-05 Bluetooth module?

<p>Data Mode (C)</p> Signup and view all the answers

What is the significance of the KEY pin on the HC-05 module when configuring it with AT commands?

<p>It must be made high to enter AT command mode. (B)</p> Signup and view all the answers

What baud rate should be set when using AT commands with the HC-05 module?

<p>38400 (D)</p> Signup and view all the answers

After opening the COM port and entering 'AT' (without quotes), what response confirms that the HC-05 has entered AT command mode?

<p>OK (A)</p> Signup and view all the answers

Which AT command is used to find the version of the HC-05 firmware?

<p>AT+VERSION? (D)</p> Signup and view all the answers

Which AT command is used to change the device name of the HC-05 module?

<p>AT+NAME (D)</p> Signup and view all the answers

What is the primary function of the DHT11 sensor?

<p>Measuring humidity and temperature (C)</p> Signup and view all the answers

What is the humidity measurement range of the DHT11 sensor?

<p>20 to 90% RH (D)</p> Signup and view all the answers

What type of component does the DHT11 sensor use to measure humidity?

<p>Resistive (A)</p> Signup and view all the answers

What type of temperature measurement component does the DHT11 sensor use?

<p>NTC thermistor (D)</p> Signup and view all the answers

What is the temperature measurement range of the DHT22 sensor?

<p>-40 to 125°C (C)</p> Signup and view all the answers

What is one advantage of the DHT22 over the DHT11 sensor?

<p>Wider humidity range (B)</p> Signup and view all the answers

When connecting a four-pin DHT11 to an Arduino, what is the purpose of the pull-up resistor on the data pin?

<p>To ensure a stable voltage level for accurate readings (B)</p> Signup and view all the answers

What is the first step recommended before using the DHT11 sensor with an Arduino?

<p>Installing the DHTLib library (B)</p> Signup and view all the answers

When setting up the DHT11 sensor with Arduino, which sequence of steps correctly describes how to include the required library?

<p>Sketch &gt; Include Library &gt; Add .ZIP Library (B)</p> Signup and view all the answers

What does the dht.begin() function do in the Arduino code for the DHT11 sensor?

<p>Initializes the DHT11 sensor (C)</p> Signup and view all the answers

What is the proper setup when configuring HC-05 with AT commands?

<p>To set the HC-05 into AT command mode, the KEY pin of the module is made high. (D)</p> Signup and view all the answers

What are the parameters to change baud rate to say, 115200, 1 stop bit, 0 parity, using AT commands?

<p>AT+UART=115200,1,0 (A)</p> Signup and view all the answers

What is the correct code for including SoftwareSerial library?

<p>#include &lt;SoftwareSerial.h&gt; (B)</p> Signup and view all the answers

What is the correct code for initializing Serial monitor at a baud rate of 9600?

<p>Serial.begin(9600); (B)</p> Signup and view all the answers

What is the correct code for initializing SoftwareSerial library?

<p>SoftwareSerial mySerial (10, 11); (C)</p> Signup and view all the answers

How many pins does DHT11 sensor have?

<p>3 or 4 (B)</p> Signup and view all the answers

What is power supply requirement by DHT11 sensor?

<p>3.3 to 5.5 Volt DC (D)</p> Signup and view all the answers

What is the frequency of ISM band?

<p>2.4 GHz (C)</p> Signup and view all the answers

Which frequencies does Bluetooth operate in?

<p>Radio frequencies (A)</p> Signup and view all the answers

Which one is NOT an advantage of using Bluetooth technology?

<p>Greater vulnerability to interception (B)</p> Signup and view all the answers

In which mode HC-05 is configured as either master or slave?

<p>Command Mode (B)</p> Signup and view all the answers

In what temperature does DHT11 can measure accurately?

<p>0 to 50°C (A)</p> Signup and view all the answers

Which technology does Bluetooth use for radio communication?

<p>FHSS (C)</p> Signup and view all the answers

What is the purpose of GND pin in HC-05 Bluetooth module?

<p>It represents the ground (A)</p> Signup and view all the answers

Which of the following statements is true about the range of Bluetooth?

<p>The range depends on the class of radio used. (B)</p> Signup and view all the answers

What value is set for DHTPIN in the sketch?

<p>2 (B)</p> Signup and view all the answers

What is the correct syntax for defining dht object?

<p>dht dht(DHTPIN, DHTTYPE) (C)</p> Signup and view all the answers

The HC-05 Bluetooth module is commonly used for what?

<p>Replacing wired serial connections (A)</p> Signup and view all the answers

Flashcards

What is Bluetooth?

Wireless communication technology for exchanging data over short distances found in many devices.

Bluetooth Technology

A combination of both hardware and software, creating personal area networks (PAN) over a short range.

What is the ISM band?

The unlicensed industrial, scientific and medical band in which Bluetooth operates, specifically 2.4 to 2.485 GHz.

Frequency Hopping Spread Spectrum (FHSS)

A radio technology used by Bluetooth that divides the radio signal into channels and rapidly switches between them to reduce interference.

Signup and view all the flashcards

Master-Slave Structure

A packet-based communication structure where one device controls communication with other devices.

Signup and view all the flashcards

Bluetooth Radio Class 2

Class 2 radios are the most commonly used, with a range of 10 meters or 33 feet.

Signup and view all the flashcards

Advantage of Bluetooth

The transfer of data over short ranges without cables or wires, consuming less power.

Signup and view all the flashcards

What is HC-05?

A Bluetooth module with Serial Port Profile (SPP) that can be configured as master or slave.

Signup and view all the flashcards

HC-05 Modes

Modes of operation for HC-05, allowing to send AT commands and data transmission.

Signup and view all the flashcards

KEY Pin

Is used for the module to enter into AT command mode.

Signup and view all the flashcards

DATA Mode.

It is the default configuration, that may work fine for many applications.

Signup and view all the flashcards

Command Mode

Mode to send AT commands to configure the HC-05 module.

Signup and view all the flashcards

Set HC-05 to AT command mode

To set the HC-05 for configuration using AT commands.

Signup and view all the flashcards

Steps to Enter AT Commands

Open the COM port and set the baud rate to 38400.

Signup and view all the flashcards

What are AT commands?

Check connection, see default name/address/version/baudrate, see role, reset, restore factory settings, and see default password.

Signup and view all the flashcards

What does DHT11 measure?

Provide humidity and temperature values serially over one wire.

Signup and view all the flashcards

DATA pin for DHT11

A digital output pin.

Signup and view all the flashcards

DHT22 accuracy

Provides temperature readings ±0.5°C accuracy, and humidity readings with 2-5% accuracy.

Signup and view all the flashcards

Study Notes

  • Bluetooth technology is a wireless communication method for short-distance data exchange
  • It is integrated into many devices, including mobile phones and computers
  • The technology combines both hardware and software
  • The intent is to establish personal area networks (PAN) over short distances
  • Operates in the unlicensed industrial, scientific, and medical (ISM) band at 2.4 to 2.485 GHz
  • Uses frequency hopping spread spectrum (FHSS) radio technology
  • It is a packet-based protocol with a master-slave structure
  • Bluetooth range is determined by the radio class in use
  • Class 3 radios have a range of up to 1 meter or 3 feet
  • Class 2 radios have a range of 10 meters or 33 feet
  • Class 1 radios have a range of 100 meters or 300 feet
  • Class 2 is the most used radio

Advantages

  • The technology needs no cables or wires for data transfer over short distances
  • Bluetooth consumes less power than other wireless communication technologies
  • Bluetooth technology uses Class 2 radio and consumes only 2.5 mW of power
  • Less prone to data interference
  • Devices do not need a clear line of sight

Disadvantages

  • Greater Radio Frequency (RF) range makes it vulnerable to interception/attack
  • Intended only for short-range communications

HC-05 and HC-06 Modules

  • HC-05 is a Class 2 Bluetooth module with Serial Port Profile (SPP)
  • Can be configured as either master or slave
  • Serves as a replacement for wired serial connections
  • Has 'Command Mode' in which AT commands can be sent
  • Has 'Data Mode' that transmits and receives data to another Bluetooth module

HC-05 Specifications

  • Bluetooth Protocol is Bluetooth Specification v2.0 + EDR (Enhanced Data Rate)
  • Frequency: 2.4 GHz ISM band
  • Profiles: Bluetooth Serial Port
  • Working Temperature: -20 to +75 centigrade
  • Power of emitting: 3 dBm

Pins

  • Vcc: Power supply for the module
  • GND: Ground of the module
  • TX: Transmitter the Bluetooth module
  • RX: Receiver of the module
  • Key: Enters AT command mode

Additional Info

  • The default is DATA Mode which fits most applications
  • Baud Rate: 9600 bps
  • Data: 8 bits
  • Stop Bits: 1 bit
  • Parity/Handshake: None
  • Passkey: 1234
  • Device Name: HC-05

Data Mode Connection

  • To Arduino:
  • Vcc to 5V
  • GND to G
  • TX to RX
  • RX to TX

Programming example

  • Use Serial.begin(9600) and pinMode(13,OUTPUT) to set up the serial communication and pin 13 as an output in the void setup() function
  • Inside the void loop() function, read serial data, if 'h' is received, then write the pin high using digitalWrite(13,HIGH)
  • If character is 'l' then write pin 13 low using digitalWrite(13.LOW)

Configuring w/ AT Commands

  • Name and password can be configured using AT commands
  • Configure as either master or slave
  • Set high the KEY pin of the module to enter the HC-05 into AT command mode
  • Key connects either to 5V or 3.3V of Arduino
  • TX of Arduino connects to TX of HC-05
  • RX of HC-05 connects to RX of Arduino.

Command Mode Connections

  • Tx -- Tx
  • Rx ---Rx
  • Vcc-- 5V
  • GND -- GND
  • KEY--3.3V

AT Command Mode

  • AT
  • AT+RESET
  • AT+VERSION?
  • AT+ORGL
  • AT+ADDR?
  • AT+ ROLE?
  • AT+PSWD?
  • AT+UART?
  • AT+STATE?
  • AT+DISC
  • AT+NAME

AT Commands Defs

  • AT : Check the connection
  • AT+NAME : See default name
  • AT+ADDR : See default address
  • AT+VERSION : See version
  • AT+UART : See baud rate
  • AT+ROLE: See role of bt module(1=master/0=slave)
  • AT+RESET : Reset and exit AT mode
  • AT+ORGL : Restore factory settings
  • AT+PSWD: see default password

Useful AT Commands

  • To ensure the unit is responding, enter AT. The unit should respond OK
  • To return the HC-05 to its default settings, enter AT+ORGL
  • To see the version of your HC-05 enter AT+VERSION?
  • To change the name of the device to AJCLOCK, for example, enter AT+NAME=AJCLOCK
  • To change the default security code (1234) to 2332 enter AT+PSWD=2332
  • To check baud rate, enter AT+UART? (my unit reset to 38400)
  • To change baud rate to say, 115200, 1 stop bit, 0 parity, enter AT+UART=115200,1,0

Software Example

  • Include:
#include <SoftwareSerial.h>
SoftwareSerial mySerial (10, 11); // RX | TX
  • Use void setup() to set serial using Serial.begin(9600), Serial.println("Enter AT commands:") and mySerial.begin(38400) sets the HC-05 speed in AT command mode
  • Inside void loop() transfer serial data

DHT11 and DHT22

Pinout

  • VCC = Power supply between 3.3 and 5.5V
  • Data = Digital output pin
  • NC = Not in use
  • GND = Ground

DHT11

  • Measures and provides humidity and temperature values serially over a single wire
  • Measures relative humidity from 20 to 90%, and temperature from 0 to 50°C
  • It has 4 pins; one of which is used for data communication in serial form
  • Uses resistive humidity and NTC temperature measurement component
  • Ultra-low cost
  • Operates between 3 to 5V
  • Uses 2.5mA during conversion
  • Good for humidity readings between 20-80% with 5% accuracy
  • Good for temperature readings between 0-50°C, with ±2°C accuracy

DHT22

  • Low cost
  • Operates between 3 to 5V
  • Uses 2.5mA during conversion
  • Good for humidity readings between 0-100% with 2-5% accuracy
  • Good for temperature readings between -40 to 125°C, with ±0.5°C accuracy

Setup for Arduino

#include <Adafruit_Sensor.h>
#include "DHT.h"
  • Add: #define DHTPIN 2 and #define DHTTYPE DHT11, and then initialize the DHT using: DHT dht(DHΤΡΙΝ, DHTTYPE)
  • Example Arduino code:
void loop()
{
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  Serial.print("Humidity: \t" );
  Serial.print(h);
  Serial.print(" % \n");
  delay(500);
  Serial.print("Temperature: \t");
  Serial.print(t);
  Serial.print(" *C \n");
}

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Wireless Communication Technologies
24 questions
Bluetooth Wireless Communication Protocol
43 questions
Non-IP Networking and Wireless Protocols
40 questions
Use Quizgecko on...
Browser
Browser