Silicon ChipDead simple radio IF alignment with DDS - September 2017 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Editorial Viewpoint: A rapid shift to electric vehicles could be disastrous
  4. Feature: Commemorating Cassini's demise and... by Ross Tester
  5. Feature: Commemorating Sputnik’s birth by Ross Tester
  6. Project: Fully adjustable, 3-way active loudspeaker crossover Pt.1 by John Clarke
  7. Feature: This month: Melbourne’s turn for Electronex Expo
  8. Feature: The unclear future of radio broadcasting in Australia by Alan Hughes
  9. Feature: Digital Radio Mondiale (DRM): what’s it all about? by Jim Rowe
  10. Project: Dead simple radio IF alignment with DDS by Nicholas Vinen
  11. Serviceman's Log: When a GPS loses its way by Dave Thompson
  12. Feature: LTspice Tutorial Part 3: Modelling an NTC Thermistor by Nicholas Vinen
  13. Project: Arduino Data Logger Part 2 by Nicholas Vinen
  14. Project: Arduino “ThingSpeak.com” ESP8266 data logger by Bera Somnath
  15. Feature: El Cheapo modules Part 9: AD9850 DDS module by Jim Rowe
  16. Vintage Radio: The 3-transistor Philips MT4 Swingalong by Ian Batty
  17. PartShop
  18. Product Showcase
  19. Market Centre
  20. Advertising Index
  21. Notes & Errata: Arduino Stereo Audio Playback and Recording Sheld / 12V DC Cyclic Pump Timer / New Marine Ultrasonic Anti-fouling Unit / Induction Motor Speed Controller / Building the RapidBrake

This is only a preview of the September 2017 issue of Silicon Chip.

You can view 59 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Fully adjustable, 3-way active loudspeaker crossover Pt.1":
  • 3-Way Adjustable Stereo Active Crossover PCB [01108171 RevD] (AUD $12.50)
  • 3-Way Adjustable Stereo Active Crossover prototype PCB [01108171 RevC] (AUD $5.00)
  • 3-Way Adjustable Stereo Active Crossover PCB [01108171 RevE] (AUD $20.00)
  • Set of four 8-gang potentiometers with knobs for the 2/3-Way Active Crossover (Component, AUD $55.00)
  • SMD parts for the 3-way Adjustable Active Stereo Crossover (Component, AUD $30.00)
  • 3-Way Adjustable Stereo Active Crossover simulation file (Software, Free)
  • 3-Way Adjustable Stereo Active Crossover PCB pattern (PDF download) [01108171] (Free)
  • 3-Way Adjustable Stereo Active Crossover front & rear panel artwork (PDF download) (Free)
Articles in this series:
  • Fully adjustable, 3-way active loudspeaker crossover Pt.1 (September 2017)
  • Fully adjustable, 3-way active loudspeaker crossover Pt.1 (September 2017)
  • 3-way Active Crossover for speakers, Part 2 (October 2017)
  • 3-way Active Crossover for speakers, Part 2 (October 2017)
Items relevant to "Dead simple radio IF alignment with DDS":
  • Micromite LCD BackPack PCB [2.8-inch version) [07102122] (AUD $5.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based radio IF alignment with DDS [DDSIFAlign.HEX] (Programmed Microcontroller, AUD $15.00)
  • MCP1700 3.3V LDO (TO-92) (Component, AUD $2.00)
  • AD9833 DDS module with programmable attenuator (Component, AUD $25.00)
  • CP2102-based USB/TTL serial converter with 5-pin header and 30cm jumper cable (Component, AUD $5.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • Matte/Gloss Black UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $5.00)
  • Clear UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $5.00)
  • Gloss Black UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $4.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Radio IF Alignment [DDSIFAlign.HEX] (Software, Free)
  • Micromite LCD BackPack PCB patterns (PDF download) [07102121/2] (Free)
  • Micromite LCD BackPack/Ultrasonic sensor lid cutting diagrams (download) (Panel Artwork, Free)
Items relevant to "LTspice Tutorial Part 3: Modelling an NTC Thermistor":
  • Software for the LTspice Tutorial, Part 3 (Free)
