Stufin
Home Quick Cart Profile

24 in 1 Sensors DIY Learning Kit

Buy Now on Stufin

Pin Configuration

  • 24 in 1 Sensors DIY Learning Kit Pinout Guide
  • The 24 in 1 Sensors DIY Learning Kit is a comprehensive kit that includes a variety of sensors and modules, allowing users to explore and learn about different IoT projects. This guide provides a detailed explanation of each pin on the kit, helping users understand how to connect and utilize each component.
  • Pinout Structure:
  • The kit consists of multiple modules, each with its own set of pins. For clarity, we will break down the pinout explanation into separate sections, one for each module.
  • Module 1: Sensor Modules (14 Pins)
  • 1. GND (Ground): Connect to the ground pin of your microcontroller or power supply.
  • 2. VCC (Power): Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • 3. OUT (Output): Output signal from the sensor, connects to an analog or digital input on your microcontroller.
  • 4. DHT11 (Temperature and Humidity Sensor)
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • OUT: Output signal from the DHT11 sensor, connects to a digital input on your microcontroller.
  • 5. DS18B20 (Temperature Sensor)
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • DQ: Output signal from the DS18B20 sensor, connects to a digital input on your microcontroller.
  • 6. FC-37 (Rain Sensor)
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • OUT: Output signal from the FC-37 sensor, connects to a digital input on your microcontroller.
  • 7. Sound Sensor
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • OUT: Output signal from the sound sensor, connects to an analog input on your microcontroller.
  • 8. Light Sensor
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • OUT: Output signal from the light sensor, connects to an analog input on your microcontroller.
  • 9. Vibration Sensor
  • VCC: Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • GND: Connect to the ground pin of your microcontroller or power supply.
  • OUT: Output signal from the vibration sensor, connects to a digital input on your microcontroller.
  • Module 2: I2C Modules (4 Pins)
  • 1. GND (Ground): Connect to the ground pin of your microcontroller or power supply.
  • 2. VCC (Power): Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • 3. SCL (Clock): Connect to the SCL pin of your microcontroller (usually labeled as SCL or Clock).
  • 4. SDA (Data): Connect to the SDA pin of your microcontroller (usually labeled as SDA or Data).
  • Module 3: 433MHz RF Module (4 Pins)
  • 1. GND (Ground): Connect to the ground pin of your microcontroller or power supply.
  • 2. VCC (Power): Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • 3. TX (Transmit): Connect to the TX pin of your microcontroller (usually labeled as TX or Transmit).
  • 4. RX (Receive): Connect to the RX pin of your microcontroller (usually labeled as RX or Receive).
  • Module 4: 16x2 LCD Display (16 Pins)
  • 1. VSS (Ground): Connect to the ground pin of your microcontroller or power supply.
  • 2. VCC (Power): Connect to the power pin (usually 3.3V or 5V) of your microcontroller or power supply.
  • 3. V0 (Contrast): Connect to a potentiometer or a fixed resistor to adjust the display contrast.
  • 4. RS (Register Select): Connect to a digital output on your microcontroller to select the register.
  • 5. RW (Read/Write): Connect to a digital output on your microcontroller to control the read/write operation.
  • 6. EN (Enable): Connect to a digital output on your microcontroller to enable the display.
  • 7. D0-D7 (Data Pins): Connect to digital outputs on your microcontroller to send data to the display.
  • Connection Tips:
  • When connecting sensors to your microcontroller, ensure that the power and ground pins are correctly connected to the corresponding pins on the microcontroller.
  • Use appropriate pull-up or pull-down resistors for digital signals, as required by the sensor or module.
  • For I2C modules, ensure that the SCL and SDA pins are connected to the correct pins on your microcontroller.
  • For the 433MHz RF module, ensure that the TX and RX pins are connected to the correct pins on your microcontroller.
  • By following this pinout guide, you should be able to connect and utilize each component in the 24 in 1 Sensors DIY Learning Kit. Happy prototyping!

Code Examples

Component Documentation: 24 in 1 Sensors DIY Learning Kit
Overview
The 24 in 1 Sensors DIY Learning Kit is a comprehensive bundle of sensors designed for IoT enthusiasts, hobbyists, and professionals. This kit includes a diverse range of sensors, allowing users to explore and experiment with various IoT applications. The kit is ideal for learning, prototyping, and developing innovative projects.
Components Included
The kit comprises 24 sensors, including:
1. Temperature sensors (DS18B20, TMP36)
2. Humidity sensors (DHT11, DHT22)
3. Light sensors (LDR, BH1750)
4. Sound sensors (KY-037)
5. Proximity sensors (HC-SR04, HC-SR05)
6. Motion sensors (PIR, ADXL345)
7. Vibration sensors (SW-420)
8. Tilt sensors (SW-520D)
9. Flame sensors (FLame sensor module)
10. Smoke sensors (MQ-2)
11. Gas sensors (MQ-135, MQ-6)
12. Air quality sensors (MQ-137)
13. Soil moisture sensors
14. Water level sensors
15. Wind speed sensors (Anemometer)
16. Raindrop sensors
17. Infrared sensors (VL53L0X)
18. Ultrasonic sensors (HC-SR04)
19. Gyroscopes (MPU-6050)
20. Accelerometers (ADXL345)
21. Barometers (BMP180)
22. Compasses (HMC5883L)
23. Ambient light sensors (BH1750)
24. Laser sensors (VL53L0X)
Code Examples
Here are three code examples demonstrating how to use the 24 in 1 Sensors DIY Learning Kit in various contexts:
Example 1: Temperature and Humidity Monitoring using DS18B20 and DHT11
In this example, we'll use the DS18B20 temperature sensor and DHT11 humidity sensor to monitor environmental conditions.
Hardware Requirements:
DS18B20 temperature sensor
 DHT11 humidity sensor
 Arduino Board (e.g., Arduino Uno)
 Breadboard
 Jumper wires
