Application Note - Semiconductor Solutions - Inspired ... Note Transceiver TH7122x Cookbook 39011...

38
Application Note Transceiver TH7122x Cookbook 39011 07122 02 Page 1 of 38 AN7122x-Cookbook Rev. 007 May 2012 TH7122 and TH71221 Cookbook 1 General Description The TH7122 and TH71221 transceiver ICs are highly versatile ISM band RF components suitable for a wide range of applications. Both devices require external components for setting the operating frequency and IF bandwidth. The TH7122x, through proper component selection, may be used for any frequency between 27 and 950MHz. It performs well in wide and narrow band applications and with FM, FSK, and ASK (OOK) modulation. This application note is called a “Cookbook” because it is a tested collection of real applications and reference example circuits. The detailed descriptions of the procedures for selecting the appropriate components will help get your design up and running fast. Please also consult the data sheets and evaluation board descriptions for detailed technical information. These can be found on the Melexis Web Site at www.melexis.com . Fig. 1: TH7122 and TH71221 IC block diagram 2 Important Features Usable in stand-alone or programmable user mode (via 3-wire bus serial control interface - SCI) The reference oscillator input (RO) can be a crystal oscillator or an input buffer from an external TCXO or microprocessor reference. It drives a programmable R counter with a range of 4 to 1023. The input range is 1 to 16MHz. The N counter has a very wide range of 64 to 131071, so very small VCO frequency steps are possible. The VCO is a negative resistance oscillator with a tuned circuit between pins 20 and 21. There is also an internal varactor (not shown). This allows the VCO to be tuned to any desired frequency by selecting the appropriate inductor. An external varactor can be added for wider tuning ranges. The loop filter for the VCO on pin 23 is external to allow optimizing the design for wide band or narrow band applications. The LNA and IF sections are tuned by external elements. Usually a ceramic filter is used for the IF, but crystal filters can be used for narrow band applications. The FM detector on pin 3 can be tuned with a ceramic discriminator or LC combination. OA1 is an operational amplifier to be configured as a data slicer or output buffer FM applications. OA2 is biased at Vcc/2 and can be used as an AFC amplifier. Both FSK and ASK (OOK) transmission and reception are possible with a switchable peak detector. ASK and FSK operation is possible without changing any parts just by loading control data via SPI. IN_LNA LNA GAIN_LNA OUT_LNA IN_MIX IF MIX 26 29 28 30 OUT_MIX1 IN_IFA VEE_IF 32 31 1 VEE_LNA 27 IFA VCC_IF RSSI 2 7 1.5pF IN_DEM 3 MIX Demodulator FSK OUT_DTA OA2 bias OUT_DEM SW1 SW2 6 OA1 8 INT1 5 INT2/PDO 4 200k VEE_PLL OUT_PA FSK ASK LO IN_DTA ASK/FSK RE/SCLK TE/SDTA FS0/SDEN 25 PS_PA 24 FSK_SW FS1/LD VEE_RO 11 19 9 17 16 15 13 12 RO RO R counter N counter RO 10 SCLK SDTA SDEN Control Logic SCI PKDET VCO PA VCC_PLL 20 TNK_LO 23 22 LF 21 18 VEE_DIG 14 VCC_DIG

Transcript of Application Note - Semiconductor Solutions - Inspired ... Note Transceiver TH7122x Cookbook 39011...

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 1 of 38 AN7122x-Cookbook Rev. 007 May 2012

TH7122 and TH71221 Cookbook

1 General Description

The TH7122 and TH71221 transceiver ICs are highly versatile ISM band RF components suitable for a wide range of applications. Both devices require external components for setting the operating frequency and IF bandwidth. The TH7122x, through proper component selection, may be used for any frequency between 27 and 950MHz. It performs well in wide and narrow band applications and with FM, FSK, and ASK (OOK) modulation. This application note is called a “Cookbook” because it is a tested collection of real applications and reference example circuits. The detailed descriptions of the procedures for selecting the appropriate components will help get your design up and running fast.

Please also consult the data sheets and evaluation board descriptions for detailed technical information. These can be found on the Melexis Web Site at www.melexis.com.

Fig. 1: TH7122 and TH71221 IC block diagram

2 Important Features

Usable in stand-alone or programmable user mode (via 3-wire bus serial control interface - SCI) The reference oscillator input (RO) can be a crystal oscillator or an input buffer from an external TCXO

or microprocessor reference. It drives a programmable R counter with a range of 4 to 1023. The input range is 1 to 16MHz.

The N counter has a very wide range of 64 to 131071, so very small VCO frequency steps are possible. The VCO is a negative resistance oscillator with a tuned circuit between pins 20 and 21. There is also

an internal varactor (not shown). This allows the VCO to be tuned to any desired frequency by selecting the appropriate inductor. An external varactor can be added for wider tuning ranges.

The loop filter for the VCO on pin 23 is external to allow optimizing the design for wide band or narrow band applications.

The LNA and IF sections are tuned by external elements. Usually a ceramic filter is used for the IF, but crystal filters can be used for narrow band applications.

The FM detector on pin 3 can be tuned with a ceramic discriminator or LC combination. OA1 is an operational amplifier to be configured as a data slicer or output buffer FM applications. OA2 is biased at Vcc/2 and can be used as an AFC amplifier. Both FSK and ASK (OOK) transmission and reception are possible with a switchable peak detector. ASK and FSK operation is possible without changing any parts just by loading control data via SPI.

IN_LNALNA

GA

IN_L

NA

OU

T_L

NA

IN_M

IX

IF

MIX

26

29 28 30

OU

T_M

IX1

IN_IF

A

VE

E_IF32 31 1

VE

E_

LN

A27

IFA

VC

C_IF

RS

SI

2 7

1.5pF

IN_DEM3

MIX

DemodulatorFSK

OUT_DTA

OA2bias

OUT_DEM

SW1

SW2

6

OA18

INT1

5

INT2/PDO

4

200k

VEE_PLL

OUT_PA

FSK

ASK

LO

IN_D

TA

AS

K/F

SK

RE

/SC

LK

TE

/SD

TA

FS

0/S

DE

N25

PS_PA24 FS

K_S

W

FS

1/L

D

VE

E_R

O

11 19 9 1716151312

RO RO

Rcounter

Ncounter

RO10

SC

LK

SD

TA

SD

EN

Control Logic SCI

PKDET

VCO

PA

VCC_PLL20TNK_LO 23 22LF21 18 VE

E_D

IG

14 VC

C_D

IG

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 2 of 38 AN7122x-Cookbook Rev. 007 May 2012

Document Content

1 General Description ...................................................................................................1

2 Important Features.....................................................................................................1

3 VCO Design ................................................................................................................4

3.1 Standard FSK VCO............................................................................................................... 4

3.2 Standard ASK VCO .............................................................................................................. 5

3.3 VCO with External Varactor .................................................................................................. 5

3.4 External VCO........................................................................................................................ 6

4 Modulation ..................................................................................................................7

4.1 FSK Crystal Modulation ........................................................................................................ 7

4.2 Analog FM or FSK ................................................................................................................ 7

4.3 Direct VCO Modulation for Narrow Band............................................................................... 8

4.4 FSK Modulation – C Coupling ............................................................................................... 8

4.5 Two Point FSK Modulation.................................................................................................... 9

4.6 VCO Band Switching .......................................................................................................... 10

5 IF Filtering.................................................................................................................10

5.1 Standard IF Filter ................................................................................................................ 11

5.2 Narrow Band Ceramic IF Filter........................................................................................... 11

