Tuesday 8 March 2022

19 - Measuring the Deviation of an FM transceiver using an SDR

 

If your FM transceiver is a converted PMR set it may be useful to measure the FM deviation because if it is set too low you are only heard faintly. There are deviation meters that can sometimes be picked up on the second hand market, or they may be part of a communications test set but not all of us have access to these. It is possible to measure deviation by the carrier null method. To do this you need a VHF/UHF SSB transceiver with 500 Hz CW filters, or an SDR.

I recently purchased an SDRPlay RSP1a (for £98) that is a really good SDR – with a 14 bit ADC it is much much better than the £20 SDR dongles you can buy as these are only 8 bit. I will repeat the measurements below with an 8 Bit device and report back if it works, but here are the results of using the RSP1a.

The RSP1a comes with software called SDRUno (Version 1.41) and also RSP-Spectrum Analyser software (Version 1.1). I used the spectrum analyser software here but the ordinary SDR would work as well – just with “fatter” traces.

How does the method work? Well, we are all familiar with the sidebands of AM and SSB. The sidebands of an FM modulated signal are much more complicated. But you don’t need the theory (it involves Bessel functions). Just accept the diagram below; and note the first trace (the carrier) passes through zero at 2.405


 

These are a plot of the various sidebands that exist with an FM transmission, of course they are all added together and hard to separate. You can see them on the spectrum plot of my SDR below

 <<< spectrum/sdr plot >>> 



This is a 1KHz tone being played through a loudspeaker, near the microphone.

You can use an app on your phone or a PC to generate the audio tone (I find Audacity on the PC quite good). Here I used an audio signal generator which is more convenient as I needed to slowly increase the frequency while watching the screen. Notice that the Carrier – the first waveform coloured Red above, it passed through zero at a special value of 2.405– this is why this method works, we increase the frequency of the applied single tone until the carrier goes low – it dips. It does not actually go to zero, but the dip was easy to see. Here it is;

<<< spectrum/sdr plot+text box and carrier dip - I was inputting 1.818kHz>>>


 

This dip occurred when I was inputting an audio frequency of 1818Hz. This was the first dip as I transmitted a sweep of audio frequencies from 300 Hz to 6KHz. You want the first dip, not the second.

The deviation is simply this frequency multiplied by the magic number of 2405.

So the deviation of the transmitter being tested is 1818*2405 = 4.37kHz

It would be better to be 5kHz so I need to tweak it a bit, I also tested an old PMR which I used a lot on the repeater when I drove to work every day and its deviation was below 3kHz. Oops.

I will continue playing with the RSP1a as I am finding it a fantastic spectrum analyser – as good as instruments costing £1,000 plus. Do be aware however that you MUST not connect the input direct to the transceiver – the RSP1a will self destruct if it gets an input above 10 milliwatts, and in fact the recommended limit is 1mW. I just ran my 5W transceiver into a dummy lead through 2 metres of coax and left the SDR antenna socket unconnected, and the SDR about 5 feet away from the dummy load. I am making up some simple attenuators – vital accessories with a spectrum analyser like this.






 

 

 

18 - Using LTspice to help build RF circuits

LTspice is a free software package that can compute and display what the output of a circuit would be if we were to build it and apply some inputs. We call this process simulation; this can be very useful – it is a lot faster to draw a circuit then to build it. I have been



using it for years and am currently working on simple transistor circuits and building up to simulating an entire HF transceiver (the uBITx) before building it. The text below makes more sense if you download and try the software.

To get you started I will show you how to use LTspice to see the performance of a simple low pass filter. I will first apply a range of frequencies and then show you the frequency response. Here is the circuit of the filter (also called a “schematic diagram” in American English) 

  To simulate this we must add a voltage source – at the antenna inputs. The voltage source should be given a series impedance (Rser) of 50 Ohms. We also need to add a 50 Ohm load to the output. Filters only work correctly if they are properly terminated with their designated input and output impedances. Rightclick on the voltage source and set Rser to 50 and the AC amplitude to 1 Volt. Don’t give it any of the functions you see on the left of the form. (keep it at the default of “none”)

