Saturday, 9 December 2017

Op-amps thrill me. I mostly employ them as instrumentation amps, plus AF small signal boosters or filters. With simple math (often embedded in software or spreadsheets) , we can calculate design parameters such as gain, frequency response or better yet, a stage's transfer function. Once built, you can measure and analyze your circuit's outcomes in your lab.

I get many ideas and information from peer-reviewed journals. If your affiliated with a university, then your librarian may have access to many free journal articles. Occasionally, you must purchase a journal article if you deem it essential to your progress. This supports the author(s), publisher and in turn, spawns more research and journal articles. Circle of life stuff in academia.

Article abstracts provide a good way to learn too. I think of them as free little packets of information. At the very least, they may inspire you down a new, exciting path. I read a lot of abstacts on various subjects.

Further, I try to devote some study time to instrumentation circuitry because you get exposed to some brilliant engineering techniques, historical perspectives and often enough, cool new parts. Apart from the usual RF measurement gear, I hold a special interest in chemical and atmospheric measurement circuits.

OK, back to op-amps:

A case in point follows. Op-amps prove essential for modern instruments -- without them, our digital circuits often wouldn't have any usable voltage to work with. Analog isn't dead Malcolm!

This abstract sums it up perfectly.

AbstractThe Analog Revolution and Its On-Going Role in Modern Analytical Measurements.

The electronic revolution in analytical instrumentation began when we first exceeded the two-digit resolution of panel meters and chart recorders and then took the first steps into automated control.

It started with the first uses of operational amplifiers (op amps) in the analog domain 20 years before the digital computer entered the analytical lab. Their application greatly increased both accuracy and precision in chemical measurement and they provided an elegant means for the electronic control of experimental quantities.

Later, laboratory and personal computers provided an unlimited readout resolution and enabled programmable control of instrument parameters as well as storage and computation of acquired data. However, digital computers did not replace the op amp's critical role of converting the analog sensor's output to a robust and accurate voltage.

Rather it added a new role: converting that voltage into a number. These analog operations are generally the limiting portions of our computerized instrumentation systems. Operational amplifier performance in gain, input current and resistance, offset voltage, and rise time have improved by a remarkable 3-4 orders of magnitude since their first implementations.

Each 10-fold improvement has opened the doors for the development of new techniques in all areas of chemical analysis. Along with some interesting history, the multiple roles op amps play in modern instrumentation are described along with a number of examples of new areas of analysis that have been enabled by their improvements.

Reference

Enke, C. G. (2015). The Analog Revolution and Its On-Going Role in Modern Analytical Measurements. Analytical Chemistry, 87(24), 11935-11947.

With new appreciation for op-amps from reading this article, I plan to get on the bench and have some fun applying them. Who knows, I might blog some of these circuits 1 day.

Saturday, 25 November 2017

I like making simple component-level radios. This Fall, I rekindled my love for making transistor radios and hope to slowly blog some circuits and fun. I'm warning you now — these circuits hearken the 1970s and 80s, SSD, EMRFD, old issues of Ham Radio and other stuff that require no coding skills.

For the Ham 40 meter band, I thought about employing an Si5351 for the synthesizer -- naw. While this chip poses a great choice, I wanted something a little more organic. If you go the Si5351 route, I recommend you consider the offerings by EtherKit. Jason toiled to improve the Arduino code library for this and perhaps you might support his future efforts?

Above — Block diagram. This topology borrows from the concepts of Wes, W7ZOI.

Above — Reference oscillator output. I built the 2 MHz crystal reference oscillator in a familiar Pierce circuit with an 74HC14. This hex inverter with Schmitt-trigger inputs makes a fabulous reference oscillator as seen above.

Above — DSO tracing of the 2 MHz reference divided by 13 in the 74HC193 4-bit synchronous counter. The internal 4-bit WORD gets programmed by pins 9, 10,1 and 15. By default, all 4 pins are set HIGH. Three N-channel MOSFETs locally switch the appropriate pins to ground according to a front panel 5-position switch. This avoids the usual 4 toggle switches you might otherwise use.