5.3 Crystal IF Filter.................................................................................................................... 12

6 FSK and FM Detectors .............................................................................................13

6.1 FSK Detector - Standard..................................................................................................... 13

6.2 LC FSK Detector................................................................................................................. 13

6.3 FSK Detector with AFC....................................................................................................... 14

6.4 LC FSK Detector with AFC ................................................................................................. 14

6.5 Wide Band FSK + ASK Peak Detector ................................................................................ 15

6.6 FSK Squelch Circuit ............................................................................................................ 15

6.7 Low impedance FM Output ................................................................................................. 16

7 High Performance Narrow Band Receiver Using External IF ...............................17

7.1 Component List for Transceiver with External NB IF ..................................................... 19

8 ASK (OOK) Detectors and RSSI..............................................................................21

8.1 ASK Detector with Bit Slicer ................................................................................................ 22

8.2 ASK Detector with Peak Detector ....................................................................................... 22

8.3 Fixed Threshold ASK Detector............................................................................................ 23

9 RF Input Matching....................................................................................................23

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 3 of 38 AN7122x-Cookbook Rev. 007 May 2012

10 RF Output Matching .................................................................................................23

11 LNA Output and Mixer Input Matching ...................................................................25

12 Special Considerations............................................................................................25

13 EVB7122 Special Evaluation Board ........................................................................26

13.1 Circuit Schematic for EVB7122-special board............................................................... 27

13.2 PCB layout showing components, traces and bottom copper........................................ 28

13.3 Overview Component List for Special Boards ............................................................... 29

14 SW7122 Software Description.................................................................................30

14.1 Parameter View ............................................................................................................ 30

14.2 Register View................................................................................................................ 33

14.3 Frequency Switching..................................................................................................... 34

14.4 Extended Parameters ................................................................................................... 35

14.5 Forbidden N settings:.................................................................................................... 37

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 4 of 38 AN7122x-Cookbook Rev. 007 May 2012

3 VCO Design

If the internal varactor diode of the TH7122x is used for tuning the VCO at Vcc = 3.0V, the tuning ratio is fmax / fmin ≤ 1.135. For Vcc = 5.0V, the ratio is approximately 1.191. This determines whether or not an external varactor is required. For example, at 27MHz operation with a 10.7MHz IF (intermediate frequency), the VCO frequency in the receiver will be 37.7MHz. This gives fmax / fmin = 1.40, so an external varactor will be required. Tuning ratios up to 2:1 are possible with hyper-abrupt tuning diodes. Another consideration when tuning the VCO is the tuned circuit impedance. The VCO is a negative resistance oscillator, and its resistance decreases with increasing frequency. Its noise can be improved by reducing the tank circuit losses to increase the Q of the tank. The loaded Q of the equivalent RLC parallel

combination of the VCO tank is R /√L/C . It is limited by the parasitic elements of the IC package and the PCB. Care must be taken not to make the tank inductor too small, the VCO may not start or may oscillate at a high parasitic frequency which is determined by the circuit traces and stray capacitance of the coil and/or varactor circuit. On the other hand, the coil inductance must be small in order to have a low tuned circuit

impedance (√ L/C ) . This means that the tuning capacitance should be large. In this case, an external varactor must be used even though the same frequency could be tuned with the internal varactor. With a tuning voltage range from 0.2V to Vcc - 0.2V, the equivalent capacitance Cint across pins 20 and 21 is approximately 3.37 to 4.34pF when Vcc = 3.0V. When Vcc = 5.0V, the minimum capacitance is approximately 3.06pF. The VCO directly generates the RF signal in transmit mode, so the VCO and transmit (carrier) frequency are the same. In receive mode, the VCO is also active and its frequency is offset from the receive frequency by the IF (because of the super-heterodyne receiver architecture). In this mode the VCO is also called LO (local oscillator). There is always a slight LO signal passing to the receiver input. This undesired leakage is lowest if the VCO current is set to the smallest value; this can be done by setting the VCOCUR register bits to 00.

3.1 Standard FSK VCO

The frequency is set by LO, the internal capacitance of the varactor and about 0.5pF fixed capacitance plus CO if it is used. C0 can be added to adjust the VCO tuning voltage. The tuning voltage should be monitored on pin 23 so it is not too close to Vcc or GND. This way the VCO frequency can be centered for optimum performance in the particular operating range. This circuit is recommended for FSK when the modulation is achieved by switching the capacitive loading of the crystal oscillator. The FSK data rate is limited to about 20kbps NRZ (non-return to zero) because of the high Q of the crystal. CPS is recommended to prevent LNA oscillations in receive.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 5 of 38 AN7122x-Cookbook Rev. 007 May 2012

3.2 Standard ASK VCO

Note that this is the same as the FSK VCO except that the loop filter components will be different RF, CF1 and CF2 are set to give a wider PLL bandwidth. This allows the VCO to correct faster for frequency disturbances caused by load pulling effects in the ASK-modulated PA. C0 is added to reduce the tuning range of the VCO. This results in smaller frequency disturbances (spurious FM) caused by switching the PA stage on and off. CPS also helps to minimize spurious FM by reducing the rise and fall time of the PA switching on and off. The PLL loop comparison frequency should be greater than 300kHz for good ASK. In some cases, it may be best to use a custom crystal frequency for transmission so the loop frequency can be as high as possible.

3.3 VCO with External Varactor

This circuit can be used to extend the frequency range. The frequency extension can be even down to 13MHz. The VCO frequency fvco is given by:

fVCO

=1

2π √1

L0(C0+ Cint+Cd⋅C7

Cd+ C7 )

Where Cint = internal diode capacitance Cd = diode capacitance of VD1 R2 connects the varactor to the tuning voltage and filters the RF signal present on the diode. R4 is used in low frequency applications to prevent parasitic oscillations at high frequencies. It is also possible to put R4 in series with pin 20. The combination of C0 and C7 set the tuning range. If VD1 has a large capacitance at 0V, C7 must be small or the low impedance of the circuit may prevent start-up of the VCO.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 6 of 38 AN7122x-Cookbook Rev. 007 May 2012

The selection of RF, CF1,CF2 is important for good FSK and ASK modulation. These values depend on the value for NT the maximum modulating frequency and the desired loop damping factor. The design equations for the loop filter are in the Melexis application note: TH7122 and TH71221x Used in Narrow Band FSK Applications. A value for M of 2.5 gives a damping factor of .707. This results in a fast rise time with some overshoot in the FSK signal, but this overshoot is usually filtered our in the receiver. In ASK applications, the ASK spectrum is improved because the VCO returns to the center frequency faster with no ringing. The easiest way to design the filter for ASK is to select 39pF for CF2 and then design RF and CF1 to give the desired damping. This gives the widest possible loop bandwidth for good FSK and ASK operation. For this condition, the loop comparison frequency should be greater than 300kHz. In some cases, it may be best to use a custom crystal frequency for transmission so the loop frequency can be as high as possible. For example, to generate a transmit frequency of 433.92MHz, you could use a 12MHz crystal with: RT = 25 and NT = 904 PLL reference = 480kHz If we use a crystal frequency = 12.0533MHz RT = 4 and NT = 144 PLL reference = 3.01MHz, and the ASK is much better One note of caution: There are some values of N < 256 which are not allowed because of the nature of the dual modulus counter. This is discussed more in the section 13.6.

3.4 External VCO

