IR Break Beam for Pulling in Garage

I'd like to create an IR break beam sensor to assist with knowing how far to pull into the garage. I was hoping someone could help me confirm a few things.

1.) For the sensors, I'm looking at something like the E3F-5DN1 (like this) as the 5m range should be plenty. The ...5DN1 is an NPN-NO. From my research, I think I want NPN, so I can use a higher voltage with the sensor than I have with the Arduino, but I'm not sure about the NO vs NC part. ...or maybe both would work depending on the code. But even then, I think NO makes more sense as I'm planning to have the beam shooting diagonally across the garage door opening.

2.) I'm using this tutorial as the basis for the project (Arduino | IR Breakbeam Sensors | Adafruit Learning System), except that I'll power the sensors with a separate 12V power source and replace the LED with a piezo buzzer. But otherwise, would the wiring and code listed here be appropriate?

3.) I obviously want a fairly loud sound. I was thinking about using a passive 3-wire buzzer (like this), but I don't know if that will be enough. Does active vs passive make a difference? Does the buzzer volume increase with voltage? Since I will already have a 12V power source, I could use a relay to control an active 12V buzzer.

Thanks!

I use a tennis ball hanging from the ceiling.


An Ultrasonic Sensor HC-SR04 on the ceiling point down would work nicely.

  1. Didn't dive into this as I noticed that one sensor is 2 wire and the other is 3. To me that means one is the IR LED and the other is the sensor. The NC and NO shouldn't matter too much and code will fix it also means you can set a threshold value for sensitivity.

  2. All looks good here, the buzzer you are thinking of getting has its own transistor or MOSFET so you may need to data sheet its max/ min voltage values.

  3. For the noise making part, active typically means it is able to play music (a range of notes) and takes a bit more control (software etc).
    A passive speaker, to me, is a single 'note' that gets louder with voltage/ current (as the voltage increases the note may change slightly due to physics I guess... also they have their own annoying tone behind the advertised note/frequency giving those types buzzers their distinguished buzz). The 3 pin one you have won't be the loudest but if you live in a quiet enough area you may be ok (passing cars are louder than you think) depending on where you locate them and that you put down your window.

NO is "normally open", that is only when a beam break is detected, the NPN transistor is switched on and the load is powered (low side). This is usually what you want and matches the behaviour of the sensor in the tutorial you've linked. Anyway, with the Arduino (and maybe a couple of resistors) you could use any of the switching options of that sensor.

A passive buzzer cannot be driven by a relay because it is not self oscillating and has to be driven at a certain frequency (say one or two kHz). Use the tone() function for this. If the buzzer uses more than 20mA , that is more than an arduino pin can supply, you could use an NPN transistor to drive it.

@LarryD

I use a tennis ball hanging from the ceiling.

I think my wife got to you. :grin:

But seriously, the advantage of this over other simpler systems is that no matter what the vehicle, the beeping will stop when the bumper has cleared the garage door. So it will work the same even if I swap vehicles with a family member.

The 3 pin one you have won't be the loudest but if you live in a quiet enough area you may be ok

I tried it out last night and my wife thinks it will be plenty loud. I was realizing that I need to find a compromise between loud enough and not so loud that it disturbs the family if someone comes home late at night.

Anyway, I appreciate the feedback. I'll give all this a try and report back.

Not necessarily true.
It's and LED not a LASER so the beam will be cone shaped and wide.
A wider car may break the beam sooner than a smaller car.

You raise an interesting point.

I was assuming that this beam-sensor pair was the same type that the safety sensor for the garage door used and that they were using some sort of lens to make it narrow. Are one of these two assumptions is not correct?

If so, does that mean I want some type of laser pair instead?

It looks like they have a lens but it might just be a round plastic cover. They give no information on the website.
You'll have to buy and try it.
The LASER types are expensive.

Why not use an actual garage door beam-sensor and be sure?

An Ultrasonic Sensor HC-SR04 on the ceiling point down would work nicely.

I'd have thought that the fact that the beam may spread is irrelevant. A break will be detected if there is no direct light path between the transmitter and the receiver. OK. You have to be careful that some reflection of the IR beam does not give the false appearance of the beam being unbroken, but a shroud over the receiver and transmitter, in so far as such does not already exist, should be enough.

You'll have to buy and try it.

I agree, especially since it's less than $10. Hoping @6v6gt is correct with his hypothesis about the beam.

@EmilyJane That would have been great, but it's seems very hard to find specs on these (this is an old post, but probably still true: Garage door safety sensors). Also,I'm assuming I would need a 3-wire since the sensors probably need more voltage then the MCU is capable of.

@LarryD My goal is to know when the end of the vehicle has cleared the plane of the garage door. I'm having trouble understanding how a distance sensor would do that?

It may be more work than you want to do, but the typical sensor system is a two-wire system. Pretty cool actually. The transmitter and the receiver are wired in parallel. The controller supplies power through the two-wire system, around 6.3VAC. When the 38KHz transmitter LED signal is interrupted by something, the receiver temporarily shorts out the power supply which is sensed by the controller.

I was assuming it is a two part device with separate transmitter and receiver unit. From the picture, it does appear to be composed of two separate parts. If that is not the case, the issue of beam spread could become more relevant but I can't say if this would have a big impact in this application.

When a beam break sensor uses a mirror to reflect the IR, the spread of the IR beam is ignored and only the center-on part will be returned to the receiver part.

Dog tested and dog approved.

As to beam break and garage? I would likely just run with a garage door safety sensor which are common off the shelf and inexpensive.

Ron

My neighbor has a small LED laser device he bought at a local auto shop, mounted on the ceiling of his garage. He bought it after his wife put the garage door down on the trunk of the car... minor scratches only, but she had gone inside so the door was open all night; raccoons found the garbage. Yuck.

It points downwards. When the dot appears on his dash, he's in the right spot. Simple. Doesn't get in the way. But yes, it's auto-specific.

Buy two
:+1:


Install two tennis balls.
5 autos five balls.
:thinking:


We have a small target mark on the inside of the windshield we match up to the hanging ball.

Can park within 1 inch left/right, forward/back.