New VS Code Program for VSWR Calculations

In my previous post about using AI for programming i made a tool for generating user files for DMR.

Now I have made a new program for calculating VSWR based on forward and reflected power. This software is also made in VS Code with phyton and compiled to an executable file.

https://www.dropbox.com/scl/fi/el08dtof6vc10as32b1tp/SWR4.exe?rlkey=d02jgk9ij3wqkqksfhfrdkm5o&st=3qeufvns&dl=0

In the future I will post more software when ever I make something that others might have use of.

Maximize Your Radio’s User Storage with AI and VS Code

The tool i’m using is the VS code that have AI support from Github. What i do is to make a description of what i want the software to do and number all functions I requires in the software. The description is made in notepad and each function is put in a separate numbered line. When the description is completed I tells the AI through the chat window to do the task numbers either as a batch or as separate tasks. I do also tell the AI to put a # in front of each completed task to be able to keep track of what is done.

https://www.dropbox.com/scl/fi/uzw7ixree705puilwv4h3/AT_User_Tool.exe?rlkey=o1xunvq5hqqlejtestjbdnzm2&st=al65ev9p&dl=0

STM32 Bluepill with USB working.

I’m no expert on programming and have found this method to get the USB working on the Bluepill. There might be a better way to get this to work, but this works for me!

This picture can be found several places on the internet.

R10 modification.

First ting i did was to do the R10 modification on the Blue pill. This is the pullup resistor for the USB+ line. There are boards with 10k (marking 103) and 4k7 (marking 472) but the correct value is 1k5 (marking 152), but I’m not certain that it is critical because i use a 10k & 2k2 in parallel (1k8) and this works.

The resistor is in size 603 and can be hand soldered with good light and a fine tip on the soldering iron.

Another option is to just leave the resistor in place and connect a 1k8 regular resistor from 3,3V supply to pin PA12. 3,3V can be found in 5 diffrent places on the board the simplest is probably on the J-tag header to PA12 or to the end of R10 closes to the pin-header.

I did not have the correct resistors available and ended up doing a bit of creative modification to get the mod done.

Finding the correct boot-loader.

There are several boot-loaders that can be found on the internet. As far as I know all are based on the Maple-leaf development board. Over the years there have ben done modifications on the boot-loader and Roger Clark har been a major player in this development. Thank you Roger!!!

https://github.com/rogerclarkmelbourne/STM32duino-bootloader

For the Blue pill I have used the boot-loader called «generic_boot20_pc13.bin» that can be found in the binaries folder.

Flashing the boot-loader.

I have used the STM32Cube programmer to upload the Boot-loader to the chip.

https://www.st.com/en/development-tools/stm32cubeprog.html

You need to put in some personal information like e-mail and name to get access.

The usage of the programmer is pretty simple.

  1. Connect to the MCU by selecting the correct interface. In my case i used a USB to serial converter with a FTDI chip. RX : PA9, TX : PA10, GND : GND, 3,3V : 3,3V. Remember to set the serial converter to 3,3V otherwise you will damage the MCU
  2. Go to the download tab.
  3. Select the correct boot-loader form Rogers Git. «generic_boot20_pc13.bin«
  4. Configure the upload according to the picture and click «start programming»
MCU info from STM32 Cube

STM32F103C8 with boot-loader

Adding board definitions to Arduino IDE.

Now its time to set up the Arduino IDE!

First add the line. «https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json» to the preference in the Arduino.

Then go into the board manager and select the STMicroelectonics board definitions. Just put STM in the search field and select the ones form STM. If you have some other STM stuff installed just uninstall it if you dont need it.

Setting up Arduino IDE for uploading a sketch.

I had to play a bit with the configuration of the Arduino to get it to work. The configuration in the picture shows my working configuration. The upload of the sketch where done with the same wiring as when the boot-loader where flashed.

The configuration that makes the USB work for my application.

DMR in Norway. My first peek into DMR.

Use of timeslots (TS).

DMR Tier II uses two timeslots TS1 and TS2. Here in norway there are a recomandation of how to use the timesots.

  • TS1: To be used on the national groupe 242 and to call for starting a QSO.
  • TS2: To be used after a QSO is started.

As a result of this all repeaters must be programmed as two channels, one for each TS. This is to prevent blocking of the repeaters.

Use of colour code (CC).

The use of CC is basicly the same as for PL tone on analouge FM radio. There are 16 CC form 0 to 15.

In Norway is it common to use CC 1 on everything.

DMR SMS WX service

The Brandmeister have several SMS based services that is handy. One of the most handy features I have found so far is the weather services. The service is a German service that have to be sendt to DMR ID 262993.

