NEC model of 600mm a side square loop for field strength measurement

This article Reconciliation of transmitter power, EIRP, received signal strength, antenna factor, ground wave propagation etc @ 576kHz used a 600mm a side square loop which was originally designed for field strength measurements on the 40m in an effort to understand and document BPL (PLC) emissions.

As part of validation of the antenna, a free space NEC model with external excitation was developed. This article publishes a graphic summary of the antenna characteristic. The model antenna is loaded with 50+j0Ω and includes 10m of RG58A/U which was used for the BPL related measurements with FSM. Continue reading NEC model of 600mm a side square loop for field strength measurement

Crystal substitute using si5351 – part 3

Continuing the Crystal substitute using si5351 series…

Above is an example pair of inexpensive modules, less than $10 for the pair (incl shipping). Both boards are powered from 5V, the left hand module is a ATTiny85 dev board, it has a small 3.3V regulator on board. The dev board uses a DIP chip, so it can easily be programmed in a device programmer and then inserted in the socket. Continue reading Crystal substitute using si5351 – part 3

Crystal substitute using si5351 – part 2

Crystal substitute using si5351 – part 1 described the first part of a series on an inexpensive crystal replacement using a si5351-A / MS5351M PLL chip and an ATTiny controller.

Above is an example pair of inexpensive modules, less than $10 for the pair (incl shipping). Both boards are powered from 5V, the left hand module is a ATTiny85 dev board, it has a small 3.3V regulator on board. The dev board uses a DIP chip, so it can easily be programmed in a device programmer and then inserted in the socket.

Above is a cold start of the module, error settles around +137ppm.

Above is an Allan Deviation chart for this module referenced to a Trimble Thunderbolt (module freq=10M-137.5ppm). Short term stability is not too bad, the bigger problem is likely temperature response over hours and days. The crystal on this cheap module has 140ppm error, so specification accuracy would be worse than that, and temperature stability is probably about the same for 10-60°. So, that is quite likely around 3ppm/°.

Note that the Adafruit module that this appears to be cloned from is specified with a crystal of 30ppm accuracy and similar temperature stability over 10-60° (0.6ppm/°).

Development programming

 

Above is a screenshot of the EEPROM configuration data with two selectable configuration sets (burstsets) programmed. The ATTinyx5 has two pins for selection of one of four burstsets, the ATTinyx4 chips have four pins available for selection one of up to 16 burstsets, limited in both cases by the EEPROM available.

Bus Pirate v5

A Python script was written to parse the exported configuration from Clockbuilder Pro and create the Bus Pirate commands to be pasted into a terminal emulator (Teraterm v5). Bus Pirate 5 is not backwards compatible with v4 and v3, so the script accepts an argument to set the language version. The script also writes a binary file of the EEPROM image for use with a device programmer.

Teraterm was used as it allow specification of a pause at the end of each line to allow Bus Pirate to execute the command.

#!/usr/bin/env python
# coding: utf-8

from pathlib import Path
import csv
import os
import sys
import struct

print('\n'+Path(__file__).stem+' v1.02 20240330 Owen Duffy\n')

import getopt,sys

def usage():
print(Path(__file__).stem+" [-a hexaddress] [-m mversion][-o outprefix][-b bfilename][-p pfilename][-t toclen] ifile1 [ifilen]...")
sys.exit(2)

try:
opts,args=getopt.getopt(sys.argv[1:],"ha:b:m:o:p:t:v:",["help","address=","bfilenane=","mversion=","outprefix=","pfilename=","toclen=","verbose="])
except getopt.GetoptError as err:
# print help information and exit:
print(err) # will print something like "option -a not recognized"
usage()
sys.exit(2)

verbose=False

ifilesn=0
ifilenames=[]
if len(args)<1:
usage()
for arg in args:
ifilenames.append(arg)
print(arg,ifilesn)
ifilesn=ifilesn+1
chip=0xc0
toclen=ifilesn+3

p=Path(ifilenames[0])
pfilename=p.with_suffix('.pllldri')
bfilename=p.with_suffix('.bp')

