📘 COMPONENT DATASHEET TEMPLATE
*(Use this template to document any electronic component)*
---
## 1.COMPONENT NAME: BUZZER MODULE
**Type:** **OUTPUT**
---
## 📸 PHOTO

---
## 🧠 USEFUL INFO
A buzzer is a small device that makes sound when electricity is applied to it. You’ll find buzzers in all kinds of everyday electronics — things like alarms, timers, and devices that need to get your attention with a beep. There are two main kinds:
* Active buzzers, which only need power to make a sound
* Passive buzzers, which need a signal (like from a microcontroller) to create different tones.
**Purpose and What It Does**
The main purpose of a buzzer is simple: to make noise when something happens.
It converts electrical energy into sound, giving you an audible warning, alert, or confirmation.
**What It Can Detect, Measure, or Control**
A buzzer doesn’t detect or measure anything. It’s not a sensor, it’s an output device.
Its job is to tell you or signal something, such as:
* An alarm going off
* A button being pressed
* A timer finishing
* A system starting up or shutting down
Basically, if the circuit wants to get your attention, the buzzer is the thing that “speaks.”
**Strengths**
Low power and inexpensive. Makes clear audible alerts that work even when you can’t see lights or screens. Great for alarms, reminders, and feedback sounds.
**Limitations**
It can only make sound,no sensing or measuring abilities. Active buzzers usually produce only one fixed tone. The sound may not be loud enough in very noisy environments. Passive buzzers need extra control signals to make different tones.
---
## ⚙️ TECHNICAL INFO

- **Datasheet link:**
- https://www.scribd.com/document/73251181/Buzzer-Datasheet
## 💻 CODE EXAMPLE
This Arduino code demonstrates how to control a buzzer using simple tone commands. First, the buzzer is connected to digital pin 12, which is configured as an output in the setup() function. Inside the loop(), the code alternates between playing two different tones. It starts by generating a 2000 Hz sound for one second using the tone() function, then stops the sound with noTone() and waits another second. It then repeats the process using a 1000 Hz tone, again playing for one second and pausing for one second. This creates a repeating pattern of alternating beep pitches, showing how the buzzer can produce different audio signals based on frequency.
```cpp
const int buzzer = 12; //buzzer to arduino pin 9
void setup(){
pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output
}
void loop(){
tone(buzzer, 2000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
}
```
## 🔌 SCHEMATIC / DIAGRAMS

---
## 📝 NOTES & OBSERVATIONS
**Calibration notes**
* The buzzer does not require traditional calibration, but different frequencies were tested to find the clearest tones.
* 1000 Hz and 2000 Hz provided stable and easily audible results during testing.
* Environmental noise levels influenced tone selection; higher frequencies worked better in louder areas.
**Issues encountered**
* Some low-quality buzzers produced distortion or buzzing artifacts at higher frequencies.
* Loose breadboard connections caused intermittent or unstable sound output.
* On certain Arduino clones, noTone() responded slightly late, causing brief sound extensions.
**Safety considerations**
* Prolonged exposure to high-frequency tones may cause discomfort or ear strain.
* Keep testing sessions short when using loud tones to avoid hearing irritation.
**Recommendations for future use**
* Experiment with tone patterns or melodies for more expressive audio alerts.
* Consider using a passive buzzer for better control over sound range via PWM.
---
## 2.COMPONENT NAME: HC-SR04 Ultrasonic Distance Sensor
**Type:** **INPUT**
---
## 📸 PHOTO

---
## 🧠 USEFUL INFO
An ultrasonic sensor measures distance by using high frequency sound waves, sound that is too high for humans to hear. The sensor sends out a sound pulse, waits for it to bounce off an object, and then listens for the returning echo. By measuring how long the echo takes to return, the sensor calculates how far away the object is.
You’ll find ultrasonic sensors in many interactive systems, such as automatic doors, parking assistance, obstacle avoiding robots, and smart devices that need to detect movement or proximity.
**Purpose and What It Does**
The main purpose of an ultrasonic sensor is to detect how close or far an object is.
It turns sound reflections into distance data, giving your system the ability to sense objects without touching them.
**What It Can Detect, Measure, or Control**
While the sensor itself measures distance, it can also trigger other actions, such as:
* Turning on a buzzer when someone gets close
* Activating lights in a dark area
* Stopping a robot before collision
* Opening a smart door when a person approaches
* Counting objects passing through a space
So it allows your circuit to react to movement and presence in the environment.
**Strengths**
* Contact-free — detects objects without touching them
* Accurate short-range distance measurement
* Fast response time for real-time interaction
* Works with many microcontrollers including ESP32 and Arduino
**Limitations**
* Soft or sound-absorbing surfaces (cloth, foam, hair) may not reflect the echo
* Limited sensing angle (approx. 15º field of view)
* Requires stable 5V power for maximum accuracy
* Multiple ultrasonic sensors near each other can interfere with readings
---
## ⚙️ TECHNICAL INFO

