TX power levels are not always correct on any releases after 2020.10.16

VK3KYY
Posts: 3318
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: TX power levels are not always correct on any releases after 2020.10.16

Post by VK3KYY » Fri Oct 30, 2020 7:38 am

Unforunately even between 1W and 5W the power output vs drive is not linear

Originally, I used a linear relationship between 1W and 5W as it worked reasonably well on the GD-77, but the RD-5R has a totally different PA circuit with only 1 stage of PA FET followed by a band pass filter.

So I had to change all the radio to use a table of values for each power level

static const float fractionalPowers[3][7] = { {0.59,0.73,0.84,0.93,0.60,0.72,0.77},// VHF
{0.62,0.75,0.85,0.93,0.49,0.64,0.71},// 220Mhz
{0.62,0.75,0.85,0.93,0.49,0.64,0.71}};// UHF

This is a bit dificult to read, because it doesnt have the values for 1W and 5W, as they would be wastes space.

So below 1W the value calcultion is

txPower = trxPowerSettings.lowPower * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel];

and for 2W , 3W and 4W the calcualtion is


int stepPerWatt = (trxPowerSettings.highPower - trxPowerSettings.lowPower)/( 5 - 1);
txPower = (((powerLevel - 3) * stepPerWatt) * fractionalPowers[trxCurrentBand[TRX_TX_FREQ_BAND]][powerLevel-1]) + trxPowerSettings.lowPower;

where power level is 0 for 50mW and 9 for 5W.

These values were fairly accurate on a couple of my GD-77 radios, but are obviously not accurate for your radio.

And we don't have a way of allowing operators to enter their own values, as 99.9% of operators won't bother to do this.

KI5GZK
Posts: 85
Joined: Sat Apr 11, 2020 6:27 pm

Re: TX power levels are not always correct on any releases after 2020.10.16

Post by KI5GZK » Fri Oct 30, 2020 8:15 am

Wow! I had no idea it was that complicated. My hat's off to you for what you and the rest of your team have accomplished and continue to work on.

Thank you for all your hard work and sticking with this issue until it was solved. I was nearly ready to give up on it.
I have flashed and re-flashed my radio, and loaded and reloaded code plugs so many times I am probably wearing out the memory!
My SP/MIC cover has already broken and is no longer attached to the radio from being flexed so much.

I guess that is the cost of using experimental firmware.

It is 3 am here, so I supposed I should attempt to get some sleep.

Thanks again for everything!

VK3KYY
Posts: 3318
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia
Contact:

Re: TX power levels are not always correct on any releases after 2020.10.16

Post by VK3KYY » Fri Oct 30, 2020 8:43 am

No worries

Post Reply