Friday, January 11, 2013

Infrared audio headphone link for TV

To listen via headphones preferably good ‘surround your ears’ muff-type headphones, which not only deliver the wanted sounds directly to your ears and hearing aid(s) but also cut back the competing sounds at the same time. If you pick the right kind of headphones, with some acoustic damping in the earmuffs, they don’t cause your hearing aid(s) to emit feedback and whistle sounds either.

The result is comfortable listening at a volume level that’s right for you, where you can hear and understand everything that’s being said.

Headphone jack
Some TV sets do have earphone jacks, so you could simply fit a pair of stereo headphones with their own volume control (if necessary), plus a long cord and plug to mate with the jack on the TV. But many sets do not have a headphone jack, and many that do have it wired so that when headphones are plugged in, the speakers are disabled.

That’s fine for you, but no good for everyone else. In any case, being hooked up to the TV via a long cable has its own problems: you can forget to take ’em off when you get up for a comfort break or someone else can trip on the cable when they move about the room.

Cordless headphones
A much better solution is to use ‘cordless’ headphones, either via a UHF or infrared link. This means that you have a transmitter or sender unit that sits on the top of the TV, plus a small battery-operated receiver to drive the headphones at your end.

Of course, IR-linked cordless headphones are available commercially and these can give you some improvement. But there are drawbacks, the main one being that the receiver unit is built into the actual earphones and/or their headband, so it can’t be used with any other headphones. That means you’re stuck with the ones you get and in most cases, they are not the ‘surround-your-ears’ muff type. Nor do they have any acoustic damping.

As a result, you not only have to throttle back your hearing aid to stop it from whistling, but also the headphones allow quite a lot of competing sounds to enter as well.

So that’s the reasoning behind the development of this project – by building it, you get to choose the best type of headphones. However, there is one more feature – it works in mono only. This has been done deliberately because stereo sound is a real drawback to those who have trouble making out speech from the TV.

This applies particularly to those films, documentaries and sportcasts where there is a lot of background music or other sounds. By using a mix of the left and right channels, we cancel most of these extraneous sounds, making the speech much easier to discern. In addition, we have applied a small amount of treble boost to the audio signal, which further improves intelligibility on speech – see Fig.6.

There’s one more bonus with using mono sound – it also simplifies the circuit considerably.

How it works
The method of transmission is simple and effective. Basically, the signal is transmitted using pulsewidth modulation (or PWM). This converts the audio signal directly into a pulse stream of constant frequency, but with the pulse width varying with the instantaneous amplitude of the audio signal.

Fig.1(a) shows the method. First, the left and right stereo signals are mixed together to give a mono signal. This signal is then passed through an input amplifier stage (IC1b) and then via a four-pole low-pass filter (IC1a and IC4a), which sharply rolls off the response just above 12kHz.

This is done for two reasons. First, if you are partially deaf, signals above 12kHz are not much use anyway. Second, it prevents any spurious ‘alias’ signals from being generated during the digital modulation process – which is equivalent to digital sampling. We are using a fairly high sampling frequency of about 90kHz which tends to reduce aliasing, but the low-pass filtering is also worthwhile, because it ensures that virtually no signal frequencies above 15kHz are fed to the modulator.

Sampling signal
Next, the audio is fed directly to the non-inverting input of a comparator (IC5) where it is compared with a 90kHz triangular wave ‘sampling’ signal on the inverting input. This 90kHz triangular wave signal is generated by feeding a 180kHz clock signal into a D-type flip-flop.

This then produces a very symmetrical square-wave signal at half the clock frequency, or 90kHz. This 90kHz signal is buffered and fed through an active integrator stage, which converts it into a linear and very symmetrical triangular wave.

But how does the comparator use this 90kHz triangular wave to convert the audio signal into a PWM stream? To see how this works, take a look at the waveforms of Fig.2. Here the green sinewave represents the audio signal fed to the positive input of the comparator,
while the higher frequency red triangular wave shows the sampling signal fed to the comparator’s negative input.

In operation, the comparator’s output is high when the audio signal level is higher than the 90kHz sampling signal. Conversely, the comparator’s output is low when the sampling signal’s level is the higher of the two. A switching transition occurs when ever the two waveforms cross. The resulting PWM output waveform from the comparator is shown as the lower black waveform.

Note that the comparator output is a stream of 90kHz pulses, with the pulse widths varying in direct proportion to the audio signal amplitude. The average value of the pulse stream is directly proportional to the instantaneous value of the incoming audio, as shown by the dark blue dashed curve.

Referring back to Fig.1, this PWM pulse stream is fed to a PNP switching transistor, which drives a string of IR-emitting LEDs. As a result, the digitised audio is converted into a stream of IR light pulses, directed towards the receiver unit.