Articles in this series:
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
Items relevant to "Arduino Data Logger Part 2":
  • Arduino Data Logger shield PCB with stackable headers [21107171] (AUD $5.00)
  • Arduino Data Logger shield PCB [21107171] (AUD $2.50)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • Elecrow 1A/500mA Li-ion/LiPo charger board with USB power pass-through (Component, AUD $25.00)
  • Elecrow 1A Li-ion/LiPo charger board with USB pass-through (Component, AUD $35.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • Firmware (Arduino sketch) file for the Arduino Data Logger (Software, Free)
  • Arduino Data Logger shield PCB pattern (PDF download) [21107171] (Free)
Articles in this series:
  • An Arduino Data Logger with GPS (August 2017)
  • An Arduino Data Logger with GPS (August 2017)
  • Arduino Data Logger Part 2 (September 2017)
  • Arduino Data Logger Part 2 (September 2017)
Items relevant to "Arduino “ThingSpeak.com” ESP8266 data logger":
  • DHT22/AM2302 Compatible Temperature and Humidity sensor module (Component, AUD $9.00)
  • Firmware (Arduino sketch) and libraries for the Arduino ThingSpeak.com Data Logger (Software, Free)
Items relevant to "El Cheapo modules Part 9: AD9850 DDS module":
  • Software for El Cheapo Modules: AD9850 DDS (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $10.00.

Dead-easy Superhet IF Alignment using Direct Digital Synthesis • Touch-screen convenience • Really quick and easy IF alignment! This project is based on the touch-screen Micromite DDS Signal Generator project and makes aligning the IF stage of superhet sets a snap, whether they are valve or transistor-based. It also lets you examine the IF stage bandwidth, which gives a good indication of the set’s selectivity, as well as the shape of the IF curve. I n the simplest terms, a superheterodyne AM radio works by mixing (ie, heterodyning) the radio station signal with a tracking oscillator signal that has a fixed frequency offset above (ie, super) that of the tuned station. The output of the mixer includes components at the sum and difference frequencies of the two input signals. The following stages reject all but the difference frequency and this carries the same audio (amplitude) modulation as the incoming signal from the radio station. The difference frequency is known as the Intermediate Frequency (IF) and the IF circuitry normally comprises two stages with tuned resonant circuits, each involving a transformer with adjustable cores (slugs). In more detail, the primary and secondary windings of each transformer have parallel capacitors and their cores need to be adjusted so that their resonant frequency matches the IF, eg, 455kHz or 450kHz. 66  Silicon Chip Adjusting the transformers in this way maximises the gain of the radio and the whole process is referred to as IF alignment. IF alignment also optimises the Q of each stage and this increases the rejection of unwanted signals (outside the tuned circuit’s resonant range). This has the effect of increasing the selectivity of the radio which means that it is easier to tune when stations are crowded together on the dial. Normal alignment also involves adjusting the antenna input circuits so that stations at the top and bottom of the dial (ie, the full timing range) are actually received at the marked points (ie, the station call sign or the transmitter frequency on the dial). Note that some sets with a wide audio bandwidth (say 10kHz or more) may have the IF transformer cores adjusted to slightly different frequencies, say 447kHz and 463kHz, in the case of by Nicholas Vinen a 455kHz IF. This “staggered tuning” gives a wider audio bandwidth but slightly lower gain. For more information on how a superhet set works, see the AM Radio Trainer project in the June 1993 issue; it’s available as a PDF download from our online shop at www.siliconchip. com.au/Shop/5/3435 We also published a detailed description of the operation of the IF stage in the December 2002 issue; see www.siliconchip.com.au/Article/ 6698 Aligning the IF stages There are a number of methods by which you can do alignment on an AM radio but the simplest approach involves injecting a signal into the set which can be set to the intermediate frequency. If this signal is modulated (typically at 400Hz), you can easily judge the effect of your adjustments by the loudness of the tone in the radio’s loudspeaker. That means you need a siliconchip.com.au It’s all housed in a small Jiffy Box . . . and if you’re into restoring vintage radios, for example, you’ll find this the best thing you’ve ever seen since sliced bread! modulated RF oscillator which can be set to precisely 450 or 455kHz. It is also desirable that its output is a clean sinewave, ie, with few harmonics to cause problems in the alignment results. Unfortunately, the output waveform of most old valve and transistor RF oscillators is surprisingly distorted and their output amplitude can also vary significantly as the frequency is changed. But there is a much easier and more elegant way and here is where modern technology comes to the rescue. Sweep oscillator What we would really like is to plot of the set’s detector output against the injected frequency so we can actually see what the IF stage frequency response looks like. That’s just what this project does. It produces a signal which is swept over a range of frequencies around the nominal IF and it measures the output of the voltage detector (usually a diode just preceding the volume control). The varying DC output can then be SWEEP OSCILLATOR plotted on an LCD screen. You can set the centre frequency and span and it automatically scales the vertical axis and adds cursors showing the peak frequency and (if visible) -3dB points. That makes doing the IF alignment, and even setting the IF bandwidth, easy! But we are getting ahead of ourselves. Fig.1 shows the concept. The sweep oscillator can be thought of as an oscillator which can be set to vary in a linear fashion from say, 440kHz to 470kHz, repeatedly. This signal is connected to the input of the IF stages and the output of the detector is connected to an oscilloscope. But we have combined the sweep oscillator and the oscilloscope screen into the one unit. For the sweep oscillator, we’re using a Direct Digital Synthesis (DDS) module based on the Analog Devices AD9833 IC. Then we’re using the Micromite LCD BackPack to provide the oscilloscope function, to display the result. AM RADIO Because the Micromite is controlling the DDS, it can synchronise the plotted result on the screen with the frequency of the sweep oscillator. The hardware used in this project is pretty much the same as that in the Micromite BackPack Touchscreen DDS Signal Generator that was published in the April 2017 issue. The main changes are to the software, to provide the sweep and plotting function. There’s just a slight change hardware, to provide the required analog voltage measurements. Circuit operation The circuit diagram for the DDS IF Alignment unit is shown in Fig.2. Most of the work is done by the Micromite software running on the BackPack and the arbitrary waveform generator module which contains the AD9833 IC. If you compare this diagram to the one from the Touchscreen DDS Function Generator in the April issue (on page 70), you will see a few minor changes. Firstly, we have changed the coupling capacitors from the PGA (pro- DETECTOR OUTPUT IF Fig.1: an overview of how this unit can be used to plot the frequency response of the IF stage in a radio. A sinewave signal is produced which sweeps from just below the intermediate frequency to just above and this is injected into the set via its antenna. The detector voltage is then plotted against the sweep frequency on an LCD screen to produce a frequency response plot. Note that the sweep oscillator’s output is not amplitude modulated. siliconchip.com.au September 2017  67    Fig.2: circuit diagram for the DDS IF Alignment unit. It consists primarily of the Micromite LCD BackPack at left, wired to an AD9833-based DDS module at centre. The DDS module produces the sweep signal at the output connector and the resulting DC detector voltage is applied to the input connector and then fed back to the Micromite, to be measured and plotted on the touchscreen. grammable gain amplifier) output of the DDS module to the output connectors to a single 10nF 630V type, primarily to provide protection for the DDS module from accidental connections to HT voltages in valve radios. We have also added a 10kΩ resistor in series, to limit inrush current in the case of a short circuit. This offers the possibility of inject- ing the signal into HT-biased parts of the circuit but as we will see later, that is generally not necessary. We’ve omitted the attenuated output terminal since you can adjust the sinewave amplitude output of the DDS via the touchscreen and you can also control the amount of signal coupling into the radio antenna by how closely you place the leads (more on that later). Fig.3: the modified main screen from Geoff Graham’s DDS Signal Generator. Note the new “IF Align” button at centre left. You can still use the unit as a signal generator, with all the same functions of the original unit. We simply added the extra functions required for IF alignment, accessed via this new button. 68  Silicon Chip We haven’t bothered with any DC biasing of the output since that will generally be accomplished in the set if you are using direct signal injection. In place of the trigger output used in the original DDS Generator project, we have an analog input that’s intended to monitor the DC output of the detector or AGC (automatic gain control) signal. This gives the unit direct feed- Fig.4: we hooked our test unit up to an HMV 64-52 “Little Nipper” valve superhet and this is the result. The plot shows that the IF stage needs some re-alignment as its peak response is not at 455kHz. Note the cursors indicating the peak and (approximate) -3dB points. The output lead was simply placed near the ferrite rod antenna while the output of the detector was taken from the top of volume control pot VR1 (which doubles as the AGC signal, fed to R4). siliconchip.com.au back on the amount of signal passing through the IF stage. This goes back to pin 24 on the BackPack since this is an analog input. It’s protected from accidental high voltage application via a 4.7MΩ series resistor and this also forms a divider with the 1MΩ resistor to pin 22, if pin 22 is actively driven. If pin 22 is left floating by the software, it has little effect on the voltage at pin 24. For radios which have a negative AGC/detector output (the majority), pin 22 is driven high, to +3.3V. This allows pin 24 to measure voltages down to -15.5V (3.3V x -1 x [4.7MΩ ÷ 1MΩ]). To measure positive voltages, pin 22 can be left floating for high sensitivity (0-3.3V) or driven low for low sensitivity (0-18.8V) measurements. This is all under the control of the software. We won’t go into a great deal of detail on the operation of the AD9833 DDS module. This was covered in a dedicated article in the April 2017 issue, starting on page 18 (see www.siliconchip.com. au/Article/10608). It was also explained in the article on the DDS Signal Generator in the same issue. In brief, software running on the LCD BackPack sends commands to the DDS module over a three-wire SPI (serial peripheral interface) bus comprising pins SCLK (clock), SDATA (data) and FSY (module select). The same SPI bus is used to communicate with a digital attenuator in the same module, except that the CS (chip select) line is pulled low when communicating with it, rather than FSY. By sending serial commands to the AD9833, the PIC32 in the BackPack can set the output waveform type (sine, triangle, square), the frequency (from 0.1Hz to 12.5MHz), the phase and it can also put the AD9833 IC into lowpower sleep mode, or wake it up. By sending commands to the digital attenuator, the output level can be changed in 255 steps, over a range of about 4mV to 1V RMS. Software operation The software for this project is based directly on the software for the DDS Signal Generator from April 2017 and retains all the original features of that project. We’ve simply added an “IF Align” button to the main screen (see Fig.3). siliconchip.com.au Parts list – DDS IF Alignment 1 2.8-inch Micromite LCD BackPack kit with microcontroller programmed for DDS IF Alignment (DDSIFAlign.HEX), laser-cut lid and mounting hardware (SILICON CHIP online shop Cat SC4021) 1 DDS Function Generator module with AD9833, AD8051 and MCP41010 ICs (SILICON CHIP online shop Cat SC4205) 1 UB3 plastic Jiffy Box 4 M3 x 10mm Nylon machine screws 12 M3 Nylon hex nuts 11 short single pin female-female DuPoint jumper leads (Jaycar WC6026; set of 40) 1 USB charger with USB-to-DC-plug cable (see Fig.7) 1 chassis-mount DC barrel socket, to suit cable 2 chassis-mount BNC sockets 1 10nF 630V polyester capacitor 1 4.7MΩ 1W resistor 1 1MΩ 0.25W resistor 1 10kΩ 1W resistor Once you’ve set up the generator to produce a sinewave at the expected intermediate frequency, press this button and the unit will go into sweep mode. By default, it will sweep from 10kHz below the current centre frequency to 10kHz above (ie, a span of 20kHz). Each sweep takes a couple of seconds. To do a sweep, the unit first sets the DDS output frequency to the lower end of the sweep range, then after a short delay, measures the voltage at the detector input. It then increases the output frequency by 1/80th of the span and measures the detector input voltage again. Once it has at least two measurements, it updates the display with a short line segment, forming that portion of the IF curve plot. This process is repeated until the frequency is at the top of the span (ie, after 80 steps) and the curve plot is complete. The unit then repeats this process forever, so that the plot is constantly being updated. Each time a sweep is completed, it analyses the data and finds the maximum value, then draws a cursor, which includes text that shows the peak frequency and voltage reading, plus a vertical line down to that part of the curve. It then looks for the -3dB points on either side of this peak and if found, draws cursors for them too, including the frequency readings. The mode buttons that are normally at the bottom of the screen in the DDS Signal Generator are still present in sweep mode, so pressing any of these will take you out of sweep mode and back into one of the normal signal generator modes. Other areas of the screen can be touched to change the sweep parameters. You can press on the centre frequency, at the bottom of the plot, to change it (a keyboard will appear). Similarly, touching either the lowest or highest sweep frequency in the bottom corners will let you set the frequency span. If you press on one of the cursors at the top of the screen, you will change the cursor update interval. Normally they are updated each time a sweep is completed but you can set them to change on every second or fourth sweep, to give you more time to read them off, by pressing on the cursors. The first number in the top-right hand corner of the plot (before the comma) indicates the current cursor sweep update interval. The second of these two numbers indicates the detector voltage input mode. The default mode is “1” which inverts the voltage measured and gives a maximum input reading of around -16V. In this mode, the pin 22 output is driven high, in order to shift negative input voltages up into the range of 0-3.3V, so the micro can measure them. Pressing on the middle of the screen will change this mode to “2”, which sets the pin 22 output low. Thus, the unit measures positive voltages, from 0V up to around +19V. Pressing again will change the mode to “0”, which causes pin 22 to float and so September 2017  69 Here’s how it all fits inside a UB3 Jiffy Box, albeit with a new laser-cut acrylic front panel. The 10kΩ 1W resistor attached to the upper BNC socket appears to go to nowhere in this photo; in fact it is soldered to the 10nF capacitor immediately below it. Similarly the orange cable connecting to the BackPack solders direct to the end of the 4.7MΩ 1W resistor. Note also the small piece of strip board attached to the MicroMite BackPack PCB – we used this to more firmly anchor the 1MΩ 1W resistor which connects between pins 22 and 24 of the BackPack. Incidentally, 1W resistors were chosen not for their power dissipation but instead for their voltage ratings, assuming the DDS module will be used with the higher voltages of valve radios. the input voltage measurement range is 0-3.3V. Another press will take you back to mode 1. The input impedance is around 5MΩ, regardless of mode. Note that current does flow into pin 24 when making analog measurements and the high source impedance of 4.7MΩ, due to the series resistor, will cause errors in the readings. But the whole measurement process is quite approximate, due to various factors such as AGC operation, imperfect coupling of the test signal into the set, non-linearity in the detector, background noise being picked up by the set’s antenna (unless it is disconnected), etc. In general, the measurements are close enough to get a pretty good plot of the IF stage’s response and make any necessary adjustments. online shop. You can use the plain BackPack kit (www.siliconchip.com.au/ Shop/20/3321) and load the BASIC code for the DDS IF Alignment yourself, using a USB/serial adaptor and the free MMEdit software. Or for the same price, you can pur- chase a kit with the software pre-loaded on the microcontroller from www. siliconchip.com.au/Shop/20/4021 Both kits are supplied with a lasercut lid to replace the UB3 jiffy box lid, with the required cut-out and holes already drilled. The kits also come with the hardware needed to attach Construction The majority of the assembly required for this project is to build the LCD BackPack module. This is available as a kit from the SILICON CHIP 70  Silicon Chip Fig.5: this diagram shows how the LCD BackPack is attached to the underside of the 3mm laser cut lid, while the DDS module is mounted in the bottom of the jiffy box. siliconchip.com.au 103K 630V    Fig.6: follow this diagram to make the connections between the LCD BackPack, DDS module and input/output sockets. The components between the PGA output on the DDS module and the output connector can be made as shown here while you may prefer to mount the other two components on a small piece of prototyping board, as we did for our prototype. the module to the lid. Assembly is quite straightforward, simply fit all the parts where indicated on the PCB silkscreen label. For full details, see the February 2016 article describing the BackPack (www.siliconchip.com.au/Article/ 9812) but most constructors won’t have any trouble figuring it out. Make sure the 28-pin socket goes in with its notch in the position shown and when you plug the micro into its socket, its pin 1 dot needs to go near the notch. The female header for the LCD and 6-pin right-angle in-circuit serial programming (ICSP) header both go on the same side as the micro and related components, while the two vertical male pin headers for the input/output connections are soldered on the back. Regarding the three 10µF/47µF capacitors, note that they were shown as through-hole tantalum types in the February 2016 article, and you can use these, but we prefer to use SMD ceramics as they are more reliable and this is what is supplied in the kit. The ceramic capacitors are not polarised and the PCB has pads to suit either type. The kit is normally supplied with two SMD capacitors in one pack and one in another; the one by itself is the 47µF type. However, it doesn’t actually matter where you solder them since we only specified 47µF for VCAP in case tantalum capacitors are used. When ceramic capacitors are used, 10µF is sufficient for all three. This has been a point of confusion for some constructors who have ordered kits. Once the module is complete, power it up to make sure it works and then attach it to the underside of the lid with the supplied 1mm thick Nylon washers as spacers. The touchscreen is held onto the main board by screws which pass through the lid, these spacers, the LCD module and then into the spacers mounted on the main board. The overall arrangement is shown in Fig.5. Final assembly The next job is to place the DDS module in the bottom of the case and mark and drill mounting four 3mm holes, then attach it to the inside of the case using Nylon machine screws and nuts, as shown in Fig.5. This module should be mounted to- wards the right-hand end of the case, around 60mm from the end, with the output connector to the right. The only other holes you need to drill are two in the right side of the case for the BNC sockets (10mm) and one in the left side for the DC power socket (8mm). You can then mount those sockets and solder the extra components as shown in the wiring diagram, Fig.6. The easiest way to do this is to trim the leads of the 10kΩ resistor short and solder one to the central pin of the output socket. One end of the 630V capacitor can be soldered to the PGA output of the AD9833 module before that module is installed in the case, then trim the remaining lead and solder it to the free end of the 10kΩ resistor. The 4.7MΩ resistor can also be soldered directly to the centre pin of the input socket and then a short wire run back to pin 24 on the BackPack I/O header. We made up a little plug-in board out of a piece of prototyping board, with the 1MΩ resistor onboard and a header for this wire to plug into so that we could easily remove it later if we Fig.7: this power supply cable is made from a USB cable cut short, with a DC plug soldered onto the end. It plugs into a USB charger, which is a cheap and readily available source of regulated 5V. The unit can also be run from a USB power bank or the USB port of a computer. The wires inside the USB cable should be colour coded; solder the red wire to the inner conductor, the black wire to the outer barrel and cut short and insulate the white and green (USB signal) wires. siliconchip.com.au September 2017  71 There’s the old way, using a 455kHz generator and a ’scope to monitor the waveform (and lots of time!) . . . and the new way, using the touch-screen DDS to perform the alignment much more easily. Note that while the oscilloscope’s vertical scale is showing peak voltage, the display on the DDS Alignment Unit has a logarithmic vertical scale (ie, it reads in dB) so the shape of the curve is different. However, they are effectively displaying the same thing. needed to. You could solder the 1MΩ resistor directly between the pins to save time. With the four extra components in place, all that’s left to do is wire up the various connections using the jumper leads, as shown in Fig.6, plus the two wires to the DC socket. Where you need to go from a header pin to a soldered connection, you can simply cut the DuPont socket off one end of the wire, strip it back and then solder it in place. The other end can then just be plugged in; see the internal photo for more details. Now double-check that you have wired up the DC socket with the correct polarity before powering the unit up because there’s no protection against reverse polarity! The easiest way to do this is to unplug the +5V connection from the BackPack board (check the silkscreen labelling to see which one this is) while leaving the earth connection attached. Apply power, then measure between the disconnected pin and the outer shield of one of the BNC sockets with your DMM, with the black lead to the BNC socket shields. If you get a positive reading on the DMM, close to +5V, plug the cable back in and the unit should spring into life. 72  Silicon Chip Once you’ve verified that it’s all working, you can attach the lasercut lid to the case with the supplied self-tapping screws and the unit is complete. Note that as the lid is slightly thicker than the one originally supplied with the case, and doesn’t have recesses for the screw heads, it’s possible you may need to substitute longer screws; we find the ones supplied with UB3 boxes from Jaycar are just long enough. That’s it, you are ready to start alignSC ing radios.       Reprinted from the April 2017 feature on the AD9833 module (siliconchip.com.au/Article/10608) this shows the circuit of the AD9833-based DDS module used in this project, The output is taken from the socket labelled PGA and AGND (lower right). siliconchip.com.au