Stufin
Home Quick Cart Profile

DIY Automatic Sanitizer Dispenser Kit

Buy Now

IR Sensor Module

+ Operating Frequency38 kHz
+ Detection Range1-5 cm

Microcontroller

+ Arduino/ESP32 compatible

+ Flash Memory32 KB/4 MB
+ SRAM2 KB/520 KB

Peristaltic Pump

+ Flow Rate1-5 mL/min
+ Maximum Pressure10 psi

Sanitizer Container

+ Capacity500 mL
+ MaterialFood-grade plastic

Power Supply

+ USB-powered adapter (5V, 1A) or battery holder (4x AA batteries)

Assembly and Installation

The DIY Automatic Sanitizer Dispenser Kit comes with a detailed assembly guide and instructions for installing the components. Users can assemble the kit using the provided hardware and software resources.

Software and Programming

The kit includes a sample code and programming guide for the microcontroller, allowing users to customize the dispenser's behavior and adjust the dispensing volume according to their needs.

Certifications and Compliance

The DIY Automatic Sanitizer Dispenser Kit complies with relevant safety and regulatory standards, including CE, RoHS, and FCC certifications.

Warranty and Support

The kit comes with a limited warranty and dedicated customer support, providing users with assistance and resources for troubleshooting and optimization.

Pin Configuration

  • DIY Automatic Sanitizer Dispenser Kit Pinout Explanation
  • The DIY Automatic Sanitizer Dispenser Kit is an innovative IoT project that enables users to create a touchless sanitizer dispenser. The kit consists of various components, including sensors, microcontrollers, and actuators. To facilitate easy assembly and integration, this section will provide a detailed explanation of the pins on the kit's components and their connections.
  • Microcontroller (Arduino Board) Pins:
  • 1. VIN (5V): This pin provides a 5V power supply to the microcontroller. Connect the 5V output from the power source (such as a USB cable or a battery) to this pin.
  • 2. GND: This pin is the ground connection for the microcontroller. Connect the ground wire from the power source to this pin.
  • 3. D2: This digital pin is used to connect the infrared sensor module. Connect the VCC pin of the infrared sensor module to the 5V pin on the Arduino board, and connect the OUT pin of the infrared sensor module to this D2 pin.
  • 4. D3: This digital pin is used to connect the relay module. Connect the VCC pin of the relay module to the 5V pin on the Arduino board, and connect the IN pin of the relay module to this D3 pin.
  • 5. D13: This digital pin is used to connect the LED indicator. Connect the positive leg of the LED to this pin, and connect the negative leg to a GND pin on the Arduino board through a 220 resistor.
  • Infrared Sensor Module Pins:
  • 1. VCC: This pin provides a 5V power supply to the infrared sensor module. Connect this pin to the 5V pin on the Arduino board.
  • 2. GND: This pin is the ground connection for the infrared sensor module. Connect this pin to a GND pin on the Arduino board.
  • 3. OUT: This pin provides the output signal from the infrared sensor module. Connect this pin to the D2 pin on the Arduino board.
  • Relay Module Pins:
  • 1. VCC: This pin provides a 5V power supply to the relay module. Connect this pin to the 5V pin on the Arduino board.
  • 2. GND: This pin is the ground connection for the relay module. Connect this pin to a GND pin on the Arduino board.
  • 3. IN: This pin receives the control signal from the microcontroller to operate the relay. Connect this pin to the D3 pin on the Arduino board.
  • 4. NO (Normally Open): This pin is connected to the sanitizer dispenser pump. Connect the positive wire of the sanitizer dispenser pump to this pin.
  • 5. COM (Common): This pin is connected to the negative wire of the sanitizer dispenser pump. Connect the negative wire of the sanitizer dispenser pump to this pin.
  • Power Source (Battery or USB Cable) Pins:
  • 1. 5V: This pin provides a 5V power supply to the microcontroller. Connect this pin to the VIN pin on the Arduino board.
  • 2. GND: This pin is the ground connection for the power source. Connect this pin to the GND pin on the Arduino board.
  • Sanitizer Dispenser Pump Pins:
  • 1. Positive Wire: Connect this wire to the NO pin on the relay module.
  • 2. Negative Wire: Connect this wire to the COM pin on the relay module.
  • LED Indicator Pins:
  • 1. Positive Leg: Connect this leg to the D13 pin on the Arduino board.
  • 2. Negative Leg: Connect this leg to a GND pin on the Arduino board through a 220 resistor.
  • By following this pinout explanation and connection guide, you can successfully assemble and integrate the DIY Automatic Sanitizer Dispenser Kit components to create a functional touchless sanitizer dispenser.

