Overload at Vout without reaction of eFuse

I found strange behavior for overloaded Vout.

If voltage output is overloaded during Vout is switched on, usually it will shut off with good error message. But if it is overloaded after Vout was already on, then there is a not expected reaction.

For hard short circuit voltage immediate drops to 0V and current limits to ~300mA. After some seconds the currents starts to toggle between 0 and 300mA. Easy to reproduce with just a single wire from Vout to GND.

I have also tried with ca. 5 Ohm at output instead of hard short circuit. Current is ~400mA. The output voltage dropps first to 2V before it also starts to toggle. Voltage and current then periodically toggles between 0V/0mA and previous value.

But-Pirate meanwhile shows active output, while the measured voltage is 0/2V. It seems that overloaded voltage regulator is not detected by software. eFuse cannot detect that, as the current was never high enough. It was limited by regulator before. Also the toggling values seems to come from voltage regulator.

I have measured output current and voltage with oscilloscope. As a “new user” I can’t upload the picoscope measurement files.

1 Like

for context: that user is the one guy that sat next to me on 39C3. Vouching for him

1 Like

Missed one information. Vout was enabled with 5V and 500mA. Also reproducable with lower currents, but there the likelihood increases that eFuse will detect the short circuit.

1 Like

I’m not 100% certain, but I think the confusion might stem from the limits of the LDO vs the current sense.

The AP2127K regulator has a maximum output of 300mA. The current sense allows maximum 500mA limit, which is more than the regulator can output. Anything above ~300mA limit (not exact, lots of offsets here and there) will be handled by the LDO instead of the efuse.

There are a few reasons I chose 500mA fuse max instead of 300mA.

  1. Inrush current when the supply is enabled/new loads attach can exceed 300mA while not being particularly dangerous. In this case we might want a higher limit to accommodate an acceptable level of inrush.
  2. The op-amp offsets/component tolerances result in 10-20mA difference between devices. If we used a firm 300mA efuse then some devices could really only deliver 280mA or so.
  3. As I recall the math/component selection was a bit cleaner with 0.5A, but I did all of that years ago and would need to review the design to tell you precisely which components were the limiting factors.

Is this the type of behavior you’re seeing?

Thank you for the explanation. The mentioned behavior is caused by the lower limit of the regulator compared to efuse. But I would expect any reaction of buspirate firmware if the regulator cannot held the expected voltage on the output. At the moment it is possible to have enabled output, but with lower or toggling voltage on output.

@masterX244 had such an issue on 39C3 where he connected a broken multimeter to replace its battery supply by buspirate. It showed 412mA, but also 0,7V instead of 2,8V. It is also relevant if the load is connected before or while Vout is enable.

1 Like

Excellent point. I will add (optional) voltage monitoring to the W command.

btw: that multimeter wasted me a good bunch of time at 39C3…. sidequest at evening of day 0 whne i wanted to do other debugging/reverse-engineering

1 Like

Looking at this now.

Considering adding a -u flag for undervoltage limit, with the percent of allowed under voltage to be a user configuration. The default would be 10%.

Does that sound reasonable?

Adding the scaffolding and updating the code base to account for the voltage lag allowance.

Just need to tweak it a bit and update the docs.

I forgot to keep my units straight :slight_smile: Need to compare ADC to ADC counts and volts to volts :slight_smile:

Code is implemented, but the power supply comes up slowly. We could introduce a longer delay during startup, but that seems annoying.

Instead I’ll add a new function for polling the voltage after startup, which will need a cycle counter so it doesn’t hit on core 2 until the voltage has stabilized somewhat.

Sounds good. 10% as default value should also be good.

As an alternative to the delay after enabling the output, you can maybe debounce the measurement. So an alarm would only be triggered after some number of measurements or after some time if the voltage is not expected.

1 Like

Fixed the units issue and it’s now comparing the proper voltages.

Ran into a few issues with the arguments parser that took some rework.


        if ((system_config.psu == 1 && system_config.psu_irq_en == true)
            (!psu_fuse_ok() || !psu_vout_ok())
            ) {
            system_config.psu_irq_en = false;
            psucmd_irq_callback();
        }

The final major issue is to completely rework the PSU monitor system. It’s really only designed for a single error source, so I need to think through how do add the new under voltage alarm in a less hack-y way.

Woot!

1WIRE> W 3.3
3.30V requested, closest value: 3.30V
300.0mA requested, closest value: 300.0mA

Power supply:  Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 2.9mA

Voltage only.

1WIRE> W 3.3 50
3.30V requested, closest value: 3.30V
50.0mA requested, closest value: 50.0mA

Power supply:  Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 3.0mA

Voltage and current.

1WIRE> W 3.3 50 -u 10
3.30V requested, closest value: 3.30V
50.0mA requested, closest value: 50.0mA
Undervoltage alarm: 2.0V (10%)

Power supply:  Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 3.0mA

Voltage, current, undervoltage.

1WIRE> W 3.3 -u 10
3.30V requested, closest value: 3.30V
300.0mA requested, closest value: 300.0mA
Undervoltage alarm: 2.0V (10%)

Power supply:  Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 3.0mA

Voltage and undervoltage.

Question now: should under voltage protect be enabled by default? @ArnF mentions 10% as the default value. Any considerations?

1 Like

Cleaned this up and pushed it. An autobuild should show up shortly. In terminal help is updated, but I need to update the docs.

I’m updating the docs, but I’d really love some feedback on the command usage.

Specifically:

  • For unlimited current (disable efuse) we request 0 mA.
  • For unlimited undervoltage (disabled voltage monitoring) we request -u 100

That feels inconsistent to me.

1 Like

I see what you mean. My first thought was -1 for ‘unlimited’, but that’s not very intuitive.

Maybe there needs to be a flag for current limit instead of it being a positional argument?

1 Like

You’re right, and everything should be a flag honestly. Maybe we can support both.

The new user experience of W 3.3 50 to setup a supply with current limit is pretty slick, no need to remember flags for the most common operation. Mixing positional and flags is ugly though, and a third positional seems excessive. Supporting both methods might be a good compromise.

1 Like

If I understand it correctly you want to disable voltage monitoring for commands like W 3.3 or W 3.3 50? At least I don’t see a monitoring setting in above pictures for these commands. Usually there is no reason to disable voltage monitoring as a wrong voltage on output is a faulty condition. So therefore I request to have it always enabled with e.g. 10% if nothing else is specified with -u.

To request disabled voltage monitoring I think it is good to support both -1 and 100.

2 Likes

They way it is setup now is that 10% under voltage limit is the default on all quick positional commands and also when using the prompts. You need to specify a -u to change it from 10%.

2 Likes