开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

QMX+ V2 - I've killed it


 

I think 116.7 KHz would be the frequency of PWM_3V3.
That could be inspected with a scope, and is of most interest to users since
that determines the harmonics that might interfere with a receiver somehow.
The rate at which ADC_3V3 is inspected by the STM32F could be quite a bit slower,
and is not available for inspection.
?
The 5v switcher is probably run at exactly the same rates.
?
Jerry
?
?
On Mon, Oct 21, 2024 at 02:18 PM, Tony Scaminaci wrote:

I *think* the switcher frequency is 116.7 KHz from what I’ve seen on the terminal screen shots. Maybe I’m wrong on this, if so, what does the 116.7 KHz reading mean?


 

Donald, Looks like a very nice part but Vin range is?4.5 to 18 V. It could work for 5V protection, but not 3.3V.? Looks like TI has other e-fuses with lower minimum voltage that could work for 3.3V but need to find a low cost one that has the required parameters.
-Steve K1RF

------ Original Message ------
From "Donald S Brant Jr" <dsbrantjr@...>
Date 10/21/2024 3:42:33 PM
Subject Re: [QRPLabs] QMX+ V2 - I've killed it

On Mon, Oct 21, 2024 at 12:43 PM, Bruce Akhurst wrote:
There’s definitely a market for a small fast and cheap 3 or 4 terminal protector for the common supply rail voltages
These are $1.56 single quantity, under a dollar at 25 pieces (DigiKey). ?
Overcurrent (2%) , over/undervoltage (3%), thermal protection, Vo dV/dT limiting, etc.? They even have a design calculator tool spreadsheet, just fill in the blanks with your specs. ?
I used them on a MIL SATCOM portable earth terminal power board I designed, among others.? There are many like it, higher voltage, higher current, lower RDSon, etc.
The internal FET makes it a small, bulletproof solution.
73, Don N2VGU


 

Are there cases of damage to the rig involving the SMPS's
that result in anything other than D109 failing as a short?
If not, perhaps all that's needed is to have a few spare zener's on hand.
?
Does the zener on 5v ever get nailed?
?
Of the four short term solutions I suggested, the SCR clamp
might be best because it is the simplest and most foolproof to apply.
Works like a zener by shorting out the supply, but recovers when power is removed.
Can be designed to have a more accurate trigger voltage than a zener,
operates faster, and could handle more current without damage.
?
When the 3.3v rail is shorted to ground by either D109 or this new SCR clamp,
the STM32F drops PWM_3V3 and PWM_VCC and everything shuts down.
When an SCR clamp brings down the 5v rail, the STM32 might still be
running PWM_3V3 and PWM_VCC, burning out Q103, Q105, Q108 and L101.
So perhaps best to build both clamps on one board, a high detected on?
either 3.3v or 5v causes both SCR's to trigger and bring down the rig.
This board requires connections to 3.3v, 5v and ground, could plug
into JP103 or JP105 for those connections so no soldering required.
Note that 3.3v is enough to power an op amp and a precision voltage reference.
?
Jerry, KE7ER
?
?
On Mon, Oct 21, 2024 at 01:42 PM, Jerry Gaffke wrote:

Short term solutions include:


 

Jerry,

Hans increased the power rating of the 5.6V Zener from 1/2W to 5W a while back which solved Zener failures on the 5V rail. Therefore, there’s no need for an SCR on the 5V SMPS. As Hans stated previously, the issue with 3.6V 5W Zeners is they will conduct a bit at 3.3V which degrades the switcher efficiency and causes higher battery drain. IMO, I think a good quality SCR could replace the 3.6V Zener as long as you could maintain tight control of the SCR firing voltage.

Tony