The selectivity and spectrum of narrow band receivers and transceivers especially in the 868 and 915MHz bands can be considerably improved by using an external VCO like the one here. RO is used to prevent the internal oscillator from running. Note that the varactor is grounded, so the PFD polarity in the software should be set to Positive. A commercially available VCO could also be used.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 7 of 38 AN7122x-Cookbook Rev. 007 May 2012

4 Modulation

4.1 FSK Crystal Modulation

This is the standard approach to generate an FSK signal. The crystal frequency, that provides the reference to the internal PLL synthesizer, is pulled by two external capacitors CX1 and CX2. An internal switch at pin FSK_SW is either open (if the signal at pin IN_DTA is logic high) or connected to ground (if the signal at pin IN_DTA is logic low). This way either CX1 or the combination of CX1 + CX2 determines the crystal frequency. So the FSK signal is generated at the crystal frequency and then up-converted in the PLL. The polarity of the signal at IN_DTA can also be inverted in programmable mode. This circuit is recommended for data rates ranging from DC to about 20kbps NRZ. Note that the reference frequency will not be centered when in receive. In most cases, the IF and discriminator bandwidth are wide enough so it is not a problem. If it is desired to center the receive frequency, a combination of the N and R dividers can be found to do this within an acceptable frequency tolerance.

4.2 Analog FM or FSK

In this circuit a varactor diode is used to modulate the crystal. R4 and C4 is an external lowpass filter which can be used to reduce high frequency modulation levels, and C1 isolates the DC on the varactor from the audio input. R3 provides isolation from the RF signal on the diode. R1 and R2 are used to bias the diode to give the desired load capacitance on the crystal. R1 and R2 should be relatively large so they do not affect the low frequency response due to C1 and the parallel combination of R1 and R2.

R4 and C2 can be used to control the rise time of FSK signals. For analog FM, C1 with the parallel combination of R1 and R2 can be used to provide pre-emphasis.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 8 of 38 AN7122x-Cookbook Rev. 007 May 2012

4.3 Direct VCO Modulation for Narrow Band

This circuit is usually used in narrow band applications. Rather than switching the crystal oscillator’s capacitive loading for FSK generation, this circuit employs so-called direct VCO modulation. This means data is directly injected into the VCO control line through the loop filter.

CF1 is usually 1.0µF or larger and CF2 is usually 100nF

or larger. RF is usually around 1.5 to 3.3kΩ. To get flat modulation response, it is necessary that CM1·RM1 = CF2·RF. Since the VCO is very sensitive, the

modulation signal must be attenuated. RM1 = 1MΩ and

RM3 = 10kΩ for convenience, and the modulation sensitivity is adjusted by changing RM2. CM2 can be added to reduce the rise time of the digital modulating signal to reduce the occupied bandwidth. This arrangement can also be used with only the internal varactor.

The design equations for the loop filter are in the Melexis application note: TH7122 and TH71221 Used In Narrow Band FSK Applications

4.4 FSK Modulation – C Coupling

This method accomplishes the same result as in section 4.3 but with fewer components and no additional current when in standby mode. CM1 and CF1 form a capacitive divider to set the modulation sensitivity. RM1 is added to reduce the high frequency response to reduce the modulation bandwidth. The modulation sensitivity can more easily be adjusted by changing RM1 and RM2 or by using a potentiometer. The parallel combination of RM1 and RM2 * CM1 determines the FSK rise time and can be used to control the occupied bandwidth.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 9 of 38 AN7122x-Cookbook Rev. 007 May 2012

4.5 Two Point FSK Modulation

When the VCO is modulated, it has a highpass response due to the nature of the PLL. Because of this, it is necessary to have a lower loop frequency which is about 1/3 of the lowest modulating frequency. In the case of FSK modulation, long data pulses will become distorted as the loop forces the VCO back to the center frequency. The common way to deal with this is to apply the data pulses to the reference so that it is also modulated. This can be done with a varactor on the crystal reference as in section 3.7 or by using FSK crystal modulation as in section 3.6. The lowest cost method is FSK crystal modulation using a small capacitance for CX2. This does not result in a perfect frequency crossover between VCO and crystal modulation but in most cases the result is satisfactory. In the circuit shown, the crystal modulation is out of phase with the VCO modulation, so the DTAPOL setting for the TH7122 must be set to ‘1’ – inverse.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 10 of 38 AN7122x-Cookbook Rev. 007 May 2012

4.6 VCO Band Switching

This circuit shows one method for switching the VCO bands to cover a wider tuning range. In this case, the lowest frequency is around 27MHz and the highest is 950MHz.

PD1 and PD2 are PIN diodes with a low capacitance at 0V. VD1 is a wide range tuning diode. BS1 and BS2 are the band switching inputs. R03 prevents parasitic oscillations when the low frequencies are selected.

When BS1 and BS2 = Vcc, the lowest frequency is set by L02 + L03, VD1 and the TH7122x internal varactor.

When BS1 = 0V, and BS2 = Vcc, the low frequency circuit is shorted by PIN1, and the frequency is determined by LO2 and the TH7122x internal varactor. This setting is for medium bands.

When BS1 = Vcc and BS2 = 0V, the frequency is determined by LO1 and the TH7122x internal varactor. This is the highest frequency band setting.

Remember that the off capacitance of the PIN diodes is in parallel with the coils and the series inductance of the PIN diode and CB9 add to the coil inductance. Also, the drive to BS1, and BS2 must be able to sink approximately 10mA.

5 IF Filtering

The IF frequency range is very wide from about 400kHz to 30MHz. LC, ceramic or crystal filters can be used for the IF filter depending on the desired IF bandwidth. The most common frequency for this type of application is 10.7MHz. 455 or 450kHz is not practical for FSK because the internal capacitor coupling the IF to the demodulator is only 1.5pF. Also, with single conversion and a low IF, the receiver has virtually no image rejection.

The output resistance of pin 32, OUT_MIX, is about 330Ω to match most ceramic filters. In order to match other filters, a passive matching network can be used. A simple PI or L matching network can be used, but a PI network with a higher Q has the advantage of reducing the spurious responses of the filter far from the center frequency. A PI network can also be added to the normal ceramic wide band filter to suppress spurious responses.

The input resistance of pin 1, IN_IFA, is about 2kΩ in parallel with a few pF of capacitance. This is very convenient because this is about the required termination for 10.7MHz crystal filters. Just adding a resistor between pins 1 and 2 can terminate filters which require a smaller load resistance of for example 330Ω.

In the normal application, the IF filter is the same as the ones used in most FM radio receivers. Its bandwidth is usually around 180kHz, but the FSK deviation in most ISM applications is usually around 30kHzpk-pk.

Therefore, it is not necessary to terminate the filter with 330Ω to keep the response flat, so the resistor at IN_IFA can be omitted.

The IF amplifier 3dB low and high end frequencies are about 400kHz and 30MHz, respectively and the –3dB sensitivity at 10.7MHz is about 150µV with a ceramic discriminator.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 11 of 38 AN7122x-Cookbook Rev. 007 May 2012

5.1 Standard IF Filter

This filter circuit can be used with all types of 330 Ohm termination filters. RIF is in parallel with the 2k input resistance of the internal IF input. It can be omitted if a slight tilt in the filter response is unimportant such as in ASK or FSK with typical 25 to 30kHz deviation. The overall IF gain is slightly higher without RIF. SMD type ceramic filters from Murata are for example:, or equivalent part

SFECV10.7MJA00 @ BIF2 = 150 kHz (size 7x3mm)

SFECV10.7MHA00 @ BIF = 180 kHz (size 3.5x3.1mm)

5.2 Narrow Band Ceramic IF Filter