CommandExplanation
helpShows an overview of the available functions
echoSends immediately a response to test the SMS function
wxWeather at the repeater site
wx helpOverview of all available weather commands
wx TownWeather in the city «Town»
wx zip TownWeather in the area «zip» in the city «Town»
wx zip, ccWeather in the area «zip» in country «cc»
wx Town, ccWeather in the city «Town» in country «cc»
wx zip Town, ccWeather in area «zip» in city «Town» in country «cc»
wx gpsWeather at the actual position of the DMR user according to the radio’s GPS
metar xxxxMETAR message at the airport identified by ICAO code «xxxx»
gps helpOverview of all GPS commands
gpsShows actual GPS position including the name of the location (street, city) of the DMR radio. Also direction and distance in relation to the actual repeater are provided
gps setStores the actual position as ‘Home’ location
gps homeShows distance and direction of the actual position in relation to the previously stored ‘Home’ position
gps callsignShows distance and direction in relation to DMR user identified by ‘callsign’

This information where found on the BrandMeister blog web page.

T3FD the resistor (part 2)

The W4RNL PDF decribes a resistor of 800-900 ohm.

After doing some exercises in a excel spreadsheet I found that a serial parallel combination of 12 in series by 7 in parallel will give a resistor of 805,7 ohm.

 

In the beginning I considered using SMD resistors but found it a bit troublesome to get the resistors and would also have to design and get manufactured a PCB for the resistors.

Instead I decided to go for regular axial resistors. I found a supplier on E-bay that sold 3W 470ohm 5% resistors in bags of 100 for a reasonable price.

resistor ebay

 

To mount the resistors I decided to make PCB. To simplify the manufacturing of the PCB I went for the quick and dirty method of doing the layout. I measured the length of the resistor body 17 mm and  rounded that up to 20mm. Two strips of PCB 45mm wide and 300 mm long where cut.

20190722_205654

The I used 3M 33+ electricians tape and masked of the with of the tape every 20 mm. The PCB where etched in a FeCl solution, it where a bit time consuming because the etching solution where not at the optimum temperature.  In the end I had to make two boards to tit all resistors because of the length of enchant tank and size of the available PCB material.

I bent 84 resistors in the shape of a top hat like showed in the picture.

resistor

To get the resistors reasonable aligned I made a line along the center of the PCB lengthwise and soldered six resistors on top of the line. This would make it simple to just solder 3 on each side.

20190722_210954

After about an hour of soldering and bending resistors I ended up with one of these and in about another hour I had two of these.

20190722_205700

T3FD antenna. Part 1.

For a long time I wanted a broadband dipole. Most of the broadband dipole antennas of the T2FD and T3FD variations are marketed for commercial users like the military, governmental agency and NGOs and is therefore in a price rang not favorable for a ham. Manufacturers of commercial antennas are companies like Bushcomm, Codan Communication and Barkers&Wiliamson. There are also other manufacturers but most of them are in the same price rang or have export restriction when it is manufactured in the US.

The US export restrictions are based on that some equipment can be considered as military equipment. But I think that most of the time it is the manufacturers that don’t want to use the sorceress and time to check if it is actually covered by the US legislation of materials that can be considered as military equipment.

To save money and don’t have the hassle of dealing with Norwegian  or any  other country customs legislation I decided to go ahead to build one.After searching the internet I found some building-plans at the HF link website. Here i found some information about a PDF from LB Cebik W4RNL (sk)                              Notes_on_Wide_Band_Multi_Wire_Folded_Dipoles_by_LB_Cebik_W4RNL.

The W4RNL PDF contains all the information I need to build  wide-band dipole antenna. There are variations of the wide-band dipole, but the most common variations are the T2FD and T3FD. After reading the PDF form start to end I decided to build the T3FD because this have a flatter SWR along the whole frequency range.

Description of the antenna.

The antenna is described in lengths of 89,14′ and 90′. Because I bought a 100 m length of 2 mm stainless steel wire I will make the antenna a bit longer and cut it down a bit to tune for lowest SWR.

The resistor is 800 ohm because this will give a flatter and lower SWR than when using a 450 ohm resistor.

Balun will be a 10:1 balun made with 43 material binocular core.

The spacers will be fiberglass fence-poles used on electric fences.

 

To build the antenna the following parts will be required.

  1. Terminating resistor 800 ohm.
  2.  Ferrite material for the balun.
  3. Antenna wire stainless.
  4. Fiber glass spreaders.
  5. Isolators.
  6. Housing for resistor and balun.
  7. Fasteners and crimps.

Ebay low pass filter for HF.

