Arduino ALARM STROBE With Sound using Nano

Hello world! I had a broken alarm strobe bought in china and i thought today i am going to fix it with a Arduino Nano and make a Arduino ALARM STROBE, Now it also has sound. I removed the original PCB because some copper parts fell off, so i made my own PCB for the leds with a prototype PCB Board. Wanna build it yourself?
I did not use resistors but you should use some resistors on the leds.

On the bottom of the Arduino ALARM STROBE enclosure i placed 2 wires for GND & VIN. I connected the Red wire to VIN & the Black to GND on the arduino Nano, and connected a 12v Adapter.

It does not make allot of sound, but i want to use it for intruder detection and add a PIR sensor to it so this small alarm triggers and i know something is moving in front of my door.

Schematic:
Arduino ALARM STROBE

Parts list:
Arduino Nano.
6 Leds. (Short pin on led is ground.)
PCB ProtoType Board (I used 5×7 cm)
Jumper wires set MM/FF/MF
6 Resistors (Value is up to you, I did not use them!)
Buzzer.
Breadboard (optional)
alarm strobe enclosure, (I used a broken one you can buy it here) very cheap!
9 Volt to 12 Volt Adapter.

Good luck! You Can change Tones in the code! And program your Arduino ALARM STROBE!

Code:

int buzPin = 9;
int timer = 20;           // The higher the number, the slower the timing.
int tones[] = {261, 277, 293, 311, 329, 349, 369, 392, 415, 440, 466, 493, 523 ,554};
//              1    2    3    4    5    6    7    8    9    10   11   12   13   14
// You can add more tones but i added 14. Just fill in what tone you would like to use, @ void loop you see " tone(Buzzer, tones[12]); " below,  digitalWrite(Buzzer, HIGH);
// here you can change the tones by filling in a number between 1 and 14
void setup() {
  // use a for loop to initialize each pin as an output:
  for (int thisPin = 2; thisPin < 8; thisPin++)  {
    pinMode(thisPin, OUTPUT);   
    pinMode(buzPin, OUTPUT);   
  }
}

void loop() {
  // loop from the lowest pin to the highest:
  for (int thisPin = 2; thisPin < 8; thisPin++) { 
    // turn the pin on:
    digitalWrite(thisPin, HIGH); 
    digitalWrite(buzPin, HIGH);  
    tone(buzPin, tones[2]);
    delay(30);                  
    // turn the pin off:
    digitalWrite(thisPin, LOW); 
    digitalWrite(buzPin, LOW);   
    noTone(buzPin);
    delay(30);
  }

  // loop from the highest pin to the lowest:
  for (int thisPin = 7; thisPin >= 2; thisPin--) { 
    // turn the pin on:
    digitalWrite(thisPin, HIGH);
    digitalWrite(buzPin, HIGH);
    tone(buzPin, tones[7]);
    delay(30);
    // turn the pin off:
    digitalWrite(thisPin, LOW);
    digitalWrite(buzPin, LOW);
    noTone(buzPin);
    delay(30);
  }
}
Danny van den Brande

http://www.arduinosensors.nl

Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *