In the first installment, we established that a TV channel selector would be the heart of our receiver, letting us explore some fascinating parts of the radio spectrum. Now we’ll choose a tuner that suits the project, learn the commands it needs, power it, and connect it to the outside world. We’ll make our first tuning tests—and encounter a few less familiar aspects of the radio world. Let’s get started.
Among channel selectors that support the I2C protocol, there are many models, brands, and package styles. The key consideration is the integrated circuit that controls the tuner’s PLL. What is a PLL? The diagram makes the basic idea clear.
On the left are the VHF and UHF oscillators. A modern channel selector typically covers roughly 53 MHz to 300–350 MHz in VHF and 300–830 MHz in UHF. These figures are approximate and vary between tuners. With a little adjustment, VHF may reach down to around 40–45 MHz, while UHF can be pushed higher. We’ll look later at how to stretch the tuner’s capture range.
The oscillation, whichever band it comes from, passes through a programmable divider that produces a fixed reference-related frequency, such as 3.90625 kHz, 6.25 kHz, or 7.8125 kHz. That signal enters the phase comparator, where it is compared with a signal from a fixed, quartz-crystal oscillator. The reference oscillator is divided as well, producing the same values as the main programmable divider. Any difference in frequency or phase causes the comparator to output an error signal that corrects the oscillator frequency.
Choosing the tuner and extending its range
TSA5520/5521 control over I2C
We aren’t looking for a loose integrated circuit; we want a channel selector that contains the right chip. Why the TSA5520/5521? Its datasheet specifies an operating frequency up to 1.3 GHz. If we successfully modify the tuner’s UHF local oscillator, reception could reach as high as 1.2 GHz—well beyond the factory limit of about 830 MHz. The adjustment is simple: carefully spread the turns of the UHF oscillator coil to raise its frequency.
The coil is easy to identify. Spread its turns as far as practical; experienced builders may remove one or more turns. This lets us approach the upper limit allowed by the PLL, potentially reaching the 800–900 MHz GSM band, 900 MHz cordless phones and amateur radio, and 1,200 MHz signals including additional GSM traffic. There is always something to hear, and broader coverage makes experimenting more rewarding.
With the lower cover removed, you can inspect the TSA5520/5521. It comes in several packages and may be marked simply 5520 or 5521. The Philips logo is another clue that you have the desired tuner.
A shopkeeper is unlikely to know which channel selector contains a TSA5520/5521; sellers usually know the tuner’s external specifications, not its internal parts. Your best bet is to ask a TV repair technician you know. Offer to pay for it, rather than expecting it for free. It should cost the technician about €10–15 to buy, so a few euros for helping you is reasonable; don’t pay more than €25 in total.
Programming the TSA5520/5521
Once you have the tuner, there are three jobs: learn the I2C sequence needed to send the TSA5520 its commands, build a suitable power supply, and provide a receiver that can handle the tuner’s output frequency. First, let’s examine the registers and the settings needed for the results we want. The datasheets explain the difference between the TSA5520 and TSA5521.
Only the TSA5521 supports 50 kHz tuning steps. The TSA5520 uses 31.25 kHz or 62.5 kHz steps. With the 5521, control firmware is simpler because frequency increments fall on multiples of 50. We’ll deal with the actual frequency calculations when we implement tuning. Here are the registers from the IC datasheet.
Address Byte (ADB) sets the tuner’s address on the I2C bus, which can also serve EEPROM, audio preamps, and other I2C devices. For MA1 and MA0, the datasheet specifies MA1 = 0 and MA0 = 1 to keep the tuner permanently enabled (datasheet table 5). Therefore, ADB is binary %11000010.
Control Byte (CB) sets several parameters. CP controls how quickly the system locks to a frequency: lower charge-pump current means slower locking, while higher current makes capture faster. Set CP to 1. The required settings are T2 = 0, T1 = 0, and T0 = 1. Set RSA and RSB according to datasheet table 7; for this initial application, set both to 0. OS is also 0 for normal operation. The resulting CB is %11001000.
For the band-switch byte, use %00000001 for low VHF (BB1), %00000010 for high VHF (BB2), and %00001000 for UHF (BB3). We now have the band, reference-oscillator divider settings (RSA and RSB), and tuner bus address. The remaining values are the main programmable-divider bytes, DB1 and DB2.
So far, we’ve used BYTE variables, each 8 bits long. The divider requires a WORD, which we’ll split into HIGHBYTE and LOWBYTE. Call the word DIVIDER, its high byte DB1 (later DIVIDER1), and its low byte DB2 (later DIVIDER2).
For example, to set the VHF local oscillator to 100 MHz with 50 kHz steps and a 7.8125 kHz internal reference (using the appropriate RSA/RSB setting), calculate 100,000 kHz / 50 kHz = 2,000. In binary, 2,000 is %11111010000. Add five leading zeros to make 16 bits (one WORD equals two bytes), giving DB1 = %00000111 and DB2 = %11010000.
Here’s another example: to receive a local FM station at 88.5 MHz, add the tuner’s 45.75 MHz intermediate frequency: 88.5 + 45.75 = 134.25 MHz for the local oscillator. Divide by 50 kHz (with RSA and RSB set to 1) to obtain DIVIDER = 2,685. In binary, that is %0000101001111101, or DB1 = %00001010 and DB2 = %01111101. The same method works across the range the tuner can cover. A short routine can then write the frequency to the tuner. In Basic (Proton), it’s as simple as this:
Those seven instructions let the tuner receive amateur-radio communications, security services, commercial stations, and much more.
Powering the tuner
If you’re ready to build, here’s how to connect the tuner and a suitable supply. Viewed from underneath, its pins are arranged as shown. Treat RF IN as the antenna input. Connect AGC, the first pin, to the wiper of a 10 kΩ preset, with its ends connected to +12 V and ground. The other connections are straightforward. You’ll need the power supply to provide 5 V and 30/33 V.
Building the supply
Using the MC34063A, covered in earlier articles, we can readily build a supply that provides the tuner’s 33 V requirement. The exact voltage is not critical: 27–33 V will work, although 30 V is a good choice for the varicap diodes in the tuner’s oscillators.
The input is 12 V, and the 30 V output is adjustable for accurate setting. C11 and C12 can be 1,000 µF if space allows; the values shown in the circuit have performed well in initial tests. L2 can be 100–300 µH; we chose 220 µH for convenience and compact size. The 5 V section is conventional and uses a 7805 series regulator, fitted with a heatsink. It powers the tuner as well as the microcontroller and LCD. The many capacitors may look excessive, but this supply is part of a larger project and must withstand noise, transients, and voltage fluctuations.
D3 and D6 work with the R2–R3 divider. In the microcontroller circuit, they signal that the supply has been interrupted. When power is cut, the divider—unburdened by electrolytic capacitors that could slow its response—switches quickly from high to low. The transition is immediate. The microcontroller remains powered for another second or two while the electrolytic capacitors on the 5 V rail discharge. That interval is long enough to save the DIVIDER value in the microcontroller’s internal EEPROM. When you power up again, the receiver returns to the last tuned frequency instead of making you scan the dial from scratch.
Think radio amateurs use strange, incomprehensible code? Listen to this example: they speak just like everyone else, adding their callsign to the conversation.
Once the supply is working, connect the receiver we built with the TDA7000. Adjust its tuning until you reach 45.75 MHz, then experiment with the microcontroller programming. As we did when receiving weather satellites, changing the number of turns in the tuning oscillator can shift its range. This time, increase the coil to 9 or 10 turns to tune the channel selector’s fixed 45.75 MHz output.
Final thoughts
Remember that this project is about experimentation and the challenge of exploring the unknown through electronic design. If you can’t find the suggested tuner, don’t give up: try another selector with a different PLL. You may not reach 1.2 GHz, but you can always replace it later when you find the desired model. All tuners of this type controlled over I2C use the same communication protocol, making it universal. Start with what you can find, experiment, learn, and keep looking for the model with the greatest possible reception range.
In the next installment, we’ll work on the microcontroller program and show the channel-selector module in detail—the videos offer a preview. We’ll also cover the computer connection, antennas for each band, listening techniques, and where to find the interesting activity on the radio spectrum. There’s plenty more to come.