For divide by 12, two steering diodes get employed without the 2K2 current-limiting resistors seen on the other switch positions. Each diodes' forward voltage drop limits the MOSFET gate drive current to ~ 1 mA which is about the current limit offered by the 2K2 resistor in the other switch positions.The output of the 4-bit counter goes to Pin 3 of a phase-frequency detector built with a pair of 74HC74s. The other 74HC74 clock input (Pin 11) is driven by a 74HC00 buffer which takes the low frequency, sine wave output of the offset mixer and squares it to proper CMOS voltage levels.

Above — The 74HC00 signal squarer in my DSO when tested with a 7.04 MHz signal generator.With no AC input signal, a CMOS squarer may oscillate somewhere between between ~2 and 70 MHz. My 5 volt 74HC00 DC supply is bypassed from AF to HF and the signal path input is also decoupled and bypassed with the 51 Ω / 470pF network.

For the PLL board, it's literally test as you go. For example, build the 2 MHz Pierce oscillator and look at its output. Then use that output to test the 4-bit counter. Any old bench sine wave oscillator from AF to HF will test the 74HC00 squarer. For the 2 remaining NAND gates: Ground the input pins of one gate while using the other gate to reset pins 1 and 13 in your phase/frequency detector.

I stuck with the classic, low-noise, OP-27 for the loop filter. You'll find the OP-27 in PLL circuits published decades ago. While we enjoy lower noise op-amps today, I got them for low cost long ago and they impart some nostalgia on my bench -- and the OP-27 is still a great part.Since the VCO operates over a very narrow bandwidth [ hopefully 7.00 - 7.065 MHz ], you can filter the loop well. The 1K2 loop dampening resistor posed critical, so I employed a 1% part in that slot. The critical dampening resistance value in my loop was ~ 1170 to 1188 Ω. If I went below that resistance, the feedback loop goes into spasm and oscillates. A 5% 1K2 resistor might not cut it! Hence, a 1K5 Ω 5% part might be a better choice if you don't have a 1% 1K2 Ω resistor in stock.

For the op-amp filter, two, small, 63v, polyester 1 µF caps were placed in parallel since I lacked a 2.2 µF capacitor. Above ~ 80 KHz, the op-amp loop filter = a third order filter. At low frequencies it functions as a first order filter.The filter allows the PLL to locks quickly and filters well. The output of the main VCO looks good for a home brew PLL system.

Above — The main VCO channel output (with some external attenuation) into my spectrum analyzer. I could not see any reference oscillator spikes in the output. Yay! Basically, we're seeing the noise of my SA.

[Section Two — VCO]

Above — The VCO schematic. This VCO provides 3 output ports: main, offset mixer and a port to connect a frequency counter. A frequency counter proves essential, since this style of synthesizer uses a VXO with non-linear tuning; plus frequency overlap or gaps may occur across different divisions of the reference oscillator.

The oscillator and 1 buffer run on a AF low-pass filtered 8 volt DC supply. Any ripple on your oscillator's DC supply can pump the VCO and cause noise modulation.
Two outputs from the PNP Colpitts oscillator get lightly AC-coupled to an NPN buffer that I forgot to label. Its 39 ohm collector resistor provides a low-amplitude signal which is further boosted by Q3 which drives a common base amp (Q4) to prevent any of the frequency counter's digital noise from reaching the main oscillator.

The emitter of the unlabelled NPN buffer stage functions as a normal emitter follower. I ran 9 mA emitter current to preserve the main oscillator signal fidelity. This signal goes to an output port that connects to 1 of the offset mixer's input ports.

Above — The output of Q4 ( frequency counter port) terminated in a 50 Ω 'scope input. When terminated with a high impedance it measured ~700mV Vpp. If you need higher peak to peak output voltage , run more current in the common base amp. Other ways to boost its output include dropping the 470 Ω DC voltage decoupling resistor to 150-220 Ω, and/or increasing the 470 pF coupling cap to 100 nF.The main output circuitry takes signal tapped from the tank inductor L1. I tapped about 2/3 down and could have tapped it lower. In honesty, I was too lazy to rewind the L1 toroid, so I employed a 2.7p coupling cap to provide some low-level signal to Q5 without having to run high current to prevent further distortion of the VCO signal. A FET source current of 8.45 mA preserved the VCO signal fidelity and provides good drive for the final feedback amp.

