The BD Sensor Board is a versatile circuit board that integrates various sensors to detect and measure physical properties such as temperature, pressure, humidity, and motion. This board is commonly used in applications requiring environmental monitoring and data collection. Its compact design and ease of integration make it suitable for a wide range of projects, from home automation systems to industrial monitoring solutions.
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5V |
Operating Current | 10mA - 50mA |
Temperature Range | -40°C to 85°C |
Humidity Range | 0% to 100% RH |
Pressure Range | 300 hPa to 1100 hPa |
Motion Detection | Up to 10 meters |
Communication | I2C, SPI |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | SDA | I2C Data Line |
4 | SCL | I2C Clock Line |
5 | MISO | SPI Master In Slave Out |
6 | MOSI | SPI Master Out Slave In |
7 | SCK | SPI Clock |
8 | CS | Chip Select for SPI |
9 | INT | Interrupt Pin for Motion Detection |
10 | A0 | Analog Output for Temperature Sensor |
#include <Wire.h> // Include Wire library for I2C communication
#define TEMP_SENSOR_ADDR 0x48 // I2C address for temperature sensor
#define MOTION_SENSOR_PIN 2 // Digital pin for motion sensor interrupt
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
Wire.begin(); // Initialize I2C communication
pinMode(MOTION_SENSOR_PIN, INPUT); // Set motion sensor pin as input
attachInterrupt(digitalPinToInterrupt(MOTION_SENSOR_PIN), motionDetected, RISING);
// Attach interrupt to motion sensor pin, trigger on rising edge
}
void loop() {
float temperature = readTemperature(); // Read temperature from sensor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");
delay(1000); // Wait for 1 second before next reading
}
float readTemperature() {
Wire.beginTransmission(TEMP_SENSOR_ADDR); // Start I2C transmission
Wire.write(0x00); // Send command to read temperature
Wire.endTransmission(); // End I2C transmission
Wire.requestFrom(TEMP_SENSOR_ADDR, 2); // Request 2 bytes from sensor
if (Wire.available() == 2) {
int temp = Wire.read() << 8 | Wire.read(); // Read temperature data
return temp * 0.0625; // Convert to Celsius
}
return 0.0; // Return 0.0 if no data available
}
void motionDetected() {
Serial.println("Motion detected!"); // Print message when motion is detected
}
By following this documentation, users can effectively integrate and utilize the BD Sensor Board in their projects, ensuring accurate environmental monitoring and data collection.