On Mon, Oct 21, 2024 at 8:30?PM Jerry Gaffke via <jgaffke=[email protected]> wrote:
Are there cases of damage to the rig involving the SMPS's
that result in anything other than D109 failing as a short?
If not, perhaps all that's needed is to have a few spare zener's on hand.
?
Does the zener on 5v ever get nailed?
?
Of the four short term solutions I suggested, the SCR clamp
might be best because it is the simplest and most foolproof to apply.
Works like a zener by shorting out the supply, but recovers when power is removed.
Can be designed to have a more accurate trigger voltage than a zener,
operates faster, and could handle more current without damage.
?
When the 3.3v rail is shorted to ground by either D109 or this new SCR clamp,
the STM32F drops PWM_3V3 and PWM_VCC and everything shuts down.
When an SCR clamp brings down the 5v rail, the STM32 might still be
running PWM_3V3 and PWM_VCC, burning out Q103, Q105, Q108 and L101.
So perhaps best to build both clamps on one board, a high detected on?
either 3.3v or 5v causes both SCR's to trigger and bring down the rig.
This board requires connections to 3.3v, 5v and ground, could plug
into JP103 or JP105 for those connections so no soldering required.
Note that 3.3v is enough to power an op amp and a precision voltage reference.
?
Jerry, KE7ER
?
?
On Mon, Oct 21, 2024 at 01:42 PM, Jerry Gaffke wrote:
Short term solutions include:


 

Thanks.
I'm guessing the STM32F sees 5v drop away and shuts everything down.
?
Spent a career in digital design.
Stability of a system with feedback is a thorny issue, something I've
done my best to forget from those EE classes I slept through 50 yrs ago.
Far as I know, Hans is adjusting the PWM at 100 KHz and it's still a bit
unstable when given a step on Vin due to delay through that coil.
Perhaps a bigger cap?
?
Jerry
?
?
On Mon, Oct 21, 2024 at 07:33 PM, Tony Scaminaci wrote:

Jerry,
?
Hans increased the power rating of the 5.6V Zener from 1/2W to 5W a while back which solved Zener failures on the 5V rail. Therefore, there’s no need for an SCR on the 5V SMPS. As Hans stated previously, the issue with 3.6V 5W Zeners is they will conduct a bit at 3.3V which degrades the switcher efficiency and causes higher battery drain. IMO, I think a good quality SCR could replace the 3.6V Zener as long as you could maintain tight control of the SCR firing voltage.
?
Tony


 