In Ltspice you add a voltage source using the “add component” icon on the tool bar. The coils, capacitors and resistors are added by the obvious icons. You add labels and wires as shown and assign values by rightclicking on the components. To run the simulation below you select a “running man” icon on the toolbar. In addition you must specify a simulation command – this is done by planting text on the schematic that begins with a dot - such as .AC dec 101 3Meg 45Meg You can do this by picking “edit simulation command” on the top line View menu item – it allows you to fill in a form that explains that this command causes a linear sweep from 3MHz to 45MHz with 101 points per decade. The .AC analysis is known as a small signal analysis it is only an approximate result but it does allow looking at a range of frequencies – the other often used command is the .TRAN – a super accurate analysis but only at one frequency. For a filter we want to sweep the input frequency.


 Select run by clicking on the running man symbol at the top, or right-clicking the mouse

After running the simulation a blank, black window appears – the plot pane (I changed mine to white to save ink here!). To add a trace to this simply let your mouse hover over the output label on the schematic “TO_MIXER1” and notice that a symbol of a voltage probe appears, left click and you get the waveform below. 


 

You can add cursors by double clicking on the green label at the top and move the cursors to see the insertion loss and -3dB points. This is useful but LTspice can do so much more. You can use LTspice in, maybe 8 or 9 different ways to work out input and output impedances, noise and distortion measurements as well as just the frequency response.

Just running LTspice once is fine but LTspice is much more useful than that. Say the filter was to be made with components that had a 5% tolerance. LTspice can “run” a circuit tens of thousands of times and change the component values each time – randomly plus or minus 5% on each component. After all these runs you can see if the performance is good across all the runs. If not then you should be using 2% components.

To do this is a very advanced use of LTspice. Instead of giving a capacitor a value of 100p you give it a value or formula denoted by a name enclosed in curly brackets { } then somewhere else in your circuit you define a range of values that it should take. I wanted the system to pick random values for me using a standard distribution also known as a Gaussian distribution, there is a GAUSS function available. Here is the modified schematic. Check the helpfiles for what .PARAM and .STEP do.


 

I told LTspice to do this 5000 times – see the .STEP command above and in the help files. The 5000 runs took 15 minutes on a fast laptop. I have run jobs overnight, early in my professional career I once ran a simulation that took 26 days to get an answer. (glad it wasn’t 42) The plot below is after 50 runs. One of the runs has a 2dB discrepancy and would affect 30MHz. But it is mainly ok. 



 

Looks like a reasonable filter, even if built with 5% capacitors and 10% inductors…

This is not a tutorial on how to use LTspice – just to show you it can be a useful tool. It is a simple tool to use and there are several good Youtube videos and blogs showing you this – a good start is; https://robs-blog.net/2017/02/10/lt-spice-for-radio-amateurs-part-1/ More advanced is the webpages of Gunthard Kraus at http://www.gunthard-kraus.de/ he also covers QUCs and microwave simulators. I have corresponded with him and he is a good guy. The youtube videos of “FesZ Electronics” are excellent but can be advanced. https://www.youtube.com/c/FesZElectronics/videos LTspice can be downloaded from https://www.analog.com/en/design-center/design-tools-and calculators/ltspice-simulator.html And there is most excellent support from https://groups.io/g/LTspice I hope to update my own blog soon on 8 lessons on using LTspice for transistor design for simple RF buffers check out http://mi5afl.blogspot.com/

Go and play … I mean experiment…

17 - Building a Lowcost HF transceiver from Scratch

Building a Lowcost  HF transceiver from Scratch.

Transceivers have only 4 different types of circuit within them, so making a complete transceiver is not overly difficult, particularly given the availability of very low cost test equipment and modern designs that are simple and convenient to make.  Radio Amateurs who do this are called homebrewers and it is an active and growing part of our hobby. I will document my journey to making a particular design known as the uBitx.

The four types of circuit are;