Receiver block diagram
The receiver is even simpler than the transmitter because of the fact that the average value of the PWM pulse stream varies in direct proportion to the audio modulation.

As shown in Fig.1(b), a silicon PIN photodiode is used to detect the IR pulse stream from the transmitter. Its output current is then passed through a current-to-voltage (I/V) converter and amplifier stage (IC1b and IC1a) to boost its level. The resulting pulse waveform is then fed through a limiter stage (IC2) to produce a stream of clean, rectangular pulses of constant amplitude.

 Next, the pulses are fed through a multi-stage low-pass filter (IC3b and IC3a) to remove all traces of the 90kHz sampling/modulating signal. This simply leaves the audio signal which was carried in the average signal level of the pulses.

From there, the recovered audio passes to a volume control pot and finally to a small audio amplifier (IC4) to drive the headphones.

Power for the receiver circuit comes from four AA cells, which can be of either alkaline or NiMH rechargeables.

Circuit description
Refer now to the full circuit for the transmitter – see Fig.3. As shown, the incoming line level stereo signals are mixed together using two 47kohm resistors, while trimpot VR1 sets the level. The resulting mono signal is then fed to op amp stage IC1b, which operates with a gain of 23, as set by the 22kohm and 1kohm feedback resistors.

Next, the signal is passed through op amps IC1a and IC4a, which form a 4-pole low-pass filter (or two 2-pole active filters in cascade, to be more precise). Together, these roll off the response above 12kHz. The filtered signal then emerges from pin 1 of IC4a and is fed directly to the non-inverting input of comparator IC5.

The 180kHz ‘twice sampling clock’ signal is generated by IC2b, a 4093B CMOS Schmitt NAND gate wired as a simple relaxation oscillator. A 12kohm resistor and 680pF capacitor set the operating frequency. This is not particularly critical, although for best performance it should be between 160kHz and 200kHz (corresponding to a sample frequency of 80 to 100kHz).

Flipflop stage IC3a is used to divide the clock pulses by two and generate the symmetrical 90kHz square wave. Its output at pin 1 is then passed through Schmitt NAND gates IC2a, IC2c and IC2d which are connected in parallel as a buffer. The buffer output is then coupled via a 100nF capacitor to op amp IC4b.

IC4b is configured as an active integrator to convert the 90kHz squarewave into a linear symmetrical triangular waveform of the same frequency. This triangular wave is then fed directly to the inverting input of comparator IC5, to sample and convert the audio signal into the PWM pulse stream.

IC5’s PWM output appears at pin 7 and is used to drive transistor Q1 (BC328). This in turn drives series-connected infrared LEDs (LEDs 1 to 3 and LEDs 5 to 7), along with LED4 (green) which serves as a ‘power on’ indicator. The 47ohm resistor in series with the LED
string limits the peak pulse current to around 45mA, resulting in an average current drain for the complete transmitter circuit of about 25mA.

Transmitter power supply

Power for the transmitter circuit is derived from a 12V AC or 15V DC plugpack. This feeds diode bridge D1 to D4, which rectifies the output from an AC plugpack. Alternatively, the bridge rectifier allows a DC plugpack to be used with either polarity.

The output from the bridge rectifier is filtered using a 1000uF capacitor and then fed to 3-terminal voltage regulator REG1 to produce a 12V DC supply rail.

Receiver circuit
OK, so much for the transmitter circuit. Now let’s take a look at the receiver circuit – see Fig.4.

In operation, the transmitted PWM infrared signal is picked up by PIN photodiode PD1 (BP104). This device produces output current pulses in response to the incoming IR signals and these are then fed to the inverting input (pin 6) of op amp IC1b. The non-inverting input (pin 5) of IC1b is biased to half-supply (ie, 3V) by two 22kohm resistors connected in series across the 6V supply rail.

IC1b operates as an active I/V (current-to-voltage) converter. In operation, it converts the input current pulses to voltage pulses, which appear at its pin 7 output. These pulses are then coupled via a 2.2nF capacitor to op amp stage IC1a, which operates with a gain of –10. The resulting amplified output pulses appear at pin 1 and are fed directly to pin 3 of IC2.

IC2 is an LM311 comparator and is used here as the limiter. Note that its non-inverting input (pin 2) is biased to half the supply voltage using the same voltage divider (2 × 22kohm resistors) that’s used to bias IC1a and IC1b. This ensures that the pulses from IC1a are compared with a voltage level corresponding to their own average DC level. And that in turn ensures that the limiter ‘squares up’ the pulse stream in a symmetrical fashion.

In addition, the 2.2Mohm feedback resistor and the 10kohm resistor in series with the bias for IC2 together provide a small amount of positive feedback hysteresis, to ensure clean switching. Because the LM311’s output (pin 7) is an open collector, it must be provided with a resistive pull-up load. This is provided by power-on indicator LED1, together with its 390ohm series resistor.

