The RAK19007 is a high-precision temperature and humidity sensor manufactured by RAK. It is specifically designed for Internet of Things (IoT) applications, offering reliable and accurate environmental monitoring. The sensor provides a digital output and is capable of measuring temperature in the range of -40°C to 125°C and relative humidity (RH) from 0% to 100%. Its compact design and robust performance make it ideal for applications such as smart agriculture, industrial automation, weather stations, and indoor air quality monitoring.
The RAK19007 sensor is built to deliver precise environmental data with minimal power consumption. Below are its key technical specifications:
Parameter | Value |
---|---|
Temperature Range | -40°C to 125°C |
Humidity Range | 0% to 100% RH |
Accuracy (Temperature) | ±0.2°C |
Accuracy (Humidity) | ±2% RH |
Supply Voltage | 1.8V to 3.6V |
Communication Protocol | I²C |
Operating Current | 0.6 mA (typical) |
Standby Current | <1 µA |
Dimensions | 15 mm x 10 mm x 2 mm |
The RAK19007 features a standard I²C interface with the following pinout:
Pin Name | Pin Number | Description |
---|---|---|
VCC | 1 | Power supply input (1.8V to 3.6V) |
GND | 2 | Ground connection |
SDA | 3 | I²C data line |
SCL | 4 | I²C clock line |
INT | 5 | Interrupt pin (optional, for event notifications) |
The RAK19007 is straightforward to integrate into IoT systems, thanks to its I²C interface. Below are the steps to use the sensor in a circuit and some best practices:
Below is an example Arduino sketch to read temperature and humidity data from the RAK19007:
#include <Wire.h>
// I2C address of the RAK19007 sensor
#define RAK19007_ADDRESS 0x44
void setup() {
Serial.begin(9600); // Initialize serial communication
Wire.begin(); // Initialize I2C communication
// Check if the sensor is connected
Wire.beginTransmission(RAK19007_ADDRESS);
if (Wire.endTransmission() != 0) {
Serial.println("RAK19007 not detected. Check connections.");
while (1); // Halt execution if sensor is not found
}
Serial.println("RAK19007 detected successfully.");
}
void loop() {
float temperature, humidity;
// Request 4 bytes of data from the sensor
Wire.beginTransmission(RAK19007_ADDRESS);
Wire.write(0x00); // Command to read temperature and humidity
Wire.endTransmission();
Wire.requestFrom(RAK19007_ADDRESS, 4);
if (Wire.available() == 4) {
// Read temperature and humidity data
uint16_t tempRaw = (Wire.read() << 8) | Wire.read();
uint16_t humRaw = (Wire.read() << 8) | Wire.read();
// Convert raw data to human-readable values
temperature = -45.0 + 175.0 * ((float)tempRaw / 65535.0);
humidity = 100.0 * ((float)humRaw / 65535.0);
// Print the results
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");
} else {
Serial.println("Failed to read data from RAK19007.");
}
delay(2000); // Wait 2 seconds before the next reading
}
Sensor Not Detected:
Inaccurate Readings:
No Data Output:
Q: Can the RAK19007 operate at 5V?
A: No, the RAK19007 operates within a supply voltage range of 1.8V to 3.6V. Using 5V may damage the sensor.
Q: How do I extend the I²C bus for longer distances?
A: Use lower-value pull-up resistors (e.g., 2.2 kΩ) and shielded cables to reduce noise.
Q: Is the sensor waterproof?
A: No, the RAK19007 is not waterproof. Use a protective enclosure for outdoor applications.