Search This Blog

Sunday, 15 December 2024

QRP HomeBuilder rebrands to Popcorn Electronics

Greetings Friends!  Well, it's time to re-imagine QRP HomeBuilder. I'm going back to the beginning and rebranding as Popcorn Electronics. This was the site nickname given back in 1998-99 by the late Mike, KL7R.

The site will teach basic bench-level electronic design to my readers & YouTube viewers. (A new YouTube channel will be unveiled in 2025). Rest assured, I will not monetize — no affiliated links, e-commerce, ads, _Patreon_,  etc.. I do this for fun and seek to give back all the knowledge that others gave to me over decades.

Thank you for your support.  Best to you!

Todd





Wednesday, 11 December 2024

Linux Mint, QRP, & C / C++ Compilers

 Greetings:

On the bench I'm studying PLL techniques using a sample & hold detector + VHF circuitry. Currently, I've got nothing to post RF-wise. Another factor includes changing my personal computer to a 100% Linux machine. Although I built a new PC + installed Windows 11 for my wife — I decided to go the Linux route for myself.  Why? Lots of reasons, but mostly preference. 

I'm not a gamer, music producer, nor multimedia tech developer so no compelling reasons exist for me to just run Windows. Linux has its own set of problems and certainly since switching over my computer knowledge has grown immensely.  Linux seems to suffer a lack of up-to-date documentation. Most of the programs were written for free and some unpaid code writers feel loathe to write/update their documentation in plain language.

I chose Linux Mint with the desktop interface, Cinnamon. All my hardware worked perfectly right away. I also enjoy the role of the terminal in Linux . With 8 fingers + 2 thumbs, I type faster than clicking a mouse.  (The terminal is a text input and output environment which also exists in Windows). Back in 1984, I knew most of the DOS commands & their switches ( I still do), plus advanced batch file techniques and taught them to folks for cash. I've always enjoyed working on terminals and automating tasks.

For radio and electronic software , a lot of good applications are hosted on web pages, however, many needed applications are not. Thus, I've been writing code — mostly in C. And yes, for the console.  Most of the time,  I tend to need software to quickly analyze circuitry I see in service manuals.  I'm trying not to use any Windows programs.

My first application served as trial run and involves a voltage feedback amplifier used in a lot in VHF gear for boosting small signals:

Above — Amplifier A runs voltage feedback. Sometimes designers employ an emitter resistor with or without AC bypass. In figures B and C, the amp gets set up in Hybrid-H parameter mode for small signal analysis. I feel very fortunate to have received introductory teaching of 2-port network analysis by Wes, W7ZOI.  He instructed me in both scattering  S-parameter techniques & linear circuit analysis using H- parameters. As a builder, simply do what you can:  hand-calculator calculations — or full on simulations in SPICE. 

Another option is to write programs to run the equations and give you the information you seek. Small signal analysis is often boring and perhaps unhelpful for non-engineers.

However, you can write programs to calculate almost anything - such as inductance for X turns of wire on a toroid core such as the T50-6. This hobby is more than making circuits. For some, measurement + design work & tool use serves as equal sources of pleasure to actually just making circuits on your bench.

Above — A screen shot of my console screen where I compile vFBA.c, (my source code) into the executable file ap2 --- and then run the app with the command ./ap2 . After that the terminal asks for and receives 4 parameters including the value of any emitter resistor.  Then the application calculates and gives me the 6 things I want to know when I am viewing this type of transistor circuit in a service manual/schematic. I wrote many apps for different type of amplifiers + other circuits and keep track of them with a cheat sheet.  I only re-compile the C program if I change something in the code.

This allows rapid program development as you do not waste time on GUI code and also don't bother writing tons of error checking code which is typically needed for applications that get public use. I like that all I need is a text editor -- and that the C /  C++ compiler is built into the shell on my terminal.

I feel surprised about the number of great open-source applications available for free:

Above — The program I use to edit RAW image files and render them into jpgs. The jpeg rendering engine does a great job. The program is called RawTherapee 5.1. Kudos to the designers.

Finally, in the past , I made my schematics with the Windows Paint program.  I desperately sought an equivalent program.

Above — I settled on a program called KolourPaint. Because I've used Paint for decades, it took some time to adjust. I miss a couple of familiar routines, however, KolourPaint also has some capabilities that Paint does not have.  I think it will work out fine as I gain experience with this app.

Best to you!



Thursday, 2 May 2024

Direct Conversion Receive System (Video Supplement)

 

Above — Drilled chassis for the popcorn direct conversion receiver test bed. AF power amp in place.
The local oscillator and input filter lie in separate boxes and won't be discussed.

Direct Conversion Receive System (Video Supplement)