If a NB ceramic filter with 600Ω is used , then some additional components are recommended:

LIF1 = 4.7µH, CIF1 = 100pF, CIF2 = 68pF, RIF = 1k A leaded type ceramic filter from Murata is for example,: or equivalent part

SFKLA10M7NL00 @ BIF2 = 30 kHz

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 12 of 38 AN7122x-Cookbook Rev. 007 May 2012

5.3 Crystal IF Filter

If a crystal filter with 3kΩ termination is used then the additional components should be: LIF1 = 10µH, CIF2 = 22pF, CC specified by the filter manufacturer Remember that a single 2-pole crystal filter has a maximum attenuation of only 25dB, so a 4-pole filter should be used for best results. A 4-pole crystal filter from ECS is for example:

ECS-10.7-7.5B @ BIF = 7 kHz

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 13 of 38 AN7122x-Cookbook Rev. 007 May 2012

6 FSK and FM Detectors

The FM detector is an analog detector. The detector output signal can be observed on pin 8. If the TH7122x is used in a tone or voice application, this signal would go to a tone decoder or audio amplifier.

6.1 FSK Detector - Standard

The normal ceramic discriminator FM detector acts like a high Q coil. CP is used to tune it, and RP is used to set the detector bandwidth. Any ceramic discriminator can be used with the TH7122x by adjusting CP. In most cases the value is 10pF If the recommended CDSCB10M7GA136 discriminator is used, CP is not needed. The detector bandwidth is set by the demodulator output

resistance of 270kΩ and the external capacitor C4.

6.2 LC FSK Detector

This circuit shows how the ceramic discriminator can be replaced by an LC tank. CP and LDIS form a parallel resonant circuit.

A fixed inductor and trimmer capacitor could also be used. In this case it is better to use a small value for the trimmer C and add CP in parallel to make tuning easier. LP must be relatively large and CP small because the internal coupling C from the IF amplifier is 1.5pF.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 14 of 38 AN7122x-Cookbook Rev. 007 May 2012

6.3 FSK Detector with AFC

An external AFC circuit can be added to the ceramic discriminator or a coil to further increase the detection range. This is useful when working with SAW transmitters which may have a frequency tolerance up to 200kHz. The AFC time constant is determined by the demodulator output resistance of 270kΩ times C6. Be sure to turn on OA2 in the TH7122x when using this circuit. The capacitance across CERDISC is:

CP+CS⋅CVD2

CS+ CVD2

Where CVD2 is the diode capacitance.

6.4 LC FSK Detector with AFC

For really wide detection ranges, a coil tuned discriminator can be used together with the external AFC. In this circuit, if VD2 is a BB639 diode, it will tune the 5.6µH coil. The tuning can be adjusted by changing CS and/or by adding CP1 in parallel with LP1.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 15 of 38 AN7122x-Cookbook Rev. 007 May 2012

6.5 Wide Band FSK + ASK Peak Detector

If the ASK peak detector and the FSK detector with AFC are required in one application, the AFC circuit can be driven from the OUT_DEM like this. R3 and CB8 filter out the audio or data signal from OUT_DEM. R13 is to decouple the RF signal on the diode. The output swing on pin 7 is from about 0.7V to Vcc -0.25V so the diode should be set up so CERDIS is tuned to the center frequency at:

Vcc+ 0 .45

2

6.6 FSK Squelch Circuit

The circuit diagram shows how squelch functionality can be added to the standard FSK application circuit. The RSSI output is used to detect an RF signal at the receiver input IN_LNA. In case an RF signal is available, the RSSI signal goes up to a certain voltage level. The absolute voltage level depends on the actual RF input level. This DC voltage level can be adjusted with the potentiometer RSQ1 before it passes the resistor RSQ2. Now this voltage is used to set the threshold of the comparator OA1 by feeding it to pin INT1.The impedance of RSQ1 and RSQ2 must be lower than the output impedance at OUT_DEM plus the internal 200kΩ resistor at the (-) input of OA1 to “overwrite” the DC

content from the demodulator output.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 16 of 38 AN7122x-Cookbook Rev. 007 May 2012

6.7 Low impedance FM Output

This circuit can be applied to buffer FM signals at the demodulator output. The internal op-amp OA1 is used as a unity gain buffer to give a low impedance output. The circuit is useful, for example, to receive audio signals or to drive external data detector circuits.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 17 of 38 AN7122x-Cookbook Rev. 007 May 2012

7 High Performance Narrow Band Receiver Using External IF

Below is a narrow band IF circuit using the popular Toshiba TA31136 narrow band IC. Several other manufacturers make a similar part for this type of application. Matching components for a 600 Ohm ceramic filter and crystal filters are shown. FL2 is a 6 pole ceramic filter for 12.5kHz channels. IF frequencies up to 45MHz can be used with this circuit together with any of the narrow band VCO circuits for the TH7122. The additional current drain is only 3.2mA, so the total receiver current is only about 11mA. Since this narrow band IF is very sensitive, the LNA load impedance can be reduced to lower the LNA gain to improve the intermodulation rejection. A squelch circuit is not shown, but the necessary circuitry is built in to the TA31136. For digital applications, the comparator and data slicer in the TH7122 are used to provide a logic level data output signal.

Fig. 2: TH7122x + NBIF

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 18 of 38 AN7122x-Cookbook Rev. 007 May 2012

Three receivers were designed to use with the NB IF shown above.. The 833MHz one does not use an external varactor, but C0 is large to reduce the VCO sensitivity. The performance with this combination is impressive. The selectivity is determined by FL2 and the TH7122 oscillator phase noise. At lower frequencies, it is mainly determined by FL2 and at frequencies above about 150MHz, it is determined by the oscillator phase noise. The phase noise can be improved by using an external VCO connected to pin 21 of the TH7122. A simple low cost transistor circuit can be used for this. 150MHz receiver: Sensitivity: -120dBm for 12dB S/N @ 2.5kHz FM deviation 12.5kHz selectivity = 37dB 25kHz selectivity = 48dB (limited by IF filter) 2MHz blocking = -43dBm 10MHz blocking = -32dBm With two IF filters: 12.5kHz selectivity = 60dB @ at 12.5kHz 65dB @ 25kHz (2 generator measurement) 433MHz receiver: Sensitivity: -120dBm for 12dB S/N @ 3kHz FM deviation Selectivity: 45dB @ 25kHz (2 generator measurement) 868MHz receiver: Sensitivity: -120dBm for 12dB S/N @ 3kHz FM deviation Selectivity: 40dB @ 25kHz (2 generator measurement) CW output spectrum at 150MHz:

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 19 of 38 AN7122x-Cookbook Rev. 007 May 2012

7.1 Component List for Transceiver with External NB IF

Part Size Value Description

C1 0603 39pF 2nd mixer crystal tuning

C10 0603 1nF RSSI filtering

C2 0603 56pF 2nd mixer crystal tuning – usually 2x C1

C6 0603 10 – 100nF data slicer – depends on data rate

C7 0603 10nF coupling to NBIF

C9 0603 91pF 455kHz discriminator tuning

CB0 A 10uF power supply filter if needed

CB1 0603 LNA tank bypass

CB10 0603 100nF NBIF bypass

CB2 0603 RF output bypass

CB4 0603 10nF Vcc bypass

CB5 0603 100nF Vcc bypass

CB6 0603 VCO supply bypass

CB7 0603 100nF Vcc bypass

CB8 0603 100nF NBIF bypass

CF1 0603 1uF works for most PLL loop filter

CF2 0603 100nF works for most PLL loop filter

