Juma PA-100D v1.06b - Build 4

Software developed by Adrian

Juma PA-100D v1.06b - Build 4

Postby 5B4AIY » 08 Feb 2015 13:02

Version 1.06b Build 4 improves the accuracy of the frequency counter, and provides a number of minor User Interface enhancements, as well as fixing a minor annoyance and a bug.

Frequency Counter Accuracy
The choice of master oscillator frequency for the micro-processor was largely based on economics, and as a result, the chosen frequency (7.3728MHz) is not ideal to generate a precise 1mS interrupt or counter gate.

The interrupt timing is obtained by using the master clock to increment an internal counter, and when it reaches a preset value an interrupt is generated, and the counter reset. Unfortunately, the preset value is a 16-bit integer, and with the frequency chosen there is no integer value that will result in an interrupt timing of exactly 1,000uS. In addition, for the frequency counter there are additional machine cycles necessary to close the gate, transfer the accumulated count, reset the counter and open the gate to be taken into account. (For full details, please read the comments in the source files pa-100.c and timers_pwm.c)

After a lot of experimentation, a suitable preset constant was determined which ensures that all frequency counts over the range of amateur bands are within the range of +0/-1kHz. Whilst this would normally be good enough, I felt that if the accuracy could be improved, then it was worthwhile expending the effort.

In the previous version of the firmware an empirical algorithm was designed that gave acceptable results. However, if the injected signal is varied, for a perfect counter with a gate time of exactly 1,000uS then if the frequency is increased by just over 500Hz from an integer kHz value then the display should just increment by 1 count in the least-significant digit. Equally, if the frequency is reduced by just over 500Hz from an integer kHz value, then the display should decrement by 1 count in the least significant digit. Unfortunately the previous algorithm only approximately satisfied this constraint.

As an example, when carefully adjusted, my results were:

Displayed Measured Offset
28.851 28.850430 +430
28.849 28.849398 -602
1.901 1.900578 +578
1.899 1.899514 -486

There were similar discrepancies for the other amateur bands, and whilst this would still result in a frequency counter of acceptable accuracy, I felt that it could be improved.

This version of the firmware improves the overall accuracy, and uses a simpler algorithm. With proper calibration, the new version achieves:

Displayed Measured Offset
28.851 28.850525 +525
28.849 28.849485 -515
1.901 1.900521 +521
1.899 1.899474 -526

Note that these results are for a stable display with no signs of jitter. The internal count is averaged over 100 samples.

There are also some minor formatting changes in the way the Calibration and User Configuration settings are displayed in the Serial Test Suite.

This version of the firmware does not change the EEPROM mapping from version 1.06a, and thus it can be safely loaded over this version without incurring a checksum error on first boot. However, because the frequency display algorithm and calculation has changed significantly you will now have to re-calibrate the frequency display. If you fail to do this, then you will receive thoroughly erroneous frequency displays! Load the firmware as normal, then from the power off state, press and hold the PWR button until you receive the prompt:

Juma PA100 v1.06b
Calibration Mode

Release the button, wait for the information message to finish, and you will drop into page 1 of the Calibration & Setup menu. Briefly press the PWR button to step back to the last page of this menu, which is the frequency counter calibration page.

Ensure that the amplifier is terminated in a suitable 50 ohm dummy load. If this is the first time, then the frequency calibration factor will have been reset to the minimum value as all calibration and configuration menu pages have automatic range limits, and your previous calibration factor would have been too low. Press and hold the UP button, and set the calibration factor to the default, 999985.

If you are using the Juma TRX-2 as the frequency source, select the default 10m band frequency, select the TUNE mode, and press the PTT switch. The display should indicate 28.850MHz. Press the UP button and note the calibration factor where the display just reads 28.849 as a stable display. (No jitter) Now release the button and press the DOWN button and note the calibration factor where the display just reads 28.851 as a stable display. Add this factor to the first, and divide by 2. The result is the optimum calibration figure.

As an example, for my amplifier, the upper factor was 1000004, and the lower factor 999966. The sum is (1000004 + 999966) / 2 = 999985

User Interface Enhancements
As in the System Setup & Calibration and User Configuration modes, a brief press of the PWR button in the normal mode will now step to the previous measurement display page. This permits rapid switching between, for example, O/P Power and SWR, or Voltage and Current. (In the previous firmware, in the normal mode, the PWR Button Short Push function was not assigned.)

The BAND+/BAND- buttons will now auto-repeat after a short delay.

The repeat timer for the UP/DOWN buttons has been increased to allow for an easier gain selection.

Bug Fix
In previous versions, a minor annoyance was that when exiting the Service & Calibration mode, the power meter would very briefly display 0.6W, and then reset to zero. Fixed!

Fixed bug that caused the High/Low Voltage alarm On/Off pages to disappear from the calibration & Setup menu. My apologies!

Firmware Updating
If you are updating from a version earlier than 1.06a then there will be a checksum error on initial boot. This is normal, and only occurs the first time. Make a note of your calibration and configuration data BEFORE loading this firmware!

If you are upgrading from an original version, then I'm afraid you will have to re-calibrate as the measurement system is completely different, and there is no easy way to convert your original calibration values to the new system. Fortunately the bias currents are hardware settings, so only the software calibration/configuration data will need changing.

73, Adrian, 5B4AIY
PA-100D v1.06b Build 4 (C-Source+HEX Load File+User Manual).zip
Improved Frequency Meter accuracy, minor User Interface enhancements, bug fixes.
(202.69 KiB) Downloaded 249 times
Posts: 188
Joined: 13 Nov 2011 09:22
Location: Cyprus

Return to Juma Firmware by 5B4AIY

Who is online

Users browsing this forum: No registered users and 1 guest