Electronics > Projects, Designs, and Technical Stuff

simple "LiFi" : transmitting audio signal with a LED

(1/1)

pwlps:
I'm tutoring electronics projects (applied physics&engineering students), this is a lot of fun and gives opportunities to test simple ideas.
This year among other projects I'm proposing a simple "LiFi" system to transmit an audio signal via optical link, using a LED or a laser diode.  The students only had a freshman electronic course and don't know much about complex modulation/demodulation schemes, PLL's etc. so it has to be simple. Here I'm proposing a simple PWM modulation, transmitted directly without any carrier. So the sensivity is limited but for short distances or using a laser diode it is enough. I'm posting this because I was stunned by the transmission quality of this simple circuit made solely from op-amps and comparators. I couldn't tell the difference between a direct and led-transmitted music :) The quality is probably largely due to the precision inherent to the sigma-delta modulator used to generate the PWM (NB. to be more precise, this is due to the "continuous sampling" of the sigma-delta modulator:  there is no quantization noise here, so that there won't be any distortion even if the PWM frequency is not significantly higher than the highest audio frequencies).

The schematics are below (as Yansi pointed out they look messy: these are not just diagrams to explain the principle but the schematics I actually used to generate the PCBs, therefore tons of decoupling capacitors etc. are obscuring the picture, I apologize for that). The transmitter consists of an asynchronous sigma-delta modulator (working at around 100kHz) : an LF356 as the error integrator, coupled to a LM311 comparator, feeding the LED. The frequency is set by the integrator time constant (C1,R7,R8) and the hysteresis ratio of the comparator (R1 and R2). R3 provides the modulator feedback. In the receiver the photodiode (D1: BPW34) current is detected by a transimpedance (IC1:AD817, gain given by R1; C1 added to limit the overshoot on the pulse edges), then we have a highpass (R2,C2), an amplifier (IC2:LM318, gain determined by R3,R4), a comparator to restore the original PWM signal  (IC3:LM319 but I did not find it in my Eagle library so drawn as a generic DIL14; here a small hysteresis is added with R6/R7 to avoid self-oscillations when no signal is detected) and finally a Sallen-Key lowpass (IC4).

I'm now thinking about a more elaborated version (for the smartest students, or for fun) still using a PWM but with a carrier modulation, so that frequency channels can be defined.  The transmitter would be a clocked version of the sigma-delta  (but still keeping a small hysteresis to provide carrier bursts that we can lock-in to in the receiver), this can be easily done adding an oscillator, a D-type flip-flop and an AND gate. However I have a problem finding components for the receiver. Here I need a PLL with linear phase comparator (to recover the carrier from an unfiltered baseband signal) and with a quadrature output to demodulate the signal.  The tone decoder LM567 has everything (a PLL with I-Q detector) but it seems to be limited to quite low frequencies.  I think I would need something working at 500kHz at least. At the same time it has to remain not too complex so I don't want to assemble my own I-Q demodulator and PLL from scratch, I would prefer to find an easy to use chip like the 567. Any ideas ?

Yansi:
If you are teaching electronics, at least please try making the schematic readable. This is just mess.

Zero999:
How about the CD4046 or the newer 74HC4046?

pwlps:

--- Quote from: Zero999 on March 22, 2019, 10:44:47 pm ---How about the CD4046 or the newer 74HC4046?

--- End quote ---


Yes, this was probably the first I looked at, but its phase comparators based on logic gates are not suitable for noisy signals (the purpose of the PLL here is to average out off-carrier noise like in a lock-in amplifier). It can also be configured with an external phase detector, this is indeed an option to consider if I don't find anything simpler.

In the meantime I did some tests and apparently the carrier modulation is not as simple as I thought: the modulation introduces a quantization error (because of integer number of carrier cycles in a PWM cycle) a part of which goes into the audio domain, it seems that to reduce this noise to an acceptable level a carrier frequency in the range of several MHz would be necessary and this is difficult with the sort of components I'm using (fast components would also require a careful PCB layout to avoid oscillations, moreover faster opamps and comparators exist only in CMS). Therefore I tried a simpler frequency-selective receiving scheme without using a carrier: simply replacing the LM319 comparator with a PLL for a synchronous detection at the PWM frequency. For this to work correctly I also made a small modification in the modulator to stabilize its frequency (an asynchronous sigma-delta exhibits a slight frequency pulling by the modulating signal, probably due to some asymmetries between the positive and negative parts of the PWM cycle): I replaced the hysteresis by an oscillator injecting an alternating current in the integrator, this makes a sort of "clock-disciplined asynchronous sigma-delta" in the sense that the frequency follows the clock but the PWM pulse edges are not related to that of the clock. 
For the moment I have tried a LM567 PLL for the detection, but apparently it is not very sensitive and generates some harmonics in the ouput signal, I wonder what kind of phase detectors are inside (no much info in the datasheet). 
So I will probably reconsider using the 4046 but with external phase detectors e.g. an inverter and a SPDT switch. Or even a true DBM if I find a cheap one working at such low frequencies.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod