71M651x Energy Meter IC: Using IR Diodes and Phototransistors
71M651x Energy Meter IC: Using IR Diodes and Phototransistors
Energy Meter IC
A Maxim Integrated Products Brand
APPLICATION NOTE
AN_651X_008 SEPTEMBER 2005
+3.3V +3.3V
+
R1
Signal 10k
Generator
Vout
R1 Vout
10k
GND GND
Figure 1: Basic Optical Circuits: Transmitter (left), non-inverting receiver (center), inverting receiver
(right)
1
AN_651X_008 Using the Optical Port
With the IR light off, the transistor will be in the off state and it will provide only its residual current, consisting of
leakage current and the current caused by the background radiation. If R1 is connected to the emitter, this re-
sidual current will lift the output voltage Vout slightly above zero Volts. The lower R1 is chosen, the lower the “logic”
output level will be. Once the transistor is irradiated with IR light, it transitions to its on state, pulling the output
voltage up. The OP408SL easily generates between 7 and 20mA when saturated. That way, the transition of the
output signal from low to high is usually very fast. In the opposite direction, the resistor R1 has to remove the
charges from the saturated transistor and overcome charges in parasitic capacitors. This usually causes the
transition from high to low to be much slower.
When R1 is connected to the collector, the transistor has to “work” to get the output voltage close to zero. How-
ever, this circuit has the advantage that no signal inversion occurs.
In bench tests it was possible to bridge more than 2” with the circuit from Figure 1, when the IR diode was driven
with a peak amplitude of only 0.6V. It should be noted that the OP233W device used for this test has a wide
irradiance pattern. This means, larger distances will be possible with devices such as the OP233 that bundle the
emitted light.
The “base” of the photo-transistor is brought out as a pin for some transistor models. In the test circuits, the base
pin was left unconnected. It may as well be cut off to limit interference from electromagnetic fields. One potential
application for the base is when background radiation has to be suppressed. This can be done by tying the base
with a high-ohmic resistor (1MΩ) to the collector.
For practical tests, it is best to mount both photo devices in a tube that keeps them axially aligned while the
distance between them can be manipulated (Figure 2).
While driving the OP233W with the 100Ω series resistor, a 25mm distance was bridged at 9,600bps. To achieve
this, R1 was reduced to 1kΩ (R1 at emitter). This reduced the switching time and varied the output amplitude,
which was then close to 0V in the off state and above 2V in the on state. The signal obtained at the phototrans-
istor is shown in Figure 3, the slower signal resulting from using a 5kΩ resistor for R1 is shown in Figure 4. With
R1 = 5kΩ, a settling time around 100µs was achieved, with R1 = 1kΩ the settling time decreased to around 40µs.
IR DIODE TRANSISTOR
Figure 2: Mechanical Arrangement for IR Diode and Photo-Transistor
The voltage swing achieved with R1 = 1kΩ is ideal for driving the 71M6511/6513 OPT_RX input pin with its
threshold voltage specified between 200mV and 300mV. The output voltages of the photo-transistor should be
adjusted to stay safely away from the 200 to 300mV band in all operating conditions. IR diodes and photo-trans-
istors have temperature effects that have to be taken into consideration. For instance, the light output of the
OP233W decreases to 75% at 50°C.
Much faster switching times may be achieved by using so called photo-logic devices such as the OPTEK
OPL801-OC. These devices guarantee CMOS logic output levels while keeping rise and fall times below 1µs.
2
AN_651X_008 Using the Optical Port
Figure 3: 9600 bps signal at Phototransistor w/ R1 = 1kΩ at 12.5mm (left), 25mm (right)
Figure 4: 9600 bps signal at Phototransistor w/ R1 = 5kΩ at 12.5mm (left), 25mm (right)
3
AN_651X_008 Using the Optical Port
50mm (2")
GND
Demo Board
The IR diode should be connected between terminal 2 of header J12 on the Demo Board (cathode) and the V3P3
voltage (anode), which is accessible at terminal 1 of header J12 (see Figure 3). If the diode current must be
varied, R79 can be increased or decreased.
Diode Current
Current can be saved by increasing R79. Consequently, a certain decrease in signal will occur. However, with
careful selection of the components on the receiving side, the signal can still be received at minimum diode drive
currents.
Figure 6 shows the output voltage swing of the receiving transistor OP804SL as a function of the current-limiting
resistor (Rx = R79) at two distances. As can be seen, even at 1600Ω, a useable amplitude of 160mV can be
achieved with a distance of 12.5mm (1/2”).
4
AN_651X_008 Using the Optical Port
4000
3500
3000
25mm 12.5mm
2500
[V]
2000
1500
1000
500
0
0 400 800 1200 1600
Rx [Ohm]
Figure 7 shows the diode current as a function of the current limiting resistor Rx (R79). As can be seen in the
graph, at Rx = 100Ω, the diode current does not exceed 16mA.
Note: Optek recommends to operate the diode above 5mA in order to guarantee operation in the linear region.
Diode Current
16
Current [mA]
12
0
0 400 800 1200 1600
Limiting Resistor Rx [Ohm]
Signal Polarity
Components for asynchronous interfaces almost always treat "HIGH" (CMOS/TTL levels) as the quiescent state.
Once, the signal is pulled "LOW" by the transmitter, the start of the character is detected by the receiver.
This polarity is maintained in our optical circuit if we use the basic circuit that has the resistor connected to the
collector of the photo transistor. The transmitter pulls the cathode of the IR diode "LOW" in order to generate light.
Receiving the light (active) will generate a "LOW" signal which, again, is defined as active (see Figure 8).
5
AN_651X_008 Using the Optical Port
Care must be taken to generate the proper active voltage level (i.e. <200mV if connected to +3.3V
the OPT_RX pin of the 71M651X) when the transistor receives light. Higher values of R1
will promote clean signal levels while lower values of R1 will improve the timing. Figures 9 R1
through 12 show signals received with the circuit from Figure 8. Up to 40kHz could easily 10k
be transmitted while maintaining clean signal levels for the active state.
Vout
6
AN_651X_008 Using the Optical Port
Inter-Byte Delay
Inter-byte delay can be measured with an oscilloscope directly at the OPT_TX pin of the 71M6511/6513 while
transmitting the test string in a loop (see above). Typically, the delay is 400µs to 600µs (see Figure 13).
Occasionally, a larger gap of about 1ms can be observed, probably due to a higher priority interrupt being
serviced by the demo code
1000µs
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent
licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408- 737-7600
2010 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products.