My initial feedback amp transistor Q6 choice was a 2N2222A. I ran a target 23-24 mA to help achieve a stage output impedance of 50 Ω and raised the *51 Ω emitter resistor shown to 75 Ω to get this. Without a heat sink, the 2N2222a ran at 39-40 degrees C. Rather than make a heat sink, I stuck in a 2SC1971 and changed the emitter resistor to 51 Ω as shown in the schematic. I targeted ~23 mA emitter current.

This BJT runs at 28.7 degrees C and won't run away. The 2SC1971 I used was probably 1 of those cheap bootleg or counterfeit transistors as it cost < 40 cents with free shipping on eBay a few years ago.I find these "probably bootleg" transistors work OK for HF projects. I've got some original,very old Mitsubishi 2SC1971s in my parts collection reserved for VHF amps + drivers and they cost a fortune now.

Above — A DSO capture of the unfiltered output from the 2SC1971 feedback amplifier (Q6) during some early experiments with attenuation on its output.

Above — An early DSO capture of the frequency counter output in yellow and the main VCO output in green with the low-pass filtered soldered in, but not the 6 dB pad.

Above — Final FBA version into my DSO. I wanted an output close to 10 dBm so I can get ~7 dBm outputs from a quadrature hybrid coupler for use in single signal DC receivers if so desired.

Above — VCO board on my test bench. I soldered a 100K pot with 12.3 VDC supply, so that I could apply reverse DC voltage to the varactors and manually tune the VCO to test its function. Most importantly, this allows you to choose the correct tank inductor and fixed capacitor values.

When you connect the varactors to the VCO, tweak the small 5-30p trimmer cap to get phase lock. Switch off the power. Then after 4-5 seconds, switch back on the12 VDC. If your VCO does not phase lock, tweak the trimmer cap some more and repeat. You can connect your voltmeter right to the PLL output to monitor the DC voltage.

My circuit captures and locks the VCO after switching it off and then on with 3.9 volts DC measured on the PLL output with the VXO set to its lowest frequency + the 4-bit counter set to divide by 11. It's then set and forget. Once set, the VCO locks perfectly every time and it stays on the set frequency for days.

[Section Three — Offset Mixer]

Above — Offset mixer schematic. In old CB radio synthesizers, engineers often used a single BJT as an offset mixer (usually they ran 1 for TX and another 1 for RX). To prevent mixer output from leaking out its AC and DC ports, we may do 2 things: well filter the DC going to the BJT -- plus run common-base amps on the 2 BJT mixer inputs to provide reverse isolation for the mixer board input ports.The VCO and VXO ports get the same common-base amp. An active low-pass (ripple filter), plus some serious decoupling + HF to VHF bypass filter the DC power line. The mixer output gets a simple, but stout, pi low-pass filter. The shunt 560 Ω resistor loads the output to stabilize the output signal + boost filtration.

Above — DSO capture with 10X probe at the output of the 1 µF capacitor. At this point the only filtration is provided by the 1n capacitor shunt to ground, so you still see some mixer products.

Above — DSO capture with 10X probe at the output of the pi low-pass filter. You've filtered it enough when it looks like a sine wave at the correct offset output frequency. I tested it with the project VXO and a bench signal generator.

[Section Four — VXO]

We require a VXO that tunes the VCO from 7.0 to 7.065 MHz. I had some HC49-S style 28.4 MHz crystals and hoped to divided them by 4 -- and get enough frequency swing to tune my desired VCO range. I failed here! The crystals on hand proved terrible and would not pull as far as I'd hoped without compromising my desired less than 1 Hertz VXO temperature drift fluctuation.

I tried them in a super VXO fashion + varied the inductance and such but could not get a fully meshed to fully open tuning capacitor swing over 10 KHz with a divide by 4. In my collection, I found an air variable capacitor that offered more range, but alas it suffered backlash and when I mounted it in my enclosure the Bakelite support material cracked and crumbled rendering it garbage.

I hope to get some different 28.8 MHz crystals and derive the tuning range I initially calculated and hoped to achieve. I will also try to find an air variable capacitor with a lower minimum capacitance like the 1 that broke. Perhaps it was foolhardy to chose a divide by 4 scheme? We'll see.