On Mon, Oct 21, 2024 at 07:55 PM, Jerry Gaffke wrote:
Perhaps a bigger cap?
Sorry Jerry, just one more disagreement here, then I will back out of this conversation.
?
Why should the design ever have to expect a sudden large step on Vin after the PWM 3.3V is stabilized (~1/4 second or so after power-on)?
It shouldn't.? The input power should be stable by then.? The QMX is spec'd to have a Vin of 7 - 12VDC, not a rapidly changing voltage with very high slew rates.? The input power should not instantaneously increase by a large delta-V from any input power source.? If it does, the problem is in the power source, and should be dealt with there.? As far as I am aware, only one reported failure has happened this way from thousands of units. And if the input voltage ramps up over several msec instead of a sudden step change, all is handled fine.? Or if a voltage change of modest delta-V happens, it is handled fine.? So when this sudden step happens, and fuses the protection diode - that is what that diode is there for, and it did its job.? Just replace it, and fix the power input to avoid step voltages.? If someone's PD supply just does that, choose a different one that does not (mine does not), or put an L-C in the cable to reduce the rise time of the power step.
?
I also spent a 40 yr career in digital electronics and communications system design.? Over-design and solving problems in the wrong place are also big issues to deal with.
?
So, in my opinion (which may have evolved over time, and is obviously different than yours), no design change needs to be made here.? These power supplies are reasonably robust as-is.? The? diode failures due to assembly issues which result in mechanical shorting would be hidden by the suggested fixes, and become more insidious than they already are.? And I'm suspicious that the 'trivial' fix of using an SCR to replace/augment the zener would have similar problems to the high-wattage low-voltage zeners - things are rarely as simple as they seem at first glance.?
?
Design changes that really have an important impact on the vast majority of users are where the focus and energy should be placed (SSB and the other 100 things already on Hans's list).


 

Hello Jerry
?
So why is it that a step from 5v to 12v on Vin can blow D109?

Can it? Have you seen it? Or is this just a rumor hanging over from the old days? Or failures due to some other short or fault somewhere?

This was originally a problem on the first batch of Rev 1 boards, for one user (as far as I know), who executed a step change from 6 to 12V. I documented my investigations and results here:?


Note that stepping from 5V to 12V would not do anything because the QMX wouldn't be working anyway at 5V so it would still be on linear supply, trying its best.?

At the time I implemented various improvements to the control loop. I set up a controlled test jig involving a P-channel MOSFET. The test jig caused a very harsh?switch from 6V to 12V near instantaneously (no capacitors!). Even after the changes, I was able to blow the 5.6V 500mW diode, not every time, but around half the time. In every single experiment, replacing the 5.6V 500mW diode got the QMX back to full operation and nothing else but that diode was damaged, so it did its job. I did it at least 4 times to convince myself. The 3.6V 500mW diode never blew.?

The 5.6V 500mW diode was changed to 5.6V 5W in subsequent batches, and I believe that lets it eat the pulse without damage, under that harsh step input change scenario.?

I was not able to cause any damage by intermittent power connections unless I seriously aggressively jiggled around the power supply lead while simultaneously holding the power button pressed down continuously; a rather unrealistic scenario. Again the 5.6V 500mW diode was the failure point and replacing it restored normal operation.?

Once more: I never saw any 3.6V 500mW D109 failure in all these experiments, nor any other damage to the QMX; the only thing that ever got damaged was the 5.6V 500mW zener diode and all that was necessary was to replace it. But now it is 5W,?even that should not happen.?

Since then the QMX here has gone through plenty of abuse; I mentioned the portable operations on Friday with intermittent power supply, high SWR, open coax cable, tried a PD unit too, and there were no problems with the QMX reliability. The QMX/QMX+ in the lab also go through lots of abuse; frequently I end up during my software development messing up something and the code goes off into its own unresponsive world doing something best known only to itself; I then have to pull the plug from the power supply, and again: still no issues.?

I think someone running an original first batch QMX and an old firmware version before my SMPS control loop improvements could, if they tried hard enough, blow D108 (not D109). Other than that, I don't think there's a serious issue. QMX cannot tolerate absolutely ANYTHING you throw at it. Treat it reasonably, it's reliable. Even make some mistakes, it's still reliable.?

73 Hans G0UPL


 

I don't think this is important enough that Hans should move away from his current firmware efforts.
But I would like to see the switchers improved on future boards.
That should be possible with cheap SMPS IC's that have second sources.
?
There are multiple reports of D109 blowing when the power connector is jiggled.
One of which reported it was when using up to date firmware.
Not a lot of such reports and Hans has not reproduced this?with the updated firmware,
but a very brief interruption in +12v where the caps keep the Vdd rail up
for the STM32F would bring about this failure.?
Many users will be unduly cautious about touching the QMX with power on if this is left as is.
?
Would also be nice to have a definitive solution for users with current rev boards.
I think the SCR clamp would be a nice easy addition for those that are concerned.
?
Jerry, KE7ER
?
?
On Mon, Oct 21, 2024 at 10:33 PM, Stan Dye wrote:

Why should the design ever have to expect a sudden large step on Vin after the PWM 3.3V is stabilized (~1/4 second or so after power-on)?


 

Hans,
?
Here's a case of a QMX+ with current firmware having D109 fail:
?
I doubt it was the speaker and key connector board shorting to the case,
don't see how that would bring down D109.
So probably a matter of him jiggling the power connector.
?
It may be a rare occurrence.
Perhaps most of the other reports of D109 failing were with older firmware.
But many users will hesitate before moving a rig that is powered on.
?
With that I'll give it a rest.
?
Jerry, KE7ER
?


 

Hi Jerry
?
Here's a case of a QMX+ with current firmware having D109 fail:
?
I doubt it was the speaker and key connector board shorting to the case,
don't see how that would bring down D109.
So probably a matter of him jiggling the power connector.
?
It may be a rare occurrence.
Perhaps most of the other reports of D109 failing were with older firmware.
But many users will hesitate before moving a rig that is powered on.

In an attempt to understand any problem quantitatively rather than qualitatively or subjectively... I did a search of the forum posts for all instances of "D109" going back 12 months. There were 51 messages that mention D109, out of a total of approximately 20,000 messages. Which means that 0.25% of messages mention D109 somewhere in their?text.?

In examining?these 51 messages I found only two cases where the D109 failure was thought to have been caused by wiggling a supply connector intermittently. NO cases where D109 was blown by a step voltage from 5V to 12V (or other similar). Even in these two cases, the intermittent supply wasn't definitively the issue, it was postulated as the likely issue. As I mentioned, I have never seen issues with intermittent or sudden drop out of supply but, nevertheless, of course I think it's better to avoid these scenarios if possible.?

Perhaps we should get it in perspective??

I personally have THREE times spilt something into my radio, which is only ME. Including a cup of Turkish coffee which was knocked over during my SMPS investigation? and which the QMX survived. And at the Friedrichshafen hamfest this year, with poor Hannes DL9SCO's QMX+ as my demo QMX+ on the table, I spilled Fanta into it - and it did NOT survive (failure mode is currently still pending investigation).?

Yeah so dumb Hans should be less clumsy. Yet, we are not all talking about how QMX/QMX+ should be made waterproof...

73 Hans G0UPL


 

On Sun, Oct 20, 2024 at 11:45 AM, Hans Summers wrote:
Hi Chris, Stan
?
I'm interested in why Chris objects to the SMPS design so much?
?
?
The thing I'm concerned about is that the microcontroller control of the voltages means that it cannot react rapidly to input voltage or current draw fluctuations.? The microcontroller samples the voltage every millisecond so it can't react more rapidly than that.? A millisecond is a long time in the microcontroller world.
One scenario is a short interruption of the supply, or a short reduction in voltage, followed by a rapid increase to maximum.
?
The right amount of noise on the input could cause the voltage to drop and the controller increases the M/S ratio to compensate.? The the voltage increases - from 6 to 12 maybe, and for a millisecond the drive will remain the same and the voltage will increase.? It's only after a millisecond that any sort of regulation can start.? It's similar on the output, if something increases the load, even for a short time, then to controller drive increases and when the load returns to normal.? It will take a millisecond before it notices and maybe more.? Would giving the microcontroller 5V instead of 3.3V for a few milliseconds be enough to kill it? Or the PCM1804?
?
I don't buy using a Zener as a fuse, especially relying on its failure mode.? I don't have the equipment to do surface mount rework to replace them.
?
There's been plenty of examples of the power controller being problematic, enough that you supply replacements.
So as I said my QMX is using a couple of linear regulators. These can cope with sudden voltage and power changes without dying and without failing to protect the rest of the circuit.? If the QMX+ had continued to use replaceable controllers I would probably have got one.? I'd have bought replacement controllers as well.
?
You have said that this is basically home made - and for you it is.? You can choose how it's designed.
But it isn't for me, I don't have the choice about your design, I have to take what you give us - or not.?? For the QMX+ with irreplaceable power controllers I've chosen not.
?
As for the it only happens to a few argument I tend to go a bit Dirty Harry - it all depends on how lucky you are.? How lucky do I feel?? Not lucky enough.
?
People mention using a higher rated fuse.? I think of the Darwin award for someone who used a .22 cartridge to replace a fuse.? One of the few not awarded posthumously.
?
Hope that helps,
Chris, G5CTH


 

One of the few not awarded posthumously.
Not awarded because it was a urban legend.

Seriously, I think that for average ham, 12V not only means ~13.8V whatever, but it also mean automotive power and device tough enough to survive car supplied power, a really harsh environment for electronic stuff.

I didn't disconnect my FT-857D when I crank the ignition, would QMX+ survive 7 years being in this condition, power cycled like 20 times a week? This one was connected directly to the car battery, with a couple of 6mmq cables (AWG ~9).

I am not saying that QMX/QMX+ will or it should but MY mindset is that if it is ham gear, I expect it and I would like it being able to survive if I trip into the supply cable and the radio goes off while powered on while at home.

Now, the real question,? Is it possible? Maybe adding something external on the power supply.

?I don't care giving up extreme portability due to extreme lower power consumption for added peace of mind.

Giuseppe Marullo
IW2JWW - JN45RQ


 

Hi Chris

Thanks for the interesting explanation.??
I'm interested in why Chris objects to the SMPS design so much??
The thing I'm concerned about is that the microcontroller control of the voltages means that it cannot react rapidly to input voltage or current draw fluctuations.? The microcontroller samples the voltage every millisecond so it can't react more rapidly than that.? A millisecond is a long time in the microcontroller world.
One scenario is a short interruption of the supply, or a short reduction in voltage, followed by a rapid increase to maximum.

Yes indeed, 1ms is a long time. I did consider running the SMPS control loop more often. However it did not appear to be beneficial during testing. At 1ms control loop rate, according to the built-in CPU monitor, the SMPS consumes 2% of the CPU's total cycles. How much one wants to spend on SMPS regulation, compared to other things, is also a consideration - particularly when no benefit is apparent from running it any faster.?

Although 1ms seems like a long time, bear in mind that the relatively large 330uH inductor combined with relatively significant 470uF capacitor means that the output voltage of the buck converter modules is inherently slow to react to sudden large input changes; in this context the output variation is relatively large compared to an integrated solution but, not damaging to the circuits; and the control loop has plenty of time to respond, even at 1ms rate. Despite the slow reaction time the control loop is demonstrably highly stable.?

I will eventually complete a thorough technical description of the way the SMPS control loop works.?

There are numerous failsafe mechanisms, it is not just a simple unconstrained control loop. It also measures the supply voltage directly and that allows it to get an advance warning of what is coming through the 330uH inductor and act accordingly to reduce the PWM duty cycle.?
?
The right amount of noise on the input could cause the voltage to drop and the controller increases the M/S ratio to compensate.? The the voltage increases - from 6 to 12 maybe, and for a millisecond the drive will remain the same and the voltage will increase.? It's only after a millisecond that any sort of regulation can start.? It's similar on the output, if something increases the load, even for a short time, then to controller drive increases and when the load returns to normal.? It will take a millisecond before it notices and maybe more.? Would giving the microcontroller 5V instead of 3.3V for a few milliseconds be enough to kill it? Or the PCM1804?

What you described doesn't happen. Any glitches on the supply rails are much smaller than that and are non-damaging.?

The output voltage of the buck converters can't increase that fast; the 330uH and 470uF are enough to slow it down. In an extreme event where the 1ms control loop isn't fast enough, the zeners save the day. Still the excursions are relatively small and are non-damaging.?

Note that one of the failsafe mechanisms in the system is a model of the expected duty cycle vs supply voltage (since the load on these buck converters is relatively known and constant). The output of this model is a maximum % duty cycle value which does not allow the voltage to vary more than 10% above the expected value in the model.?

Since nothing external is connected to the buck converters, only the internal circuits of the QMX/QMX+ (including small variations such as the QLG3 GPS module), this means that the load current is approximately known and constant. If for some (failure) reason it suddenly increased, the control loop would try to increase the duty cycle to compensate, but only to an extent, because it would hit the maximum of the model. The Vdd rail would then drop and the processor would reboot. In doing so the hardware automatically switched off the SMPS and returns to the 78M33 linear regulator.?

The inclusion of several failsafe mechanisms both in the firmware and the hardware give these SMPS a good reliability. When I get to documenting you'll probably see more of what I mean.?
?
?I don't buy using a Zener as a fuse, especially relying on its failure mode.? I don't have the equipment to do surface mount rework to replace them.

Calling it a fuse is a little loose terminology really. A fuse is a slow acting device that usually doesn't do anything to protect your electronics. It slowly gets hot and melts, in so doing it hopefully stops very large current flow before your device catches fire and burns your house down. By the time the fuse blows any sensitive semiconductors are long since dead and gone.?

What the zener does is cope with any short lived uncompensated glitches. As others have noted, in normal operation the zeners are not part of the circuit which works fine without it. But in the event of any abnormal condition the zener can help save the sensitive semiconductors from damage. Not quite the same as a fuse. It's only in extreme conditions, which I believe would need to be caused by some other failure elsewhere in the circuits, that the zener itself fails. They do fail short, not by chance: it's what they do.?

Replacing SMD parts doesn't require special SMD equipment, just more care than through hole as the parts are typically smaller. SMD parts are a fact of life these days. I do keep the QCX+ in the product line for people who prefer an almost all through-hole construction experience. But SMD, there is; and if any other component fails for any reason and needs replacement, this is the way it is. The world moved that way, and many devices are now only available in SMD format. Progress....

There's been plenty of examples of the power controller being problematic, enough that you supply replacements.

I supply replacements because yes, sometimes people break them due to some mishap. Or sometimes they get damaged due to incorrect installation such as soldering faults, solder whiskers or dry soldering or misalignment of the pin header connectors, etc.?

They are fiddly to install. It was a necessity in QMX due to the very small space availability. Cramming so much into such a small space was tough. In QMX+ there isn't a space problem. I'm confident of the SMPS reliability. Enough that I integrare them in the main board. Which makes the assembly easier, removing one of the trickiest steps. It also means we can carry out a complete rest on the boards which helps ensure a good success probability for builders.?

So as I said my QMX is using a couple of linear regulators. These can cope with sudden voltage and power changes without dying and without failing to protect the rest of the circuit.? If the QMX+ had continued to use replaceable controllers I would probably have got one.? I'd have bought replacement controllers as well.

It's up to you. You could still use linear regulators on a QMX+ too. If you were prepared to substitute linear regulators on the QMX then I'd say you're clearly a competent constructor and experimenter, I'm sure doing linear regulators on a QMX+ would be no problem for you. It's not difficult to remove the SMD components of the inbuilt SMPS and substitute connections to your own linear regulators. All the board trace diagrams are in the manual.?
?

You have said that this is basically home made - and for you it is.? You can choose how it's designed.
But it isn't for me, I don't have the choice about your design, I have to take what you give us - or not.?? For the QMX+ with irreplaceable power controllers I've chosen not.

OK

?As for the it only happens to a few argument I tend to go a bit Dirty Harry - it all depends on how lucky you are.? How lucky do I feel?? Not lucky enough.

Not only on luck. It's designed with a lot of fail-safes in firmware and hardware.?

People mention using a higher rated fuse.? I think of the Darwin award for someone who used a .22 cartridge to replace a fuse.? One of the few not awarded posthumously.

QMX transceivers don't have a fuse. Fuses could belong in your power supply perhaps. Debatable. For the SMPS zeners the 3.6V zener needs to remain 500mW. The 5.6V zener was long ago upgraded to 5W to make it survive glitches; it was found to be the only one of the two zeners which blew on glitches anyway.?

Hope that helps,

Yes thank you, good clear feedback.?

73 Hans G0UPL


 

Hello Giuseppe

Seriously, I think that for average ham, 12V not only means ~13.8V
whatever, but it also mean automotive power and device tough enough to
survive car supplied power, a really harsh environment for electronic stuff.

I didn't specify the QMX for direct connection to 13.8 or car supplies, that's very clear in the documentation. A lot of other equipment has a voltage rating.?

For running directly from a car, if nervous, why not build a QMX for 9V operation and install a 9V converter inline? Or build it for 12V and put some series diodes in to drop the voltage from the car.?

I am not saying that QMX/QMX+ will or it should but MY mindset is that
if it is ham gear, I expect it and I would like it being able to survive
if I trip into the supply cable and the radio goes off while powered on while at home.

It already does survive that. Anyone who has visited my lab knows that it's a terrible mess. Wires everywhere. Things frequently get accidentally disconnected. Anyone who has visited this area of Turkey will also know that unfortunately power outages are very frequent and worse still, glitchy unreliable supply or brownouts. So there are plenty of torturous things to trouble a QMX. But it isn't troubled.

73 Hans G0UPL


 

Hans,
?
One failure mode that I have not seen discussed is if the MPU freezes.? How do you ensure the loop is executed every 1 ms, and can you detect if it does not?? This is a tradeoff in using only one MPU for the radio—cost savings with a tradeoff of possible failure modes.? Maybe a failsafe heartbeat can shut down the input.? You can still have the controller stuck in a state where the interrupt will not trigger the failsafe.
?
I suspect that the technical description you are writing will cover this.? I look forward to that document.
?
Even with the possible failures, the price-to-performance ratio is still WAY better than any other radio available.? Overall, it's a good design!!!
?
The above are my opinions.? I am always open to feedback to learn and better understand the technology.
?
73
Evan
AC9TU


 

Hi Evan

One failure mode that I have not seen discussed is if the MPU freezes.? How do you ensure the loop is executed every 1 ms, and can you detect if it does not?? This is a tradeoff in using only one MPU for the radio—cost savings with a tradeoff of possible failure modes.? Maybe a failsafe heartbeat can shut down the input.? You can still have the controller stuck in a state where the interrupt will not trigger the failsafe.

Practically speaking the MPU doesn't normally "freeze". If the programmer made some mistake and didn't cover some unforeseen situation, the code goes off into its own infinite loop someplace waiting for something to happen which never does, for example. The thing *looks* like it froze because it's unresponsive to controls etc. and looks frozen. But really it's still doing it's interrupts and related stuff.?

It happens to me all the time because when I'm programming I make a lot of mistakes and "freeze" the MPU. But it doesn't kill the SMPS because the interrupts are still running fine. Or, sometimes the "freeze" causes the MPU to do some illegal activity and reboot. Which then starts off the SMPS from scratch anyway.?

I've never encountered a situation where a MPU really freezes: neither reboots nor continues with it's interrupt operations. It's a matter of firmware design to make sure that the SMPS loop runs in a high priority interrupt and no other interrupts at that or higher priority do anything significant that could get stuck waiting for anything or suffering memory overruns etc.?

Which reminds me of another point: I intentionally don't use C malloc/free in any QRP Labs projects. I have (so far) always found ways to avoid it. This removes a major unpredictability of the firmware system. Apparently unlike for example my ISP's internet modem which I have to reboot every couple of days otherwise it gets painfully slow. One of few benefits of frequent power outages: takes care of slow internet modems by rebooting them!

73 Hans G0UPL



 

Hi Hans,

Please don’t assume that Zener diodes *always* fail short. They may tend to fail short due to the silicon melting under high heat but they can also fail open if a wire bond fuses before the silicon melts. I have seen open failures over the course of my career. Also, see below…

“With Zener diodes, will failures due to exceeding the permissible loss result in an open or short failure mode? Exceeding the permissible loss normally results in a short-circuit. However,?an open mode may occur, depending on failure conditions.”

Regards,

Tony

On Tue, Oct 22, 2024 at 10:45?AM Hans Summers via <hans.summers=[email protected]> wrote:
Hi Evan

One failure mode that I have not seen discussed is if the MPU freezes.? How do you ensure the loop is executed every 1 ms, and can you detect if it does not?? This is a tradeoff in using only one MPU for the radio—cost savings with a tradeoff of possible failure modes.? Maybe a failsafe heartbeat can shut down the input.? You can still have the controller stuck in a state where the interrupt will not trigger the failsafe.

Practically speaking the MPU doesn't normally "freeze". If the programmer made some mistake and didn't cover some unforeseen situation, the code goes off into its own infinite loop someplace waiting for something to happen which never does, for example. The thing *looks* like it froze because it's unresponsive to controls etc. and looks frozen. But really it's still doing it's interrupts and related stuff.?

It happens to me all the time because when I'm programming I make a lot of mistakes and "freeze" the MPU. But it doesn't kill the SMPS because the interrupts are still running fine. Or, sometimes the "freeze" causes the MPU to do some illegal activity and reboot. Which then starts off the SMPS from scratch anyway.?

I've never encountered a situation where a MPU really freezes: neither reboots nor continues with it's interrupt operations. It's a matter of firmware design to make sure that the SMPS loop runs in a high priority interrupt and no other interrupts at that or higher priority do anything significant that could get stuck waiting for anything or suffering memory overruns etc.?

Which reminds me of another point: I intentionally don't use C malloc/free in any QRP Labs projects. I have (so far) always found ways to avoid it. This removes a major unpredictability of the firmware system. Apparently unlike for example my ISP's internet modem which I have to reboot every couple of days otherwise it gets painfully slow. One of few benefits of frequent power outages: takes care of slow internet modems by rebooting them!

73 Hans G0UPL



 

Hi Tony

Please don’t assume that Zener diodes *always* fail short. They may tend to fail short due to the silicon melting under high heat but they can also fail open if a wire bond fuses before the silicon melts. I have seen open failures over the course of my career. Also, see below…

“With Zener diodes, will failures due to exceeding the permissible loss result in an open or short failure mode? Exceeding the permissible loss normally results in a short-circuit. However,?an open mode may occur, depending on failure conditions.”

Thanks, yes you're correct. My comment was sloppy.? I should have stated that in the QMX context I've only ever seen failure as a short. (So far, anyway).?

73 Hans G0UPL


 

Hans,
?
By a "freeze," I do mean where the control loop is not executing for multiple reasons.? This can be a situation where the MPU is waiting for an interrupt that does not occur.? ?In my control experience (PLC, NOT MPU), The way to address this was to make the critical interrupt routine as simple as possible to reduce this type of failure.? ?Most PLCs implement a program check routine that is the highest priority interrupt.? It takes much of the processor to check, and I believe it can be as high as 20%.? This is to verify that no code changes have occurred and that the time between heartbeats is not exceeded.? Maybe it's overkill for this situation.
?
73
Evan
AC9TU


 

Hi Evan

Interrupts are one of the most challenging aspects of embedded programming. I've often said there are three levels of embedded firmware developer. The beginner heard about interrupts but they sound scary, hard to understand, and he'll manage without. The intermediate programmer understood basic use of interrupts, thinks he understood them completely, and now he uses then for everything that ever happens in his systems. The experienced embedded programmer knows how dangerous interrupts can be and how hard it can be to get them working properly and reliably! So you go from scared, to over-confident, to scared again ;-)

