Last modified by UT2UK on 2026/03/02 10:55

From version 1.1
edited by UT2UK
on 2026/03/02 10:54
Change comment: There is no comment for this version
To version 2.1
edited by UT2UK
on 2026/03/02 10:55
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -3,7 +3,6 @@
3 3  ## Purpose of the Utility
4 4  
5 5  The program is designed for engineers and technicians for:
6 -
7 7  * Automatic calibration of driver and output stage bias
8 8  * Setting target idle currents for each stage
9 9  * Monitoring the current status of the power amplifier
... ... @@ -16,6 +16,39 @@
16 16  
17 17  The utility is organized as a hierarchical menu system:
18 18  
18 +```
19 +Main menu
20 +├── View information
21 +│ ├── Print PA info (status)
22 +│ ├── Print PA config (configuration)
23 +│ ├── Print PA bias table (bias table)
24 +│ └── Print total current (current consumption)
25 +├── Edit bias table
26 +│ ├── Print PA bias table
27 +│ ├── Reset all bias to defaults
28 +│ ├── Enter driver stage current
29 +│ ├── Enter output stage current
30 +│ ├── Autotune DAC bias for driver stage
31 +│ ├── Autotune DAC bias for output stage
32 +│ ├── Enter driver stage thermo compensation
33 +│ └── Enter output stage thermo compensation
34 +├── Edit PA configuration
35 +│ ├── Print PA config
36 +│ ├── Edit max temperature ALARM
37 +│ ├── Edit restore temperature ALARM
38 +│ ├── Edit max driver current
39 +│ ├── Edit max output stage current
40 +│ └── Fan Table Editor
41 +│ ├── Print fan lookup table
42 +│ ├── Reset fan table to defaults
43 +│ └── Edit entries 0-7
44 +├── Quick commands
45 +│ ├── Bias switch ON
46 +│ ├── Bias switch OFF
47 +│ ├── Reset overcurrent
48 +│ └── Write all settings
49 +```
50 +
19 19  ## Command Line Parameters
20 20  
21 21  The utility does not accept command line parameters. All control is performed through the interactive console menu.
... ... @@ -22,8 +22,11 @@
22 22  
23 23  ### Starting the Program
24 24  
25 -At startup the program:
57 +```bash
58 +patune
59 +```
26 26  
61 +At startup the program:
27 27  1. Connects to PA Manager
28 28  1. Requests the current PA configuration
29 29  1. Requests the current bias table
... ... @@ -37,15 +37,17 @@
37 37  #### Numeric Input
38 38  
39 39  When a numeric value is requested, the program expects:
40 -
41 41  * A positive integer within the specified range
42 -* Or the q character to cancel the operation
43 -* Or q and Enter to exit
76 +* Or the `q` character to cancel the operation
77 +* Or `q` and Enter to exit
44 44  
45 45  Example of entering a current value:
46 46  
47 -**Validation:**
81 +```bash
82 +Enter driver stage current, mA (1-1000), press 'q' to cancel: 600
83 +```
48 48  
85 +**Validation:**
49 49  * The value must be within the range [min, max]
50 50  * If a value outside the range is entered, the program will display an error and repeat the prompt
51 51  * Maximum 1 attempt per second (1 sec delay)
... ... @@ -54,8 +54,11 @@
54 54  
55 55  Signed values are used for thermal compensation:
56 56  
57 -**Valid value ranges:**
94 +```bash
95 +Enter driver stage thermo compensation, C/dac (-100 - 100), press 'q' to cancel: -5
96 +```
58 58  
98 +**Valid value ranges:**
59 59  * Thermal compensation: -100 to +100 DAC/°C
60 60  * Temperature: -40 to 126 °C
61 61  * Fan speed: 0 to 100 %
... ... @@ -62,58 +62,106 @@
62 62  
63 63  #### Cancelling an Operation
64 64  
65 -Press q at any input prompt to cancel the current operation without saving.
105 +Press `q` at any input prompt to cancel the current operation without saving.
66 66  
67 67  ### Menu Navigation
68 68  
69 -* Digits 0-9 to select a menu item
109 +* Digits `0-9` to select a menu item
70 70  * Enter to confirm
71 -* q to return to the previous menu
111 +* `q` to return to the previous menu
72 72  
73 73  ## Output Format
74 74  
75 75  ### PA Status
76 76  
77 -| Field | Description | Unit |
78 -| -------------------- | --------------------------------- | ---- |
79 -| Heat temp | Heatsink temperature | °C |
80 -| Int temp | Internal temperature | °C |
81 -| VSWR alarm | VSWR alarm flag | 0/1 |
82 -| Extra current alarm | Overcurrent alarm flag | 0/1 |
83 -| Temperature alarm | Temperature alarm flag | 0/1 |
84 -| Bias enable | Bias enable status | 0/1 |
85 -| Bus voltage | Supply voltage | mV |
86 -| Output stage current | Output stage current | mA |
87 -| Driver stage current | Driver current | mA |
88 -| Output bias | Output bias voltage (channel 0/1) | mV |
89 -| Driver bias | Driver bias voltage (channel 0/1) | mV |
90 -| Fan speed | Fan speed | % |
117 +```bash
118 +Print PA info.
119 + Heat temp: 75C
120 + Int temp: 65C
121 + VSWR alarm : 0
122 + Extra current alarm : 0
123 + Temperature alarm : 0
124 + Bias enable: 1
125 + Bus voltage: 48mV
126 + Output stage current: 1050mA
127 + Driver stage current: 620mA
128 + Output bias: 2450/2460mV
129 + Driver bias: 1850/1855mV
130 + Fan speed: 45
131 +```
91 91  
133 +| Field | Description | Unit |
134 +| -------------------- | -------------------------------------------- | ------ |
135 +| Heat temp | Heatsink temperature | °C |
136 +| Int temp | Internal temperature | °C |
137 +| VSWR alarm | VSWR alarm flag | 0/1 |
138 +| Extra current alarm | Overcurrent alarm flag | 0/1 |
139 +| Temperature alarm | Temperature alarm flag | 0/1 |
140 +| Bias enable | Bias enable status | 0/1 |
141 +| Bus voltage | Supply voltage | mV |
142 +| Output stage current | Output stage current | mA |
143 +| Driver stage current | Driver current | mA |
144 +| Output bias | Output bias voltage (channel 0/1) | mV |
145 +| Driver bias | Driver bias voltage (channel 0/1) | mV |
146 +| Fan speed | Fan speed | % |
147 +
92 92  ### PA Configuration
93 93  
94 -| Field | Description | Default value |
95 -| ------------------ | ------------------------------------ | ------------- |
96 -| High limit temp | Maximum temperature (alarm) | 80°C |
97 -| Low limit temp | Minimum temperature (restore) | 75°C |
98 -| Max driver current | Max driver current (alarm threshold) | 1200mA |
99 -| Max output current | Max output current (alarm threshold) | 2000mA |
150 +```bash
151 +Print PA config.
152 + High limit temp: 80C
153 + Low limit temp: 75C
154 + Max driver current: 1200mA
155 + Max output current: 2000mA
156 +```
100 100  
158 +| Field | Description | Default value |
159 +| ------------------ | --------------------------------------------- | ------------- |
160 +| High limit temp | Maximum temperature (alarm) | 80°C |
161 +| Low limit temp | Minimum temperature (restore) | 75°C |
162 +| Max driver current | Max driver current (alarm threshold) | 1200mA |
163 +| Max output current | Max output current (alarm threshold) | 2000mA |
164 +
101 101  ### Bias Table
102 102  
103 -| Field | Description | Range |
104 -| -------------------------- | ---------------------------------------------- | ------------------- |
105 -| Bias DAC output [0/1] | DAC bias value for output channels 0 and 1 | 0-4095 |
106 -| Bias DAC driver [0/1] | DAC bias value for driver channels 0 and 1 | 0-4096 |
107 -| Target driver current | Target idle current for driver stage | 1-1000 mA |
108 -| Target output current | Target idle current for output stage | 1-2000 mA |
109 -| Driver thermo compensation | Driver thermal compensation | -100 to +100 DAC/°C |
110 -| Output thermo compensation | Output thermal compensation | -100 to +100 DAC/°C |
111 -| Temperature of calibration | Temperature at which calibration was performed | °C |
167 +```bash
168 +Bias DAC output 0: 2450
169 + Bias DAC output 1: 2460
170 + Bias DAC driver 0: 1850
171 + Bias DAC driver 1: 1855
172 + Target driver current,mA: 600
173 + Target output current,mA: 1000
174 + Driver thermo compensation,dac/C: -2
175 + Output thermo compensation,dac/C: -3
176 + Temprature of calibration,C: 25
177 +```
112 112  
179 +| Field | Description | Range |
180 +| -------------------------- | --------------------------------------------------- | ------------------- |
181 +| Bias DAC output [0/1] | DAC bias value for output channels 0 and 1 | 0-4095 |
182 +| Bias DAC driver [0/1] | DAC bias value for driver channels 0 and 1 | 0-4096 |
183 +| Target driver current | Target idle current for driver stage | 1-1000 mA |
184 +| Target output current | Target idle current for output stage | 1-2000 mA |
185 +| Driver thermo compensation | Driver thermal compensation | -100 to +100 DAC/°C |
186 +| Output thermo compensation | Output thermal compensation | -100 to +100 DAC/°C |
187 +| Temperature of calibration | Temperature at which calibration was performed | °C |
188 +
113 113  ### Fan Control Table
114 114  
115 -The table contains 8 interpolation points. Each row contains:
191 +```bash
192 +Index | Temperature (°C) | Fan Speed (%)
193 + ------|------------------|---------------
194 + 0 | 10 | 0%
195 + 1 | 20 | 7%
196 + 2 | 35 | 31%
197 + 3 | 40 | 63%
198 + 4 | 50 | 79%
199 + 5 | 60 | 100%
200 + 6 | 70 | 100%
201 + 7 | 126 | 100%
202 +```
116 116  
204 +The table contains 8 interpolation points. Each row contains:
117 117  * **Index**: sequence number (0-7)
118 118  * **Temperature**: threshold temperature in °C
119 119  * **Fan Speed**: fan speed in %
... ... @@ -124,8 +124,13 @@
124 124  
125 125  During automatic calibration a progress bar is displayed:
126 126  
127 -Components:
215 +```bash
216 +Tuning Driver Channel 0
217 + Target Current: 600mA
218 + DAC: 1800/4095 [***** ] 12% | Current: 150mA/600mA [**** ] 25%
219 +```
128 128  
221 +Components:
129 129  * **DAC**: current DAC value and maximum
130 130  * First progress bar: DAC progress (yellow)
131 131  * **Current**: current measured current and target current
... ... @@ -133,10 +133,28 @@
133 133  
134 134  ### Error Messages
135 135  
229 +```bash
230 +Set bias ON ERROR
231 +Get driver current ERROR
232 +Request PA config ERROR
233 +Connect/Disconnect loading ERROR
234 +Unable to tune bias for Driver channel 0
235 +```
236 +
136 136  An error message in red indicates a communication failure with PA Manager or an unexpected state.
137 137  
138 138  ### Success Messages
139 139  
241 +```bash
242 +✓ Finished OK
243 + Channel: 0
244 + Final DAC Value: 1850
245 + Final Current: 600mA
246 +Bias switched ON.
247 +New settings were recorder to NVMEM - OK.
248 +Overcurrent flag reseted OK.
249 +```
250 +
140 140  Successful operations are displayed in yellow.
141 141  
142 142  ## Usage Examples
... ... @@ -143,14 +143,105 @@
143 143  
144 144  ### Example 1: Checking Amplifier Status
145 145  
257 +```bash
258 +$ patune
259 +************************************************************
260 +| Power amplifier service utility version 1.2 |
261 +************************************************************
262 +[Main menu]
263 +0 - Print PA info.
264 +1 - Print PA config.
265 +2 - Print PA bias table.
266 +3 - [Edit bias table]
267 +4 - [Edit PA configs]
268 +5 - [Edit fan table]
269 +6 - Bias switch ON.
270 +7 - Bias switch OFF.
271 +8 - Reset overcurrent.
272 +9 - Write all settings.
273 +q - Quit
274 +Enter your choice: 0
275 +Print PA info.
276 + Heat temp: 45C
277 + Int temp: 38C
278 + VSWR alarm : 0
279 + Extra current alarm : 0
280 + Temperature alarm : 0
281 + Bias enable: 1
282 + Bus voltage: 48mV
283 + Output stage current: 1050mA
284 + Driver stage current: 620mA
285 + Output bias: 2450/2460mV
286 + Driver bias: 1850/1855mV
287 + Fan speed: 35
288 +```
289 +
146 146  ### Example 2: Setting Target Driver Current
147 147  
292 +```bash
293 +Enter your choice: 3
294 +[Bias table editor]
295 +0 - Print PA bias table.
296 +1 - Reset all bias to default value.
297 +2 - Enter driver stage current.
298 +3 - Enter output stage current.
299 +4 - Autotune DAC bias for driver stage.
300 +5 - Autotune DAC bias for output stage.
301 +6 - Print power consumption for all stages.
302 +7 - Enter driver stage thermo compensation.
303 +8 - Enter output stage thermo compensation.
304 +q - Quit
305 +Enter your choice: 2
306 +Enter driver stage current, mA (1-1000), press 'q' to cancel: 650
307 +```
308 +
148 148  ### Example 3: Automatic Driver Calibration
149 149  
311 +```bash
312 +Enter your choice: 4
313 + Tuning Driver Channel 1
314 + Target Current: 600mA
315 + DAC: 800/4096 [** ] 19% | Current: 0mA/600mA [ ] 0%
316 + DAC: 1200/4096 [**** ] 29% | Current: 100mA/600mA [***** ] 16%
317 + DAC: 1500/4096 [**** ] 36% | Current: 250mA/600mA [******* ] 41%
318 + DAC: 1700/4096 [***** ] 41% | Current: 450mA/600mA [***** *** ] 75%
319 + DAC: 1750/4096 [***** ] 42% | Current: 590mA/600mA [***** **** ] 98%
320 + DAC: 1751/4096 [***** ] 42% | Current: 600mA/600mA [***** ***** ] 100%
321 + ✓ Finished OK
322 + Channel: 1
323 + Final DAC Value: 1751
324 + Final Current: 600mA
325 +```
326 +
150 150  ### Example 4: Editing a Fan Table Entry
151 151  
329 +```bash
330 +Enter your choice: 5
331 +[Fan Table Editor]
332 +0 - Print fan lookup table.
333 +1 - Reset fan table to defaults.
334 +2 - Edit entry 0 (10°C / 0%).
335 +3 - Edit entry 1 (20°C / 7%).
336 +...
337 +Enter your choice: 3
338 + Edit Fan Table Entry 2
339 + Current settings:
340 + Temperature: 35°C
341 + Fan Speed: 31%
342 +Enter new temperature (C) (-40 - 126), press 'q' to cancel: 30
343 +Enter new fan speed (0-100%) (0-100), press 'q' to cancel: 25
344 + Entry 2 updated:
345 + Temperature: 30°C
346 + Fan Speed: 25%
347 +```
348 +
152 152  ### Example 5: Saving Configuration
153 153  
351 +```bash
352 +Enter your choice: 9
353 +New settings were recorder to NVMEM - OK.
354 +```
355 +
154 154  ## Error Diagnostics
155 155  
156 156  ### Calibration Error
... ... @@ -157,8 +157,11 @@
157 157  
158 158  **Message:**
159 159  
160 -**Causes:**
362 +```bash
363 +✗ Unable to tune bias for Driver channel 0
364 +```
161 161  
366 +**Causes:**
162 162  * Amplifier is not functioning
163 163  * No power supply to the stage
164 164  * Current sensor is faulty
... ... @@ -165,7 +165,6 @@
165 165  * Bias circuit is incorrectly configured
166 166  
167 167  **Solution:**
168 -
169 169  1. Check PA power supply
170 170  1. Check load connectors
171 171  1. Make sure bias can be adjusted
... ... @@ -175,14 +175,16 @@
175 175  
176 176  **Message:**
177 177  
178 -**Causes:**
382 +```bash
383 +Write config ERROR
384 +```
179 179  
386 +**Causes:**
180 180  * NVMEM is full
181 181  * Hardware write error
182 182  * Loss of connection with PA Manager
183 183  
184 184  **Solution:**
185 -
186 186  1. Repeat the write operation
187 187  1. Try resetting the configuration: "Reset all bias to default value"
188 188  1. Reboot and try again
... ... @@ -191,24 +191,83 @@
191 191  
192 192  ### Scenario 1: Initial Setup of a New Amplifier
193 193  
400 +```
401 +Step 1: Check status
402 + - Select "Print PA info"
403 + - Make sure the sensors are working
404 +Step 2: Set target currents
405 + - Select "Edit bias table" → "Enter driver stage current"
406 + - Enter 600 mA (typical value)
407 + - Select "Enter output stage current"
408 + - Enter 1000 mA (typical value)
409 +Step 3: Automatic calibration
410 + - Select "Autotune DAC bias for driver stage"
411 + - Wait for completion (both channels sequentially)
412 + - Select "Autotune DAC bias for output stage"
413 + - Wait for completion
414 +Step 4: Verify results
415 + - Select "Print PA info"
416 + - Make sure currents are within target values
417 +Step 5: Save
418 + - Select "Write all settings"
419 +```
420 +
194 194  ### Scenario 2: Fan Control Setup
195 195  
423 +```bash
424 +Step 1: View current table
425 + - Select "Edit fan table" → "Print fan lookup table"
426 +Step 2: Edit interpolation points
427 + - For each entry:
428 + - Select "Edit entry N"
429 + - Set the trigger temperature
430 + - Set fan speed in %
431 +Step 3: Save
432 + - Select "Write all settings"
433 +Example table for cold climate:
434 + Entry 0: 15°C / 0%
435 + Entry 1: 25°C / 10%
436 + Entry 2: 40°C / 30%
437 + Entry 3: 50°C / 60%
438 + Entry 4: 60°C / 80%
439 + Entry 5: 70°C /100%
440 + Entry 6: 80°C /100%
441 + Entry 7: 126°C /100%
442 +```
443 +
196 196  ### Scenario 3: Maintenance and Diagnostics
197 197  
446 +```
447 +Step 1: Check configuration integrity
448 + - Select "Print PA bias table"
449 + - Make sure all values are within acceptable limits
450 + - Select "Print PA config"
451 +Step 2: Check current consumption
452 + - Select "Print power consumption for all stages"
453 + - Compare with expected values
454 +Step 3: Test the amplifier
455 + - Select "Bias switch ON"
456 + - Check "Print PA info"
457 + - Make sure all alarms are in zero state
458 + - Select "Bias switch OFF"
459 +Step 4: Reset alarm (if required)
460 + - Select "Reset overcurrent"
461 +```
462 +
198 198  ## Limitations and Implementation Notes
199 199  
200 200  ### Parameter Limits
201 201  
202 -| Parameter | Minimum | Maximum | Note |
203 -| -------------------------- | ------- | ----------------------------- | ----------------------- |
204 -| Driver current | 1 mA | 1000 mA | Target value |
205 -| Output current | 1 mA | 2000 mA | Target value |
206 -| Max alarm current (driver) | - | 6000 mA | Threshold value |
207 -| Max alarm current (output) | - | 26000 mA | Threshold value |
208 -| Heatsink temperature | -40°C | 126°C | Sensor range |
209 -| Maximum alarm temperature | - | 80°C | Limited |
210 -| Bias DAC | 0 | 4095 (output) / 4096 (driver) | 12-bit resolution |
211 -| Thermal compensation | -100 | +100 | DAC/°C |
212 -| Fan speed | 0% | 100% | Corresponds to DAC 0-63 |
467 +| Parameter | Minimum | Maximum | Note |
468 +| ---------------------------------- | ------- | ------------------------------ | --------------------- |
469 +| Driver current | 1 mA | 1000 mA | Target value |
470 +| Output current | 1 mA | 2000 mA | Target value |
471 +| Max alarm current (driver) | - | 6000 mA | Threshold value |
472 +| Max alarm current (output) | - | 26000 mA | Threshold value |
473 +| Heatsink temperature | -40°C | 126°C | Sensor range |
474 +| Maximum alarm temperature | - | 80°C | Limited |
475 +| Bias DAC | 0 | 4095 (output) / 4096 (driver) | 12-bit resolution |
476 +| Thermal compensation | -100 | +100 | DAC/°C |
477 +| Fan speed | 0% | 100% | Corresponds to DAC 0-63 |
213 213  
214 214  **Utility version:** 1.2