Above — VXO schematic. The single hex inverter buffer might not be needed, however, I've got lots of CMOS logic to use up and more years behind me than ahead.

Final synthesizer tuning range = 7.007 to 7.065 MHz with some gaps as follows:

The VXO tunes from 7.189152 to 7.19702 MHz. As mentioned, Ill work on the VXO to remove the gaps in ranges 1, 2 and 3 -- and hopefully get down close to 7.00 MHz.

Limiting the VXO range to only that what's needed improves the synthesizer tuning resolution.

[Section Five — Photos]

Above — All 4 boards were built in re-purposed Hammond boxes. A PIC-based counter sits on top of the offset mixer. I build modular gear and this allows modification and fosters experimentation. When I build a final transistor radio receiver, I plan to place the offset mixer, PLL circuitry and VXO on the same board inside the radio with some shielding. My VCOs always go in a RF tight container. A 0.0033 µF feed through capacitor connects the VCO varactors to the outside world.

Making this project I learned much and like my VCO + mixer, the sublime loop filter and also avoiding toggle switches by running local MOSFET switches. I've already extended the MOSFET switching technique in a more complex PLL for a scratch UHF synthesizer.

Above — All 4 boards on my bench

Above — Main VCO output in a DSO.

[Section Six — Miscellany]

Above — Basic configuration of the HC193 4-bit synchronous counter. By setting the 4 switches HIGH or LOW you can divide by 1 to 15.

Above — Cascading two 4-bit counters yields division by 1 to 255. If you were to place all 8 switches on a front panel, we would place the left counter's switches to the right of the 240 weight switches so that we could program it in a more "humanly logical" fashion.It's great fun to play with old school digital circuitry such as these CMOS chips. I've got the whole series of HC74 synchronous and asynchronous counters in my parts bins.

Above — 3 edge-triggered phase and frequency detectors using D flip flop(s). I normally employ Figure A with active filtering. The op-amp filter boosts the DC output signal up in voltage which may help improve VCO phase noise and stability.

Figure B employs a charge pump. You'll see diodes or transistors used in charge pumps -- often in PLL circuits within ICOM, Yaesu and other brand-name radios.

Compared to the Exclusive OR phase detector ( in the 4046 etc.), edge-triggered PD's exhibit a greater linear tuning range, plus better capture, lock and tracking characteristics. All of them may be effected by input signal duty cycle. 50% proves best.

Also digital television
broadcasting standards may involve the UHF spectrum, and so, a pattern emerges: UHF
circuitry sending data that's controlled by CPUs.

This UHF proliferation benefits us experimenters by providing an excellent bevy
of fast parts such as 25+ GHz transistors, cheaper, more abundant transmission line + connector choices, numerous scientific articles, faster +
cheaper test equipment --- and loads of inspiration. To boot, many transmitting
circuits are low voltage and/orlow
power – aka “QRP”. This is the new QRP ! Fresh, relevant, science-driven -- and supporting the marriage of code plus RF design in the new age via the latest tools, techniques and hardware.

The physics and challenges of RF design haven't changed however. For example, the Smith Chart still works perfectly, and measurement techniques remain the same. However, some differences become quickly obvious as you plow in: 1 stark example == resonator Q. Vitamin Q gets hard to come by as we move up in frequency. Further, the ease + slack and forgiveness of HF quietly disappears and this proves both vexing and challenging to us builders.

Casual construction techniques work poorly at UHF. Consider
a Class A common emitter BJT amplifier: A poorly RF grounded emitter lead may add parasitic inductance that results in series feedback which degenerates the signal
and reduces amplifier gain.

Further, I’ve learned that a high bandwidth transistor amp designed and/or built poorly make frustrating oscillators, or, just offers low gain due to mismatch or instability. Unsurprisingly RF filters with poor
RF grounding @ UHF poorly attenuate UHF. I'll show this graphically in the next section.

UHF design looks scary to some: you have to master
the Smith Chart, obtain some fast transistors, and learn about microstrip techniques and so on.

Then comes the task of making your test bench. Yikes!

High bandwidth gear may equal high cost depending on what
you build or purchase. For sure, you’ll need some form of a 50 Ω detector. My
main UHF detector = a 3 GHz spectrum analyzer with a tracking generator. This allows me to measure with or without sweeping 1 or 2 port circuits. You also get a frequency counter in the RG + SA package -- so it seems like a good choice; at least for now.

