A laser barrier with Arduino
In this post we will see how to make a laser barrier to integrate with an Arduino board.
The applications of a light barrier (laser and infrared) are numerous, especially whenever we want that the passage of a person or of an object through a threshold triggers a certain event. This event may be, for example, a count if what we need is to count the number of objects that cross a threshold (on a conveyor belt for istance). Another example would be taking a photo at the precise moment an animal crosses the space delimited by the laser (photo hunting). Or again, it is the activation of an audible and / or visual alarm to protect a specific area that you want to control access.
If you place two or more laser barriers in sequence you can measure the elapsed time between the two thresholds, and then measure in some way the speed of an object or a person.
Browsing around the net i wanted to find a starting point from which to begin. So i found an article written by M.Ribble www.glacialwanderer.com/hobbyrobotics. In this article a laser barrier for photo hunting is presented.
Since my needs are different and i want to especially develop something which is the more general possible, i make some changes to the laser barrier discussed in that article. In fact, i need to split the circuit in two separate parts: an emitter (the LED laser) and a receiver (photoresistor). These two modules will be connected to the Arduino board and managed separately. Making two separate modules, independent of each other, expands the application possibilities. So we can include them in any project and mount on any infrastructure, adapting them to different situations each time.
Fig.1 shows the circuit diagram of the two modules.
First, the following is a list of all the necessary shown to make our barrier laser in Fig.2
- A) a stripboard
- B) a photoresistor
- C) a red laser LED
- D) a 2-channel screw terminal
- E) a 100Ω resistor
- F) a 10kΩ resistor
- G) a 220Ω resistor
- H) a male bent connectors strip
- I) an electric wire
While the rest of the material is easily purchased at any electronics store, as regards the laser led, I found this product on the Sparkfun site:
Maker: Wenta Electronics co., LTD, China
Wavelength: 650nm (645-660nm)
Output power: 0.45 to 0.80mW
Input power source: 3.1V+/-10%
Consumption current: 35mA (max 40mA)
Laser spot: circle
Laser life: 3000 hours
In Fig. 3 the receiver board is shown. You can notice that I bent the photoresistor so that it laterally faces toward the opposite side with respect to the three pins.
For more detail: A laser barrier with Arduino
This Post / Project can also be found using search terms:
- light barrier arduini
- arduino light barrier
- arduino project barrier
- barrier arduino