CLP 0603 10nF de-emphasis filter

CM1 0603 VCO modulation coupling

CM2 0603 MIX output to 1st IF filter matching

CM3 0603 MIX output to 1st IF filter matching

CMI 0603 coupling from LNA to mixer

CO 0603 to reduce VCO tuning range

CO6 0603 external varactor tuning

CPS 0603 1nF PA rise time control

CRX1 0603 LNA input decoupling

CRX2 0603 LNA tank tuning

CTX0 0603 PA output decoupling

CTX1 0603 Output matching

CTX2 0603 Output matching

CX1 0603 Reference crystal tuning

DISCR1 CDBLA JTC455C24 455KHz discriminator

FIL1 10.7 or 21.4 or 45 MHz 1st If filter

FIL2 CFW LT455FW 455KHz IF filter

LM1 1008 MIX output to 1st IF filter matching

LO 1008 VCO tuning

LRX1 1008 LNA input matching

LRX2 1008 LNA tank tuning

LTX0 1008 PA output decoupling

LTX1 1008 Output matching

R10 0603 1.5K ceramic discriminator load

R3 0603 100 LNA decoupling

R4 0603 100 LFIF decoupling

R5 0603 10K pads for ASK modulation input

RF 0603 PLL loop filter

RL 0603 1st If filter load if needed

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 20 of 38 AN7122x-Cookbook Rev. 007 May 2012

RLP 0603 de-emphasis filter

RM1 0603 100K VCO modulation input - controls mod rise time

RM2 0603 10K VCO modulation level adjust

RO5 0603 10K or a coil for lower

noise PLL tuning coupling

RO6 0603 0 or 22 22 Ohms for low frequencies to prevent HF

oscillation

RPS 0603 10K-47K sets max output power

RS1 0603 10K SPI input filter - filters noise from micro

RS2 0603 10K SPI input filter - filters noise from micro

RS3 0603 10K SPI input filter - filters noise from micro

U1 LQFP32 TH7122

U2 SSOP16 TDA31136 NBIF

VD1 SC-79 VCO tuning diode

X1 10.245 / 20.945 /

44.545 MHz 2nd mixer crystal

XREF 3-16MHz PLL reference crystal

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 21 of 38 AN7122x-Cookbook Rev. 007 May 2012

8 ASK (OOK) Detectors and RSSI

The logarithmic RSSI signal is used for ASK detection. When the TH7122x is switched to ASK mode, the RSSI pin 7 is internally connected to the OUT_DEM pin 6 in order to feed the RSSI signal directly to the data slicer which is setup by OA1. Therefore only one capacitor is needed to set the detector bandwidth on either pin 7 or 6. Below is a typical RSSI graph. The curves show the voltage at pin RSSI versus RF input power for both settings: LNA high and low gain.

Fig. 3: RSSI output voltage vs. RF input level

Note the following:

• There is a variation in the absolute value of the RSSI voltage vs RF signal level. Therefore, the absolute value for the RSSI voltage is not an accurate indication of the signal level.

• The slope of all the curves is relatively constant.

• The usable RSSI range is about 70dB When the RSSI signal is used for ASK detection, the absolute value of the voltage is not important.

RS

SI / V 1.0

1.2

1.4

1.6

1.8

0.8

0.6

0.4

0.2

0.0-130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20

RF input / dBm

Typical RSSI curve

low LNA gainhigh LNA gain

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 22 of 38 AN7122x-Cookbook Rev. 007 May 2012

ASK (OOK) data detection can be done two ways:

8.1 ASK Detector with Bit Slicer

This bit slicer is very simple. The time constant is

approximately 200kΩ · C3. It works for both ASK and FSK reception. For NRZ data, the ratio of 1’s to 0’s should not be greater than about 5:1 because this method operates by filtering the average voltage of the data signal to the data comparator. If the data is RZ like Manchester, this is not a problem. The detector bandwidth is set by the RSSI output impedance of 33kΩ and C5. Remember: In ASK mode, the RSSI and OUT_DEM pins are connected together with a switch in the IC.

8.2 ASK Detector with Peak Detector

This circuit can be used for ASK if the DC component of the data is not constant. This is usually the case for NRZ (non-return-to-zero) codes. C6 is charged by the peak detector. The discharge time constant is C6 · (R1 + R2). Pins 6 and 7 are connected together, so one capacitor, C5 sets the detector and RSSI frequency response.

R1 is selected to be 100kΩ, and then R2 is set to give the desired offset to the (-) input of the internal OA1 (the output data comparator). If the system is designed to operate at short ranges, R2 can be reduced to increase the threshold of the data detector to reduce random outputs.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 23 of 38 AN7122x-Cookbook Rev. 007 May 2012

8.3 Fixed Threshold ASK Detector

In cases where a received ASK or OOK signal is not near the noise level such as in cable systems, the switching level of OA1 can be set to be somewhere between .5V and 2V with this circuit. The PD should be turned on with the programming so the - input of OA2 is not influenced by the RSSI signal through the internal 200K resistor. This gives the receiver a response down to DC to the RCV DATA output can detect a continuous carrier. There will also be no random data output if the threshold is not set too close to the noise level.

9 RF Input Matching

The LNA input pin IN_LNA can be considered as a parallel circuit of a capacitance Cin and a resistance Rin. Cin is relatively frequency independent and at Cin = 2pF while Rin ranges from about 600Ω at 27MHz to 200Ω at 900MHz. When designing a matching network, it should end with a series inductor. A capacitor from IN_LNA to ground may cause parasitic oscillations of the LNA at high frequencies above 1GHz. At high frequencies, an inductor in series with the input can resonate with Cin. Rin is close to the required load resistance for the TH7122x power amplifier (PA), so it can be connected to the PA output pin OUT_PA as is done in the evaluation boards. The LNA noise figure is about 2.3dB while its IIP3 is about –18dBm. During transmit, the LNA input is shunted to ground. The shunt resistance is approximately 33Ω. This is to protect the LNA input and to prevent the PA output from nonlinear distortions that could otherwise be caused by the PN junction of LNA input transistor.

10 RF Output Matching

The internal PA provides an open-collector output at pin OUT_PA. In order to provide bias to the PA, this pin is usually connected to positive supply by an inductor (LTX0). The saturation voltage of the PA output is about 0.7V. In order to avoid saturation of the output stage the peak output voltage swing should be less than VCC - 0.7V. The maximum available output power (TXPOWER = ‘11’) for different values of the power

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 24 of 38 AN7122x-Cookbook Rev. 007 May 2012

select resistor RPS on pin 24 is given in the data sheet. Since the open-collector output transistor can be considered as a current source, the only parameters needed to design the output matching network are the output capacitance, the peak voltage swing and the power which should be delivered to the load. The equation for the optimum load resistance is given in the data sheet. An example is given for a 3V supply and to deliver 10mW:

RL=

(V CC−V

CESAT )2

2⋅PO

=(3V−0 . 7V )2

2⋅10mW≈260 Ω

According to the output power vs. RPS curve given in the data sheet, the RPS value must be approx. 30kΩ

for 434MHz and 50kΩ for 868MHz applications. The internal capacitance at OUT_PA is typically 3pF. This can be part of the PI matching network or can be tuned in a parallel tank circuit together with the inductor LTX0. If the transceiver must be designed for a wide frequency range, matching is more difficult. A wide band transformer and/or multiple stage PI network can be used. If a PI network is used, LTX0 is usually made large enough to act as an open circuit for the RF signal.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 25 of 38 AN7122x-Cookbook Rev. 007 May 2012

