1
\$\begingroup\$

I am sending a data with On-Off keying over the air using an LED and receiving it with photodiode.

A figure below is a stream transmitted (blue) and a stream received (yellow). A symbol rate of this test is 2,000 Symbols/sec. It means, each duration of HIGH and LOW is a multiple of 0.5 ms, 500 us.

As I use the light as communication medium, interference from fluorescent light exists. And it is a sinusoid with a frequency of 120 Hz. And it appears in the figure as the upper and lower envelopes.

Therefore, I need to filter out that 120 Hz sinusoid from the received signal.

I have two choices:

  1. RC HPF with 120 << cutoff << 1 kHz
  2. (Passive or active) Twin T notch filter at 120 Hz

I used filter design and analysis tool to determine proper resistances and capacitances of each circuit.

  1. RC HPF with R = 51, C = 10u
  • enter image description here
  1. Twin T notch filter with R1 = R2 = 4.7k, R3 = 470, C1 = C2 = C3 = 1u

I think both are sufficient to have a gain nearly -10 dB at 120 Hz so that the interference can be reduced significantly. In addition, it shows nearly 0 dB gain when frequency is higher than 1 kHz.

But I wonder that how phase distorts the received signal significantly or not. With my knowledge, different phase over frequencies are related with group delay as below:


(source: williamson-labs.com)

But, I'm not sure about phase and group dealy since I have little knowlege about it.

In short:

  1. Which implementation would you recommend to reject f = 120 Hz and pass f > 1 kHz?
  2. Will phase do something serious to the received signal in filtering out f = 120 Hz?
\$\endgroup\$
8
  • \$\begingroup\$ What sort of laser are you using? Specifically, what wavelength? Are you trying for an omnidirectional receiver, or are receiver and transmitter fixed in position with a clear line of sight between them? \$\endgroup\$ – WhatRoughBeast Jul 31 '15 at 12:24
  • \$\begingroup\$ Not a laser. It is a white LED. Specifically, Blue LED + phosphor. Part number is W42182 from Seoul Semiconductor. For a receiver, Si PIN diode S6036 from Hamamatsu. \$\endgroup\$ – Jeon Jul 31 '15 at 12:26
  • 1
    \$\begingroup\$ The HPF will also work in 50Hz mains countries, the Twin-T won't work so well without re-tuning... \$\endgroup\$ – user_1818839 Jul 31 '15 at 13:26
  • \$\begingroup\$ To repeat, are you trying for an omnidirectional receiver or are receiver and transmitter fixed in position with a clear line of sight between them. And, just out of curiosity, do you have any requirement that the LED be a white one, and a colored LED won't do? \$\endgroup\$ – WhatRoughBeast Jul 31 '15 at 14:16
  • 1
    \$\begingroup\$ Configuration in the post has gain of -16 dB at 100 Hz and about -10 dB at 120 Hz. It does not reject such frequencies more than -20 dB, which is desirable and preferable... But I think it would help me to reduce 120 Hz interference sufficiently... \$\endgroup\$ – Jeon Jul 31 '15 at 16:45
1
\$\begingroup\$

2kbaud with constant on-off data is basically a sq wave with frequency of 1kHz and this is a little too close to 120Hz for my liking - what if the data you sent consisted of ten zeros followed by ten ones? - Answer - filtering would kill the data.

My advice is to either use Manchester encoding or transmit at a much higher rate so that the basic low frequency you get with consecutive 1's and 0's is still significantly higher in frequency than 120Hz.

Manchester encoding is probably your best bet: -

enter image description here

Having said all of that if you used a comparator on your received data, according to the scope picture you should still be able to detect decent data - imagine the top and bottom of the upper scope trace were clipped - you would be left with a small but perfectly formed square wave that you can turn into logic using a comparator: -

enter image description here

This is called a data slicer: -

enter image description here

Irrespective of the DC level on the received data (providing it is within the input common mode range of the op-amp/comparator), an averaged version of the data (due to R1 and C1) appears on the inverting input. This means that providing your data doesn't rise and fall too much with any underlying slow moving trend, you can perfectly turn this sort of signal into a logic data signal.

If you get the filter frequency just about right you can produce a voltage on the inverting input that is largely the 120 Hz plus any DC offset - this can improve the data slicer's ability to work with very small wanted signals superimposed on dc and ac waveforms.

In a way this is filtering as you prescribe but you filter off the data and just leave the main AC waveform and any dc on the inverting input.

Then there is going to a really hard high pass filter - in effect it largely removes any instance of 120 Hz but leaves your data differentiated and looking sorry for itself - however you get a positive spike for a rising edge and a negative spike for a falling edge - use a comparator with hysterisis and bingo, you get your data back.

Two methods I've used for recovering sorry-looking data!

\$\endgroup\$
9
  • 1
    \$\begingroup\$ Yes, I am already using Manchester coding in my application above. So the signal contains a 120 Hz component and a component with f > 1 kHz. But, thanks for your concern and answer. :) \$\endgroup\$ – Jeon Jul 31 '15 at 13:07
  • 1
    \$\begingroup\$ Or use modulation, like any RC# standard :-) (i.e 2kbaud modulated with 36kHz, allowing much wider filtering bands) \$\endgroup\$ – Asmyldof Jul 31 '15 at 13:12
  • \$\begingroup\$ And now re: the comparator: Of course that requires this test to have the minimum Lamps-to-Detector distance. I'm just bugging you now, aren't I? \$\endgroup\$ – Asmyldof Jul 31 '15 at 13:14
  • \$\begingroup\$ @Asmyldof I'm trying to prompt the OP to question his use a filter by taking him bit by bit towards a tracking data slicer so stop interrupting LOL! \$\endgroup\$ – Andy aka Jul 31 '15 at 14:23
  • \$\begingroup\$ Is there a good way to determine a threshold for a comparator? In both figures of mine and yours, zero voltage (which is a quick and easy threshold) line is far below the signal. And I'm not sure how large that DC offset would be in my next experiments. Would feeding a low pass filtered signal as a threshold do some help? \$\endgroup\$ – Jeon Jul 31 '15 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.