Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
QMX/QMX+ internal Transmit Voltage measurement question
Hans (and others who may know):
?
On my QMX and QMX+, I have often wondered why the measured TX voltage, as shown in the Diagnostics page, always has a significant drop (about 1.5V) from the supply voltage.? Looking at the schematic, it should have only the very small drop due to Q507.
?
So (while answering someone else's question today) I measured the voltages at Q507 and ADC_PA with my DMM and oscilloscope, on my 12V QMX+ build, all measurements done at 7.074MHz.
?
Diagnostic screen shows:
?- supply voltage 11.8V receive, 11.5V during TX
?- transmit voltage 0.4V receive, 9.8V during TX? (the unexpected drop of 1.7V in TX voltage)
?
DMM measurement shows:
?- supply voltage 11.84V receive, 11.48V during TX (measured at Q507 source terminal)
- agrees well with QMX+ supply voltage measurement
?- transmit voltage 0.43V receive, 11.22V during TX (measured at Q507 drain terminal, a drop of 0.26V)
- does NOT agree with QMX+ transmit voltage measurement
- but is as expected from Q507 drop
?
So it appears that measurement of TX voltage on QMX/QMX+ is not well calibrated.
Could this be causing some of the problems seen in SSB calibration, etc?
?
So I measured the voltage at ADC_PA with my DMM (at top of C529), in case it is helpful:
?- ADC_PA during diagnostic receive mode (off): 0.08V
?- ADC_PA during diagnostic transmit: 1.96V
Using just the 47k/10k voltage divider ratio, this would equate to 9.2V (rather than the full 11.22 measured); hmmm, is this part of the problem? Or is there an expected additional resistance in the STM32 input that completes the voltage divider?
?
Stan KC7XE
|
Yes, I see similar behavior with my QMX+. See /g/QRPLabs/message/143062
Probably a software bug and maybe the cause for SSB calibration failures. Calling out @Hans! :-) Gottfried |
On Mon, Apr 14, 2025 at 08:34 PM, Stan Dye wrote:
Stan, calculating from 1.96V back to the PA voltage (Q507 D) I came to a value of 11.17V, close to 11.22V you measured.
1.96V * ((10k + 47k) / 10k) = 11.17V?
?
73 Ludwig |
Hi all The ADC measurement voltage is multiplied in the code by 5.7 (due to the 10 / 47 potential?divider).? It IS expected that the TX voltage is less than the supply voltage because the code is written this way. The gain of the PA modulator amplifier (Q512, Q513, Q514, Q515, Q507) is expected to be 6.24. When the system measures the supply voltage, it can therefore calculate what it expects the maximum available PA modulator voltage to be. Or in other words, what DAC value to use for the desired maximum PA voltage. It needs to know?this to get the top of the Blackmann-Harris CW envelope shaping correct, and for the ALC or CESSB in SSB generation. However there are component tolerances, and the supply voltage?is likely to drop a little further under high load, and for this reason a safety margin is built in, and this is why the TX voltage is less than the supply voltage.? During Receive, the PA voltage is just set to the maximum DAC value, this means the PA voltage will be as close as it can get to the supply voltage. This is because we don't need to use that voltage for anything other than to minimize BS170 vDS capacitance and therefore as far as possible, remove the PA from view during Reception.? None of this is involved in the calibration or any issues with calibration. 73 Hans G0UPL On Mon, Apr 14, 2025 at 11:28?PM Stan Dye via <standye=[email protected]> wrote:
|
开云体育
I measured the TX voltage at the drain of the modulator with my DVM during transmit and I get a value within a few tenths of supply. This is in CW mode. But the diagnostic display still says TX voltage is 1.5 volts lower than supply.
Tony
AD0VC
From: [email protected] <[email protected]> on behalf of Hans Summers via groups.io <hans.summers@...>
Sent: Tuesday, April 15, 2025 7:27 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Hi all
The ADC measurement voltage is multiplied in the code by 5.7 (due to the 10 / 47 potential?divider).?
It IS expected that the TX voltage is less than the supply voltage because the code is written this way. The gain of the PA modulator amplifier (Q512, Q513, Q514, Q515, Q507) is expected to be 6.24. When the system measures the supply voltage, it can therefore
calculate what it expects the maximum available PA modulator voltage to be. Or in other words, what DAC value to use for the desired maximum PA voltage. It needs to know?this to get the top of the Blackmann-Harris CW envelope shaping correct, and for the ALC
or CESSB in SSB generation. However there are component tolerances, and the supply voltage?is likely to drop a little further under high load, and for this reason a safety margin is built in, and this is why the TX voltage is less than the supply voltage.?
During Receive, the PA voltage is just set to the maximum DAC value, this means the PA voltage will be as close as it can get to the supply voltage. This is because we don't need to use that voltage for anything other than to minimize BS170 vDS capacitance
and therefore as far as possible, remove the PA from view during Reception.?
None of this is involved in the calibration or any issues with calibration.
73 Hans G0UPL
On Mon, Apr 14, 2025 at 11:28?PM Stan Dye via
<standye=[email protected]> wrote:
|
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> on behalf of mux_folder2001 via groups.io <canthony15@...>
Sent: Tuesday, April 15, 2025 8:49 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
I measured the TX voltage at the drain of the modulator with my DVM during transmit and I get a value within a few tenths of supply. This is in CW mode. But the diagnostic display still says TX voltage is 1.5 volts lower than supply.
Tony
AD0VC
From: [email protected] <[email protected]> on behalf of Hans Summers via groups.io <hans.summers@...>
Sent: Tuesday, April 15, 2025 7:27 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Hi all
The ADC measurement voltage is multiplied in the code by 5.7 (due to the 10 / 47 potential?divider).?
It IS expected that the TX voltage is less than the supply voltage because the code is written this way. The gain of the PA modulator amplifier (Q512, Q513, Q514, Q515, Q507) is expected to be 6.24. When the system measures the supply voltage, it can therefore
calculate what it expects the maximum available PA modulator voltage to be. Or in other words, what DAC value to use for the desired maximum PA voltage. It needs to know?this to get the top of the Blackmann-Harris CW envelope shaping correct, and for the ALC
or CESSB in SSB generation. However there are component tolerances, and the supply voltage?is likely to drop a little further under high load, and for this reason a safety margin is built in, and this is why the TX voltage is less than the supply voltage.?
During Receive, the PA voltage is just set to the maximum DAC value, this means the PA voltage will be as close as it can get to the supply voltage. This is because we don't need to use that voltage for anything other than to minimize BS170 vDS capacitance
and therefore as far as possible, remove the PA from view during Reception.?
None of this is involved in the calibration or any issues with calibration.
73 Hans G0UPL
On Mon, Apr 14, 2025 at 11:28?PM Stan Dye via
<standye=[email protected]> wrote:
|
Hi Tony How could you measure in TX Key down with speed zero, if you were in the Diagnostics screen viewing the voltage?? 73 Hans G0UPL On Tue, Apr 15, 2025, 17:51 mux_folder2001 via <canthony15=[email protected]> wrote:
|
开云体育
You have a point. I measured as I said with key down. But , separately, looked at the TX voltage in the diagnostic screen while holding the T key. I assumed that the two were equivalent TX conditions since both seem to produce full power out. If this is not
the case, that both produce full power, then that would be interesting to know since many of us measure power out using the diagnostic screen.
Tony
AD0VC
From: [email protected] <[email protected]> on behalf of Hans Summers via groups.io <hans.summers@...>
Sent: Tuesday, April 15, 2025 9:06 AM To: [email protected] Notification <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Hi Tony
How could you measure in TX Key down with speed zero, if you were in the Diagnostics screen viewing the voltage??
73 Hans G0UPL
On Tue, Apr 15, 2025, 17:51 mux_folder2001 via
<canthony15=[email protected]> wrote:
|
开云体育
Here is a link to a photo showing me holding T in the diagnostic screen while displaying the DVM reading at the drain of the modulator.?
The diagnostic screen says 1.75, the DVM says 8.62. Supply is 9 volts from a regulator mounted on the backpanel of the QMX+.
Sorry that it is a little fuzzy. Holding the camera in one hand while pressing a key with the other is a bit of a challenge for my shaky hands.
Tony
AD0VC
From: [email protected] <[email protected]> on behalf of mux_folder2001 via groups.io <canthony15@...>
Sent: Tuesday, April 15, 2025 9:19 AM To: [email protected] <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
You have a point. I measured as I said with key down. But , separately, looked at the TX voltage in the diagnostic screen while holding the T key. I assumed that the two were equivalent TX conditions since both seem to produce full power out. If this is not
the case, that both produce full power, then that would be interesting to know since many of us measure power out using the diagnostic screen.
Tony
AD0VC
From: [email protected] <[email protected]> on behalf of Hans Summers via groups.io <hans.summers@...>
Sent: Tuesday, April 15, 2025 9:06 AM To: [email protected] Notification <[email protected]> Subject: Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Hi Tony
How could you measure in TX Key down with speed zero, if you were in the Diagnostics screen viewing the voltage??
73 Hans G0UPL
On Tue, Apr 15, 2025, 17:51 mux_folder2001 via
<canthony15=[email protected]> wrote:
|
toggle quoted message
Show quoted text
From:[email protected] <[email protected]> on behalf of mux_folder2001 via groups.io <canthony15@...>
Sent:?Tuesday, April 15, 2025 10:05 AM To:[email protected] <[email protected]> Subject:?Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Here is a link to a photo showing me holding T in the diagnostic screen while displaying the DVM reading at the drain of the modulator.?
The diagnostic screen says 1.75, the DVM says 8.62. Supply is 9 volts from a regulator mounted on the backpanel of the QMX+.
Sorry that it is a little fuzzy. Holding the camera in one hand while pressing a key with the other is a bit of a challenge for my shaky hands.
Tony
AD0VC
From:[email protected] <[email protected]> on behalf of mux_folder2001 via groups.io <canthony15@...>
Sent:?Tuesday, April 15, 2025 9:19 AM To:[email protected] <[email protected]> Subject:?Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
You have a point. I measured as I said with key down. But , separately, looked at the TX voltage in the diagnostic screen while holding the T key. I assumed that the two were equivalent TX conditions since both seem to produce full power out. If this is not
the case, that both produce full power, then that would be interesting to know since many of us measure power out using the diagnostic screen.
Tony
AD0VC
From:[email protected] <[email protected]> on behalf of Hans Summers via groups.io <hans.summers@...>
Sent:?Tuesday, April 15, 2025 9:06 AM To:[email protected] Notification <[email protected]> Subject:?Re: [QRPLabs] QMX/QMX+ internal Transmit Voltage measurement question ?
Hi Tony
How could you measure in TX Key down with speed zero, if you were in the Diagnostics screen viewing the voltage??
73 Hans G0UPL
On Tue, Apr 15, 2025, 17:51 mux_folder2001 via ?<canthony15=[email protected]> wrote:
|
Thanks Tony I agree, there do appear to be several, or at least one, mystery here. It warrants further investigation. Again though, not related to SSB calibrarion so don't worry about that.? 73 Hans G0UPL On Tue, Apr 15, 2025, 19:07 mux_folder2001 via <canthony15=[email protected]> wrote:
|
On Tue, Apr 15, 2025 at 06:27 AM, Hans Summers wrote:
None of this is involved in the calibration or any issues with calibration.Thank you for the clarification and description, Hans. I probably should have left the 'calibration' reference out of my post.
?
What I still don't understand is this:
?- I measure 11.22V at the drain of Q507, while pressing the 'T' key in the diagnostic screen
?- but the voltage displayed in the diagnostic screen is 9.8V, over 1.4V difference.
?- a check of the voltage at ADC_PA, considering the 5.7 voltage divider factor, confirms that the processor should be seeing 11.2V.
?
This measurement discrepancy is repeatable, and present also on my other QMX+.? On my 9V QMX, the difference is proportionally smaller, with 8.4V measured and 7.2V displayed.
?
This discrepancy was misleading to one user, who thought he could safely increase his supply voltage to get a full-range TX voltage.
?
Stan KC7XE |
Hi Stan ?
I agree, it seems like something isn't quite right. I need to investigate it.?? ?
Full-range TX was never meant to mean 0 to 12V PA voltage. The PA voltage is expected to be a bit less than the supply voltage. Regardless of the discrepancies noted above (which I need to investigate).?? 73 Hans G0UPL |
Hi all I did a little bit of investigation and found the cause. The curse of C programmers... C programming 101, schoolboy error coming up... I'm so ashamed. I correctly measure the voltage at the ADC_PA pin. This is the PA voltage divided by the potential divider made up of R525 (47K) and R526 (10K). According to the usual rules for potential dividers the ratio is 10 / (47?+ 10) which is 10 / 57. Therefore to convert the actual voltage measurement on the pin, to the real voltage to be displayed, I should multiply by 57 / 10.? Now unfortunately what happens when you have a floating point variable, and you multiply it by? voltage *= (57 / 10); is that 57 and 10 are compiled as integers. The division 57 / 10 is equal to 5 (because division of integers truncates). Then the 5 gets converted to floating point implicitly, and the multiplication goes ahead in all due happiness.? What the conscientious C programmer SHOULD do, when he wants a constant to definitely be understood and used by the compiler as a floating point value, is specify it with a decimal point zero, even when it is just 57 (in this example). So the correct way to write this line of code is: voltage *= (57.0 / 10.0); Which then will properly multiply the voltage by 5.7. Whereas it WAS being multiplied by 5.0, which is why the displayed value was too low.? Many thanks to everyone involved in this thread, I am glad we could fix it! Now this will go into the next firmware version.? Again I'd like to stress, currently the ONLY place this ADC_PA signal is used, is in the Diagnostics screen. And the silly multiplication by 5 (instead of 5.7) was also only done for the purposes of display on the Diagnostics screen. Hence the error does not affect anything else about the operation of QMX including the SSB self-calibration. 73 Hans G0UPL On Tue, Apr 15, 2025 at 9:29?PM Hans Summers via <hans.summers=[email protected]> wrote:
|
Hi Hans, Looking at the schematic, I see a resistive divider consisting of R508 and R509 hanging off Q507’s drain. Depending on the states and gain of Q514 and Q515, R508/R509 provide some current path to ground which *might* affect the voltage the ADC sees. I don’t know how you arrived at a gain calculation of 6.24 or what that means exactly. Bottom line is measuring the PA DC voltage with a ?DVM should be close to what the display reads, within a few percent tolerance, over all possible PA voltages. Otherwise, the user can become confused as Stan pointed out. It would be better to not display the PA voltage at all if an accurate figure over all voltages can’t be guaranteed. Tony AC9QY On Tue, Apr 15, 2025 at 1:29?PM Hans Summers via <hans.summers=[email protected]> wrote:
|
Why not simply multiply by 5.7? No need to divide. Tony AC9QY On Tue, Apr 15, 2025 at 2:23?PM Hans Summers via <hans.summers=[email protected]> wrote:
|
Hi Tony ?
The amplifier consisting of Q512, Q513, Q514 and Q515 pulls whatever current is necessary through R506 in order to try to make the voltage at the base of Q513 equal to the voltage at the base of Q515. It's kind of like an op-amp having inverting and non-inverting inputs: the simple way to think of the op-amp is that it will try to do something to the output in order to make the voltage at its inputs equal.? In this case the voltage at the gate of Q515 is the PA voltage (at the Q507 drain) divided by a potential divider consisting of R508 and R509. The ratio is 1.91 / (1.91?+ 10) = 1 / 6.24. It's analogous to?the feedback resistor of a simple inverting op-amp configuration. This is what gives the 5-transistor amplifier (PA amplitude modulator) a gain of 6.24.? This is a separate thing to the potential divider made up of R525 and R526 which deliver a 1 / 5.7 fraction of the PA voltage to the ADC_PA processor pin for measurement (and display on the diagnostics?screen).? ?
Yes, as I mentioned in my previous post, there was a bug here, and now it should be reasonably accurate in the next firmware version when this?bug fix is implemented.? The whole point of the PA voltage measurement on the Diagnostics screen is to make sure that the PA modulator is working properly. It's another way for QMX to self-test itself. It could in theory ramp up the DAC voltage and check that the output of the amplitude modulator was always at the expected voltage, by measuring it. Currently it's only checking the two extremes but this is an important check and as for other items in the Diagnostics screen, if there are any errors they light up RED inverse text, to highlight the problem.? > Why not simply multiply by 5.7? No need to divide. Sometimes to make the code clear, for when one comes back ages later and wonders what possessed one to write such confusing things, it helps to have the explanation as part of the code. In any case, the compiler optimizer removes any calculations involving constants so it does not increase the program size or execution time. It's just a form of in-code documentation. It would indeed be just as good to write 5.7 then a comment explaining where that comes from.? 73 Hans G0UPL |
Why not simply multiply by 5.7? No need to divide. It used to be that a divide operation was the slowest math operation you could do. That's why you'll sometimes see an integer operation that divides by 2 done as a bit-shift right, or a multiply by 2 as a bit-shift left. Long ago when my company was marketing our statistics package and the 80366 was popular and had the 80387 math co-processor, our test suggested the time saved by using X *.5 instead of X/2.0 was barely measurable. Today, unless a divide operation is buried in a tight loop, it's probably not worth worrying about. Also, the divide expression is easier to understand. Jack, W8TEE ?
On Tuesday, April 15, 2025 at 03:39:24 PM EDT, Tony Scaminaci via groups.io <tonyscam@...> wrote:
Why not simply multiply by 5.7? No need to divide. Tony AC9QY On Tue, Apr 15, 2025 at 2:23?PM Hans Summers via <hans.summers=[email protected]> wrote:
|
Hi Hans, Thanks for the explanation. Yeah, I see it now - I was looking for some hardware issue as opposed to a firmware issue. I saw your firmware fix right after I posted… ships passing in the night:-). I totally understand writing code in such a way as to assist in future recall. I prefer using comments to explain calculations that are fixed as constants due to design implementation. I’d defined the 5.7 multiplier as a floating point constant and group it together with all of my other constants including comments explaining how these constants were derived, mostly because I can’t remember why I did something weeks after I do it. Anyway, great catch on the integer division. It’s an easy mistake to make. Tony AC9QY On Tue, Apr 15, 2025 at 2:54?PM Hans Summers via <hans.summers=[email protected]> wrote:
|
to navigate to use esc to dismiss