I am currently working on a visible light communication project. I have seen similar projects made by other people, for example:
But they all have one thing in common, that is the system needs a continuous light source to operate. If the light source is moved away or a hand is blocking the light path, the photodiode on the receiving end cannot detect light and the communication stops. To come up with a solution, I want to send data in chunks so that even if the light source is moved away during transmission, the audio can still be played for another 10~15 seconds.
Below is a block diagram that illustrates my very rough idea:
- A headphone jack is connected to a smartphone to get the analog signal of the music
- Signal is amplified and converted to digital signal and sends to a microcontroller
- To send data in chunks, the data should be recorded and stored inside a buffer
- The mcu modulates the LED to send the data. I am using OOK modulation (so for example if a data value is 100, the binary representation is 01100100, then the LED goes OFF-ON-ON-OFF-OFF-ON-OFF-OFF)
- Sensor receives the data, data is amplified and stored inside a buffer of the receiving end's mcu
- Use a DAC and play the audio
So my question is: Is this the most straightforward way to achieve what I want? Am I going in the right direction and is there anything that can be improved? I know this question is very broad since I didn't specify the size of the audio, the sampling rate, the desired quality of the sound, the speed of transmission... list can go on. I am only aiming to send a 10~15 seconds audio file for now and the quality isn't the main goal as long as its recognizable.
Any suggestion and advice is appreciated!