Site icon Circuit Ideas for You

Arduino Based Motion Dog Barking Alarm Circuit

This Arduino Based Motion Dog Barking Alarm Circuit make dog sound when motion detects, it uses Arduino Nano, Pir sensor, Dog Sound Module, BC547 transistor, IC LM386 Amplifier Module and 8Ω Speaker.

When Pir senses human or animal move, then Arduino play dog bark sound to scare intruder, also this is simple and low cost security system.

Arduino Code:

int pirPin = 2;    // PIR sensor connected to D2
int trigPin = 3;   // BC547 base connected from D3

void setup() {
  pinMode(pirPin, INPUT);
  pinMode(trigPin, OUTPUT);
  digitalWrite(trigPin, LOW);
}

void loop() {
  int motion = digitalRead(pirPin);
  
  if (motion == HIGH) {
    digitalWrite(trigPin, HIGH);   // trigger transistor ON
    delay(5000);                   // play sound for 5 sec
    digitalWrite(trigPin, LOW);    // stop sound
  } 
  else {
    digitalWrite(trigPin, LOW);    // keep off when no motion
  }
}

Code Explanation:

Circuit Working:

Arduino Based Motion Dog Barking Alarm Circuit Diagram

Parts List:

ComponentsValuesQuantity
Resistors10k 1/4 watt1
SemiconductorsArduino Nano1
PIR Motion Sensor1
Dog Barking Sound Module1
IC LM386 Amplifier Module1
Speaker 8Ω from 0.25W to 2W1

Pir sensor watches the area and when someone moves then Pir sensor output goes high.

Then Arduino read this from D2 and Arduino then send high signal from D3 to Q1 BC547 transistor base; after that BC547 switches ON and connects dog sound module to play pin to ground.

Now dog sound module play dog bark sound and then sound goes to LM386 amplifier module and LM386 amplify sound and sends to speaker.

Further, speaker make loud bark noise and sfter some time sound stops and circuit waits again.

Furthermore, a USB connection or the 5V pin powers the Arduino.

Formulas and Calculations:

Following are the basic formula for Motion Dog Barking Alarm Circuit:

output power approx = (V^2) / (2 * Rload)

for 5V and 8ohm speaker power = (25)/(16) = 1.56W max theoretical

delay time in code = delay(ms) value

example:

P = (5^2)/(2*8) = 25/16 = 1.56 watt approx

How to Build:

To build a Arduino Based Motion Dog Barking Alarm Circuit follow the below steps for connections:

Conclusion:

Overall, the Arduino-Based Motion Dog Barking Alarm Circuit scares thieves by playing a fake dog bark, also, this project provides a simple and low-cost security alarm solution.

Moreover, we can place the circuit at a door or in a garden and beginners can easily build it.

Exit mobile version