I also
designed and built a wide band return-loss bridge and plan to improve this
design over time. I would love to own a network analyzer, but will hold off
until I find an affordable unit with a bandwidth >= 10 GHz.10 GHz? Yes, I hope to work 10 GHz EME using JTF4
mode with Doppler correction on homebrew gear 1 day.

My eventual goal @ UHF -- to design and build a UHF radio
astronomy system looms in the background, however, first, I must learn to
design and match amplifiers, tackle low phase noise, temperature-stable
oscillators and learn how to make filters that work well into microwave.

Above — I got a deal on some MG-Chemicals FR-4 and will use it for all of my 2017 experiments. FR-4 is common, easily available and cost effective.
Permittivity, or the dielectric constant Er = ranges between batches and manufacturers of FR-4. I've read Er values from 3.9 to 4.8 and tend to use the standard 4.7. This means a 50 Ω stripline gets cut to a 2.9mm width.

Although, substrate thickness varies and insertion loss increase with frequency, I think we can manage OK with FR-4 copper clad laminate board at UHF. PTFE-based boards pose an option if we require critical impedances , λ fractions, or lower insertion loss as you move up in frequency.

Above — 4 square feet of FR-4 laid out on the lawn. These boards will hopefully bear some good experiments ahead.

RF Grounding

Above — A portion of an older, beat-up 12 inch by 12 inch 40 gauge copper sheet I use to connect the copper surfaces at all board edges. I just cut it with scissors. You can also smooth out the pieces before, or after cutting them.

I get this sheet copper from Monte Allums in the USA. Click for his link. I've also built tops for shielded RF boxes and resonator dividers with this stuff. Oh, and I shielded an electric guitar control cavity for someone using this Cu as well.

Above — An example edge dressing. We start with a small 2-sided piece of FR-4 and a cutting of Montee Allums 40 gauge copper sheet.

Above — I' ve folded the copper sheet over 1 edge. Looking a little uneven, it's clearly not my best effort, but on the other hand -- it will work fine. I scraped the copper sheet with the edge of the scissors so it lies flush against the FR-4 with no air gaps. Time to solder.

Above — The copper sheet gets wrapped around soldered on both sides. Then repeat for the other 3 FR-4 sides. When completed, you'll have a board ready for carving out strip lines or applying classic ugly construction when using B+ posts, connectors and capacitors as stand-offs.

A 2-sided FR-4 board with copper strips joining all edges will provide stalwart RF grounding from DC to VHF. For UHF we need to drill via holes and connect the 2 surfaces with copper wires strategically located wherever UHF ground is needed.

I'll demonstrate why with an actual experiment based on a 7- element low-pass filter that I designed to use the lumped-element inductors and capacitors I had on hand.

The inductors = Coilcraft 1008CS series wire wound on ceramic chips. These are in size 0805. Click for a datasheet. I've since stocked many values of these amazing parts in both size 0805 and 0603.

Above — Simulation of my filter in GPLA, a program that ships with EMRFD.

I then built a filter, but did not solder the copper edges together with Cu sheet metal and just use 1 via wire for the RF ground on each of the 4 caps.

Above — A sweep made after adding the copper edges and 1 more via wire to each of the 4 capacitors. While better than previous, attenuation poops out at 2.475 GHz.

Above — Final version swept after adding 2 more via wires to each of the 4 capacitors. Clearly soldering 4 copper via wires per ground node boosted the filter's attenuation at 3 GHz.

Above — I purchased a popular 400-470 MHz low-pass filter sold on eBay that sells for ~ $10.00. At 2.81 GHz, the filter's stop band just falls apart. Further, the 3 dB cut-off of my particular filter = 580 MHz; much higher than advertised.

Above — The low-pass filter swept above.

Above — A MCL PLP-550 low-pass filter. This older filter suffered bent pins and I failed to get a short path for the 4 ground pins to the ground plane on the lower half of the board. 1 mm of wire length potentially could = 1 nH of stray L.

