Author Topic: How to make MCU-controlled power supply handle shorted rails gracefully?  (Read 290 times)

0 Members and 1 Guest are viewing this topic.

Offline dusanTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: sk
I need several biasing voltages in my project (measuring jig), basically a MCU controlled power supply. DAC goes from 0 to 2.5V which controls voltage from +12V to -12V. I use this schematic:



It works fine. 0V on DAC correspond to +10.3V on input and 2.5V on DAC corresponds to -11.5V. The supply is 12V/150mA (internal resistance around 15ohm), I typically only really need maybe 30mA so it's not an issue. The TL431 creates 1.13V which is somewhere near the middle to make it symmetrical.

Here is the chart: (red=+12V, green=-12V, blue=1.13V ref, yellow is DAC changing in time from 0 to 2.5V, purple is corresponding output from +10V to -10V).



Let's say I want to create -3V. In the chart above if I set DAC to 1.5V, the output will be -3V, here it is, I replaced DAC with fixed voltage U3=1.55V, which causes exactly -3.0V on the output:



So far this works as expected. But the problem is when I accidentally short the positive rail. Let's add 3ohm short R5 in top right corner. The 1.13v drops to 1.08v and the output shoots to -6V:



And that's a problem. I don't mind output droping when I short the rail, but the output shooting up to -6V when I short (or load heavily) positive rail is problem. How to solve this? I'm open to completely different solutions (but something simple), my goal is not making power supplies but to have DAC goes from 0 to 2.5V make output goes from +12 to -12V.
« Last Edit: December 08, 2024, 03:58:33 pm by dusan »
 

Offline jwet

  • Frequent Contributor
  • **
  • Posts: 620
  • Country: us
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #1 on: December 08, 2024, 04:58:37 pm »
I'm not sure why this rail is getting shorted and don't see the purpose of R5 but will just try to answer from where you are.

The very simplest thing to do from where you are would be take the supply for the TL431 before R3.  You could also make a semi isolated supply for the TL431 with a little more work.

A better way may be to use a non inverting topology.  This could make the output go to zero if the high rail and ref went away for a  rail shorted.

The LM258 amp is not a short circuit protected device and has no overtemp shutdown- look at abs max- though it lists big currents, they will destroy it.  It also has a kind of crummy output stage especially near the lower rail.  Do some op amp shopping.

Have Fun.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6332
  • Country: es
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #2 on: December 08, 2024, 05:10:45 pm »
Of course, the positive vdd of the op-amp goes down, what do you expect?
You should design the circuit to prevent this, adding current limit and/or independent supply for the control circuitry.

Also, the design is very sensitive, might not be the best approach.
« Last Edit: December 08, 2024, 05:12:42 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline dusanTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: sk
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #3 on: December 08, 2024, 05:39:53 pm »
I'm not sure why this rail is getting shorted

It's not intentional, I connect accidentally wrong sample. (the R5 represents other loads shorting the rail). It simply happens from time to time.

The very simplest thing to do from where you are would be take the supply for the TL431 before R3.

15ohm resistors are part of the transformer winding, it cannot be moved there.

A better way may be to use a non inverting topology.

I think that would just change the scenario in which it fails, no?

The LM258 amp is not a short circuit protected device and has no overtemp shutdown- look at abs max- though it lists big currents, they will destroy it.

I'm using L272M, the simulator didn't have it so I used LM258 which shows the behavior as well, shorting output of opamp is not issue here.

It also has a kind of crummy output stage especially near the lower rail.  Do some op amp shopping.

I only need +-9V so it's not issue, there's enough headroom.
 

Offline dusanTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: sk
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #4 on: December 08, 2024, 05:44:11 pm »
Of course, the positive vdd of the op-amp goes down, what do you expect?

I'm stating it as a fact and that I don't know how to solve it.

You should design the circuit to prevent this, adding current limit and/or independent supply for the control circuitry.
Also, the design is very sensitive, might not be the best approach.

Can you please show me a better design, I need to make +-10V using 0-2.5V dac.

Of course, the positive vdd of the op-amp goes down, what do you expect?
You should design the circuit to prevent this, adding current limit and/or independent supply for the control circuitry.

Also, the design is very sensitive, might not be the best approach.
 

Offline jwet

  • Frequent Contributor
  • **
  • Posts: 620
  • Country: us
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #5 on: December 08, 2024, 07:23:34 pm »
I can sense your frustration.  I'm not going to design you a circuit with some hidden requirements- that sounds a lot like my job.

Here is perhaps some helpful tips.
The basic circuit you're looking for is a circuit with a scaled gain of 8 and and an scaled offset of -10v.  You could also do it with a scaled gain of -8 and a scaled offset of +10- this where you are.  If you take away the high rail, you lose the offset and the output goes low.  You could derive this ref from the negative supply, you don't state whether that supply is subject to shorts.

If you want to make a variable supply that can put out something like 30 mA, you have to look at power and heating.  If you you dial in 1 volt, you will have a drop of 11v across the op amp with an output of 30 ma, this is 1/3 watt!  Even at these low currents, you probably need to make a composite amp with external transistors that are heat sunk to take this power.

A standard short circuit current limiter can be made using a transistor say 10 ohms from base to emitter in such away as to turn on the transistor when IR = .6v, this would be about 60 mA for the 10 ohm case.  This transistor is used to disable the rail, when the short goes away, it will return.  You could do this for both rails by adjusting polarities of devices.  Here is a random google search that shows the idea.

https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.daycounter.com%2FCircuits%2FShort-Circuit-Protection%2FShort-Circuit-Protection.phtml&psig=AOvVaw3Bn--n6yzHPkCqA9QuV1-o&ust=1733772080631000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCICLjr7ymIoDFQAAAAAdAAAAABAE

What you're really making is a power supply- this is fairly involved.  Forget about the DAC input for a bit- that's just decoration.  Design an "amplifier" that meets your needs with a 0-2.5 input from a POT.

This is probably the most guidance that I can give you.
« Last Edit: December 08, 2024, 07:27:52 pm by jwet »
 

Offline dusanTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: sk
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #6 on: December 08, 2024, 07:35:47 pm »
you don't state whether that supply is subject to shorts.

Both rails are subject to shorts, I'm using it and I make mistakes. Wrong connector, wrong sample, wrong wire, ammeter instead of voltmeter, etc...

this is 1/3 watt!

I've been using it for year with L272M and it's ok but I want to fix that issue where shorting one rail increases second rail.

I'll look into that short protection example, end if it's too difficult I may add independent symmetrical supply just for the control part and power part will only have L272M buffer.
 

Offline jwet

  • Frequent Contributor
  • **
  • Posts: 620
  • Country: us
Re: How to make MCU-controlled power supply handle shorted rails gracefully?
« Reply #7 on: December 08, 2024, 07:40:07 pm »
If you try to drive 30 mA which is what you say you want at anything less than 7 volts, the op-amp overheat and will shut down.  Your requirements are a bit elusive.
« Last Edit: December 08, 2024, 07:50:53 pm by jwet »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf