Detecting linelaser with photodiode and Arduino


I'm looking to experiment with a Valve Light lighthouse sort of setup. I've bought line lasers and pin photodiodes (BPW34) and get to successfully detect the laser line. The photodiode is in parallel with a 10K resistor; this seems to give the best results. I've tried with 100k, 18k and 1k for example. The photodiode is connected to an analog port of an Arduino with a reference voltage of 1.1v. The line laser is 5mW and connected to 3.3v. The line seems clear and visible at 5 meters.

The problem I'm facing is that the distance it detects the line is max ~ half a meter. The Valve lighthouse detects 10m easily. How do they get this phenomenal performance?

I think I could improve it with the following methods:

  • Using a comparator that compares the photodiode line with a low pass filtered line of the photodiode.
  • Implementing an amplifier using (for example an op amp or transistor).
  • Using an IR receiver instead. I have some lying around but I didn't get them to work with another laser, so I'm not sure about that.
  • Or using a different photodiode, that works from 700nm to 1100nm, like BPW 34 FS

Anyone has some ideas what would increase the distance best?

Best Answer

First, the Lighthouse puts out a lot more optical power. Instead of a puny little 5 mW laser, they apparently use a string of lasers, and you can easily get 10 times more power from that sort of setup.

Second, you seem to have missed the basic idea about emitters/receivers entirely. If your laser produces a visible line (and it seems to do so), why on earth would you try to detect it with an IR receiver? The BPW34 data sheet gives it a peak sensitivity at 950 nm, but it also works at visible wavelengths, but at lower sensitivity. You're using a visible laser, so I'd expect lower sensitivity from your setup than is possible with an IR emitter of the same power. And going to a BPW FS will only make matters worse, since the FS incorporates a visible-rejection filter, so it won't see your visible laser at all. This also explains why you could not detect other lasers with an IR receiver, although there are other issues such as modulation which you need to learn about.

What you do need is a narrow bandpass filter at your laser wavelength. You can find them on eBay. If you get something, keep in mind that, for it to be really effective, you'll have to make a light-tight housing for your diode so that only light which has gone through the filter hits the diode. You really need to do something like this anyways. Try this experiment. With the laser off, put a box over your PD and take a reading. Call this your zero point. Now take the box off and take another reading, and call this your ambient level. Finally, turn on your laser and take a third reading - call it your active level. If the ambient is significantly different from zero (and it will be) this represents a laser light level which is unmeasurable, since the laser is being masked by the ambient.

An amplifier is probably a good idea, but this is clearly going to be a learning experience for you.