Above — I attempted to reduce the ground path lengths and also placed 2 via wires by each SMA connector. This boosted the UHF stop band somewhat. I'll take an entirely different approach when I redo this filter's breadboard 1 day.

I've learned the bitter truth about RF grounding @UHF -- and now RF ground lies foremost in my mind when I breadboard a circuit.

[2] SAW based Oscillators

SAW resonators offer an easy way to generate a single frequency with a decent loaded Q to reduce oscillator single sideband phase noise when compared to LC, or varactor-tuned circuits @ UHF.

It's also possible to tune them as a VCSO ( voltage controlled SAW oscillator ). They see use in many commercial items such as garage door openers, chemical sensors and even wearable medical devices. You'll often view them in datasheets covering the range of 200 - 1200 MHz, although other frequencies are also available. The unloaded Q of a typical SAW device lies between 6 - 12K. That's much better than that of a VCO with the inductor cut out in the copper board (Q = 50 - 100) and tuned with varactor(s).

Of course, the variable SAW resonator lacks the wide tuning bandwidth needed for many projects -- UHF work proves all about compromise.

So far, I've built 7 or 8 SAW oscillators and many were crappy. Some of the problems included oscillation at an overtone, low output, parasitic oscillation, and not running at the correct SAW frequency.

I'll show an oscillator I built to use for OIP3 measurements of BJT amplifiers using my lab-grade HP signal source as the other tone for these 2 tone measures.

Above — Here's my bread board layout diagram for the first and second stages. I carved these signal paths into the topmost board with a motorized cutting tool. Some part values were changed during bench tests.

Above —The output of the feedback loop oscillator. If you take the signal from the collector, the AC voltage may run as high as 1.5 Vpp, but it's rich with harmonic energy. I sampled some output from the transistor base via a 0.5 pF capacitor. All caps < 100n were C0G temperature coefficient. Transistors such as the 2SC3583 offer tremendous gain at HF, so HF and even AF bypass is needed to keep circuitry stable.

Above — Output of the second transistor stage. I'll comment about the collector feedback bias in a later blog post. I attempted to match the output impedance to the 50 ohm input impedance of the MMIC, I did OK, but failed to account for stray reactances and also I didn't have caps less than 0.5 pF at the time. The 33 Ω resistor in series with the 22n lower its Q to stabilize the amplifier.

Above — Output of the final stage, a MMIC. I lost significant signal amplitude because my poor filter layout. My carved microstrip paths were too long and so, acted like inductors that detuned the filter and created some reflections. Of course, you never know this until after you've carved your breadboard. Still, this circuit works OK for amplifier, or mixer 2-tone measures and I learned a lot by designing and making it.

This was by far the most temperature stable SAW oscillator I've built.

Above — An experimental negative resistance oscillator that allowed the selection of 1 of 3 SAW resonators. It worked to a point. The problems encountered are shown in the inlay.

Above — An experimental Butler SAW oscillator. When you remove the SAW resonator, the circuit still oscillated and needs to be within 5% of the SAW value or the frequency stability suffers. Further, the oscillator worked best with a tuned collector. I need to work on this some more. It doesn't take much to push this circuit into an overtone oscillator; intentional or not.
I'm always trying to boost the QL since SSB phase noise lies inversely proportional to the square of the loaded Q.

Above — The output signal with a tuned collector. Oscillators combine art, science and to some extent, a little luck.

[3] RF Amplifier

I'll show 1 experimental amp, since I'm still learning through experiments and this blog post is running long in the tooth.

Above — A 1 GHz amp matched by the the brute-force method: The input and output are 50 Ω microstrip line slightly greater than λ /2 long ( accounting for the FR-4 velocity factor ). To tune the input and output, you slide a size 0805 capacitor along that's attached to a thick toothpick, find the sweet spot and then tune a variable cap right at the sweet spot. The variable cap then gets removed, measured, and a nearest standard value cap goes in place.

I chose a 2SC3583 BJT with a VCE of 8 volts and 5 mA collector current. Using datasheet S parameters I calculated the maximal available gain at 15.98 dB -- and also the maximum stable gain at 13.4 dB. In the breadboard, I got 11.2 dB gain, which seemed reasonable for my first, crude 1 GHz RF amp.

Above — The 1 GHz breadboard. It's too long for practical purposes, but not for learning.