Silicon ChipEl Cheapo Modules 14: Logarithmic RF Detector - March 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Got a project idea? There'll be a badly designed app for that!
  4. Project: Arduino-based Earthquake Early Warning Alarm by Allan Linton-Smith and Nicholas Vinen
  5. Feature: Generation IV Nuclear Power – making their own fuel by Dr David Maddison & Dr Mark Ho
  6. Project: Full Wave, 230V Universal Motor Speed Controller by John Clarke
  7. Product Showcase
  8. Serviceman's Log: Squeezing an elephant through the eye of a needle by Dave Thompson
  9. Project: An AM Radio Transmitter to build by Nicholas Vinen & Jim Rowe
  10. Feature: El Cheapo Modules 14: Logarithmic RF Detector by Jim Rowe
  11. Project: Analog Audio/Video Modulator for Vintage TV sets by Ian Robertson
  12. Vintage Radio: Philips 1953 portable 5-valve model 148C radio by Associate Professor Graham Parslow
  13. PartShop
  14. Market Centre
  15. Advertising Index
  16. Notes & Errata: Lath-e-Boy / Touchscreen Altimeter and Weather Station / High-Power DC Fan Controller / Arduino Mega Box Music Player / SC200 Audio Amplifier
  17. Outer Back Cover: Microchip Embedded GUI Design

This is only a preview of the March 2018 issue of Silicon Chip.

You can view 37 of the 104 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 "Arduino-based Earthquake Early Warning Alarm":
  • Arduino sketch (.ino) file and library for the Arduino Earthquake Early Warning system (Software, Free)
Items relevant to "Full Wave, 230V Universal Motor Speed Controller":
  • Triac-based Full Wave 230V Universal Motor Speed Controller PCB [10102181] (AUD $10.00)
  • PIC12F675-I/P programmed for the Triac-based Full Wave 230V Universal Motor Speed Controller [1010218B.hex] (Programmed Microcontroller, AUD $10.00)
  • Firmware (HEX and ASM) files for the Full-wave 230V Universal Motor Speed Controller [1010218B.HEX] (Software, Free)
  • Triac-based Full Wave 230V Universal Motor Speed Controller PCB pattern (PDF download) [10102181] (Free)
  • Triac-based Full Wave 230V Universal Motor Speed Controller lid panel artwork (PDF download) (Free)
Items relevant to "An AM Radio Transmitter to build":
  • AM Radio Transmitter PCB (RevB) [06101181] (AUD $3.75)
  • AM Radio Transmitter PCB (RevD) [06101181] (AUD $7.50)
  • IPP80P03P4L-07 high-current P-channel Mosfet (Component, AUD $2.50)
  • MC1496P double-balanced mixer IC (DIP-14) (Component, AUD $2.50)
  • AM Radio Transmitter PCB pattern (PDF download) [06101181] (Free)
  • AM Radio Transmitter lid panel artwork (PDF download) (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)
