A Wire Is an Inductor (EE Tip #126)

I’m confident you know that you should keep wires and PCB tracks as short as possible. But I’m also sure that you will underestimate this problem fairly frequently.

Remember that 1 cm of a 0.25-mm-wide PCB track is roughly equivalent to an inductance of 10 nH. If this 10 nH is paired with, say, a 10-pF capacitor, that gives a resonant frequency as low as 500 MHz, which is easily below the third or fifth harmonics of the clock frequencies commonly seen on modern high-speed digital boards. Similarly, a 1-cm-long track will jeopardize the performances of any RF system such as a 2.4-GHz transceiver. There is only one solution: keep tracks and wires as short as possible. If you can’t, then use impedance-matched tracks.

Remember this rule especially for the ground connections: any grounded pad of any part working in high frequencies should be directly connected by avia to the underlying ground plane. And this via must be as close as possible to the pad, not some millimeters away.

Just yesterday I did a design review of a customer’s RF PCB. A small 0402 inductance was grounded through a via that was 3 mm away. It was a bad idea because the inductance was as low as 1 nH. Those 3 mm changed its value completely.—Robert Lacoste, “Mixed-Signal Designs,” CC25:25th Anniversary Issue, 2013. 

Wireless Data Links (Part 2): Transmitters and Antennas

If you built your own ham radio “back in the day,” you’ll recall the frustration of putting it together with components that were basic at best.

But as columnist George Novacek points out in the second installment of his series examining wireless data links: “Today you can purchase excellent, reasonably priced low-power gear for data communications off the shelf.”

Transmitter and receiver

Photo 1: SparkFun Electronics’s WRL-10524 transmitter and WRL-10532 receiver are low cost, basic, and work well.

Part 2 of Novacek’s series, appearing in the March issue, looks at transmitters and antennas.

In one section, Novacek expands upon the five basic data-transmitter modules—a data encoder, a modulator, a carrier frequency generator, an RF output amplifier, and an antenna:

Low-power data transmitters often integrate the modulator, the carrier frequency generator, and the amplifier into one circuit. A single transistor can do the job. I’ll discuss antennas later. When a transmitter and a receiver are combined into one unit, it’s called a transceiver.

Modulation may not be needed in some simple applications where the mere presence of a carrier is detected to initiate an action. A simple push button will suffice, but this is rarely used as it is subject to false triggering by other transmitters working in the area in the same frequency band.

Digital encoder and decoder ICs are available for simple devices (e.g., garage door openers) or keyless entry where just an on or off output is required from the receiver. These ICs generate a data packet for transmission. If the received packet matches the data stored in the decoder, an action is initiated. Typical examples include Holtek Semiconductor HT12E encoders and HT12D decoders and Freescale Semiconductor MC145026, MC145027, and MC145028 encoder and decoder pairs. For data communications a similar but more advanced scheme is used. I’ll address this when I discuss receivers (coming up in Part 3 of this series).

Novacek’s column goes on to explain modulation types, including OOK and ASK modulation:

OOK modulation is achieved by feeding the Data In line with a 0-to+V-level  datastream. ASK modulation can be achieved by the data varying the transistor biasing to swing the RF output between 100% and typically 30% to 50% amplitude. I prefer to add a separate modulator.

The advantage of ASK as opposed to OOK modulation is that the carrier is always present, thus the receiver is not required to repeatedly synchronize to it. Different manufacturers’ specifications claim substantially higher achievable data rates with ASK rather than OOK.

For instance, Photo 1 shows a SparkFun Electronics WRL-10534 transmitter and a WRL-10532 receiver set for 433.9 MHz (a 315-MHz set is also available), which costs less than $10. It is a bare-bones design, but it works well. When you build supporting circuits around it you can get excellent results. The set is a good starting point for experimentation.

The article also includes tips on a transceiver you can purchase to save time in developing ancillary circuits (XBee), while noting a variety of transceiver, receiver, and transmitter modules are available from manufacturers such as Maxim Integrated, Micrel, and RF Monolithics (RFM).  In addition, the article discusses design and optimization of the three forms of antennas: a straight conductor (monopole), a coil (helical), and a loop.

“These can be external, internal, or even etched onto the PCB (e.g., keyless entry fobs) to minimize the size,” Novacek says.

Do you need advice on what to consider when choosing an antenna for your design?  Find these tips and more in Novacek’s March issue article.

Wireless Data Links (Part 1)

In Circuit Cellar’s February issue, the Consummate Engineer column launches a multi-part series on wireless data links.

“Over the last two decades, wireless data communication devices have been entering the realm of embedded control,” columnist George Novacek says in Part 1 of the series. “The technology to produce reasonably priced, reliable, wireless data links is now available off the shelf and no longer requires specialized knowledge, experience, and exotic, expensive test equipment. Nevertheless, to use wireless devices effectively, an engineer should understand the principles involved.”

Radio communicationsPart 1 focuses on radio communications, in particular low-power, data-carrying wireless links used in control systems.

“Even with this limitation, it is a vast subject, the surface of which can merely be scratched,” Novacek says. “Today, we can purchase ready-made, low-power, reliable radio interface modules with excellent performance for an incredibly low price. These devices were originally developed for noncritical applications (e.g., garage door openers, security systems, keyless entry, etc.). Now they are making inroads into control systems, mostly for remote sensing and computer network data exchange. Wireless devices are already present in safety-related systems (e.g., remote tire pressure monitoring), to say nothing about their bigger and older siblings in remote control of space and military unmanned aerial vehicles (UAVs).”

An engineering audience will find Novacek’s article a helpful overview of fundamental wireless communications principles and topics, including RF circuitry (e.g., inductor/capacitor, or LC, circuits), ceramic surface acoustic wave (SAW) resonators, frequency response, bandwidth, sensitivity, noise issues, and more.

Here is an article excerpt about bandwidth and achieving its ideal, rectangular shape:

“The bandwidth affects receiver selectivity and/or a transmitter output spectral purity. The selectivity is the ability of a radio receiver to reject all but the desired signal. Narrowing the bandwidth makes it possible to place more transmitters within the available frequency band. It also lowers the received noise level and increases the selectivity due to its higher Q. On the other hand, transmission of every signal but a non-modulated, pure sinusoid carrier—which, therefore, contains no information—requires a certain minimum bandwidth. The required bandwidth is determined by the type of modulation and the maximum modulating frequency.

“For example, AM radios carry maximum 5-kHz audio and, consequently, need 10-kHz bandwidth to accommodate the carrier with its two 5-kHz sidebands. Therefore, AM broadcast stations have to be spaced a minimum of 20 kHz apart. However, narrowing the bandwidth will lead to the loss of parts of the transmitted information. In a data-carrying systems, it will cause a gradual increase of the bit error rate (BER) until the data becomes useless. At that point, the bandwidth must be increased or the baud rate must be decreased to maintain reliable communications.

“An ideal bandwidth would have a shape of a rectangle, as shown in Figure 1 by the blue trace. Achieving this to a high degree with LC circuits can get quite complicated, but ceramic resonators used in modern receivers can deliver excellent, near ideal results.”

Figure 1: This is the frequency response and bandwidth of a parallel resonant LC circuit. A series circuit graph would be inverted.

Figure 1: This is the frequency response and bandwidth of a parallel resonant LC circuit. A series circuit graph would be inverted.

To learn more about control-system wireless links, check out the February issue now available for membership download or single-issue purchase. Part 2 in Novacek’s series discusses transmitters and antennas and will appear in our March issue.

Places for the IoT Inside Your Home

It’s estimated that by the year 2020, more than 30 billion devices worldwide will be wirelessly connected to the IoT. While the IoT has massive implications for government and industry, individual electronics DIYers have long recognized how projects that enable wireless communication between everyday devices can solve or avert big problems for homeowners.

February CoverOur February issue focusing on Wireless Communications features two such projects, including  Raul Alvarez Torrico’s Home Energy Gateway, which enables users to remotely monitor energy consumption and control household devices (e.g., lights and appliances).

A Digilent chipKIT Max32-based embedded gateway/web server communicates with a single smart power meter and several smart plugs in a home area wireless network. ”The user sees a web interface containing the controls to turn on/off the smart plugs and sees the monitored power consumption data that comes from the smart meter in real time,” Torrico says.

While energy use is one common priority for homeowners, another is protecting property from hidden dangers such as undetected water leaks. Devlin Gualtieri wanted a water alarm system that could integrate several wireless units signaling a single receiver. But he didn’t want to buy one designed to work with expensive home alarm systems charging monthly fees.

In this issue, Gualtieri writes about his wireless water alarm network, which has simple hardware including a Microchip Technology PIC12F675 microcontroller and water conductance sensors (i.e., interdigital electrodes) made out of copper wire wrapped around perforated board.

It’s an inexpensive and efficient approach that can be expanded. “Multiple interdigital sensors can be wired in parallel at a single alarm,” Gualtieri says. A single alarm unit can monitor multiple water sources (e.g., a hot water tank, a clothes washer, and a home heating system boiler).

Also in this issue, columnist George Novacek begins a series on wireless data links. His first article addresses the basic principles of radio communications that can be used in control systems.

Other issue highlights include advice on extending flash memory life; using C language in FPGA design; detecting capacitor dielectric absorption; a Georgia Tech researcher’s essay on the future of inkjet-printed circuitry; and an overview of the hackerspaces and enterprising designs represented at the World Maker Faire in New York.

Editor’s Note: Circuit Cellar‘s February issue will be available online in mid-to-late January for download by members or single-issue purchase by web shop visitors.

Amplifier Classes from A to H

Engineers and audiophiles have one thing in common when it comes to amplifiers. They want a design that provides a strong balance between performance, efficiency, and cost.

If you are an engineer interested in choosing or designing the amplifier best suited to your needs, you’ll find columnist Robert Lacoste’s article in Circuit Cellar’s December issue helpful. His article provides a comprehensive look at the characteristics, strengths, and weaknesses of different amplifier classes so you can select the best one for your application.

The article, logically enough, proceeds from Class A through Class H (but only touches on the more nebulous Class T, which appears to be a developer’s custom-made creation).

“Theory is easy, but difficulties arise when you actually want to design a real-world amplifier,” Lacoste says. “What are your particular choices for its final amplifying stage?”

The following article excerpts, in part, answer  that question. (For fuller guidance, download Circuit Cellar’s December issue.)

CLASS A
The first and simplest solution would be to use a single transistor in linear mode (see Figure 1)… Basically the transistor must be biased to have a collector voltage close to VCC /2 when no signal is applied on the input. This enables the output signal to swing

Figure 1—A Class-A amplifier can be built around a simple transistor. The transistor must be biased in so it stays in the linear operating region (i.e., the transistor is always conducting).

Figure 1—A Class-A amplifier can be built around a simple transistor. The transistor must be biased in so it stays in the linear operating region (i.e., the transistor is always conducting).

either above or below this quiescent voltage depending on the input voltage polarity….

This solution’s advantages are numerous: simplicity, no need for a bipolar power supply, and excellent linearity as long as the output voltage doesn’t come too close to the power rails. This solution is considered as the perfect reference for audio applications. But there is a serious downside.

Because a continuous current flows through its collector, even without an input signal’s presence, this implies poor efficiency. In fact, a basic Class-A amplifier’s efficiency is barely more than 30%…

CLASS B
How can you improve an amplifier’s efficiency? You want to avoid a continuous current flowing in the output transistors as much as possible.

Class-B amplifiers use a pair of complementary transistors in a push-pull configuration (see Figure 2). The transistors are biased in such a way that one of the transistors conducts when the input signal is positive and the other conducts when it is negative. Both transistors never conduct at the same time, so there are very few losses. The current always goes to the load…

A Class-B amplifier has more improved efficiency compared to a Class-A amplifier. This is great, but there is a downside, right? The answer is unfortunately yes.
The downside is called crossover distortion…

Figure 2—Class-B amplifiers are usually built around a pair of complementary transistors (at left). Each transistor  conducts 50% of the time. This minimizes power losses, but at the expense of the crossover distortion at each zero crossing (at right).

Figure 2—Class-B amplifiers are usually built around a pair of complementary transistors (at left). Each transistor conducts 50% of the time. This minimizes power losses, but at the expense of the crossover distortion at each zero crossing.

CLASS AB
As its name indicates, Class-AB amplifiers are midway between Class A and Class B. Have a look at the Class-B schematic shown in Figure 2. If you slightly change the transistor’s biasing, it will enable a small current to continuously flow through the transistors when no input is present. This current is not as high as what’s needed for a Class-A amplifier. However, this current would ensure that there will be a small overall current, around zero crossing.

Only one transistor conducts when the input signal has a high enough voltage (positive or negative), but both will conduct around 0 V. Therefore, a Class-AB amplifier’s efficiency is better than a Class-A amplifier but worse than a Class-B amplifier. Moreover, a Class-AB amplifier’s linearity is better than a Class-B amplifier but not as good as a Class-A amplifier.

These characteristics make Class-AB amplifiers a good choice for most low-cost designs…

CLASS C
There isn’t any Class-C audio amplifier Why? This is because a Class-C amplifier is highly nonlinear. How can it be of any use?

An RF signal is composed of a high-frequency carrier with some modulation. The resulting signal is often quite narrow in terms of frequency range. Moreover, a large class of RF modulations doesn’t modify the carrier signal’s amplitude.

For example, with a frequency or a phase modulation, the carrier peak-to-peak voltage is always stable. In such a case, it is possible to use a nonlinear amplifier and a simple band-pass filter to recover the signal!

A Class-C amplifier can have good efficiency as there are no lossy resistors anywhere. It goes up to 60% or even 70%, which is good for high-frequency designs. Moreover, only one transistor is required, which is a key cost reduction when using expensive RF transistors. So there is a high probability that your garage door remote control is equipped with a Class-C RF amplifier.

CLASS D
Class D is currently the best solution for any low-cost, high-power, low-frequency amplifier—particularly for audio applications. Figure 5 shows its simple concept.
First, a PWM encoder is used to convert the input signal from analog to a one-bit digital format. This could be easily accomplished with a sawtooth generator and a voltage comparator as shown in Figure 3.

This section’s output is a digital signal with a duty cycle proportional to the input’s voltage. If the input signal comes from a digital source (e.g., a CD player, a digital radio, a computer audio board, etc.) then there is no need to use an analog signal anywhere. In that case, the PWM signal can be directly generated in the digital domain, avoiding any quality loss….

As you may have guessed, Class-D amplifiers aren’t free from difficulties. First, as for any sampling architecture, the PWM frequency must be significantly higher than the input signal’s highest frequency to avoid aliasing….The second concern with Class-D amplifiers is related to electromagnetic compatibility (EMC)…

Figure 3—A Class-D amplifier is a type of digital amplifier (at left). The comparator’s output is a PWM signal, which is amplified by a pair of low-loss digital switches. All the magic happens in the output filter (at right).

Figure 3—A Class-D amplifier is a type of digital amplifier. The comparator’s output is a PWM signal, which is amplified by a pair of low-loss digital switches. All the magic happens in the output filter.

CLASS E and F
Remember that Class C is devoted to RF amplifiers, using a transistor conducting only during a part of the signal period and a filter. Class E is an improvement to this scheme, enabling even greater efficiencies up to 80% to 90%. How?
Remember that with a Class-C amplifier, the losses only occur in the output transistor. This is because the other parts are capacitors and inductors, which theoretically do not dissipate any power.

Because power is voltage multiplied by current, the power dissipated in the transistor would be null if either the voltage or the current was null. This is what Class-E amplifiers try to do: ensure that the output transistor never has a simultaneously high voltage across its terminals and a high current going through it….

CLASS G AND CLASS H
Class G and Class H are quests for improved efficiency over the classic Class-AB amplifier. Both work on the power supply section. The idea is simple. For high-output power, a high-voltage power supply is needed. For low-power, this high voltage implies higher losses in the output stage.

What about reducing the supply voltage when the required output power is low enough? This scheme is clever, especially for audio applications. Most of the time, music requires only a couple of watts even if far more power is needed during the fortissimo. I agree this may not be the case for some teenagers’ music, but this is the concept.

Class G achieves this improvement by using more than one stable power rail, usually two. Figure 4 shows you the concept.

Figure 4—A Class-G amplifier uses two pairs of power supply rails. b—One supply rail is used when the output signal has a low power (blue). The other supply rail enters into action for high powers (red). Distortion could appear at the crossover.

Figure 4—A Class-G amplifier uses two pairs of power supply rails. b—One supply rail is used when the output signal has a low power (blue). The other supply rail enters into action for high powers (red). Distortion could appear at the crossover.