Introduction: Car Stop Alarm

Picture of Car Stop Alarm

This project is made for the purpose of knowing how far to pull into your garage so you don't pull in too far or not enough. I made this project because i have scratched the back of my car before from metal frames and what not connected to my garage door in result of not pulling in far enough. No matter what size garage. It could also be used for many other purposes as well as you will be able to recognize through out this tutorial and after finishing.

Step 1: Requirements

Picture of Requirements

You will need the following to complete this project

-Laser pointer




-Wood (for the box to hold it in)

-10K ohm resistor

-Alarm or buzzer

-Some sort of power source (if using computer to accomplish, just a usb will work)

Step 2: Circuit Set-up

Picture of Circuit Set-up

-With one wire connect one end to the 5v and the other to a negative terminal

-With one wire connect one end to Analog 0 and the other to any row

-Connect one end of the 10K ohm resistor above the previous wire on the same row on the other side to a negative terminal

-Connect one end of the photocell to the same row as the previous wire and resistor and the other two spaces to the left

-With one wire connect one end to a different positve terminal and the other end to the same row as the left leg of the photocell (that wire should be in the same row as itslef as well)

-With one wire connect one end to the ground (do the closest ground to the breadboard for more slack in wire) and the other to the same positive terminal directly next to it

-Connect the black wire of the buzzer or alarm in the same terminal as the previous into the same positive column and the red wire to analog 9

Step 3: Code

Picture of Code

You will have to adjust the numbers in this code to your specific room. You could get by with changing the number next to the line saying "if(ldrval>=900). Changing that number tells the arduino what number to use as a point to beep or set off alarm. You can find this by finding the number that comes up on the serial monitor when the action happens. For example, the number that comes up when a laser is pointed at it. That number should go in the spot where 900 is. Here is the code.

int rcvpin=A0;int buzzpin=9;
void setup() { pinMode(rcvpin,INPUT); pinMode(buzzpin,OUTPUT); buzz(200); buzz(200); buzz(200); delay(2000); Serial.begin(9600); }void loop() { int ldrval=analogRead(rcvpin); Serial.println(ldrval); if(ldrval>=900) { buzz(50); } } void buzz(unsigned char time) { analogWrite(buzzpin,170); delay(time); analogWrite(buzzpin,0); delay(time); }

Step 4: Finished Project

Picture of Finished Project

You can make whatever type of box or anything you want for this project but I'm just going to share mine in case someone wants to do what I did.

Step 5:


seamster (author)2016-05-23

This is a great idea!

You may want to change the title to reflect what the completed project is, though. Just a little tip! ;)