KfirMati
Posts: 3
Joined: Thu Dec 22, 2016 12:59 pm

Rpi for Visual light communication

Thu Dec 22, 2016 1:08 pm

Greetings all,

For my final project in EE I need to establish VLC using Rpi2.
The main purpose of the project is to receive streaming video from USB camera and transmit the data using external LEDs using OOK modulation.
Top goal is to achieve 10Mbps (rate of communication)

My questions is:

1. What is the best way to transfer data from the USB input into the external pins (to light up the LEDs)
2. Do we need communication protocol in order to do the above? if so- what is the most preferred?
3. Will the 10Mbps rate can be achieved without external IC, if not, could you please recommend?

Thank you so much.

drgeoff
Posts: 10832
Joined: Wed Jan 25, 2012 6:39 pm

Re: Rpi for Visual light communication

Thu Dec 22, 2016 7:15 pm

And if we answer those questions what is left for you to do?
Quis custodiet ipsos custodes?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Rpi for Visual light communication

Thu Dec 22, 2016 7:19 pm

KfirMati wrote: 2. Do we need communication protocol in order to do the above? if so- what is the most preferred?
The answer to that is always https://tools.ietf.org/html/rfc2549
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

drgeoff
Posts: 10832
Joined: Wed Jan 25, 2012 6:39 pm

Re: Rpi for Visual light communication

Thu Dec 22, 2016 8:20 pm

That RFC needs updating as one of the service levels is no longer available.
Quis custodiet ipsos custodes?

jbudd
Posts: 1446
Joined: Mon Dec 16, 2013 10:23 am

Re: Rpi for Visual light communication

Thu Dec 22, 2016 11:52 pm

What is the best way to transfer data from the USB input into the external pins (to light up the LEDs)
C.

KfirMati
Posts: 3
Joined: Thu Dec 22, 2016 12:59 pm

Re: Rpi for Visual light communication

Sun Dec 25, 2016 12:04 pm

drgeoff wrote:And if we answer those questions what is left for you to do?

First let me answer why now, we need to order all of the equipment until the end of the year as a project requirement, therefore time is indeed an essence.

Furthermore, I will have to establish VLC, working on long distance with high SNR, making true model of 2 cars communicating with the system and making a working prototype, believe me, we have enough things to do.

I would highly appreciate your assistance as my questions seem rather trivial to you and I do have enough code to write in the process (and so learn a lot).

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Rpi for Visual light communication

Sun Dec 25, 2016 12:11 pm

What part of we are NOT doing your work for you are you failing to grasp?

If I do it for you for free can you ask your Uni to give me your degree.

By all means find something where you've written some code that you're willing to publish on here that doesn't work and we'll try to help you debug it. But if you want code written from scratch that's going to cost $100/hour.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

KfirMati
Posts: 3
Joined: Thu Dec 22, 2016 12:59 pm

Re: Rpi for Visual light communication

Sun Dec 25, 2016 12:17 pm

DougieLawson wrote:
KfirMati wrote: 2. Do we need communication protocol in order to do the above? if so- what is the most preferred?
The answer to that is always https://tools.ietf.org/html/rfc2549

Thank you so much for your answer sir, however I believe I have might asked the wrong question or phrased it wrong.

We have a USB camera (might be the Rpi cam) connected, we would like to transfer the data directly to the output pins ( 0's and 1's), this is the light modulation via LED's, our receiver will transfer those bits and finally the second raspberry pi will stream the video to the screen.

Is there a way to send the data received from the camera directly to the output pins in the clock of our choice (hence, the frequency\"baud" rate)

jbudd
Posts: 1446
Joined: Mon Dec 16, 2013 10:23 am

Re: Rpi for Visual light communication

Sun Dec 25, 2016 1:25 pm

I guess you are going to need:
Some code to read data from the input into a FIFO buffer.
Some other code to read data from the buffer and push it out to the GPIO.
Perhaps a fast transistor to switch a higher power LED for your communication.

You could no doubt do it with a shell script or Python, but for speed use C.

You need to find out what kind of camera it is because the Pi camera is not the same as a USB webcam.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Rpi for Visual light communication

Sun Dec 25, 2016 1:35 pm

Have you read everything you can about LiFi?

You mention "direct". Sending data using light isn't going to be "direct". You can't just connect USB to LEDs and get a working link. You need encoding, modulation, filtering, error correction, some sort of messaging protocol (e.g. TCP)

Another option is use analogue composite video to modulate the carrier. Simpler and could work if you had really good SNR, but it sounds like your SNR will be pretty terrible in daylight between moving cars.

User avatar
karrika
Posts: 1125
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: Rpi for Visual light communication

Sun Dec 25, 2016 3:44 pm

Buying equipment for the final solution before creating the design sounds as a sure road to disaster.

The recent development of drones have already invested a lot of research in wireless communication and transmission of live video.

Perhaps studying that technology would give some perspective to your project.

Firewire used to have i.Link optical interfaces for transferring videos using light.

Return to “Beginners”