for o, a in opts:
if o == "-v":
verbose = True
elif o in ("-h", "--help"):
usage()
sys.exit()
elif o in ("-a", "--address"):
chip=int(a,16)
elif o in ("-m", "--mversion"):
bpv=int(a)
elif o in ("-b", "--bfilename"):
bfilename=a
elif o in ("-o", "--outprefix"):
prefix=Path(a)
pfilename=prefix.with_suffix('.pllldri')
bfilename=prefix.with_suffix('.bp')
elif o in ("-p", "--pfilename"):
pfilename=a
elif o in ("-t", "--toclen"):
toclen=a
if toclen<ifilesn:
toclen=ifilesn
else:
assert False, "unhandled option"

bfile=open(bfilename,'w')
pfile=open(pfilename,'wb')
print('Writing: ',bfilename)
print('Writing: ',pfilename)

bus=0x1
lastaddr=-2

i=0
pbuf=[]
for ifilename in ifilenames:
#write pllldri eeprom image, use burst mode for speed / efficiency
toc=b''
burst=b''
pbuf.append(b'')
burstn=0
burstlen=0
burstsetlen=0

#write bus pirate commands
bfile.write(ifilenames[i])
if(bpv==5):
bfile.write(' BP5:\n\n')
bfile.write('m\n5\nn\n100k\nW\n3.3\n100\nP\ni')
else:
bfile.write(' BP4:\n\n')
bfile.write('m4 2 2 2\ne 2\nW\nP\ni')

with open(ifilename) as csvfile:
for line in csvfile:
rdr=csv.reader(csvfile)
for row in rdr:
if(len(row)>0):
if row[0].startswith("#"):
continue
addr=int(row[0])
data=int(row[1].rstrip('h'),16)
if(addr-1==lastaddr):
bfile.write(' 0x{:02x}'.format(data))
burst=burst+struct.pack('B',data)
burstlen=burstlen+1
else:
bfile.write('\n[ 0x{:02x} 0x{:02x} 0x{:02x}'.format(chip,addr,data))
if(burstlen>0):
burst=struct.pack('B',burstlen)+burst #prepend burstlen
pbuf[i]=pbuf[i]+burst #write to file buffer
burstsetlen=burstsetlen+burstlen+1
burstn=burstn+1
burst=struct.pack('BB',addr,data)
burstlen=2
#burstn=burstn+1
lastaddr=addr
# print(row)
# print('burstlen2: ',burstlen,burstn)
if(burstlen>0):
burst=struct.pack('B',burstlen)+burst #prepend burstlen
pbuf[i]=pbuf[i]+burst #write to file buffer
burstsetlen=burstsetlen+burstlen+1
burstn=burstn+1
pbuf[i]=struct.pack('BB',burstn,burstsetlen)+pbuf[i] #prepend burst list hdr
# print('burstlen2: ',burstlen,burstn)
bfile.write(' ]\np\nw\ni\n\n')

i=i+1

#write pfile header
buf=b'\x01\x03\x00'+struct.pack('B',chip)+struct.pack('B',len(pbuf))
#append toc
offs=5+toclen*2
i=0
for x in pbuf:
buf=buf+struct.pack('<H',offs) #append toc entry
offs=offs+len(x)
i=i+1
for j in range(i,toclen):
buf=buf+b'\xff\xff' #append empty toc records
#append burst sets
for x in pbuf:
buf=buf+x
pfile.write(buf)
pfile.close
bfile.close()

Above is the Python script.

HiZ> m

Mode selection
1. HiZ
2. 1-WIRE
3. UART
4. HDPLXUART
5. I2C
6. SPI
7. 2WIRE
8. LED
x. Exit
Mode > 5

Use previous settings?
I2C speed: 100kHz

y/n, x to exit (Y) > n

I2C speed
1kHz to 1000kHz
x. Exit
kHz (400kHz*) > 100k
Mode: I2C
I2C> W
Power supply
Volts (0.80V-5.00V)

