BellBot: Your Talking Doorbell Companion

by BlackRoseMan in Circuits > Arduino

84 Views, 3 Favorites, 0 Comments

BellBot: Your Talking Doorbell Companion

WhatsApp Image 2024-11-23 at 21.25.20_043973a2.jpg

BellBot: A Fun and Interactive Doorbell Solution

Problem Statement:

Traditional doorbells serve a simple purpose but lack interactivity, personality, or meaningful feedback. They play the same repetitive tone, fail to address overuse or prank ringing, and don’t provide any creative way to communicate with visitors. These shortcomings often lead to frustration, especially when the button is misused.

Our Solution:

The BellBot is a next-generation doorbell designed to combine functionality with creativity, humor, and interactivity. Using an ISD1820 Voice Recorder Module, an Arduino board, and a buzzer, this system transforms the ordinary doorbell into an engaging, personalized communication tool.

Key Features:

  1. Customizable Messages: Record up to five unique phrases to suit your mood or situation—whether it’s a friendly welcome, a funny remark, or a stern "Stop pressing the button!"
  2. Interactive Experience: Each press of the button triggers a different message, making the BellBot entertaining and discouraging repetitive ringing.
  3. Immediate Feedback: A buzzer provides instant auditory confirmation, signaling that the doorbell has been activated.
  4. Personal Expression: Add creativity and personality to your doorbell, making your home entrance more welcoming, playful, or assertive.

Why It Stands Out:

The BellBot isn’t just a doorbell—it’s a creative solution that merges technology and design to solve everyday problems. It elevates an ordinary device into an innovative, enjoyable experience for both visitors and homeowners. This project demonstrates how simple electronics and coding can transform a mundane object into something practical and fun.

Demonstration Video: https://youtu.be/APuuvtKM8co (RECCOMENDED)

Silly Solutions: I’m Maanvardhan Sharma, a 15-year-old student at Lotus Valley International School, Noida, with a passion for science and STEM. I enjoy using technology to solve practical problems creatively. You can check out my LinkedIn for more information: https://www.linkedin.com/in/maanvardhan-sharma/

Supplies

WhatsApp Image 2024-11-23 at 21.28.04_6d1aa339.jpg
WhatsApp Image 2024-11-23 at 21.28.05_e9d8c608.jpg
OIP (2).jpeg
OIP (4).jpeg
OIP (3).jpeg
OIP (5).jpeg

Supplies:

  1. Arduino Board (e.g., Arduino Uno)
  2. The brain of your project! Used to control all the functions.
  3. ISD1820 Voice Recorder and Playback Module
  4. The module that records and plays back your pre-recorded phrases.
  5. Push Button (2-leg or 4-leg)
  6. The button that triggers the recording and playback when pressed.
  7. Buzzer
  8. Emits a sound when the button is pressed, signaling an interaction.
  9. Resistor (220Ω or 330Ω)
  10. For controlling the buzzer’s volume, so it doesn’t sound too loud.
  11. Jumper Wires
  12. For making all the necessary connections between your components.
  13. Breadboard (Optional)
  14. For easy prototyping and connecting your components without soldering.
  15. 5V Power Supply
  16. To power the Arduino and your circuit.
  17. Speaker (Optional)
  18. For a louder playback of your recorded phrases (if needed).
  19. External Storage (optional, if you need more recordings)
  20. If you plan to add additional recordings beyond the ISD1820's 5-slot limit.
  21. Arduino IDE and Computer
  22. For coding and uploading the program to your Arduino board.
  23. Small Enclosure/Box (Optional)
  24. To house the electronics and give your doorbell a finished look.

Wiring

WhatsApp Image 2024-11-23 at 21.28.05_e9d8c608.jpg
WhatsApp Image 2024-11-23 at 21.28.04_6d1aa339.jpg

Connections:



  1. Push Button:
  2. One leg to Digital Pin 2 + VCC and the other leg to GND. (Refer to picture)
  3. Buzzer:
  4. One side to Digital Pin 5 and the other side to GND, with a 220Ω or 330Ω resistor in between.

3. ISD1820 Module

  1. PL Pin (Play L) to Digital Pin 4.
  2. PE Pin (Play E) to Digital Pin 3.
  3. REC Pin to Digital Pin 6.
  4. VCC to 5V and GND to GND on Arduino.


Downloads

Writing the Code


Code:

const int playL_pin = 4; // PL pin of ISD1820
const int playE_pin = 3; // PE pin of ISD1820
const int rec_pin = 6; // REC pin of ISD1820
const int button_pin = 2; // Button to trigger recording/playback
const int buzzer_pin = 5; // Buzzer pin

unsigned long lastPressTime = 0; // Tracks the last button press
unsigned long lastDebounceTime = 0; // Tracks the debounce start time
unsigned long debounceDelay = 200; // Debounce duration (200ms)
unsigned long longPressDelay = 2000; // Long press duration (2 seconds)
unsigned long multiPressWindow = 2000; // Time window for multi-press (2 seconds)
int pressCount = 0; // Count the number of button presses

bool buttonState = HIGH; // Current button state
bool lastButtonState = HIGH; // Previous button state
bool longPressTriggered = false; // Tracks if a long press was triggered