Code:
```c++
#include <DHT.h>
#include <OneWire.h>
#define DHT_PIN 2
#define DS18B20_PIN 3
DHT dht(DHT_PIN, DHT11);
OneWire ds(DS18B20_PIN);
void setup() {
  Serial.begin(9600);
  dht.begin();
}
void loop() {
  float temperature = dht.readTemperature();
  float humidity = dht.readHumidity();
  float dsTemp = getDSTemperature();
Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" C");
Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.println(" %");
Serial.print("DS18B20 Temperature: ");
  Serial.print(dsTemp);
  Serial.println(" C");
delay(1000);
}
float getDSTemperature() {
  byte i;
  byte present = 0;
  byte type_s;
  byte data[12];
  byte addr[8];
if (!ds.search(addr)) {
    Serial.println("No more addresses.");
    ds.reset_search();
    return -1;
  }
Serial.print("ROM =");
  for (i = 0; i < 8; i++) {
    Serial.write(' ');
    Serial.print(addr[i], HEX);
  }
if (OneWire::crc8(addr, 7) != addr[7]) {
    Serial.println("CRC is not valid!");
    return -1;
  }
ds.reset();
  ds.select(addr);
ds.write(0x44, 1);        // start conversion, with parasite power on at the end
delay(750);               // maybe 750ms is enough, maybe not
ds.reset();
  ds.select(addr);
  ds.write(0xBE);         // Read Scratchpad
for (i = 0; i < 9; i++) {
    data[i] = ds.read();
  }
int16_t raw = (data[1] << 8) | data[0];
  float celsius = raw  0.0625;
  return celsius;
}
```
Example 2: Obstacle Detection using HC-SR04 Ultrasonic Sensor
In this example, we'll use the HC-SR04 ultrasonic sensor to detect obstacles and measure distances.
Hardware Requirements:
HC-SR04 ultrasonic sensor
 Arduino Board (e.g., Arduino Uno)
 Breadboard
 Jumper wires
Code:
```c++
const int trigPin = 2;
const int echoPin = 3;
void setup() {
  Serial.begin(9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}
void loop() {
  int duration, distance;
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
  distance = duration  0.034 / 2;
Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");
if (distance < 20) {
    Serial.println("Obstacle detected!");
  }
delay(500);
}
```
Example 3: Gesture Recognition using MPU-6050 Accelerometer and Gyroscope
In this example, we'll use the MPU-6050 accelerometer and gyroscope to recognize hand gestures.
Hardware Requirements:
MPU-6050 accelerometer and gyroscope module
 Arduino Board (e.g., Arduino Uno)
 Breadboard
 Jumper wires
Code:
```c++
#include <Wire.h>
const int MPU = 0x68;  // I2C address of MPU-6050
void setup() {
  Serial.begin(9600);
  Wire.begin();
  Wire.beginTransmission(MPU);
  Wire.write(0x6B);  // PWR_MGMT_1 register
  Wire.write(0x00);  // wake up MPU-6050
  Wire.endTransmission(true);
}
void loop() {
  int16_t Ax, Ay, Az, Gx, Gy, Gz;
Wire.beginTransmission(MPU);
  Wire.write(0x3B);  // starting register for Accel Readings
  Wire.endTransmission(false);
  Wire.requestFrom(MPU, 6, true); // request 6 bytes from MPU
Ax = Wire.read() << 8 | Wire.read();
  Ay = Wire.read() << 8 | Wire.read();
  Az = Wire.read() << 8 | Wire.read();
// Calculate pitch and roll angles
  float roll = atan(Ay / sqrt(Ax  Ax + Az  Az))  180 / PI;
  float pitch = atan(-Ax / sqrt(Ay  Ay + Az  Az))  180 / PI;
// Read Gyroscope data
  Wire.beginTransmission(MPU);
  Wire.write(0x43);  // starting register for Gyro Readings
  Wire.endTransmission(false);
  Wire.requestFrom(MPU, 6, true); // request 6 bytes from MPU
Gx = Wire.read() << 8 | Wire.read();
  Gy = Wire.read() << 8 | Wire.read();
  Gz = Wire.read() << 8 | Wire.read();
// Calculate yaw angle
  float yaw = atan2(Gy, Gx)  180 / PI;
// Gesture recognition logic
  if (roll > 30 && pitch < -30) {
    Serial.println("Right gesture detected!");
  } else if (roll < -30 && pitch > 30) {
    Serial.println("Left gesture detected!");
  } else {
    Serial.println("No gesture detected.");
  }
delay(100);
}
```
These examples demonstrate how to use various sensors from the 24 in 1 Sensors DIY Learning Kit in different IoT applications. The kit provides a comprehensive platform for exploring and developing innovative projects.