[Urgent] Using LED as sensor and Photodiode as receiver

Hallo Everyone, I'm having a final year project about using LED as sensor and photodiode as receiver. That means a Visble Light Communication system.
I have built a prototype of my project, however there's so many error and failed.

I really need you guys' help. Please.

The aim of the project is making a VLC system transmitting signal using light. That means Tx side produces transmitting light signal and the receiving part receiving the signal from Tx 1010110etc, and transfer it to words through ASCII.

Can you guys have any sources or ideas for this one?
Can I have the circuit diagrams and Arduino Codes from you guys...?

Please guys.... I really need help and it's quite Urgent.......

What have you tried already? LEDs and photodiodes aren't exactly rocket science anymore.

  • What distance has to be bridged?
  • What is your light source?
  • What photodiode do you use?
  • What are the outcomes of your prototypes?
  • Have you measured all input and output voltages?

One big tip is: start small. Don't go right to the LEDs and photodiodes, just connect a wire from TX to RX and see if it works. If that's working, move on.

Have a look at this Instructable.

Does it have to be visible light? Might be susceptible to ambient light and IR as in the Instructable might be better.

Hi,
Welcome to the forum.

Hallo Everyone, I'm having a final year project about using LED as sensor and photodiode as receiver. That means a Visble Light Communication system.

Don't you mean the LED is the transmitter and the photodiode is the receiver?

Tom... :slight_smile:

I'd suggest looking at www.firecomms.com for a simple circuit using Tx & RX modules which use plastic optical fibre (POF) to join the two.

The modules give you excellent coupling so you'll be able to send data over hundreds of metres, and are designed to fit standard cables that simply push in and can be locked in place.

You would need to mount the devices on PCBs or stripboard. They will take 5V logic signals, and they also have DC / baseband components.

I used to work there, so I know.

(Don't have any shares etc though!)

They MIGHT send you a sample!

Before that, check out a simple TX - RX connection, as TrevorT suggested.

Cheers

Jim

i’m using two Arduino UNO Boards, mono Red LED and photodiode.
The range between them is unlimited. 1cm is also okay.

Here’s OP’s pic:

4c1444d251fa87748bf500f78f8ac0c44b1d9b3c.jpg

You’ll make your life way easier if you bend the wires and keep the boards flat.

Thanks for you guys' help,
I'm posting my program Arduino code and my circuit diagram.

Please wait for me Sir !!
Thank you guys

Regards,
Timothy

Have you tried the Instructable I posted in #2?


Here's my Tx side, It is a LED.

The right side one is the photodiode .

The left side is just a signaling LED (which means when the right photodiode receives light, the Left LED will flash once for showing "signal received")

And Here's my Arduino Code.
Transmitter Side:

Receiver Side:

The Problem happened is like.
For the Receiving serial screen. It recieve 101010101010 cycle correctly and perfectly. However, for every 58~52cycles, one distortion has occured and repeating the cycle correctly again.

50Hz :

100Hz :

A 100 milliseconds delay is not half a second.

As this problem has happened, the Higher the frequency, the more freqent of the distortion occurs.

As there is distortion occurs, I cannot input ASCII and transfer it into words....

The delays in the two parts of your badly posted code don't match.
Why is there even a delay in the receiver?

OH sorry sorry sir. I choose the wrong photo.
I have used the correct pic right now.

The Delay time of them are the same.

So, post the actual code.

ardy_guy:
Have a look at this Instructable.

Does it have to be visible light? Might be susceptible to ambient light and IR as in the Instructable might be better.

Sir, I have read about this one.
However it only shows if the receiver can receive the light "success or not" in that case...

For a supposedly "urgent" problem, you've got a very laid-back attitude to your five minute per post limit.

Groove:
So, post the actual code.

Yes. I have editted the post. Sorry for that mistake sir.

Replying: Mr Ardy_guy.

Yes, It must be using visible LED. Such as Mono colour light. I choose Mono Red Light LED.

Groove:
For a supposedly “urgent” problem, you’ve got a very laid-back attitude to your five minute per post limit.

…SORRY Sir. Just now I have gone to shower …

The deadline is on 4/10.

The message has the following error or errors that must be corrected before continuing:
You have exceeded the number of posts you can make in a 5 minutes period. Please try again later.
<----- Is it fixed for 5 minutes?

Your receiver code is bound to slip by 100us per cycle because you're doing an analogRead.

UARTs don't work like this - they typically sample at sixteen times the transmission rate, looking for the start of the start bit, waiting eight cycles , then sampling the centre of the start bit.
If the start bit is still valid, wait sixteen cycles, sample the nominal centre of each of the data bits, and shift into your variable.
You will have to compensate for the dead time of each analogRead, or you may miss the later data bits.

Please, don't post pictures of your code, post the actual code.