Laser Modem with an Arduino Microcontroller

Submitted by esalazar on Mon, 08/11/2008 - 7:03pm.
Serial data transition from a Arduino controller using a standard red laser, photo transistor and an instrumentation amplifier.

This started when I ordered an IR led and phototransistor pair from Spark Fun along with some spare ATMega168 microcontrollers. I first experimented using the IR led to transmit 2400 baud serial to the phototransistor. I programmed my Arduino Diecimila with the sample serial program altering the baud rate and allowing it to run in a continuous loop.
diff ~/arduino-0011/examples/Communication/ASCIITable/ASCIITable.pde laserModem.pde
6c6
<   Serial.begin(9600);
---
>   Serial.begin(2400);
38,40c38,39
<     while(true) {
<       continue;
<     }
---
>     number = 0;
>      
45c44
<   delay(100); // allow some time for the Serial data to be sent
---
>   delay(10); // allow some time for the Serial data to be sent
After programing the Arduino, I took out the ATMega168 and wried it into a breadboard along with a 16mhz crystal and 5 volt regulator. For the receiver I used the phototransistor wired into two logic gates of a inverting Hex Schmitt trigger. I used the Schmitt trigger to act as a buffer and ensure only proper logic level enter the USB to serial converter on the Diecimila board. While the first test was successful, I was was not able to place the led more than an inch away from the phototransistor. To allow for more range I used an AD620AN instrumentation amplifier IC. For control I wired the gain pins of the amplifier into a small 10k potentiometer. After adjusting the gain I was able to get about a foot of range with reliable data transfer. Any further and there was too much noise in the signal.

At this moment I wondered if I could use a laser to extend my range. I happened to have a small laser that I pulled from a cheap laser level. I pulled out the laser and wired it where the IR led was minus the resistor. I then pointed the laser at the phototransistor and noticed it instantly reacted. In fact I had to turn the gain on the amplifier way down to use the signal. To test my range I wired my ATMega168 to a 9v battery and mounted the laster in a small vise a few feet away. After adjusting the gain I was able to transmit data easily. Attached is a video along with the final schematic I used.

View the Laser Modem Video Here


Submitted by Anonymous Coward on Mon, 08/18/2008 - 12:31am.

what kind of bitrates do you think you could get out of it? maybe even bidirectional and full duplex?

Submitted by navaburo on Sun, 11/16/2008 - 3:59am.

Well done Evan! Impressive data-rate (2.5kbits is my guess) for a hack (I use the term with the utmost respect!). .... Also, what does the binary number after each line in the transmission mean?

Take care,
Chris

Submitted by bilety lotnicze on Thu, 01/22/2009 - 3:44am.

Very interesting article. Thanks

Submitted by imprezy integracyjne on Sat, 02/07/2009 - 1:36am.

"This started when I ordered an IR led and phototransistor pair from Spark Fun along with some spare ATMega168 microcontrollers. I first experimented using the IR led to transmit 2400 baud serial to the phototransistor. I programmed my Arduino Diecimila with the sample serial program altering the baud rate and allowing it to run in a continuous loop."
Thanks for the information

Submitted by arduino blog on Fri, 03/06/2009 - 10:25pm.

"After programing the Arduino, I took out the ATMega168 and wried it into a breadboard"

That's an interesting twist to do it. never though about using the arduino to programm a sketch before moving the ATMega into a project. very hands on.

Submitted by dywan on Thu, 09/17/2009 - 12:59am.

Congrats , good article.

Submitted by odżywki on Sat, 09/26/2009 - 7:52am.

Thanks, your website is very helpful

Submitted by Tanie linie lotnicze on Fri, 11/20/2009 - 6:12am.

I would think of not much more than 44.736M bps..
this old stuff anyways nobody uses it anymore..

Submitted by ReCreate on Sun, 12/13/2009 - 9:12am.

What's the speed of reaction with the phototransistor and laser? I think we could reach 56000 baud. :D

Submitted by James on Thu, 03/18/2010 - 1:32pm.

Category bitrates do you think you can get out of it? even two-dimensional and full song? Directory Submission Classified Ad Submission

Submitted by best blu ray maker on Wed, 03/31/2010 - 10:14am.

very impressive.. however the problem with me is that my electronics knowledge is limited to the 8051 and 8052 micro controllers.. I have never used the Atmeg devices.. Can this be used with an 8052 controller ignoring the memory limitations?

-Faraz from blu ray copy software and blu ray ripper

Submitted by pxoxma on Fri, 04/30/2010 - 5:28am.

JiCQNc nhxexlmfhjpi, [url=http://vhbblmjmxani.com/]vhbblmjmxani[/url], [link=http://rzyzfeaffmva.com/]rzyzfeaffmva[/link], http://fbaoqhvrbffu.com/

Submitted by akqusbdxfth on Fri, 04/30/2010 - 6:32am.

W13Vhz yommwjldjoeb, [url=http://ayzknrmadvbn.com/]ayzknrmadvbn[/url], [link=http://bkdlpljinmkn.com/]bkdlpljinmkn[/link], http://yjzfauymuwtp.com/

Submitted by GillIsabel22 on Wed, 05/05/2010 - 1:12pm.

I'm assured that professional custom papers writing organizations compose the term paper of perfect quality to make their customers believe them. Furthermore it increases a number of constant customers.

Submitted by tubeforlong on Thu, 05/13/2010 - 1:01pm.
Submitted by red4ever on Thu, 05/13/2010 - 2:26pm.
Submitted by Meelbalgirl on Fri, 05/14/2010 - 4:09pm.
Submitted by daonia on Mon, 05/17/2010 - 9:57am.
Submitted by insanemantis on Mon, 05/17/2010 - 2:54pm.
Submitted by MattyllT on Mon, 05/17/2010 - 3:47pm.

cialis 3399 aciphex sib ambien dose ewn accutane wasj prednisone :[[[ valium rpqy aciphex 5291

Submitted by GiBeans on Fri, 05/21/2010 - 11:19am.
Submitted by engy4u on Fri, 05/21/2010 - 3:25pm.
Submitted by shhomay on Sun, 05/23/2010 - 9:36am.
Submitted by beansies on Sun, 05/23/2010 - 11:05am.
Submitted by darealemo on Sun, 05/23/2010 - 1:17pm.
Submitted by sparklystarZ on Mon, 05/24/2010 - 5:37pm.
Submitted by essay writing on Tue, 05/25/2010 - 4:49am.

Brilliant - thanks for sharing the story.

buy dissertation

Submitted by supersmushbro on Tue, 05/25/2010 - 5:34pm.