Filters, two types are often needed; Lowpass made with good quality capacitors and hand wound coils, usually on a simple powdered iron toroid core. Also needed are bandpass filters often made with a number of quartz filters to provide good selectivity or purchased as a ready made crystal filter.

Amplifiers; The uBitx receive chain uses a number of simple three transistor circuit, 4 identical modules are needed. The uBitx also has two simple one transistor circuits as a microphone amplifier and a audio pre-amplifier. The audio pre-amplifier feeds a low component cost audio amplifier but I will replace this with a more powerful audio circuit to drive bigger speakers as I have poor hearing. The other amplifiers in the BitX are in the transmitter portion of the circuit and there are four stages to take the sub-milliwatt RF signals up to 10 Watts. Each stage has only half a dozen to ten components and is easily tested in isolation. In fact building and testing each simple module in isolation is the best way to build.

Mixers; There are three of these, two are identical  each with four diodes and two simple broadband transformers handmade with 8 turns of wire around small ferrite toroid. The third has only one transformer and two diodes. These circuits also have 2 or 3 resistors and the odd capacitor but they are not complicated.

Oscillators; In days of yore these would be the main headache, now they are extremely simple. A single chip can provide the 3 outputs we need. This 8 pin chip is driven by a simple arduino (a nano) so that the frequencies can be changed. This allows a nice modern user interface with lots of flexibility. The software has been written for you so you do not need to be a programmer to successfully construct or buy this module.

And that is it! you can see the circuit of the uBitX at https://www.hfsignals.com/index.php/ubitx-v6/ 

Of course if interested in building a transceiver the uBitX is not the only option, HFsignals.com also describes a simpler design that covers one band only; the Bitx. This design was originally for 40m but can be put onto any other band. 

There is also a most excellent book from the RSGB online shop.










Building a Transceiver by Eamon Skelton EI9GQ and Elaine Richards, G4LFM

This is a very complete and very well explained book. It covers a more complex design but it is a valuable read. The uBitx also has good community support from the groups.io/bitX forum - it covers both Bitx and uBitx. In the near future it will no doubt cover the sBitx SDR transceiver and possibly the unnamed 2m Bitx. 

A block diagram of a conventional SSB/CW transceiver is listed below, it has the four types of object mentioned above, note the RF receiver amplifiers (between the mixers) are paired up but only one of the pair is given 12 volts of power at a time - on the 'R' or 'T' lines. this allows the mixers and filters to be shared by the transmitter and the receiver without needing a lot of relays to switch from one to the other. These amplifiers are designed so that when they are powered down they do not affect the powered up circuitry (much). 

The secret to managing complexity is to divide and conqueror. Once you can build a triangle (an amplifier) a rectangle (a filter) and a mixer (a circle) you have most of the hard work done! I have covered the bandpass filter, the output low pass filter and the crystal filters in previous CONTACT articles, at least partially.



 
 

I intend to make my uBitx in a modular way - each module will be on a small piece of singlesided PCB material, each PCB will be placed on a baseplate of a bigger piece of PCB - 6.5 inches by 6 inches is the target. Soldering bits of braid will connect each module to the base and connect up all areas of blank copper to zero volts. Before making the first module I estimated what size each module might be and made a floorplan. Module size for the filters and mixers was dictated by my use of T50 toroids for the filters and FT37 for the mixer transformers. That's what was in my junkbox! T50's have an outside diameter of 0.5 inch and the FT37's are 0.37 inch.

The main construction technique will be "manhattan" this is where islands are glued or created on blank copper clad PCB board. I also etch a traditional printed circuit board for the amplfiers as I have made many boards this way - using glossy photo ink jet paper in a laser printer to create black plastic toner which can be melted onto a copper board using a smoothing iron. The melted toner protects tracks and pads prior to dipping into ferric chloride solution where the  unprotected copper is eaten away in a few tens of minutes. 

However, just for a change I though I might try something new (to me). As well as supergluing small squares of copper I will grind circles using a dremel and a core cutter that i bought from the GQRP club many years ago - it makes a 3mm circle and a 1mm trough. (The GQRP club currently sell a slightly bigger version). Manhattan layout also allows mid-air connections.