- **Datasheet link:**
- https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/
## 💻 CODE EXAMPLE
This Arduino code demonstrates how to measure distance using the HC-SR04 ultrasonic sensor. First, the Trig pin is set as an output and the Echo pin as an input. In each loop cycle, the code sends a short trigger pulse through the Trig pin to start an ultrasonic burst. Then it waits for the Echo pin to detect the returning sound wave reflected from a nearby object.
By calculating how long the echo takes to return, the program converts that time into a distance value using the speed of sound. This distance is printed to the Serial Monitor so the user can see changes in real-time as objects move closer or farther away.
This code is a basic example that demonstrates how the ultrasonic sensor can detect objects and measure proximity, allowing devices to react to movement, for example by activating a buzzer, turning on a light, or stopping a robot before it hits something.
```cpp
// --- Pins ---
#define trigPin 15
#define echoPin 14
void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
// Trigger pulse to start ultrasonic burst
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Echo pulse reading
long duration = pulseIn(echoPin, HIGH);
// Distance calculation (cm)
long distance = duration * 0.034 / 2;
// Print distance
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay(100);
}
```
## 🔌 SCHEMATIC / DIAGRAMS

**Link:**
https://www.build-electronic-circuits.com/arduino-ultrasonic-sensor-hc-sr04/
---
## 📝 NOTES & OBSERVATIONS
**Calibration notes**
* No manual calibration required, but multiple distance thresholds were tested to find a stable reaction point.
* Measurements were most reliable between 5 cm and 150 cm.
* Very close objects (< 4 cm) sometimes caused unstable readings due to echo overlap.
**Issues encountered**
* Soft or fabric surfaces absorbed the pulse → returned 0 cm.
* Sensor required proper alignment; readings fluctuated when objects were outside its ~15° field of view.
* Long echo wires caused electrical noise on some readings.
**Safety considerations**
* The module operates with 5V input; caution needed when interfacing with 3.3V logic boards like ESP32.
* Avoid pointing the transmitter directly at ears from very close range for extended periods.
* Ensure stable mounting to prevent vibrations interfering with readings.
**Recommendations for future use**
* Combine with visual or audio alerts (LEDs or buzzer) for more intuitive human feedback.
* Apply software filtering (averaging multiple readings) to improve measurement stability.
* Consider waterproof or more advanced ultrasonic models for outdoor applications.
---
## 3.COMPONENT NAME: CD PLAYER
**Type:** **OUTPUT**
---
## 📸 PHOTO

---
## 🧠 USEFUL INFO
A CD-Player motor is a small DC motor originally used to spin discs inside CD/DVD players at controlled speeds.
When repurposed in electronics projects, it becomes a low-cost and lightweight motion feedback actuator.
The motor rotates when electricity flows through it. By controlling its power and direction using an H-Bridge, the system can:
* Start or stop rotation
* Change rotation direction
* Adjust speed through PWM signals
**Purpose and What It Does**
The main purpose of this motor in the project is to provide kinetic feedback, spinning when a user’s hand is detected and stopping when the user leaves. This creates a visible and physical reaction to human presence, enhancing the interactive experience.
**What It Can Detect, Measure, or Control**
The motor itself does not measure or sense anything.
It acts based on commands from the microcontroller, typically triggered by another sensor (ultrasonic in your system).
Common uses:
* Movement feedback in interactive installations
* Rotation for simple mechanical devices
* Sound or vibration effects using moving parts
* Spinning objects as a playful UI element
**Strengths**
* Very low cost + easy to replace
* Provides visible physical feedback
* Simple control using motor drivers (H-Bridge)
* Fast rotational response
**Limitations**
* No built-in speed/position feedback
* Overcurrent can easily damage USB power lines
* Requires external driver — cannot connect directly to microcontroller pins
---
## ⚙️ TECHNICAL INFO
| Feature | Value |
|----------------------------------------|--------------------------------|
| Motor Type | DC Brushed Motor |
| Voltage | 5v |
| Control | PWM via H-Bridge |
| Speed | ~2000–4000 rpm (unloaded) |
| Direction Control | H-Bridge polarity switching |
| Common Driver | L298N / L293D / CD-Tray H-Bridge |
## 💻 CODE EXAMPLE
This Arduino/ESP32 code demonstrates how to control the CD-motor using an H-Bridge driver.
When the ultrasonic sensor detects a hand, the motor spins; otherwise it stops.
```cpp
int M1_PIN = 8; // Motor direction pin
int E1_PIN = 10; // Motor speed control pin (PWM)
void setup() {
pinMode(M1_PIN, OUTPUT);
pinMode(E1_PIN, OUTPUT);
}
void loop() {
// Rotate in Direction 1
digitalWrite(M1_PIN, HIGH);
analogWrite(E1_PIN, 255); // Full speed (max PWM)
delay(2000); // Run for 2 seconds
// Stop the motor
analogWrite(E1_PIN, 0);
delay(1000); // Pause
// Rotate in Direction 2
digitalWrite(M1_PIN, LOW);
analogWrite(E1_PIN, 255);
delay(2000);
// Stop the motor again
analogWrite(E1_PIN, 0);
delay(2000);
}
```
---
## 📝 NOTES & OBSERVATIONS
**Calibration notes**
* Speed tuned using PWM (100–230 range for smooth rotation)
* Best interaction result when paired with 10 cm ultrasonic threshold
* Proper shaft alignment prevents wobbling
**Issues encountered**
* Motor stalled when driven directly from ESP32 (→ H-Bridge required)
* USB port shut down due to high current peaks
* Vibrations affected breadboard stability
**Safety considerations**
* Avoid touching spinning discs during rotation
* External PSU recommended for long-duration testing
* Secure mechanical mounting required to prevent jumping
**Recommendations for future use**
* Add encoders for speed or position feedback