The restored PWM pulse stream appears at pin 7 of IC2 and is then fed through the receiver’s low-pass filter circuitry. This comprises passive 47kohm/180pF and 100kohm/100pF RC filter stages, voltage follower IC3b, active low-pass filter stage IC3a and
finally, a 4.7uF coupling capacitor and a 1kohm/10nF passive filter connecting to the top of volume control VR1.

As a result, the signal appearing across VR1 is a very clean replica of the original audio signal fed into the transmitter unit.

IC4 is the audio amplifier output stage and is based on an LM386N. It amplifies the signal from the volume control (VR1) and drives a stereo phone jack via a pair of 33ohm current limiting resistors (one to the tip and one to the ring).

Finally, the receiver is powered from a 6V battery consisting of four AA cells connected in series. These cells can be either standard alkaline primary cells or rechargeable NiMH (or NiCad) cells if you prefer. The average current drain is typically around 20mA, so even ordinary alkaline cells should give at least 80 to 100 hours of listening.

Mounting the LEDs
As can be seen on Fig.7 and in the photos, LEDs 1 to 7 are all mounted with their leads bent down through 90°. This is done so that the LED bodies later protrude through their matching holes in the front panel.

In each case, it’s simply a matter of bending the leads down through 90° exactly 5mm from the LED’s body, then installing the LED with its leads 8mm above the PC board (see photo). Make sure that each LED is correctly orientated – the anode lead is the longer of the two.

The easiest way to get the LED lead spacings correct is to cut two cardboard templates – one 5mm wide and the other 8mm wide. The 5mm template is then used as a lead bending guide, while the 8mm template is used to correctly space the LEDs off the board.

The transmitter board assembly can now be completed by installing the two RCA phono connectors (CON1 and CON2) and the DC power socket (CON3).

Receiver board assembly
Fig.8 shows the assembly details for the receiver board. Once again, begin by soldering in the resistors and the small non-polarised capacitors, then install the larger electrolytics and the ICs. Note that the large 2200μF electrolytic capacitor is mounted on its side, with
its leads bent down through 90°.

Note also that the ICs are all different, so don’t mix them up. Take care to ensure they are correctly orientated.

Once the ICs are in, install the volume pot (VR1), the headphone socket and power switch S1. Follow these by installing PC pins at the A and K positions for PD1 (the BP104 photodiode) and at the power supply inputs.

The BP104 photodiode can now be installed by soldering its leads to its PC pins (see side-view diagram in Fig.8). Be sure to install this part the right way around. Its cathode (K) lead has a small tag, as shown on its pinout diagram in Fig.4.

It’s also vital to install this device with its sensitive front side facing out from the PC board.

Finally, LED1 can be mounted in position. This part must be mounted with 13mm lead lengths, so that it will later protrude through the lid of the case. A 13mm wide cardboard template makes a handy spacer when mounting this LED. Be sure to orientate it with its anode (A) lead (the longer of the two) towards IC2.

Final assembly – transmitter
The final assembly involves little more than installing the PC boards inside their respective cases.

Fig.10 shows the drilling details. The best approach is to photocopy these diagrams and then attach them to the panels so that they can be used as drilling templates. Note that hole ‘D’ is the adjustment access hole for trimpot VR1.

Once the panels have been drilled, they can be dressed by attaching the relevant artworks. These artworks are attached using double-sided adhesive tape. Once they are attached, they can be protected by covering them with clear self-adhesive film (eg, wide sticky tape) and the holes cut out with a sharp utility knife.

Final assembly – receiver
Now for the final assembly of the receiver. Use Fig.11 as a drilling template and attach the front panel artwork as described above.

As shown in the photos, the PC board is mounted on the underside of the lid on four M3 × 15mm tapped spacers. Four M3 × 6mm countersinkhead screws secure the spacers to the lid, while the PC board is secured using four M3 × 6mm pan-head screws.

The power LED (LED1) and toggle switch (S1) both protrude through matching holes in the lid. Once the PC board is in place, one of the switch nuts is fitted to the top of the threaded ferrule, to help hold everything securely together.

The two holes in the side of the box accept the shaft of the volume control (VR1) and the collar of the headphone socket (CON1). Another hole at one end of the box provides the ‘window’ for photodiode PD1.

As shown in the photos, a short length of PVC conduit was fitted around this hole, on the end of the box, to make a light shield ‘hood’. Although not strictly necessary, it does improve the signal-to-noise ratio of the link when you are using it in a fairly large room that’s lit with compact fl uorescent lamps (CFLs) – ie, when there’s a long link path. CFLs produce a signifi cant amount of noise at IR wavelengths and the hood stops most of this noise from reaching PD1.

For the prototype, the hood was made using a 15mm length of 16mm OD PVC conduit. This was glued to the box end (concentric with the hole) using fast-setting epoxy cement.