Greetings. Amidst work, landscaping our property and growing 150 + plants under lights for the gardens, I'm slowly working on a video. The video is Part 2 to The 50 Ω audio preamplifier that goes after a diode ring product detector in DC receivers - Part 1

I've built a lot of stages for this video -- but wanted to test a few of the better 50 Ω input Z audio preamps in an actual DC receiver. A functioning direct conversion receiver provides a good way to test for voltage and power amp instability & noises. I also wanted to get a feel for how much gain we really need despite all the mythos about this topic. With this supplement, I won't have to go into too much detail about the test receiver on the video.

My main receiver goal hasn't changed for 25 years — lift desired RF signals out of the ether with a decent signal to noise ratio while listening to a speaker at comfortable room loudness.

 Above — DC receive system. My chassis contains 2 BNC mixer input ports, an SBL-1 diode ring product detector, a post-product detector network and then 3 audio amplifiers plus a speaker jack. The AF amps = a 50 Ω impedance voltage amp, a second voltage amp with an active gain control - and finally a PA. I'll cover each AF stage separately, but first I'll show the complete receive system from inputs to output. Each stage lies on a separate piece of copper clad board. The active stages are numbered 1, 2 and 3. I soldered 2N4401 or 2N4403 for the BJTs.


Above — My DC (reference) receive system. A clean and simple design. I chose a common base amp for the 50 Ω input impedance first voltage amp  This old & familiar voltage amp seems a great reference piece -- I've built many 10's of them over time. With an added RF band-pass filter, plus LO giving 7 dBm available output power; this seems like a nice piece of kit. All receiver tested 50 Ω input impedance voltage amps in my video will get compared to this reference receive system.
 
DC and Ugly Construction

Not shown is the DC input. I have a 100 nF cap shunt to ground right on the DC input jack + a 470 µF + a 1 µF capacitor on the main DC line buss *.  The 3 audio boards are floating from the metal chassis and star grounded to a central point on the DC power buss.

* I build with Ugly Construction from DC to ~ 2.2 GHz and employ AF or RF bypass capacitors for DC line standoffs as they feed DC to each stage. E.g. I prefer to not use 1 to 10 megohm resistors as standoffs. Ideal voltage sources are low impedance -- I avoid any resistor unless it's needed & if needed, I strive to keep that resistor value as low as possible for sake of noise hygiene.

No receiver active low pass filtration gets applied as I want to hear all the noise, warts and quonks in my reference receiver. The logical place to insert a low-pass seems the input of the stage marked number 2. The shunt 470 pF cap serves as a simple low-pass filter in my receiver.

My RF bypass capacitors are suited towards lower HF reception. I've got some suggested RF bypass caps from 6.6 to 220 MHz covered here  If you use SMT parts, this chart will be off. I have measured the series resonant frequency of every RF capacitor in my lab -- and have it written in a notebook, or on that part's drawer or envelope.
 
AF Stages — More Detailed Analysis

Let's follow best practices & show these 3 stages from output to input -- just like I built and tested them.
 
AF PA

Above — Schematic of the PA with DC measures. At this point, I did not add the 22 Ω DC decoupling resistor shown in the completed receiver. Few homebrew PA's will oscillate when tested stand-alone with a signal generator into a resistive load. I also took AC measures with my DSO.

A single voltage divider network feeds each of the 2 current sources. A 220 µF capacitor shunts voltage divider noise to ground.

My readers/audience asked me to make a single DC supply audio PA only using TO-92 transistors as finals.This is it. I worked hard to find a solution where the maximum output transfer function would compare with the venerable LM386 -- and bonus -- this final transistor pair tend to not suffer thermal runaway and smoke up your lab.

The key design features to get those goals included serious degenerative feedback [ 68 + 39  + 1 Ω   resistors ], plus current sources to drive the input pair and VAS/final base bias stack. I also set the voltage gain to 21. By increasing the the  2K7 feedback resistor, higher gain lies on tap (a voltage gain of 80 or more arises with a higher feedback resistor); however, this is a power amp and not a voltage amp. Low noise best practices suggest you build up your AF signal voltages with low-noise voltage amps and not within the PA stage.

Above — A close up of the PA in-situ. A temporary orange coloured 1 µF metalized poly film cap lies at ~ 6 o'clock. I connected either a 1 KHz tone or a CD player to the PA via this capacitor. I listened to this PA with my CD player for 4 nights and it sounded lovely & crisp. I built 2 separate PA stages to ensure my design worked. Although preferable, I did not match the input emitter-coupled pair.

Perhaps foolishly -- I did not place heat sinks on my final complimentary pair. All the base drive current comes from the current source and not the usual complimentary pair that drives the finals. Thus they do not run as hot as any other decently designed TO-92 stages I've built.


 Above —  An FFT of the PA driven to 250 mW with a ~ 1 KHz tone.