11 LNA Output and Mixer Input Matching

The LNA output is also an open collector. Normally, it is tuned with an LC circuit and coupled to the mixer with a capacitor. However, a SAW filter can be added between the LNA output and the mixer input for better image rejection. At low frequencies, a double-tuned LC filter can also be used. When the SAW filter is placed between the LNA and mixer, the receiver sensitivity is improved slightly, but the image rejection is limited by leakage between the LNA and mixer pins. Maximum image rejection can be achieved if the SAW filter is put on the LNA input. But then the system noise figure is degraded by the loss of the filter. In this case an external LNA is usually used and an RF switch is usually used for switching between transmit and receive. The mixer input IN_MIX can also be considered as a parallel circuit of a capacitance Cin = 1.5pF and a resistance Rin = 200 Ohms. Both Cin and Rin are relatively frequency independent.

12 Special Considerations

• VCOCUR should always be set to the lowest possible setting (‘00’) on receive. This is important at frequencies above 500MHz to prevent excessive VCO signal levels on the antenna (LO leakage). It usually gives the best receive sensitivity at frequencies below 500MHz.

• The high VCOCUR setting (‘11’) is usually used for transmit.

• The largest possible capacitor should be added in parallel with RPS when transmitting ASK signals. This reduces the rise time of the PA turn on and improves the ASK spectrum. A 1nF capacitor is used in the evaluation boards.

• Pin 27 is the LNA ground and the PA ground. This pin should be connected to the ground plane and a ground trace on the top layer connecting it to the output connector ground.

• Resistors between a microcontroller and the SCI pins 15,16,17 will reduce interference caused by the microcontroller. 10kΩ can be used on pins 15 and 16 and a larger value up to 100kΩ can be used on pin 17 because this pin does not have a 120kΩ internal resistor to ground.

• Always use the highest possible PLL reference frequency for transmitting ASK. It should be 200kHz or higher. For frequencies like 315MHz, a 1MHz reference frequency can be used for transmit and 100kHz for receive. A custom crystal can be used to have a PLL reference up to 3MHz for transmit.

• The high CPCUR setting (‘1’) should be used for ASK.

• When operating at 868 or 915MHz into a mismatched nearby antenna or SAW filter, signal reflections may cause instability caused by coupling to the VCO which operates at the same frequency as the output signal. This can be improved by adding a 3dB/90-degree directional coupler between the TH7122x output matching network and the antenna. Such a coupler can be purchased as a thin film circuit or constructed with a few passive components as shown in Fig. 3.

Fig 11.1 3dB/90° directional coupler setup with LC components for 868/915MHz

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 26 of 38 AN7122x-Cookbook Rev. 007 May 2012

• When programming a TH7122x operating at 5V from a PC using the parallel port, the voltage output from the PC is sometimes not large enough to reach 0.7*VCC (3.5V), and the TH7122x will not program. This can be fixed by lowering VCC to 4.5V for programming or adding 10k pull-up resistors on the SCI lines or by adding a non-inverting buffer IC with open collector outputs pulled up to Vcc with resistors.

• The TH7122x sensitivity can be improved by adding an LNA stage before the TH7122x. In this case, a SAW filter should be placed between the LNA and IN_LNA of the TH7122x so the IM performance of the TH7122x is not degraded by the extra gain of the LNA. And, it may be necessary to put a T/R switch on the antenna to switch between transmit and receive.

13 EVB7122 Special Evaluation Board

The normal EVB7122 is used for standard ASK/FSK applications at 315, 433.92, 868.3, and 915MHz. It uses a reference crystal frequency of 7.1505MHz so that the programming pins on the EVB7122 will produce the correct transmit and receive frequencies without any external programming. For other frequencies and special applications, the EVB7122-special is available. It has additional pads for applications such as:

• Narrow band

• External varactor

• AFC with a ceramic or coil discriminator

• A SAW filter between the LNA and mixer

• A matching network between the mixer out and IF filter

• Direct VCO modulation This board is normally supplied with an 8.000MHz reference crystal to make programming via the SCI bus easier. For example, with 25kHz channel steps, NR and NT would be set to 320. For frequency hopping applications in the 902-928MHz band 400kHz frequency steps could be used, so NT could be set to 20. Also the coil pads are 1008 size so larger values needed for low frequencies can be used. For ASK applications, setting NT to 8 gives a transmit PLL reference of 1.0MHz. This gives very good ASK results for frequencies like 315 to 434MHz or even 915 MHz where the frequency is on even 1MHz centers. In this case NR could be set to 80 to allow tuning to the 10.7MHz offset for the receiver. The schematic shown in figure 12.1 shows all the components which can be placed on the EVB7122 special pcb. Figure 12.2 shows the complete PCB and component numbers. The bottom layer is almost all ground except for a Vcc trace which is placed there so it will not interfere with the text near the input and output pins. The pads for the IF matching network are 1210 size because these are usually in the range from 2.2 to 10uH. Note that there are pads for three different types of IF filters and two discriminators for both SMD and thru hole packages. The VCO can be set-up for either modulation across RF or across CF1. A thru hole pad is provided so the LNA gain can be externally controlled. RS1,RS2,RS3 are added as standard practice to reduce RFI signals which usually come from a microprocessor. RS1 is larger because the internal circuitry on pin 17 is a CMOS input without any resistor to ground and it provides additional filtering against glitches which may get into the SDEN input, pin 17). If this input receives any change of state, the chip will reset to and stop operating until it is re-programmed. RS2 and RS3 are smaller because there is a 130k resistor to ground on pins 15 and 16.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 27 of 38 AN7122x-Cookbook Rev. 007 May 2012

13.1 Circuit Schematic for EVB7122-special board

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 28 of 38 AN7122x-Cookbook Rev. 007 May 2012

13.2 PCB layout showing components, traces and bottom copper

Board layout data in Gerber format is available.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 29 of 38 AN7122x-Cookbook Rev. 007 May 2012

13.3 Overview Component List for Special Boards

Part Size Value Tol. Description

C0 0805 0.5-2.2pF ±5% VCO tank capacitor-to reduce VCO sensitivity

CRX1 0805 ±5% LNA input de-coupling

CRX2 0805 ±5% LNA output tank tuning option 1

CRX3 0805 ±5% LNA output tank tuning option 2

CM1 0805 0.5-12pF ±5% MIX input matching

C3 0805 10 - 100 nF ±10% data slicer capacitor (resistor if peak detector is used)

C4 0805 330 pF ±5% demodulator output low-pass capacitor, depending on data rate

C5 0805 1.0 nF ±10% RSSI output low pass capacitor

C7 0805 1nF-10pF ±5% in series with ext varactor to set tuning range and frequency

CB0 0805 10 µF ±20% power supply filter capacitor

CB1 0805 330pf-10 nF ±10% de-coupling capacitor-depends on frequency

CB2 0805 330pF-10 nF ±10% de-coupling capacitor-depends on frequency

CB4 0805 10 nF ±10% de-coupling capacitor

CB5 0805 100 nF ±10% de-coupling capacitor

CB6 0805 100pF-10nF ±10% de-coupling capacitor-depends on frequency

CB7 0805 100 nF ±10% de-coupling capacitor

CB8 0805 330pF-10nF extra de-coupling capacitor if needed

CF1 0805 220pF-4.7uF ±10% PLL loop filter

CF2 0805 39pF-100nF ±5% PLL loop filter

CIF1 0805 ±5% filter matching capacitor-part of filter matching network