The battery holder, with its 4 × AA cells, is mounted at the other end of the box. This can be held in place using a strip of electrical insulation tape. It’s then wedged firmly in position by the end of the PC board when the lid goes on.

Note that the lid assembly must be introduced into the box at an angle, so VR1’s shaft and the headphone socket can enter their matching holes. It’s then swung down and fastened to the box using self-tapping screws.

Set-up and adjustment
Getting the transmitter unit going is straightforward. Basically, it’s just a matter of connecting the audio input leads and applying power. However, if you have an oscilloscope or a frequency counter, it’s a good idea to check the frequency of the clock oscillator before you close up the case.

This is easiest done by checking the frequency of the triangular wave signal at test point TP2 (just behind IC5). The frequency here should be between 80kHz and 100kHz. If it’s well outside this range, then you’ll need to change the value of the 680pF oscillator capacitor to
correct it.

The capacitor concerned is easy to find on the transmitter board – it’s just to the right of IC2.

In practice, a value of 680pF (as shown on the circuit) should be suitable if a Motorola MC14093B device is used for IC2. However, if an ST Micro 4093B is used, this capacitor will probably have to be reduced to 470pF or 390pF. Conversely, for a Philips 4093B, the capacitor may need to be increased to 820pF or even 1nF.

The basic idea is that you increase the capacitor’s value to lower the clock frequency, and reduce its value to increase the frequency.

If you don’t have a frequency counter, but have a modest uncalibrated oscilloscope, you can still check and adjust the clock frequency fairly easily by using the waveform at TP2 as a guide. The waveform here should be a very linear and symmetrical sawtooth, with a peak-to-peak amplitude of about 10.5V and only a very tiny ‘pip’

on each positive and negative peak. If you find that the waveform is a clean sawtooth, but much lower in amplitude than 10.5V p-p, this means that the clock oscillator’s frequency is too high. To fix this, simply increase the value of the 680pF capacitor.

On the other hand, if the waveform does have an amplitude of 10.5V p-p or more but is clipped or truncated rather than being a clean sawtooth, this means that your clock oscillator’s frequency is too low. That’s fixed by reducing the value of the 680pF capacitor.

If you don’t have a counter or an oscilloscope, leave the capacitor’s value at 680pF and wait to see if the link’s performance is satisfactory. We’ll discuss this option shortly.

The receiver unit needs no adjustments; all you have to do to get it going is to plug in your headphones, switch it on and point it towards the transmitter. The small green power LED should light and it’s then simply a matter of adjusting the volume control for a comfortable listening level.

Testing the link
To test the link, first connect the left and right channel audio signal leads to the transmitter’s inputs. These signals can come from the stereo line outputs on your TV. You can also use the line outputs on your VCR or DVD player, but only if you are actually using this equipment.

Note that piggyback RCA phono socket leads may be required to make these connections if the audio outputs are already in use (eg, Jaycar WA-7090).

Next, use a small screwdriver to adjust the ‘Set Level’ trimpot (VR1) at the rear of the transmitter to mid-position. That done, position the transmitter (eg, on top of the TV) so that it faces towards your viewing position and apply power. The transmitter’s green centre LED should immediately light (assuming an audio signal is being applied) but the IR LEDs will remain dark to your eyes.

It’s now just a matter of checking that the link actually works. To do this, initially set the receiver’s volume control to minimum, then plug the headphones in and switch the receiver on. The receiver’s green power LED should either blink briefly (if you’re not pointing the
receiver towards the transmitter) or light steadily if PD1 is able to ‘see’ the infrared signal.

The idea now is to place the receiver in a convenient position so that it gets an unobstructed ‘view’ of the transmitter. In most cases, it can simply be positioned on an armrest, an adjacent coffee table on even on the back of the sofa.

Now turn up the volume control and you should be able to clearly hear the TV sound. If so, your link is finished and ready for use. 

If the sound is overly loud and distorted, even when the receiver’s volume control is down near zero, it’s probable that the audio input signals from the TV are overloading the transmitter. In that case, try adjusting trimpot VR1 anticlockwise using a small screwdriver, to lower the input level. This should allow you to remove any audible distortion and bring the volume down to a comfortable level.

If you find that distortion is still present, even when the audio level is turned well down, this probably means that your clock frequency is either too high or too low. This can occur if you weren’t able to previously check the transmitter’s oscillator frequency – eg, if you don’t have a counter or an oscilloscope.

In this case, try altering the 680pF capacitor’s value one way or the other, to see if the distortion gets better or worse. If it gets worse, go back the other way. If it gets better, keep changing the value in that direction.

In practice, you shouldn’t need to increase the capacitor value above 1nF or reduce it below 390pF in order to remove all audible distortion. 


No comments:

Post a Comment