Raspberry Pi Communication Via LASER

[Nick Touran] wanted to make two Raspberry Pi’s communicate wirelessly. There are lots of options, but [Nick] used a LASER and a photoresistor, along with Morse code. If you don’t find Morse code fancy enough, you could always refer to it as OOK (on/off keying). The circuit uses a common LASER module and an ordinary photoresistor that varies in resistance based on light. A resistor forms a voltage divider with the photoresistor and an external A/D reads the resulting voltage.

The circuit works, but we couldn’t help but notice a few items. Not all photoresistors are as sensitive to the same light wavelengths, so for the maximum range you’d want to pick a particular photoresistor.  While the analog to digital converter is certainly workable, we couldn’t help but wonder if you couldn’t set up the divider to use the inherent threshold of the Raspberry Pi’s input pins for a simpler circuit. Of course, if you used the same technique with an Arduino, you could use the built-in A/D converter, and the A/D converter is probably easier to get working.

The prototype only uses one Pi that talks to itself, but if you had two, they could talk to each other using this scheme. The software uses some previous code [Nick] wrote to generate the code and looks to be easy to work with and modify.

Communicating with light isn’t a new idea. Bell had the Photophone, and we’ve covered LASER communications before. And just yesterday we ran a post on LiFi, which attempts to replace WiFi with light.

28 thoughts on “Raspberry Pi Communication Via LASER

  1. I would have used an LED as the light detector, I think it would be perfect for this sort of project as LED’s can detect bright light quite well. LED’s are fast as we all know and because we ony need to read on/off I think it would be a better choice than a photoresistor which is quite a bit more reactive to background light sources.

  2. Al Williams – Since your probably using a RED laser pointer that means it’s running at 633nm. A better detector would be a simple solar cell as they peak around that light frequency. Not so good with video or data but slow Morse is no problem. If your trying to go higher than Forrest Mims has an idea using just LED’s on both ends (like Jack Laidlaw said) . Evidently a LED can handle data speeds too; http://makezine.com/projects/make-36-boards/how-to-use-leds-to-detect-light/

    1. Just to point out, I just wrote up the post. This is [Nick’s] project. It clearly works, but I also had thought a photodiode or LED. As usual there are lots of ways to skin a particular cat. A friend of mine recently used a solar cell to measure laser power through polarizing filters even though you usually do that with pyrometry, it seemed to work well enough.

    2. I’ve done that, and it isn’t that simple. Way I did was build an RD car that ran off the solar cells and a modulated laser pointer. I filtered everything in hardware as much as possible and then used it to drive a discreet logic computer. The result worked really well in a controlled environment, but the moment it saw outdoor light, all the red light in sunlight threw it off. So I recalibrated. Then someone took a flash picture. There was enough of a spike in voltage, even with filtering that it burned out my analog circuit.

      Later I did some tests and tried to filter out those impulses, but to do that really destroys the response time.

      I’d have to agree with the commenter who said to use a photo transistor. I’d add that you’d want to use a polarizing filter that has a very narrow range.

      1. euclid – These Amateur Radio enthusiasts at modulatedlight dot org have not just stopped in 1963. They are still ongoing. Yes NASA, DARPA, and USNAVY are making amazing innovations with LASERs. However, they are working in the free space of outer space. Terrestrial LASER enthusiasts have to deal with atmospherics, obstacles, and the curvature of the Earth (i.e. LOS). That’s why they have evolved to high-powered LEDs instead. The USN found a way to use LASERs underwater too.

        1. You would need two quite different wavelengths, as you dont have two differential wires. And they would have different propagation behavior. – NO.
          As in any freespace (radio) communication you cant do differential. Just use a good modulation schema.

      1. Actually that makes it more complex.
        If you serialized data into 8B10B or 64B68B encoding which are DC balanced. You should be able to take a low pass filter of the signal to get an average intensity and use that as for the threshold for a comparator with some hysteresis. Signals above it is a ‘1’ and below it is a ‘0’.

        The encoding are also have guaranteed transitions so that they can be reclocked with a PLL. BTW this is how optical communication in a nutshell.
        https://en.wikipedia.org/wiki/64b/66b_encoding

        1. You are right, but basically, when you go to really high data rates you have to keep some bias at the laser diode, just around the laser-threshold level. Although this makes it a little more complex, it makes it much faster. It takes some ns to bring up the laser oscillation above the threshold level. And it does not change the need for a modulation scheme, like you describe.
          But I think, that is for multi megabit rates, or if you want to pump serious data over optical fiber. The laser diode with integrated driver which I see here (probably out of some cheap laser pointer) is probably slow, the LDR is slow, so here we are many orders of magnitude away.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s