CIF2 0805 ±5% filter matchingcapacitor-part of filter matching network

CP0 0805 0-12pF ±5% CERRES tuning capacitor-not needed with CDSCB10M7GA136

CTX0 0805 100pF-10nF ±5% TX coupling capacitor-depends on frequency

CTX1 0805 ±5% output matching capacitor

CTX2 0805 ±5% output matching capacitor

CTX4 0805 ±5% part of output tuning to suppress harmonics

CM1 0805 ±5% VCO modulation circuit

CM2 0805 ±5% TX rise time control for occupied BW

CTX1 0805 ±5% TX impedance matching capacitor

CTX2 0805 ±5% TX impedance matching capacitor

CTX3 0805 ±5% can be used to reduce 2nd

harmonic

CTX4 0805 ±5% tunes LTX0 with output C of PA

CX1 0805 ±5% sets center frequency for ASK and high freq with VCO modulation

CX2 0805 ±5% sets low frequency with FSK modulation

CPS 0805 1nF ±5% controls rise time for ASK and improves LNA stability

R4 0805 22 Ω ±5% Prevents parasitic oscillation when L0 is large for low frequencies

RM1 0805 ±5% VCO modulation circuit

RM2 0805 ±5% forms voltage divider with RM3

RM3 0805 10k ±5% VCO modulation input

R2 0805 10 kΩ ±5% varactor bias resistor (can use L for lower VCO noise)

RP 0805 3.3-5.6k ±5% CERDISC loading

RIF 0805 ±5% load for IF filter in parallel with 2k IF input resistance

R2 0805 100 ±5% filter for LNA output

RF 0805 ±5% PLL loop filter

R12 0805 100k ±5% AFC diode tuning

RPS 0805 10k-47k ±5% power-select resistor-sets maximum power

LIF 1210 4.7-10µH ±5% filter matching inductor for NB filters

RS1...RS3 0805 10 kΩ ±5% protection resistor and for filtering digital noise from micro

LRX1 1008 ±5% input matching inductor

LRX2 1008 ±5% LNA output tuning

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 30 of 38 AN7122x-Cookbook Rev. 007 May 2012

LTX0 1008 ±5% PA power and tuning

LTX1 1008 ±5% output matching network

VD1 SC70 SMV124x series VCO varactor diode

XTAL HC49 SMD 4 to 12MHz 10-18pF load

reference crystal Rm, max = 70 Ω

SMD SFECF10M7HA00 @ B3dB = 180 kHz SFECV

SFECF

SFE

Leaded type

SFKLA10M7NL00 @ BIF2 = 30 kHz ceramic filters

CERDIS SMD 4.5x2 CDSCB10M7GA136 ceramic Discriminator from Murata or similar part

Note: * Value is determined by special application

14 SW7122 Software Description

The TH7122 software, SW7122, is available for download from the Melexis website and is a self-installing Windows program. It was originally designed to run from a PC’s parallel port (LPT) but it has been modified to be used with the Melexis SPI-USB converter (a little PCB to be plugged to a PC’s USB port).

14.1 Parameter View

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 31 of 38 AN7122x-Cookbook Rev. 007 May 2012

Note that the fRO defaults to 7.1505MHz. This is the crystal used on the normal evaluation boards and is the only frequency which will produce the 4 stand-alone mode frequencies at the bottom of the page. Clicking any of the 4 frequencies on the bottom line will give the default settings for that frequency. All the default settings as well as ASK, FSK and Transmit or Receive mode can be set with jumpers on the standard evaluation board, and no programming is required. If you are using this Cookbook, you are probably interested in programming the TH7122 for other frequencies. In this case, the 3 serial input lines can be programmed with SW7122. <SET VOLTAGE> adjusts the SPI data voltage level. This should be set to be equal to the power supply voltage used to power the EVB. The setting is in mV, so with an external supply of 3.3V, it would be set to 3300mV. Set this to 0 when an external reference is connected to the USB adapter board. The external reference would normally be the same voltage used to power the EVB. <SET DEFAULTS> returns all the settings to the stand alone options: 868.3, 433.92, 915, 315 MHz <LOAD SETTINGS> loads a .cfg file and changes all the settings to the values in the file. Once you have set all the settings to give the results you want, save the settings by clicking on SAVE SETTINGS. <SEND DATA> loads the settings shown on the screen to the TH7122 registers. The OPMODE settings determine the operating mode. If the TH7122 does not seem to work when the SEND DATA button is pressed is usually because it is set for the Standby Mode which is the default. The best way to see if the settings have been loaded into the TH7122 is to observe the power supply current. It will be around 7.5mA in receive and around 25-30mA in transmit. If Standby Mode is selected, the current will be zero. In Idle mode, it will depend on the Idle mode setting. MODSEL sets the type of modulation for transmit and receive. If it is set for ASK, the RSSI signal is used for the receive and the RSSI, pin 7, and OUT_DEM, pin 6 are internally connected together. For FSK, the discriminator is used. DATAPOL determines the polarity of the transmitted data only. If it is set for ASK and the IN_DTA, pin 12, is low, there will be no carrier. Therefore for testing, ASK transmitters, it is helpful to set the DATAPOL to INVERSE so a carrier will be present when there is no data input. It must be set to INVERSE when doing 2 point FSK modulation where the VCO and crystal are both modulated. IDLESEL selects whether only the reference oscillator or the whole PLL is running in Idle mode. Since the crystal oscillator takes the longest time to start up, leaving it running makes the start-up time shorter, but, of course, it uses some current. If the whole PLL is operating, the loop will be locked and the start-up time will be very short. However, there is one condition which is important: The PLL will be in the state from the last transmit or receive setting. If you go from receive to idle with the whole PLL operating, it will be at the receive frequency. The same is true if you were in the transmit mode first. Therefore, it may need to switch from one mode to the other when going out of idle. This can be important in narrow band applications with a low loop frequency. FRO is the reference frequency normally a crystal frequency. For the TH7122, it can be any frequency from low frequencies to 16MHz. An external oscillator such as a TCXO or microprocessor reference can also be used. This is covered in the application note: "TH7122 and TH71221 Using an External Microprocessor Reference Oscillator (RO)". Remember that the receive or transmit frequency tolerance will be the same as the crystal tolerance. RR is the setting for the reference divider in receive, and RT for transmit. This divides fRO and applies it to the phase detector for the PLL. If fpll is the PLL phase detector frequency, then: FPLL = fRO/R = channel step where R = RR or RT

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 32 of 38 AN7122x-Cookbook Rev. 007 May 2012

