Arduino connection with a beam-break sensor

Hi I'm working on a project that needs to identify the amount of people in a room. I'm doing that by using 2 break-beam IR sensors. I bought a DIY kit in maplin to see if it works. It was cheap and it seems it does. However, now I don't know how to connect ir to the Arduino! The assemble sheet and the product site will have to come in the next post since this is my first question here!!! Sorry!!! Any suggestions for how to connect it to the arduino? I actually only need a high/low signal!


The product site

The assembly sheet


Try like I did in this project:-

Remember that a simple beam breaker can't deal with two people entering/leaving at the same time or someone half entering then changing their mind.

Ok... I should have said it in the first post... I'm an artist and electronics are not my super strong issue! Where you have the schematics for the arduino board, you're just connecting the 5v and the ground right? If so, 5v to + and ground to -? This in the arduino. In the IR board... do you think I can connect it to the buzzer + and - or should it be anywhere else?


The door I'm using is really narrow and it was selected exactly for that, so there's no way 2 people are passing at the same time through the beam! Thanks for the notice anyway!

I'm working on a project that needs to identify the amount of people in a room.

The amount of people? By weight? By volume? By headcount?

The project you have proposed is not as simple as you describe. As has been mentioned, you need to account for people passing on their way in and out (the narrow opening might be sufficient in this regard), someone breaking the beam, but then backing out (two sensors positioned a sufficient distance apart would be needed), and the difference between entering and leaving (again, two sensors a sufficient distance apart will tell you direction). You'll also need to account for the difference between a person entering and some other object entering, like a person pulling a suitcase. A person pushing a stroller might present a challenge, too.

However, if all you want to know is whether there is at least one person in the room, there are other ways to determine that. At least, if they are moving.

All that has been thought about and solved! I don’t really care about the absolute accuracy of the information on how many people pass the beam in and out… at least for now!
Now I really just need to connect the sensor to the Arduino and I don’t have a damn clue about it! Looking at the schematics is for me the same as trying to read chinese!
If possible tell me how to do it in a veeeeery basic/retard way… That I think I’ll get!

One part is the sender. It connects to +V and ground. The other side is the receiver - a switch. One side connects to a digital pin. The other side connects to ground. Read, in loop() when the switch is HIGH or LOW.

Great!! I got that! Now the question is... If the buzzer terminal or the LED are just a + and a -... what should go where? should I split the + in 2 (one to 5v and the other to gnd)? Else... the IR device I assembled uses a 9v battery... does it interfere anywhere in the process!? Sorry about all the questions... I'm working at the same time with the hardware and the sofware (pd) and it's being a hustle as I have a show comming up in 2 weeks!

If the buzzer terminal or the LED are just a + and a -... what should go where? should I split the + in 2 (one to 5v and the other to gnd)?

The + side goes to +V. The - side goes to ground.

the IR device I assembled uses a 9v battery

Is it powering the sender side?

both sides have 9v batteries! did you see images of the IR device?

Ok... so review before I screw up!

side one: transmitter _ 2 blue IR LED's powered with a 9v battery. side two: reciever _ 1 transparent IR LED, with a buzzer and a red LED that indicate when the beam is broke, powered with another 9v battery.

a) don't touch/modify side one! b) connect the receiver to the arduino.

How!? from the buzzer's - (or the red LED's -) to arduino's GND

what should go to digital pin to read? once the whole device is powered should anything connect to 5v?

Am I missing anything?

Doup... I'm such an electronics newb! Thanks guys!

If you haven't yet aquired parts yet, You might consider the below linked sensor. It's advantage is that it's a one piece sensor, you don't need a emitter at one side of the door opening and a detector at the other. It's super simple to wire up, three wires, ground, +5vdc power, and one wire to a digital input pin. Detects up to 20" away.


I have! And I'm so running out of time!... I've got my MA final show in 2 weeks! I'm dead!

I have! And I'm so running out of time!... I've got my MA final show in 2 weeks! I'm dead!

You need to scale back what you want to do to something realistic. Perhaps you should describe your MA project to see if something more realistic can be developed.

Her it goes! I'm finishing my MAFA. The final project is: In one room there is a projection of an output of a PD patch. The patch plays/stops random video and audio samples as people come in/out of the room. The more people in the room the more samples playing. Therefore, I need to trigger this action as people come in/out of the room. This is where the IR sensors come in and the Arduino talks to PD. I need 2 IR beam break to define if it is an entry or an exit. ... I think that's prety much it!

So I was looking for sensors that could do this. Found some elevator ones that would cost me 150£ for the whole set... which is basically out of the question! Kept searching and found some in maplin for 8£! Bought it! Assembled it! Even with my very short knowledge of electronics!... However, now I basically need to connect the sensor to the Arduino... and I don't know how! Any other idea is super very welcome!

I told you already! I posted images of the sensor and the factory site... All I know is already there!

here it goes again

Well guys... after this battle... it seems to be working! I was quite afraid to fry the arduino! Pure Data already recognizes the input signal! Thanks a lot and sorry if I was a pain!