Maximum current (0mA-500mA), <enter> for none
- SDA SCL - - - - - - GND
3.30V requested, closest value: 3.30V 0.0V 0.0V 0.0V 0.0V GND
100.0mA requested, closest value: 100.0mA

Power supply:Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 41.7mA

I2C> P
Pull-up resistors: Enabled (10K ohms @ 3.3V)
I2C> i

This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.

Bus Pirate 5 REV10
Firmware main branch (2024-04-10T12:30:36Z)
RP2040 with 264KB RAM, 128Mbit FLASH
S/N: 2145260B134063E4
https://BusPirate.com/
Storage: 0.10GB (FAT16 File System)

Configuration file: Loaded
Available modes: HiZ 1-WIRE UART HDPLXUART I2C SPI 2WIRE LED
Active mode: HWI2C (speed)=(0)
Display format: Auto
Data format: 8 bits, MSB bitorder
Pull-up resistors: ON
Power supply: ON (3.3V/3.29V)
Current limit: OK (33.6mA/100.0mA)
Frequency generators: OFF

I2C> [ 0xc0 0x02 0x53 0x00 0x20
Vout: 3.29V/100.0mA max | Pull-ups: ON |
I2C START
038.3mA SDA SCL - - - - - - GND
3.3V [ 0xc0 0x07 0x00 3.2V 3.3V 3.2V 3.3V 3.3V 3.2V GND

I2C START
031.9mA0 ACK 0x07 ACK 0x00 ACK
3.3V [ 0xc0 0x0f 0x00 0x0c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 3.2V

I2C START
TX: 0xC0 ACK 0x0F ACK 0x00 ACK 0x0C ACK 0x8C ACK 0x8C ACK 0x8C ACK 0x8C ACK
007.0mAC ACK 0x8C ACK 0x8C ACK
3.3V [ 0xc0 0x1a 0xa4 0x3c 0x00 0x0f 0xff 0xb9 0x55 0xbc3.3V 3.3V

I2C START
TX: 0xC0 ACK 0x1A ACK 0xA4 ACK 0x3C ACK 0x00 ACK 0x0F ACK 0xFF ACK 0xB9 ACK
038.3mA5 ACK 0xBC ACK
3.3V [ 0xc0 0x2a 0x00 0x02 0x01 0x0f 0x40 0x00 0x00 0x003.3V 3.3V

I2C START
TX: 0xC0 ACK 0x2A ACK 0x00 ACK 0x02 ACK 0x01 ACK 0x0F ACK 0x40 ACK 0x00 ACK
035.6mA0 ACK 0x00 ACK
3.3V [ 0xc0 0x5a 0x00 0x003V 3.3V 3.3V 3.3V 3.3V 3.2V

I2C START
030.5mA0 ACK 0x5A ACK 0x00 ACK 0x00 ACK
3.3V [ 0xc0 0x95 0x00 0x00 0x00 0x00 0x00 0x00 0x00V 3.3V 3.3V

I2C START
TX: 0xC0 ACK 0x95 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK
006.5mA0 ACK
3.3V [ 0xc0 0xa2 0x00 0x00 0x00 0x00 3.3V 3.3V 3.2V 3.3V

I2C START
024.4mA0 ACK 0xA2 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK
3.3V [ 0xc0 0xb7 0x92 ] 3.3V 3.3V 3.3V 3.2V 3.3V 3.3V

I2C START
TX: 0xC0 ACK 0xB7 ACK 0x92 ACK
010.4mAP
3.3V p 3.3V 3.3V 3.3V 3.2V 3.3V 3.2V 3.3V 3.3V
Pull-up resistors: Disabled
I2C> w
Power supply: Disabled

I2C> i

This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.

Bus Pirate 5 REV10
Firmware main branch (2024-04-10T12:30:36Z)
RP2040 with 264KB RAM, 128Mbit FLASH
S/N: 2145260B134063E4
https://BusPirate.com/
Storage: 0.10GB (FAT16 File System)

Configuration file: Loaded
Available modes: HiZ 1-WIRE UART HDPLXUART I2C SPI 2WIRE LED
Active mode: HWI2C (speed)=(0)
Display format: Auto
Data format: 8 bits, MSB bitorder
Pull-up resistors: OFF

Frequency generators: OFF

Above is a console log of Bus Pirate v5 programming of the PLL for development testing.

… more to follow.

Crystal substitute using si5351 – part 1

Crystals have become very expensive (or so it seems), and the cost consigns some older radios to scrap. That said, I do recall buying crystals for $6 from Jan Crystals around 1967, which with Australian inflation over the period equates to $90 in 2023.

This article looks at an inexpensive substitute for the 1647kHz LSB crystal in a Codan 8525 transceiver which shipped as USB only in commercial service (yep, hams are out of step with the commercial comms world).

Above is a ‘si5351 module’ from Aliexpress for less than $3, about a tenth the price of the Adafruit module. Only one output will be used, the SMA jacks need not be used, but one was attached to channel 0 for testing the prototype. Continue reading Crystal substitute using si5351 – part 1

Noise and Quasi Peak

The article Can we find the noise power captured by a 50Ω antenna and ambient noise figure using a SDR or spectrum analyser? gave a brief explanation of Quasi Peak (QP) as applied to noise measurement.

I say “noise measurement” loosely, because since noise is a random phenomena, what we do is to sample the phenomena over some period of time, and if we were to sample it again, whilst it might seem to be the ‘same’ noise, the random events  are new, they are a new set of samples, and summary of them is new. This contributes to the large variance observed in noise ‘measurement’.

QP is commonly used to express the magnitude of noise in the context of emissions and interference potential. QP derives from a very old CCIR recommendation describing the response of a noise measurement instrument. The recommendation included a specified meter response to short tone bursts. The QP detector has a slowed rise time, and slower decay time, so it under captures isolated very fast impulses, but accumulates high repetition impulses. The QP response reads higher than an average power detector, and lower than a peak power detector. My experience is that QP is about 4-5dB higher than average power on white noise, and typically around 6-7dB higher on off air noise with little impulse noise, but high impulse noise can result in a much higher QP reading. For more information, see (ITU-R. 1986).

Most EMC receivers and Spectrum Analysers with EMC feature have a QP ‘detector’. Communications receiver S meters often have a nearly QP response.

Above is a plot of sampled noise and QP calculation (the QP ‘detector’) made during development of FSM (Field Strength Meter) software. Observe that impulses have effect but the QP is closer to average power than repetitive peaks, much closer than infrequent impulses.

Note that Peak/Avg power for a sine wave is 3dB, QP/AVG power for a sine wave is almost 3dB. Continue reading Noise and Quasi Peak

Can we find the noise power captured by a 50Ω antenna and ambient noise figure using a SDR or spectrum analyser?

Ambient noise

Ambient noise usually takes the form of random noise with uniformly distributed power density spectrum, ie the power per Hz of bandwidth is approximately uniform over a wide frequency range.

Ambient noise is often expressed as an ambient noise figure Fam or ambient noise temperature Tam, see ITU-R P.372.

Captured power

There is a direct relationship between ambient noise level and power captured by an antenna system in a given bandwidth.

SDRs and SAs are often calibrated in absolute power units, commonly dBm. SAs often have useful filters to slow the response and help to find the average of a varying signal (usually termed Video Bandwidth VBW).

Any features in an SDR to reduce or cancel noise will probably compromise its use as a measuring instrument.

Bandwidth

SAs as measuring instruments usually have calibrated filter bandwidths (usually termed Resolution Bandwidth RBW). SDRs often have selectable filter bandwidths, but they are often nominal bandwidths rather than Equivalent Noise Bandwidth (ENB), some work may be required to find the actual ENB.

SAs often have useful filters to slow the response and help to find the average of a varying signal (usually termed Video Bandwidth VBW).

Total, internal and external noise power

Both SDRs and SAs have internal noise, and their display is usually calibrated to display the equivalent total power at the input terminals, ie internal and external power, so to arrive at the external power, the internal power must be deducted. That said, if the internal noise is relatively low, it has little influence on the result.

The graph above shows the error in reading the level of two combined noise sources as the level of the higher one. The error is very small when the measurement is more than 20dB above the noise floor, below that the result to be calculated for best accuracy. If for example the noise power displayed on the SDR or SA with 50Ω termination on its input is xdBm, and the antenna noise reads x+10dBm, the true antenna power is x+9.5dBm. Continue reading Can we find the noise power captured by a 50Ω antenna and ambient noise figure using a SDR or spectrum analyser?

Can we find the noise power contributed by a 50Ω antenna using a receiver of known sensitivity?

The article Is a receiver test with different resistors connected it its input terminals meaningful? ended with the question Can we find the noise power contributed by a 50Ω antenna using a receiver of known sensitivity?

The technique depends on the fact that the audio output power of a traditional SSB communications receiver is linearly related to the RF input power (including the equivalent internal noise power) up to the onset of AGC action, which is typically more than 20dB above the equivalent  input noise power. Be warned that disabling the AGC does not usually provide a significant extension to the linear range, some stage will overload but you have no warning you have reached that threshold.

For this article, I will use Equivalent Noise Temperature as the sensitivity metric, the reason will become obvious. You can convert various receiver ‘sensitivity’ metrics using the handy Receiver sensitivity metric converter.

Example

Let’s say that a certain receiver has sensitivity specified as 50Ω input, 0.1µV for 10dB S/N. The specifications probably do not give the Equivalent Noise Bandwidth, let us assume it is 2000Hz for this example (appropriate to an SSB telephony receiver but the actual bandwidth is critically important, it can be measured).

Let’s convert that specification to Tr.

Above, Tr is 434K. Continue reading Can we find the noise power contributed by a 50Ω antenna using a receiver of known sensitivity?

Is a receiver test with different resistors connected it its input terminals meaningful?

The question arises from time to time, is a receiver test with different resistors connected it its input terminals meaningful?

Scope

This discussion applies to linear receivers. A receiver using a diode AM detector, with or without BFO injection is NOT a linear receiver for this purpose, nor is an FM receiver. A good traditional superheterodyne SSB Communications Receiver is a linear receiver for the purpose of this discussion, but for example any techniques designed to reduce / cancel noise will render it non-linear

Noise in resistors

Thermal agitation within a resistor gives rise to broadband noise (Johnson-Nyquist noise, thermal noise), the noise power that can be captured from a resistor in a given bandwidth is given by \(P=k_0 T B\) where:

  • k0 is Boltzman’s constant;
  • T is the absolute temperature; and
  • B is the bandwidth.

Receiver sensitivity

If:

  • a receiver is designed for a 50+j0Ω source; and
  • has noise figure specifications or specifications that imply a noise figure; and
  • and is tested to specification

the measurement is done with a 50+j0Ω source that contributes thermal noise (50Ω @ 290K) and the equivalent internal noise contribution of the receiver can be calculated. Continue reading Is a receiver test with different resistors connected it its input terminals meaningful?

How is SND different to NF?

Signal to Noise Degradation, SND is a measure the extent of how the off-air or ultimate S/N ratio is degraded by a receive system.

We can calculate \(SND=10 \log (1+\frac{T_{sys}}{T_{amb}})\) where:

  • Tsys is the equivalent system noise temperature at the space interface; and
  • Tamb is the equivalent ambient noise temperature at the space interface.

For more explanation of the metric Signal to Noise Degradation (SND), see Signal to noise degradation (SND) concept.

The Noise Figure (NF) of a system or system component is often defined as the extent of how the system (or component) degrades S/N. The unstated assumption is that the source has an equivalent noise temperature of 290K.

We can calculate system \(NF=10 \log (1+\frac{T_{sys}}{T_{0}})\) where:

  • Tsys is the equivalent system noise temperature at the system interface; and
  • T0 is the assumed reference temperature, 290K.

System NF can be thought of as a measure of system degradation of S/N for a specific source noise temperature of 290K.

The two expressions above might be similar in form, but are different and give very different results.

NF does not bring to book the external or ambient noise as it applies to a specific scenario, so it does not provide a complete picture of S/N degradation. Continue reading How is SND different to NF?