Above —  An FFT of the PA driven to 697 mW with a ~ 1 KHz tone. Pretty good results from a single 2N4401/2N4403 emitter follower pair.

PA Instability 

Once you connect all your AF stages together in a DC receiver, unwanted audio oscillations may occur.
This might be motor boating — a pulsed, typically low frequency oscillation that may even vary in amplitude and cause squegging. In addition to motor boating -- a steady, higher frequency oscillation tone that sounds hollow "or howls" may arise -- this usually occurs at loud volume.

I learned to think of your DC supply line as a highway connecting various stage inputs to outputs throughout your audio chain. Decoupling the DC line with series resistors and bypassing with AF and sometimes RF capacitors shunt to ground helps to stop AC signals from travelling along this highway. The ultimate way might be to use a capacitive multiplier BJT as shown on the first preamp labelled "one". The capacitor value connected to the base gets multiplied by the Beta of the transistor which sets a long time constant for very low frequency oscillations and those above this low corner frequency.

For motor boating, I normally place a 10-22 Ω decoupling resistor and both a RF and AF bypass capacitor on the PA DC line. I suggest a 470-1000 µF for the DC audio bypass capacitor as a minimum starting value. Each stage in your DC receiver should get some low pass filtration with such an RC network to keep AC signals from travelling down the DC highway.

Further, AF & HF oscillations may also occur in your PA voltage amp called the "VAS". 

AF/RF oscillations also require low-pass filtration, but often just a local bypass capacitor alone will do the job. My PA emitted a ~ 800 Hz howling sound when the volume was turned up loudly. I tamed this by soldering a 270 pF MLCC RF cap from the emitter shunt to ground. For my guitar amps, I've had to apply other strategies.

Above —  Ways to tame audio oscillations in a PA. The emitter degeneration resistor R1 could be increased to lower VAS gain. For example, from 39 to 47 Ω . And/or the C1 value could be increased to get the best result at high drive into the PA. This testing will annoy your family if you listen through a speaker like me! The VAS serves as the main PA voltage amp and offers a big source of instability in some PA designs.

 

Above — Additional circuitry I've used to tame a 40W guitar amp PA that oscillated at higher drive levels from AF to RF: 100 pF cap from collector to ground. then a 10 Ω resistor on the VAS collector with a RF bypass cap on each base followed by a series R at the BJT base terminal. 

Interestingly in this DC receiver PA build, adding a Zobel network did nothing measurable, so I left it off. I've also connected the VAS base to ground via a series RC network. Sometimes, it's trial and error.

Voltage Amplifier with Active Gain Control

Above — The first version of the inverting active gain control stage. In my reference receiver, I employed the other half of the NE5532 as a follower/buffer. Technically, you do not have to use a buffer, but it helps isolate the active gain stage from the PA input. I've built other active gain control circuits that offer a better log response of the volume control, but this version seems simpler.  If you need more maximum gain, drop R1 to 560 or 470 Ω etc.. 

Active gain controls make sense and may offer headroom and noise advantages over passive volume controls. In a typical Ham receiver, we'll run the 2nd voltage amp at maximum gain and then use a grounded potentiometer either before or after this stage to drop the signal amplitude to a comfortable listening level.

However, the voltage amp always runs at full gain; potentially reducing headroom -- and perhaps more significantly, amplifies the noise by that maximal voltage gain. With an active gain control, noise is amplified only by the exact amount of gain needed to hear a signal.


Above — The sublime FFT of the active gain control with a NE5532. It's very difficult (but not impossible) to get distortion this low with discrete transistors. Further, the device noise performance is much better if you apply a low noise op-amp over discrete BJTs. I'll likely offer a discrete BJT version(s) of this amp in the future. I've designed and built several.

First Voltage Amp — 50 Ω input impedance stage   Number one in the reference receive system
 
Above — A common base amp biased for 0.71 mA to give a 18.2 dB return loss. I feel it's essential to use an active decoupler/low pass filter - the capacitive multiplier circuit. These are common in industry: ripple filters for the DC supply in VCOs & multiple other products. Roy, W7EL used one in his Optimized QRP Transceiver for QST in August 1980. I built 2 of these back in the day. He standardized using an active decoupler in the first voltage amp for direct conversion receivers. A jolly good thing.

I prefer to follow the common base with a emitter follower: as aforementioned, this proves essential if you plan to use a active gain control with its inverting input. Further, you get maximum gain since the collector is less likely to get loaded down by any stage that follows. With a voltage gain of 107, this stage pretty much sets the noise figure for the receiver.
 
That's all. Back to the garden.  Best to you!



Sunday, 25 February 2024

The 50 Ω audio preamplifier that goes after a diode ring product detector in DC receivers - Part 1

 I posted my longest video to date:


I'll post a few images from the video in the days ahead. Making such a big video felt pretty exhausting.

Best to you