enter image description hereI would like to make a sensor that detects when my car is clear of a certain point. So, when backing in my car to my garage, I would have a beam and sensor. When the beam is broken, an LED light would turn on and then when the beam gets through, the light turns off and I know that the car will clear the garage door.

I am pretty sure I have to use either an Arduino or Raspberry Pi, but I'm completely new to home automation. There are a few other things I'd like to do but this is a good starter.

I don't know where to start.

  • 1
    I'd suggest adding a mirror, so you don't need wires at both sides of the garage. You don't even need an arduino. Laser, LDR or Phototrasistor, Transistor or Opamp, Potentiometer for fine-tuning triggerlevels, and an led. You could even just shine the laser on the photosensor of a cheap night-light.
    – Gerben
    Mar 25, 2015 at 15:25
  • @Gerben I love the night light idea. Mar 31, 2015 at 17:15
  • I agree with @Gerben but would recommend a reflector so the mounting angle is not critical. Having said all that I think you could do this more simply by using an ultrasonic range sensor.
    – SDsolar
    May 13, 2017 at 0:46
  • 1
    You could also use a mirror so all the wiring is as the same side or the door.
    – Gerben
    May 13, 2017 at 5:50

5 Answers 5


I would recommend using laser and LDR. This will be very efficient and will not cause any problem due to light or ultrasonic deflecting. It will be precise by mm if you do thing right way. I made a simple porject back in 2005 using laser, LDR and relay.

Here what you need to do.

Get a laser, any laser will work. www.ebay.com/itm/6mm-650nm-DC-5V-5mW-Mini-Laser-Dot-shaped-Diode-Module-WL-Red-Copper-Head-Tube-/291089398593?pt=LH_DefaultDomain_2&hash=item43c647bb41

Get a PhotoResgister www.ebay.com/itm/Reliable-Hot-New-20-PCS-Photoresistor-GL5528-LDR-Photo-Resistors-Light-Dependent-/161434780484?pt=LH_DefaultDomain_2&hash=item2596434344

Put ldr in the dark box and drill a hole in it so that no other light can enter 2mm diameter hole will work.

Connect the LRD to your board. Fire laser and change status of indicator led by the value of ldr.

Check this link for refrence www.instructables.com/id/Arduino-Laser-Tripwire/?ALLSTEPS


I am pretty sure that Arduino would be enough for this project since the proper computation should not be that complex. Arduino Uno seems to be the simplest to start, at the same time not being too big for your application domain. However, you could also consider some smaller Arduino model, there would not be any "computational power" problem probably.

You could use an Infrared Proximity Sensor to check whether a car is present or not, here is a link that could be useful for this: http://arduinomega.blogspot.it/2011/05/infrared-long-range-sensor-gift-of.html

In this way, the system would light ON one or more LED(s) whenever the measured distance turns out to be less than some threshold value that you decide (maybe using a test-driven approach), and then light it/them OFF once the distance returns over the fixed threshold.

Hope this will be helpful.

  • Yeah, but I'm just not sure that IR will give me the accuracy. Essentially, as soon as I'm clear of a certain point, I want to trigger an action. Mar 31, 2015 at 17:23
  • Looking at its characteristics, the sensor I linked to you above should be able to detect movement up to 150 cm far. So, it depends on how far from the car you plan your sensor to be in your project. However, consider that, even if IR sensors are not that accurate with respect to Ultrasonic sensors, for example, an object like a car would be easily detectable. As far as the responsiveness of the system is concerned, it depends on the frequency with which you perform your sensing. On the other hand, IR sensor are much more cheaper, and work well in closed/quite-dark places like a garage. Mar 31, 2015 at 17:43
  • I'll look into it. I'd be curious to see how wide the detection area is. When the car is parked, there's only 2-3 inches between the car and door, ideally. Thanks! Mar 31, 2015 at 17:54
  • You're welcome! Have a nice time working on your project! Mar 31, 2015 at 17:59

I cant make out from the picture if you have consider this thought. Install sensor at height so car tail breaks the beam. Also It might not be ideal solution if you have multiple car lets say one Range rover SUV and another hatchback. You might want to consider having multiple sensor from ground to around 4-5 feet.

  • Yep, that's exactly what I want to do. I back into a single-car garage, so essentially, as the car enters, the beam would be broken near the garage door. When the front of the car clears the door, the beam would pass and trigger the sensor. Mar 31, 2015 at 17:18

You want a light sensor like at http://rookieelectronics.com/light-sensor-using-arduino/ - the usual way is infrared (same as remote controls), so you can't see it. You might want to blink the light, to get a more accurate signal (i.e. turn the led on; test the brightness; turn it off; test the brightness; find the difference) in different light conditions.

Personally, I would probably use a http://www.dx.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696#.VRH9k3WjlIc Ultrasonic distance sensor - but there are lots of ways to accomplish this.

Not an Arduino answer, but.... a friend of mine put his car in the exact place it should be, then hung a tennis ball from the roof, at the right place so it just touches the windscreen. Now, when he pulls into the car, he moves forward until the tennis ball touches his windscreen, and he knows he's in exactly the right place.

  • Ultrasonic could work, but the smooth curved surface of a car might deflect the waves at shallow angles without reflecting them back to the sensor, causing a false negative. Mar 25, 2015 at 0:22
  • True. You'd have to think about where you put the ultrasonic. I would go for pointed at the license plate. Alternatively, if you place it pointing OUT from BELOW the license place, you could take it with you - LOL Mar 25, 2015 at 1:46
  • Yeah, I've tried the tennis ball trick already. Problem is kids play with the ball. Also, because I'm backing in and the garage is dark and I have tinted windows, It's not clear when I hit the tennis ball. Mar 31, 2015 at 17:20

I know some projects are just for the sake of the project alone but have you considered this no-tech solution?


  • Hah. I loved the idea of the ball being tied to the garage door. Great stuff. However, because I back in to a single car garage with very tight tolerances, I wanted something more accurate and unchanging. If one of the kids was playing with the tennis ball, then suddenly I'm out a few inches and the garage door may come down on the front of the car. Mar 31, 2015 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.