Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Arduino LED communication

Loading...

Sign in or sign up now!
30,135
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 5, 2008

Two Arduino boards have an LED pointed at each other, and by using the LED as a photodiode are able to detect the other LED flashing.
To start with they both flash briefly and then look for another LED's flash, if they capture the tail of another flash they immediately flash again, which is detected by the other LED, which flashes again etc.
This leads to very fast backwards/forwards flashing, and at this point the two devices are synchronised and the second red LED lights up.

While synchronised, data can be transferred, by altering the length of the flash. Holding down the button on each arduino transmits a binary 1 instead of the normal 0, which lights up the LED on the other board.

While the software doesn't yet support longer streams of data, I plan to add this support so that small pieces of data could be sent from one to the other, with all sorts of uses, such as door locks/authentication/etc.

Source code is available at https://randomskk.net/u/code/arduino/LEDcomms.html
(remove the space between LED and comms! YouTube inserted it apparently).

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (randomskk)

  • Wow, that is very cool. Nicely done!

  • thanks!

  • that is so very awesome. Any chance there's a schematic, or do you need those fancy USB boards...whatever they are that you're using.

    can normal LEDs be used as photodiodes?

  • I use those USB boards, arduinos, as I had them handy at the time and was still playing with them. However, it can be done even with just an ATtiny13 or anything with GPIO pins, such as a PICAXE 08 or a PIC12F series.

    The basic idea is to connect BOTH pins of the LED to an IO port, then reverse bias the LED and check it after a fixed period of time, if it's bright then the LED will read 0 and if it's dark it'l read 1 - there's more info on how this works online.

  • Nice, I espcialy like the Cybertool in the BG :) do you have a project site for this? I'd love to look over the source and see more pics.

  • I don't have a project site for this one, as I started the site after making this, but I do plan to continue the idea and will probably post about the new implementation on my site, negativeacknowledge (google it). I've updated the video description to include a link to the source code.

see all

All Comments (23)

Sign In or Sign Up now to post a comment!
  • @Matheusdiodo

    Yeah, I was wondering the same. Here I am, just having bought a couple of photodiodes (IR though).

  • using a led as photodiod? omg i ddin't know that was possible :o

  • @randomskk Interesting. What's the reverse bias voltage? Have you found a voltage that gives optimal sensitivity? Any LEDs better than others? Sorry for the barrage of questions..

  • all you need to do now is make a translator....

  • arduino.cc open source FREE!!! Try it

  • Using simple LED as a Photodiode ?!? In Blocking direction or what?

  • very smart.

  • next you should do it with lasers :D

  • Nice! i can't get the source code, only a 404 error when i follow the lik. Is there any other way to get the source code? Thank you.

  • Nice! I can't get the source code. When i follow the link i get a 404 error. Is there any other way to get it? Thank you.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more