Some time ago i bought a HF LP filter from Ebay.  As normal it did come with minimal documentation.Capture

After some e-mails back and forth i managed to get the required documentation form the seller.

Here are the component values.

C1 C3 C5:820P
C2:1500P
C4 C6:430P
C7 C9 C11:180P
C8:330P
C10 C12:100P
L1 L2:22T (Red toroide Amidon T50-2 ?)
L3 L4:16T (Red toroide Amidon T50-2 ?)
L5 L6:11T (Yellow toroide Amidon T50-6 ?) (L7 & L8 on the PCB)
L7 L8: 8T (Yellow toroide Amidon T50-6 ?) (L9 & L10 on the PCB)

The PCB is not 100% according to the buildings instruction, but as the capacitors are in sequential order the inductors are also follow a sequence just add 2 in the inductor name after L4.

I suspect that running 100W on these toroides might be a bit than what they are capable of.

I have done a simulation in AADE filter software for all filters.  The AADE web site is no longer active but the software can be found on other sites.


80 m filter.

The filter has a roll off at about 4,5 Mhz. making it capable for 80m but not 60m.

5M Filter Schem

5M Filter plot


60 m & 40 m filter.

This filter has a roll off close to 9 Mhz. and is capable of 60m and 40m.

8M Filter Schem

8M Filter plot


30 m, 20 m & 17 m filter.

This filter has a roll off close to 19,9 Mhz. and is capable of 30 m to 17 m.

20M Filter Schem

20M Filter plot


15 m, 12 m & 10 m filter.

This filter has a roll off close to 35,5 Mhz. and is capable of 15 m to 10 m.

30M Filter Schem

30M Filter plot


Schematics.

The schematics where made by tracing the PCB. I can not guarantee

Filter

Parts list

 


Harmonics.

When the filter is assembled i will do a sweep with the spectrum analyzer to determine the actual filter curve.

As long as I’m got 43 dB suppression on the fundamentals it will comply with the ITU recommendations found in ITU-R SM.329-10.

Some fine tuning might be required to obtain this attenuation.


This will be a on of project going through the winter and in the end be a part of a complete linear with approximately 50 W SSB at 12V.

Filter.

Because of all the harmonic some filtering is required.

I decided to use a combination of high-pass and low-pass filter.   The most important about the filters is to get the harmonics down with at least -60dB or better than the local oscillator frequency. The reason for this LP/HP combination is that the filters is simpler to trim and the band-pass is simpler to adjust, the drawback is some higher losses.But since I will use a buffer amp after the filters a loss of a few dB is not the big concern. The filters where designed with AADE filter software.

 

Schematics and plot for high pass filter.

HP filter 40MHz sch

HP filter 40MHz

EHP 40mhz

Schematics and plot for low pass filter.

LP filter 43MHz sch

43MHz LP filter plot

ELP 43mhz a

The EHP 40mhz must be renamed from .key to .sch to be able to open it in AADE filter software.

Trace.

Trace of filter smoothed with 100 samples.

f

Trace of filter and oscillator smoothed with 100 samples.

osc fil

 

As you can see there is a bit of loss in the filters, but I’ll make a tuned input buffer amp to get rid of the harmonics on 14 MHz, 56 MHz and 84 MHz.

Oscillator multiplier.

Oscillator

Here is the schematics of the oscillator multiplier. It multiplies from 14MHz to 42 MHz.

The design of the multiplier gives a lot of harmonics all the way up to the 21 order at 294 MHz. This might be a good oscillator for transverters all the way up to the 23cm band with a 2GHz transistor. The output transformer will have to be an air-core transformer.

Quick about the circuit.

R1: 47Ω

R2: 10kΩ

R3: 4k7Ω

R4: 300Ω

C1: 0,1μF

C2: 45,5 pF @ 14MHz or 30,32 pF @ 21MHz. I used a 50 pF trimmer.

C3: Ca 40pF @ 14MHz or 50pF @ 21MHz.

T1:  250Ω 14 MHz; 2,83μH, 19T 10mm core 12 mm long. 0,202mm enameled cu wire. Secondary is 10-20% of primary.

T1: 250Ω 21 MHz; 1,89μH, 14T 10mm core 9 mm long. 0,202mm enameled cu wire. Secondary is 10-20% of primary.

To calculate the I used two web pages. The Daycounter for calculating the required inductance and www.circuits.dk to calculate number of turns on the inductor.

66pacific.com does also have a good calculator to reverse engineer the inductors in the schematics.

As showed in the picture there are harmonics up to 21 order, the harmonics over 14 order are more or less neglectable.

osc