Electronic Design
Optical Data Link Now Tolerates Ambient Fluorescent Lighting

Optical Data Link Now Tolerates Ambient Fluorescent Lighting

Twenty or so years ago, I built an optical link to transmit audio from an infrared LED to a large area photodiode receiver. The link needed no optics. It simply bounced radiation off the walls and ceiling. The link used the frequency modulation of a 50-kHz carrier for the audio signal and worked well, tolerating the 120-Hz modulation in ambient lighting from the incandescent and fluorescent bulbs of that era by operating the photodiode at zero bias with a 1-mH inductor across it to bypass low-frequency signals.

When I recently went to adapt the design to send data from an LED transmitter to a photodiode receiver, I found that the design will no longer tolerate the fluorescent lighting at work or the compact fluorescent lighting at home. Such lighting now incorporates active ballasts, which modulate workplace fluorescents in the tens of kilohertz range and compact fluorescents at around 110 kHz.

The approach I used to solve the problem optimizes the optical transmitter to send very narrow data pulses and optimizes the optical receiver to respond to narrow pulses while rejecting the lower frequencies that modern lamps emit. Test results show this method performs well between a barefoot LED and a large area photodiode over a 27-ft range at 9600 baud.

The method still requires no additional optics. The LED has a collimating lens molded into its structure that achieves a ±3° beam width. The photodiode has no lens at all. The receive aperture is the photodiode itself, which greatly simplifies receiver steering.

An energy-efficient link would use pulse interval modulation (PIM) or pulse position modulation (PPM), where each optical pulse is a “symbol” that carries multiple bits of information. Energy was not a major consideration in this design, so it sends a single bit per pulse and is therefore capable of a much higher data rate than the 9600 baud I chose.

The design works with data sources that return-to-zero (RZ) between bits as well as non-return-to-zero (NRZ). For RZ sources, the design uses a monostable multivibrator (or one-shot) to simply replace half-bit-wide data pulses with narrow pulses. If the data source uses the NRZ format, with no change between adjacent bits of the same value, the design must first reconstruct a clock signal to recreate an RZ waveform before generating the narrow pulses.

The data source for the design shown here is the TxD output pin of a conventional computer serial port. The transmitter thus must convert the standard RS-232 NRZ waveform to narrow RZ pulses for transmission. The receiver restores the original pulse width after detection of the narrow pulses.

The transmitter limits the RS-232 input signal to transistor-transistor level (TTL) logic levels using a pair of diodes (Fig. 1). The input signal’s falling edge triggers monostable U1a, which generates a 5-µs pulse. Monostable U1b and half of U2 constitute a free-running clock that operates at a baud rate switch selectable by determining which half of U2 is in the loop. The values shown yield clocks for 9600 and 57,600 baud operation, with suitable adjustment of the 100-kΩ potentiometers.

Continue on next page

The short pulse from monostable U1a resynchronizes the clocks to the input data at every falling edge of the input. The total result is a regenerated data clock (Fig. 2) of narrow, negative-going pulses from U1b-7 that occur at each bit time. An oscilloscope photo shows the actual RS-232 input and the LED output driver current (Fig. 3). Because U1a initiates the clock pulses after a short delay following the falling input edges, the resulting data clock (Fig. 4) pulses consistently occur just after the start of each input bit to enable reliable gating by the input data, as shown in another photo.

NOR gate U3d passes or gates these narrow regenerated data clock pulses to the LED driver. When the input data is in a high-voltage (“logic zero”) state, the clock pulses pass through U3d. When the input data is low (“logic one”), the gate blocks the clock pulses. Thus, the transmitter sends pulses on input “zeros” and no pulses on input “ones.” This choice results in no optical pulses occurring in the idle state when there is no data to send.

The gated pulses from U3d in turn activate the LED driver, which draws 1 A peak through the LED. This value is well above the LED’s 100-mA continuous rating, but the duty cycle is so low, it doesn’t create a problem. The high peak optical signal that results, however, compensates for the high receiver noise bandwidth that this narrow pulse scheme entails.

The driver calls for the use of a 2N3507 transistor because it provides a clean current waveform to the LED. Unfortunately, the 2N3507 is an obsolete part and may be difficult to obtain. The ZTX649 shown as an alternate is a distant second choice, but it produced the best results of the dozens of other transistors I tried.

The narrow pulses give the data link signals a frequency spectrum well above that of the interfering signals from active-ballast fluorescent lamps. This separation gives the receiver the opportunity to respond to the desired signals while discriminating against the interfering signals by ignoring everything below a large fraction of a megahertz (Fig. 5).

The primary receiver elements that discriminate against low frequencies are the transformer (T) between the Advanced Photonix PDB-C109 photodiode and the transimpedance preamplifier and the coupling capacitor between the preamplifier and the comparator. Both of these constitute high-pass filters. An additional benefit of the transformer is that it prevents the preamplifier from saturating even under the strongest background signals.

Dual power supplies apply a reverse bias potential to the photodiode to minimize its capacitance and thereby maximize its speed. The transimpedance preamplifier converts the photodiode’s current signal to a voltage that can trigger the comparator when a sufficiently strong optical pulse is incident on the photodiode. Note: The OPA657 operational amplifiers used in these two stages are very high-performance units in surface-mount packages that will require careful attention to layout, bypassing, grounding, and parasitic reactances.

Each narrow signal pulse from the comparator triggers monostables set to produce a pulse of the original bit width to reconstruct the signal. Note: The data sheets for the 9602 and MC14528 monostable multivibrators reverse the definitions of A and B inputs, but the two devices function the same way. They both trigger with a rising input to pins 4 and 12 when pins 5 and 11 are high, and they trigger on a falling input to pins 5 and 11 when pins 4 and 12 are low.

Continue on next page

As with the transmitter design, a switch selects the appropriate restored waveform for the baud rate. The transistor circuit following the switch converts the monostable’s logic output to a bipolar signal that resembles the RS-232 signal that originally drove the transmitter (Fig. 6). This bipolar signal is suitable to apply to the RxD input pin of a standard computer serial port.

I tested the design by linking the serial ports of two computers both running HyperTerminal (Fig. 7). Space limitations restricted the link distance to 27 ft, but the results using breadboards of the transmitter (Fig. 8) and receiver (Fig. 9), with the PIN photodiode receiver and comparator on the printed circuit board and the pulse width regenerator on the perforated board) showed sufficient link margin with this setup to achieve 38-ft operation.

The Pacific Silicon Sensor photodiode PS100-7-CER-PIN is more than twice as large but has lower capacitance and should achieve 60-ft range with no other circuit changes. Operation was nearly perfect at 9600 baud and more prone to errors at 57,600 baud.

A short video showing this link operating between two serial ports on the same computer. Special thanks go to my colleague Dan Harres for the excellent LED driver circuitry.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.