Items relevant to "Analog Audio/Video Modulator for Vintage TV sets":
  • Vintage TV Analog Audio/Video Modulator PCB [02104181] (AUD $7.50)
  • MC1374P AV modulator IC (DIP-14) (Component, AUD $5.00)
  • Vintage TV Analog Audio/Video Modulator PCB pattern (PDF download) [02104181] (Free)
  • Vintage TV Analog Audio/Video Modulator panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Using Cheap Asian Electronic Modules Part 14: by Jim Rowe Banggood’s RF Detector This nifty RF Detector module from Banggood can measure the power of RF signals from 1MHz to 8GHz, over a range of 60dB. It is on a tiny PCB measuring 33 x 24.5mm and has an SMA RF input connector attached to one end. It’s based on the Analog Devices AD8318 chip, which is an enhanced version of the AD8307. A s a matter of interest, we used the Analog Devices AD8307 chip in the RF Level and Power Meter project of October 2008 (siliconchip.com.au/ Article/1971) and also in the Arduino Multifunction Measuring Shield of April-May 2016 (siliconchip.com. au/Series/299). Both the AD8318 and AD8307 are logarithmic amplifier/detectors which provide a DC output voltage proportional to the RF input power level. But the AD8318 has a much wider bandwidth of 1MHz to 8GHz, compared with the DC-500MHz range of the AD8307. While the AD8307 has a range of just over 90dB, the AD8318 has a smaller dynamic range of about 60dB (necessary to get the improved frequency range). Unlike the AD8307, which operates from a nominal supply voltage of 3V, the AD8318 is designed to operate from 5V. It also has a typical supply current of 68mA, compared with the 7.5mA drawn by the AD8307. But perhaps the most important functional difference between the two devices is in terms of the output circuitry. The AD8307 has a current mirror in the output circuit which provides a positive slope to the DC output voltage. So the output voltage is directly proportional to the RF input level, with a slope of 25mV/dB. In contrast, the AD8318 has a different output circuit designed to alsiliconchip.com.au low it to be used for power amplifier gain control. As a result, it provides an output voltage which is inversely proportional to the RF input, with a slope of -25mV/dB. Is this a problem? Not when you are going to use it in conjunction with an Arduino or other microcontroller. Fig.1 shows a simplified version of the circuitry inside the AD8318. It has nine detector stages, interspersed with eight cascaded gain stages. The nine detector outputs are fed to an adder which drives a current-to-voltage converter to produce the output voltage, Vout. The V-I (voltage-to-current) converter at upper right allows adjustment of the slope of Vout in measurement mode. For example, the output slope of -25mV/dB is achieved when the Vset pin and the Vout pin are tied together. Higher output slopes can be obtained by connecting a voltage divider between the Vout pin and ground, and feeding a fraction of Vout back to the Vset pin. So if the voltage fed back to Vset is Vout ÷ 2, this changes the output slope to -50mV/dB. However, the output voltage is always in the range of 0.5-4.6V, so beyond -55mV/dB, the dynamic range will be reduced as the output at lower RF levels will be pegged at 4.6V. Note that the AD8318 includes an internal temperature sensor as well as bias stabilisation circuitry for the cascaded gain stages so that changes Fig.1: simplified block diagram of the AD8318 logarithmic detector/controller. It has nine detector stages interspersed with eight gain stages. Celebrating 30 Years March 2018  73 Fig.2: circuit diagram of the log detector module. Clpf and Cobp are optional capacitors used to filter ripple from IC1’s output. Suitable values are 1nF for Clpf and 10nF for Cobp with pads provided for mounting on the PCB. in ambient temperature do not unduly affect accuracy. All this is squeezed into a tiny 4 x 4mm 16-lead LFCSP (SMD) package; much smaller than the 8-pin SOIC/ PDIP packages used for the aforementioned AD8307. Now have a look at the circuit for the Banggood log detector module shown in Fig.2. Apart from the AD8318 chip itself (IC1), there is not much to it. The only other IC is REG1, a 78L05 regulator in a SOT-89 3-pin package with tab. This provides a regulated 5V rail for IC1. But the 78L05 has a nominal dropout voltage of 2V, so the module needs a power supply (Vcc) of at least 7.5V. As with many modules, there’s one LED to indicate when power is applied. LED1 is connected directly be- tween the Vcc input and ground with a 10kW series resistor. CON1 is the RF input, an SMA edgemount socket. This is terminated via a 51W resistor and then coupled to the INhi input (pin 14) of IC1 via a 1nF capacitor, with a second 1nF cap coupling the INlo pin of IC1 (pin 15) to ground. As the input resistance of IC1 between pins 14 and 15 is close to 1200W, this gives the input circuit a low-frequency cutoff of around 300kHz. The effective input resistance at frequencies below about 100MHz is around 49W (51W || 1200W). Pin 16 of IC1 is the enable input, which can be used to switch the device into a low-current standby mode if desired, by pulling it to ground. However, in the Banggood module, it’s connected to the +5V line, so the chip always functions while the module is powered up. But what’s the purpose of that 510W resistor connected between pin 10 (Tadj) of IC1 and ground? It allows adjustment of the chip’s internal temperature compensation, to optimise its operation at different frequencies. A value of 510W apparently gives very close to optimum compensation at frequencies up to 2.2GHz, and also at 8GHz, while optimum operation at 3.6GHz and 5.8GHz can be achieved by changing RTadj to 51W or 1kW, respectively. Even so, a value of 510W apparently gives acceptable performance over the whole range. The two capacitors shown in red, Clpf and Cobp, are used for filtering any ripple in the output from IC1. If both capacitors are omitted, the nominal output video bandwidth of the AD8318 is around 45MHz, making it suitable for demodulating pulse signals. But if you’re using it purely for measuring unmodulated RF, this wide bandwidth can allow significant second-harmonic ripple to appear in the output for input signals below 22MHz. Since this ripple can cause measurement jitter, the simplest way to reduce its effect is to add either Clpf or Cobp, or both. A suitable value for Clpf is 1nF, while that for Cobp is around 10nF and these values give an output bandwidth of around 100kHz. By the way, neither of these capacitors are fitted to the module board (even though pads are provided for fitting them as 0603 SMD components) Banggood’s logarithmic RF Detector module detector module is based on the Analog Devices AD8318 chip. It has an RF bandwidth of 1MHz to 8GHz with a range of -65dBm to +5dBm and an input impedance of 50W. These photos are almost twice actual size. 74 Silicon Chip Celebrating 30 Years siliconchip.com.au which is why we’ve shown them in red in Fig.2. Trying it out To check out this module, I hooked it up to a suitable 9V DC power supply and connected its RF input up to a VHF/UHF signal generator. Then I monitored its output using a 4.5-digit bench DMM while varying the RF input level over the range from +10dBm to -70dBm, for four different frequencies: 100MHz, 1GHz, 2GHz and 4GHz. I wasn’t able to go above 4GHz because that’s the highest frequency my signal generator provides. These measurement runs were used to plot the module’s transfer characteristic at each of the four sample frequencies and the results are shown in Fig.3. The four plots are very close to linear between RF input levels from -5dBm down to -60dBm and only curve gently away at the upper and lower extremes. Although the truly linear part of the module’s transfer characteristic only covers about 55dB, the curved sections at each end give it a useful range of about 70dB as claimed in the data sheet. The linear sections of all four plots are well within ±1dB of each other and have a slope of -24.33mV/dB; very close to the expected -25mV/dB. Note that we’ve mentioned a 60dB range before, as this is the practical range over which you can expect to get an accurate result. Connecting to an Arduino or Micromite Interfacing this module to a micro is straightforward. Just feed the module with 7.5-9V DC and connect its Vout to either one of the micro’s own ADC inputs directly, or to a higher-resolution ADC coupled to the micro via an SPI or I2C interface. Then it’s just a matter of writing a firmware sketch or MMBasic program to read the analog Vout signal and convert it into an RF power level. So this module should be suitable for use as the sensor section of a homebrew VHF/UHF level and power meter. You could even use it as an RF sensor head for our Arduino Multifunction Measuring Shield (MFM), although its negative-slope transfer characteristic would require some changes to the MFM’s firmware sketch. Other uses would be in an RSSI (received signal strength indicator) for UHF base station receivers and WLAN routers. In short, it seems to represent good value at around $16.50. SC Fig.3: plot of the transfer characteristic for the AD8318 at four different input frequencies. Note the excellent linearity. siliconchip.com.au Celebrating 30 Years March 2018  75