void setup() {
pinMode(playL_pin, OUTPUT);
pinMode(playE_pin, OUTPUT);
pinMode(rec_pin, OUTPUT);
pinMode(button_pin, INPUT_PULLUP); // Button is active LOW
pinMode(buzzer_pin, OUTPUT); // Configure buzzer pin as output

digitalWrite(playL_pin, LOW); // Ensure playback is off
digitalWrite(playE_pin, LOW); // Ensure playback is off
digitalWrite(rec_pin, LOW); // Ensure recording is off
digitalWrite(buzzer_pin, LOW); // Ensure buzzer is off
}

void loop() {
unsigned long currentTime = millis();

// Read the button state
int reading = digitalRead(button_pin);

// Check if the button state has changed
if (reading != lastButtonState) {
lastDebounceTime = currentTime; // Reset the debounce timer
}

// Apply debounce logic
if ((currentTime - lastDebounceTime) > debounceDelay) {
if (reading != buttonState) {
buttonState = reading; // Update the button state

if (buttonState == LOW) { // Button pressed
pressCount++; // Increment the press count
lastPressTime = currentTime;

// Check for long press
if (!longPressTriggered && (currentTime - lastPressTime >= longPressDelay)) {
triggerSound();
longPressTriggered = true; // Avoid retriggering for long press
}
}
}
}

// Check for multiple presses within the multi-press window
if (buttonState == HIGH && !longPressTriggered && (currentTime - lastPressTime > multiPressWindow)) {
if (pressCount >= 2) {
triggerSound();
}
resetPressTracking();
}

// Update the last button state
lastButtonState = reading;
}

void triggerSound() {
beepBuzzer(); // Beep to indicate action
recordSound(); // Record sound
playSound(); // Play the recorded sound
}

void resetPressTracking() {
pressCount = 0; // Reset press count
longPressTriggered = false; // Reset long press state
}

void recordSound() {
digitalWrite(rec_pin, HIGH); // Start recording
delay(5000); // Record for 5 seconds
digitalWrite(rec_pin, LOW); // Stop recording
}

void playSound() {
digitalWrite(playE_pin, HIGH); // Start playback
delay(1000); // Play for 1 second
digitalWrite(playE_pin, LOW); // Stop playback
}

void beepBuzzer() {
digitalWrite(buzzer_pin, HIGH); // Turn on the buzzer
delay(100); // Beep duration (0.1 seconds)
digitalWrite(buzzer_pin, LOW); // Turn off the buzzer
}


Power

OIP (6).jpeg
OIP (7).jpeg


  1. Power the Arduino:
  2. Connect your Arduino to a power bank.
  3. Use a USB cable (Micro-USB or USB-C, depending on your Arduino model) to connect the power bank to the Arduino's USB port.
  4. Ensure Sufficient Power:
  5. Ensure the power bank has enough capacity to run the system for a reasonable amount of time. If using a 5V power bank, it should provide sufficient power for the Arduino and the ISD1820 module.
  6. Turn on the Power Bank:
  7. Switch on the power bank to power the entire system. The Arduino will start operating, and you can test the button, buzzer, and sound recording/playback functionality.


Downloads

Recording a Sound


Recording:

Recording is a straightforward process.

To record a sound that you want to play via the speaker, hold down the REC button to and speak into the mic on the module.

Testing and Adjustments

Now it’s time to test the system and make sure everything works as expected.

Testing:

  1. Button Press: Press the button and check if the buzzer beeps.
  2. Recording: Ensure the ISD1820 module starts recording when you press the button.
  3. Playback: After recording, verify that the ISD1820 plays back the recorded sound.
  4. Sound Quality: Adjust the resistor value if the buzzer is too loud or quiet.

Adjustments: (If needed)

  1. If the buzzer is too loud or quiet, try using a different resistor (e.g., 330Ω or 470Ω) to adjust the volume.
  2. If the sound playback is too short, adjust the delay in the playSound() function.
  3. Add more recordings to the ISD1820 if needed, following the module’s datasheet for instructions on switching between recordings.

Assembly

Choose the Box and Plan the Layout:

Select a sturdy box (cardboard or plastic) that is large enough to fit the Arduino, ISD1820 module, button, and buzzer or speaker. The box should allow easy access to the button and provide sufficient space for the other components. Measure and mark where you will cut the holes for the button and speaker. The button should be placed where it’s easily accessible, and the speaker or buzzer should be positioned for optimal sound projection.

Cut the Holes:

  1. Use a craft knife or jigsaw to cut a hole for the speaker. Ensure it’s snug so the speaker fits securely.
  2. A drill with a hole saw or a craft knife works well for making these cuts.
  3. Smooth any rough edges with a craft knife or sandpaper to ensure the components fit well and the box looks neat.

Mount the Components:

  1. Insert the button into its designated hole and secure it with a hot glue gun to ensure it stays in place while still being operational.
  2. Similarly, mount the buzzer or speaker in the hole and secure it with glue. Ensure that the speaker faces outward for better sound projection.
  3. Inside the box, arrange the Arduino and ISD1820 module securely using glue or double-sided tape. Make sure the wiring is tidy (I'm too lazy to do this) and that the components do not shift.

Downloads

Final Touches

Screenshot 2024-11-23 020655.png


  1. Close the Box:
  2. After all components are in place, close the box and secure the lid.
  3. If the box has an opening for the USB cable, make sure the cable is neatly routed through it.
  4. Test the System:
  5. Press the button to test the recording and playback functionality.
  6. Ensure the buzzer beeps when the button is pressed, and check the sound playback.
  7. Customization:
  8. You can further decorate or customize the box with paint or labels to make it look more aesthetically pleasing.