Podcast
Questions and Answers
Which characteristic is a primary advantage of Bluetooth technology?
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?
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?
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?
What is the range of a Class 3 Bluetooth radio?
Which class of Bluetooth radio is the most commonly used?
Which class of Bluetooth radio is the most commonly used?
What is one of the drawbacks of using Bluetooth technology, related to Radio Frequency (RF)?
What is one of the drawbacks of using Bluetooth technology, related to Radio Frequency (RF)?
What is the purpose of the 'Command Mode' in the HC-05 Bluetooth module?
What is the purpose of the 'Command Mode' in the HC-05 Bluetooth module?
What is the default mode of the HC-05 Bluetooth module?
What is the default mode of the HC-05 Bluetooth module?
What is the significance of the KEY pin on the HC-05 module when configuring it with AT commands?
What is the significance of the KEY pin on the HC-05 module when configuring it with AT commands?
What baud rate should be set when using AT commands with the HC-05 module?
What baud rate should be set when using AT commands with the HC-05 module?
After opening the COM port and entering 'AT' (without quotes), what response confirms that the HC-05 has entered AT command mode?
After opening the COM port and entering 'AT' (without quotes), what response confirms that the HC-05 has entered AT command mode?
Which AT command is used to find the version of the HC-05 firmware?
Which AT command is used to find the version of the HC-05 firmware?
Which AT command is used to change the device name of the HC-05 module?
Which AT command is used to change the device name of the HC-05 module?
What is the primary function of the DHT11 sensor?
What is the primary function of the DHT11 sensor?
What is the humidity measurement range of the DHT11 sensor?
What is the humidity measurement range of the DHT11 sensor?
What type of component does the DHT11 sensor use to measure humidity?
What type of component does the DHT11 sensor use to measure humidity?
What type of temperature measurement component does the DHT11 sensor use?
What type of temperature measurement component does the DHT11 sensor use?
What is the temperature measurement range of the DHT22 sensor?
What is the temperature measurement range of the DHT22 sensor?
What is one advantage of the DHT22 over the DHT11 sensor?
What is one advantage of the DHT22 over the DHT11 sensor?
When connecting a four-pin DHT11 to an Arduino, what is the purpose of the pull-up resistor on the data pin?
When connecting a four-pin DHT11 to an Arduino, what is the purpose of the pull-up resistor on the data pin?
What is the first step recommended before using the DHT11 sensor with an Arduino?
What is the first step recommended before using the DHT11 sensor with an Arduino?
When setting up the DHT11 sensor with Arduino, which sequence of steps correctly describes how to include the required library?
When setting up the DHT11 sensor with Arduino, which sequence of steps correctly describes how to include the required library?
What does the dht.begin()
function do in the Arduino code for the DHT11 sensor?
What does the dht.begin()
function do in the Arduino code for the DHT11 sensor?
What is the proper setup when configuring HC-05 with AT commands?
What is the proper setup when configuring HC-05 with AT commands?
What are the parameters to change baud rate to say, 115200, 1 stop bit, 0 parity, using AT commands?
What are the parameters to change baud rate to say, 115200, 1 stop bit, 0 parity, using AT commands?
What is the correct code for including SoftwareSerial library?
What is the correct code for including SoftwareSerial library?
What is the correct code for initializing Serial monitor at a baud rate of 9600?
What is the correct code for initializing Serial monitor at a baud rate of 9600?
What is the correct code for initializing SoftwareSerial library?
What is the correct code for initializing SoftwareSerial library?
How many pins does DHT11 sensor have?
How many pins does DHT11 sensor have?
What is power supply requirement by DHT11 sensor?
What is power supply requirement by DHT11 sensor?
What is the frequency of ISM band?
What is the frequency of ISM band?
Which frequencies does Bluetooth operate in?
Which frequencies does Bluetooth operate in?
Which one is NOT an advantage of using Bluetooth technology?
Which one is NOT an advantage of using Bluetooth technology?
In which mode HC-05 is configured as either master or slave?
In which mode HC-05 is configured as either master or slave?
In what temperature does DHT11 can measure accurately?
In what temperature does DHT11 can measure accurately?
Which technology does Bluetooth use for radio communication?
Which technology does Bluetooth use for radio communication?
What is the purpose of GND pin in HC-05 Bluetooth module?
What is the purpose of GND pin in HC-05 Bluetooth module?
Which of the following statements is true about the range of Bluetooth?
Which of the following statements is true about the range of Bluetooth?
What value is set for DHTPIN in the sketch?
What value is set for DHTPIN in the sketch?
What is the correct syntax for defining dht object?
What is the correct syntax for defining dht object?
The HC-05 Bluetooth module is commonly used for what?
The HC-05 Bluetooth module is commonly used for what?
Flashcards
What is Bluetooth?
What is Bluetooth?
Wireless communication technology for exchanging data over short distances found in many devices.
Bluetooth Technology
Bluetooth Technology
A combination of both hardware and software, creating personal area networks (PAN) over a short range.
What is the ISM band?
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)
Frequency Hopping Spread Spectrum (FHSS)
Signup and view all the flashcards
Master-Slave Structure
Master-Slave Structure
Signup and view all the flashcards
Bluetooth Radio Class 2
Bluetooth Radio Class 2
Signup and view all the flashcards
Advantage of Bluetooth
Advantage of Bluetooth
Signup and view all the flashcards
What is HC-05?
What is HC-05?
Signup and view all the flashcards
HC-05 Modes
HC-05 Modes
Signup and view all the flashcards
KEY Pin
KEY Pin
Signup and view all the flashcards
DATA Mode.
DATA Mode.
Signup and view all the flashcards
Command Mode
Command Mode
Signup and view all the flashcards
Set HC-05 to AT command mode
Set HC-05 to AT command mode
Signup and view all the flashcards
Steps to Enter AT Commands
Steps to Enter AT Commands
Signup and view all the flashcards
What are AT commands?
What are AT commands?
Signup and view all the flashcards
What does DHT11 measure?
What does DHT11 measure?
Signup and view all the flashcards
DATA pin for DHT11
DATA pin for DHT11
Signup and view all the flashcards
DHT22 accuracy
DHT22 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
- Open the COM port of the Arduino connected to Bluetooth module
- Set the baud rate to 38400
- Send the command "AT" (without quotes)
- You should see "OK" returned, indicating entry into the AT command mode
- See http://www.linotux.ch/arduino/HC-0305_serial_module_AT_commamd_set_201104_revised.pdf for commands
Popular AT Commands
- 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
-
Download DHTLib
-
Then go to Sketch>Include Library>Add .ZIP Library and select the DHTLib.zip file
-
Check the following examples: https://github.com/adafruit/DHT-sensor-library
-
Needs:
#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.