NR is the setting for the N divider in receive and NT in transmit. The VCO frequency is: FVCO = fPLL * N = fro/R*N where N = NR or NT fLO shows the calculated VCO frequency in receive. FTX shows the calculated VCO frequency in transmit. When using values for N < 256, be sure not to violate the forbidden N settings shown in section 14.6. If the tuned circuit across the LO pins 20 and 21 is not correct, the VCO will not reach the calculated frequency. In this case the LD pin 19 will be low, and the tuning voltage on pin 23 will be near 0V (too small L for the tank) or Vcc (too big L for the tank). For proper operation of the PLL, the tuning voltage must be higher than 0.5V and less than (Vcc-0.5V). This is most easily checked with a high impedance DC voltmeter. Remember that the cathode of the internal varactor is connected to Vcc, so the capacitance is maximum when the LF voltage on pin 23 is near Vcc. TXPOWER has 4 settings for transmit power. 11-P4 is the maximum. The maximum PA current is set by RPS on pin 24. If the load impedance is set correctly, RPS will set the maximum RF power. CPCUR is the charge pump current. Normally, the low current, 260uA, is used. For ASK transmission and in some narrow band applications, the high current, 1400uA, is usually better. VCOCUR sets the VCO current. Usually, it is set to 900uA for transmit and 300uA or 500uA for receive. At high frequencies, the minimum setting is important to reduce the LO leakage out the antenna to meet some regulations. For low frequency applications, it is usually set to 300uA because the impedance of the LO tank circuit is usually high. PKDET-Enable turns on the peak detector and closes SW1 and opens SW2 in the block diagram. This causes a capacitor on pin 4 to be charged to the peak RSSI signal. It also works for FSK. PACTRL on controls the PA stage so it is only on if the loop is locked (LD output on pin 9 is high). Normally, it should always be enabled. OA2-Enable turns on OA2. OA2 is used for some AFC applications as is shown in Figures 6.3 and 6.4. If OA2 is not enabled, these circuits will not work. AFC-Enable turns on the internal AFC to center the FM detector. It should be turned off if an external AFC circuit is used or there may be conflicts between the two. BAND changes the current in the dividers. For fRF > 500MHz setting, the overall current is slightly higher. <HELP> shows the pin connections from the USB-SPI Adapter to the TH7122.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 33 of 38 AN7122x-Cookbook Rev. 007 May 2012

14.2 Register View

The main feature of this tab is to help with writing a microprocessor program to control the TH7122. At the bottom of each column are the settings for the A,B,C,D registers. These are changed every time a change is made in the settings in the Parameter View or Extended Parameters. There are some settings which are not included in the other tabs: In the A word, bits 12 and 13, the mixer gain can be changed. In the B word, bit 20, CP SWITCH, the operation of the CP can be controlled by the IN_DTA. If (B20) is set to 0, the CP output is floating (disconnected) when the IN_DTA is high.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 34 of 38 AN7122x-Cookbook Rev. 007 May 2012

14.3 Frequency Switching

The purpose of this tab is for testing the completed transceiver. Automatic Switching between two TX channels is used to measure the switching time to switch between two transmit frequencies. NT2 sets the N counter for the alternate frequency, and the Time (ms) sets the wait time to switch between the two frequencies. Automatic Switching between TX[NT] and RX[NR] does just what is implies. It is most useful for checking transmit to receive to determine how long it takes the peak detector or data slicer to give good data.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 35 of 38 AN7122x-Cookbook Rev. 007 May 2012

14.4 Extended Parameters

In most applications, only four of these functions ever need to be considered. PFDPOL sets the polarity of the phase/frequency detector output on pin 23. Since the cathode of the tuning varactor is connected to Vcc in most cases, it is set to Negative. In special applications such as with an external VCO where the varactor anode is grounded, it must be set to Positive. LNACTRL sets the control of the LNA to internal or external. If it is set to Internal LNA gain control, pin 29, GAIN-LNA has no effect and the LNA gain is set according to the C register bit C21. If it is set to External LNA gain control, the LNA gain switching is controlled by GAIN-LNA. pin 29. In this case, if the voltage on pin 29 is less than about 1.3V, the LNA is at high gain. When External LNA gain control is selected, the LNAHTST box appears. When this is checked, the LNA gain control input has a hysteresis of about .4V. This is usually used when pin 29 is connected to the RSSI signal to control the LNA gain. This causes the LNA to be switched to low gain when the input signal is high to increase the ASK dynamic range about 23dB. In narrow band high sensitivity applications, the internal LNA gain setting will sometimes causes some noise in the output signal. In this case, it is better to set the LNA gain control to external and ground pin 29. MODCTRL is self explanatory. If it is set to External modulation control, ASK/FSK operation is controlled by the ASK/FSK pin 13. Low = ASK High = FSK. If it is set to Internal Modulation Control, pin 13 has no effect.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 36 of 38 AN7122x-Cookbook Rev. 007 May 2012

DEPLL sets the time to wait for the PLL to start up. If it is set to Undelayed start, the PLL starts immediately independently of the reference oscillator, RO. If it is set to Start after 8 valid RO cycles, it waits until the RO amplitude is large enough for 8 cycles to drive the reference divider. If this is not done, the PLL frequency is undetermined until the RO is running. LOCKMODE: The default setting is Before Lock Only. In this case, once the PLL has locked, the LD output from pin 19 will go high (Vcc) and will remain latched with a high level output even if the VCO is tuned to a frequency where it can not lock. If the LD output is used to verify that the PLL has locked when changing frequency, the LOCKMODE should be set to “Before and after lock". LTDM sets the minimum number of phase detector consecutive edges when the PLL goes from locked to unlocked before the lock detector output LD, pin 19, goes low. ERTM sets the maximum number of RO clock cycles when the PLL goes from unlocked to locked before the LD output, pin 19 goes high. ROMIN sets the minimum reference oscillator, RO, current. The RO has its own AGC system for faster start-up, so RO min sets its minimum current when it is running. The default setting is 150uA. ROMAX sets the maximum RO current when it is just starting up. The default setting is 525uA. When using an external reference input, both ROMAX and ROMIN can be set to 0uA In most cases, DEPLL + LTDM + ERTM + ROMIN + ROMAX should not be changed. Also MODCTRL + LNACTRL + PFDPOL do not need to be changed from the default settings except for special conditions or for testing some parameter like LNA gain. In fact, the Extended Parameters tab should be ignored until a board is operating properly and the designer wants to do some in-depth testing.

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 37 of 38 AN7122x-Cookbook Rev. 007 May 2012

14.5 Forbidden N settings:

Below is a table of N counter settings which can not be used. These may be encountered in low frequency applications or in ASK applications where the PLL comparison frequency is high. The N counter is a dual modulus counter, so it is necessary that B > A.. If any of these settings are programmed into the TH122, it will not tune to the desired frequency.

A B N A B N A B N

4 4 68 6 6 102 9 9 153

5 4 69 7 6 103 10 9 154

6 4 70 8 6 104 11 9 155

7 4 71 9 6 105 12 9 156

8 4 72 10 6 106 13 9 157

9 4 73 11 6 107 14 9 158

10 4 74 12 6 108 15 9 159

11 4 75 13 6 109

12 4 76 14 6 110 10 10 170

13 4 77 15 6 111 11 10 171

14 4 78 12 10 172

15 4 79 7 7 119 13 10 173

8 7 120 14 10 174

5 5 85 9 7 121 15 10 175

6 5 86 10 7 122

7 5 87 11 7 123 11 11 187

8 5 88 12 7 124 12 11 188

9 5 89 13 7 125 13 11 189

10 5 90 14 7 126 14 11 190

11 5 91 15 7 127 15 11 191

12 5 92

13 5 93 8 8 136 12 12 204

14 5 94 9 8 137 13 12 205

15 5 95 10 8 138 14 12 206

11 8 139 15 12 207

12 8 140

13 8 141 13 13 221

14 8 142 14 13 222

15 8 143 15 13 223

14 14 238

15 14 239

15 15 255

Application Note Transceiver TH7122x

Cookbook

39011 07122 02 Page 38 of 38 AN7122x-Cookbook Rev. 007 May 2012

For the latest version of this document, go to our website at: www.melexis.com

Or for additional information contact Melexis Direct:

Europe, Africa: Americas: Asia:

Phone: +32 1367 0495 Phone: +1 248-306-5400 Phone: +32 1367 0495

E-mail: [email protected]

E-mail: [email protected]

E-mail: [email protected]

ISO/TS 16949 and ISO14001 Certified