There are a lot of good practice rules of thumb, like using interrupts sparingly, and making sure that they do a minimum of stuff, and oniy when time-critical. I often have interrupts set a flag that something needs to be done, then get it done in a main program loop where everything is less urgent (and indeed can be interrupted by more urgent things).?

In my code the SMPS control loop runs in nearly the highest interrupt priority. STM32 MCUs implement a very nice multiple nested priority interruot system. I've never experienced a case, in all my half baked developments, where the SMPS interrupt processing control loop was stopped (other than what caused a complete processor restart, which is perfectly fine). Of course what reaches production code is a much more well baked version.?

So we're ok! Really!

73 Hans G0UPL


On Tue, Oct 22, 2024, 22:00 Evan Hand via <elhandjr=[email protected]> wrote:
Hans,
?
By a "freeze," I do mean where the control loop is not executing for multiple reasons.? This can be a situation where the MPU is waiting for an interrupt that does not occur.? ?In my control experience (PLC, NOT MPU), The way to address this was to make the critical interrupt routine as simple as possible to reduce this type of failure.? ?Most PLCs implement a program check routine that is the highest priority interrupt.? It takes much of the processor to check, and I believe it can be as high as 20%.? This is to verify that no code changes have occurred and that the time between heartbeats is not exceeded.? Maybe it's overkill for this situation.
?
73
Evan
AC9TU