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

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

Summary

Details

Page properties
Content
... ... @@ -3,6 +3,7 @@
3 3  ## Purpose of the Utility
4 4  
5 5  The program is designed for engineers and technicians for:
6 +
6 6  * Automatic calibration of driver and output stage bias
7 7  * Setting target idle currents for each stage
8 8  * Monitoring the current status of the power amplifier
... ... @@ -15,39 +15,6 @@
15 15  
16 16  The utility is organized as a hierarchical menu system:
17 17  
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 -
51 51  ## Command Line Parameters
52 52  
53 53  The utility does not accept command line parameters. All control is performed through the interactive console menu.
... ... @@ -54,11 +54,8 @@
54 54  
55 55  ### Starting the Program
56 56  
57 -```bash
58 -patune
59 -```
60 -
61 61  At startup the program:
26 +
62 62  1. Connects to PA Manager
63 63  1. Requests the current PA configuration
64 64  1. Requests the current bias table
... ... @@ -72,17 +72,15 @@
72 72  #### Numeric Input
73 73  
74 74  When a numeric value is requested, the program expects:
40 +
75 75  * A positive integer within the specified range
76 -* Or the `q` character to cancel the operation
77 -* Or `q` and Enter to exit
42 +* Or the q character to cancel the operation
43 +* Or q and Enter to exit
78 78  
79 79  Example of entering a current value:
80 80  
81 -```bash
82 -Enter driver stage current, mA (1-1000), press 'q' to cancel: 600
83 -```
84 -
85 85  **Validation:**
48 +
86 86  * The value must be within the range [min, max]
87 87  * If a value outside the range is entered, the program will display an error and repeat the prompt
88 88  * Maximum 1 attempt per second (1 sec delay)
... ... @@ -91,11 +91,8 @@
91 91  
92 92  Signed values are used for thermal compensation:
93 93  
94 -```bash
95 -Enter driver stage thermo compensation, C/dac (-100 - 100), press 'q' to cancel: -5
96 -```
97 -
98 98  **Valid value ranges:**
58 +
99 99  * Thermal compensation: -100 to +100 DAC/°C
100 100  * Temperature: -40 to 126 °C
101 101  * Fan speed: 0 to 100 %
... ... @@ -102,106 +102,58 @@
102 102  
103 103  #### Cancelling an Operation
104 104  
105 -Press `q` at any input prompt to cancel the current operation without saving.
65 +Press q at any input prompt to cancel the current operation without saving.
106 106  
107 107  ### Menu Navigation
108 108  
109 -* Digits `0-9` to select a menu item
69 +* Digits 0-9 to select a menu item
110 110  * Enter to confirm
111 -* `q` to return to the previous menu
71 +* q to return to the previous menu
112 112  
113 113  ## Output Format
114 114  
115 115  ### PA Status
116 116  
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 -```
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 | % |
132 132  
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 -
148 148  ### PA Configuration
149 149  
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 -```
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 |
157 157  
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 -
165 165  ### Bias Table
166 166  
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 -```
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 |
178 178  
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 -
189 189  ### Fan Control Table
190 190  
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 -```
203 -
204 204  The table contains 8 interpolation points. Each row contains:
116 +
205 205  * **Index**: sequence number (0-7)
206 206  * **Temperature**: threshold temperature in °C
207 207  * **Fan Speed**: fan speed in %
... ... @@ -212,13 +212,8 @@
212 212  
213 213  During automatic calibration a progress bar is displayed:
214 214  
215 -```bash
216 -Tuning Driver Channel 0
217 - Target Current: 600mA
218 - DAC: 1800/4095 [***** ] 12% | Current: 150mA/600mA [**** ] 25%
219 -```
220 -
221 221  Components:
128 +
222 222  * **DAC**: current DAC value and maximum
223 223  * First progress bar: DAC progress (yellow)
224 224  * **Current**: current measured current and target current
... ... @@ -226,28 +226,10 @@
226 226  
227 227  ### Error Messages
228 228  
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 -
237 237  An error message in red indicates a communication failure with PA Manager or an unexpected state.
238 238  
239 239  ### Success Messages
240 240  
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 -
251 251  Successful operations are displayed in yellow.
252 252  
253 253  ## Usage Examples
... ... @@ -254,105 +254,14 @@
254 254  
255 255  ### Example 1: Checking Amplifier Status
256 256  
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 -
290 290  ### Example 2: Setting Target Driver Current
291 291  
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 -
309 309  ### Example 3: Automatic Driver Calibration
310 310  
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 -
327 327  ### Example 4: Editing a Fan Table Entry
328 328  
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 -
349 349  ### Example 5: Saving Configuration
350 350  
351 -```bash
352 -Enter your choice: 9
353 -New settings were recorder to NVMEM - OK.
354 -```
355 -
356 356  ## Error Diagnostics
357 357  
358 358  ### Calibration Error
... ... @@ -359,11 +359,8 @@
359 359  
360 360  **Message:**
361 361  
362 -```bash
363 -✗ Unable to tune bias for Driver channel 0
364 -```
365 -
366 366  **Causes:**
161 +
367 367  * Amplifier is not functioning
368 368  * No power supply to the stage
369 369  * Current sensor is faulty
... ... @@ -370,6 +370,7 @@
370 370  * Bias circuit is incorrectly configured
371 371  
372 372  **Solution:**
168 +
373 373  1. Check PA power supply
374 374  1. Check load connectors
375 375  1. Make sure bias can be adjusted
... ... @@ -379,16 +379,14 @@
379 379  
380 380  **Message:**
381 381  
382 -```bash
383 -Write config ERROR
384 -```
385 -
386 386  **Causes:**
179 +
387 387  * NVMEM is full
388 388  * Hardware write error
389 389  * Loss of connection with PA Manager
390 390  
391 391  **Solution:**
185 +
392 392  1. Repeat the write operation
393 393  1. Try resetting the configuration: "Reset all bias to default value"
394 394  1. Reboot and try again
... ... @@ -397,83 +397,24 @@
397 397  
398 398  ### Scenario 1: Initial Setup of a New Amplifier
399 399  
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 -
421 421  ### Scenario 2: Fan Control Setup
422 422  
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 -
444 444  ### Scenario 3: Maintenance and Diagnostics
445 445  
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 -
463 463  ## Limitations and Implementation Notes
464 464  
465 465  ### Parameter Limits
466 466  
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 |
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 |
478 478  
479 479  **Utility version:** 1.2