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.
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.
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.pdeAfter 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.
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
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.



what kind of bitrates do you think you could get out of it? maybe even bidirectional and full duplex?
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
Very interesting article. Thanks
"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
"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.
Congrats , good article.
Thanks, your website is very helpful
I would think of not much more than 44.736M bps..
this old stuff anyways nobody uses it anymore..
What's the speed of reaction with the phototransistor and laser? I think we could reach 56000 baud. :D
Everyone, who knows someth. about written essay would value your interesting theme. I do opine that the buy term paper service can utilize it for the custom research paper examples.
I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and got a lot from them. To me, you are doing the great work. Carry on this. work at home In the end, I would like to thank you for making such a nice website.
term paper
term papers
Thanks for the useful facts about this good post! It’s obvously that the paper writing service could propose the essay writing. Moreover, it’s a very good possibility to buy term papers and custom essays about this post.
Thanks so much for your superior outcome about this post. But to see the perfect writing service all students should know some information about essay buy.
I appreacite your ideas and would like to read some mroe good stuff keep it up! This is very nice one and gives in-depth information.
logo designs
Various spheres of life take lots of time and money, thus why must we expend free time for biography term paper creating? It would be smart to use some professional sociology essay service to order the research essay from, I opine.
It is perfect that we can receive the business loans moreover, it opens completely new opportunities.
Hello,
Excellent post, I really enjoy reading this article and best like about this photo transistor and an instrumentation amplifier. thanking you so much for sharing it.
Looks complicated, but powerfulcv service