Code Examples

DIY Automatic Sanitizer Dispenser Kit Documentation
Overview
The DIY Automatic Sanitizer Dispenser Kit is a innovative IoT component designed to promote good hygiene practices by providing a convenient and touchless way to dispense hand sanitizer. This kit includes a servo-controlled dispenser, an ultrasonic sensor, and a microcontroller (Arduino or compatible). The kit can be easily integrated into various applications, such as smart homes, public facilities, or commercial buildings.
Hardware Components
Servo motor (for dispenser control)
 Ultrasonic sensor (HC-SR04)
 Microcontroller (Arduino or compatible)
 Dispenser mechanism ( custom-designed or 3D printed)
 Power supply (5V, 1A)
Software Components
Arduino IDE (for programming the microcontroller)
 Servo library (for controlling the servo motor)
 Ultrasonic sensor library (for distance measurement)
Connecting the Hardware
1. Connect the servo motor to digital pin 9 of the microcontroller.
2. Connect the ultrasonic sensor (VCC to 5V, GND to GND, Trig to digital pin 2, Echo to digital pin 3) of the microcontroller.
3. Connect the power supply to the microcontroller and servo motor.
Code Examples
### Example 1: Basic Automatic Sanitizer Dispenser (Arduino Sketch)
```c++
#include <Servo.h>
#define TRIG_PIN 2
#define ECHO_PIN 3
#define SERVO_PIN 9
Servo dispenserServo;
void setup() {
  dispenserServo.attach(SERVO_PIN);
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
}
void loop() {
  int distance = measureDistance();
  if (distance < 10) { // adjust distance threshold as needed
    dispenserServo.write(0); // rotate dispenser to dispense sanitizer
    delay(500); // adjust delay time as needed
    dispenserServo.write(90); // rotate dispenser back to original position
  }
  delay(50);
}
int measureDistance() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);
  int duration = pulseIn(ECHO_PIN, HIGH);
  int distance = duration  0.034 / 2;
  return distance;
}
```
This example demonstrates a basic automatic sanitizer dispenser that uses the ultrasonic sensor to detect the user's hand and dispenses sanitizer when the hand is within a certain distance.
### Example 2: IoT-Enabled Automatic Sanitizer Dispenser with Wi-Fi Connectivity (Arduino Sketch)
```c++
#include <WiFi.h>
#include <Servo.h>
#define TRIG_PIN 2
#define ECHO_PIN 3
#define SERVO_PIN 9
#define WIFI_SSID "your_wifi_ssid"
#define WIFI_PASSWORD "your_wifi_password"
Servo dispenserServo;
WiFiClient wifiClient;
void setup() {
  dispenserServo.attach(SERVO_PIN);
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  Serial.println("Starting dispenser...");
}
void loop() {
  int distance = measureDistance();
  if (distance < 10) { // adjust distance threshold as needed
    dispenserServo.write(0); // rotate dispenser to dispense sanitizer
    delay(500); // adjust delay time as needed
    dispenserServo.write(90); // rotate dispenser back to original position
    sendNotification("Sanitizer dispensed!");
  }
  delay(50);
}
int measureDistance() {
  // same implementation as in Example 1
}
void sendNotification(String message) {
  // send notification to a cloud-based service or a mobile app
  // using HTTP or MQTT protocols
  // implementation not shown for brevity
}
```
This example demonstrates an IoT-enabled automatic sanitizer dispenser that uses Wi-Fi connectivity to send notifications to a cloud-based service or a mobile app when the sanitizer is dispensed.
Note: These examples are meant to provide a starting point for developers and may require modifications to suit specific use cases. Additionally, ensure compliance with relevant safety guidelines and regulations when integrating this kit into real-world applications.