Author Topic: Shunt resistor 0.8 Ohm 1W needed  (Read 5163 times)

0 Members and 1 Guest are viewing this topic.

Offline nemail2Topic starter

  • Regular Contributor
  • *
  • Posts: 206
  • Country: at
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #25 on: March 26, 2021, 11:49:32 pm »
Hi all,

wow I completely lost track on this topic, sorry for not answering earlier and thanks for all your replies, answers and suggestions, really appreciated.
The issue why I even went with something like 0.8 Ohms was because using 0.1 Ohm and the MAX4080T (20x Amplification) instead of the MAX4080F (5x Amplification) which I'm using with the 0.8 Ohm Shunt was because weird stuff happens with the control loop/the output voltage when using the 20x Amplification and the 0.1 Ohm Shunt (shown later in this post).

I have attached the schematic of the analog part/control loop. VREF is a MCP1541 and as you may already have noticed, this design is derived from Daves µSupply publications from years ago. Almost forgot: D2 and R4 are not populated and R5 is 20k.

This design/my implementation is not particularly fast in terms of constant current mode but I'm ok with the performance and I wouldn't want to completely change the control loop and start from scratch, if possible.

So, like I said, when using the MAX4080F (5x Amp), no matter what current shunt I use (0.1R or 0.8R), all works fine in CC and CV mode. But when I put in a MAX4080T (20x Amp) + a 0.1R Shunt, as soon as the PSU switches to CC mode, I seems to have some kind of weird 50 Hz oscillation/noise which isn't there when using the MAX4080F.
My guess was, that maybe because of the higher amplification, the slopes of the MAX4080T output voltage are some kind of steeper, which then in turn somehow causes this issue.

Unfortunately control loop compensation and such is complete black magic for me, I wouldn't even know where to start. All control loop compensation in this circuit has been done by very smart people from this forum or from mikrocontroller.net (german forum).

I have attached some scope shots, this is how the output voltage looks like in CC and as well in CV mode (completely identical) when using the MAX4080F + 0.8R shunt:
1203198-0

This is how CV mode looks when using the MAX4080T + 0.1R shunt (obviously nothing special to see here, as we are in CV mode):
1203202-1

Well, and this is how CC mode looks when using the MAX4080T + 0.1R shunt:
1203206-2

This happens when I for example connect a 12R power resistor to the output, set the output voltage to 6V and the current to 1A and THEN lower the current limit to 400mA. As soon as CC mode kicks in, the output voltage looks like in the last scope shot.

Other than that, I'm really happy with the design and everything and if I can't get this to work with 0.1R and MAX4080T i will just stick with 5.6R + MAX4080F and maybe either put higher rated power restors in it or just lower the max output current spec a bit and everything will be fine.
However, it would be cool to get this working with 0.1R + MAX4080T, so any suggestions or hints where this weird crap on the output could be coming from would be very appreciated.

If you want to see the rest of the schematics, just let me know. Basically it is just an Atmega1284p, a 2004 LCD, some buttons, two mains transformers for 8VAC and 24VAC, a 7805 and a LM317T which makes fixed 27V. Oh and the MCP1541, of course.

If anyone wonders, this is how it looks like:
1203210-3

Thanks!

another edit: LOL i just realized that the commercial product DP832 has 1000µF of capacitance right at the output so in terms of that, my PSU should be an order of magnitude better  :-DD |O
« Last Edit: March 27, 2021, 12:19:56 am by nemail2 »
Boron rhymes with moron
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 16187
  • Country: de
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #26 on: March 27, 2021, 02:21:10 pm »
The AC signal seen with the 0.1 ohms shunt looks like mains hum. With a smaller shunt wiring gets more critical and the wiring may be just a bit different from the case with the 0.8 Ohms shung.

The relatively large capacitor at the output of the supply is often there to limit the over-shoot for the transition from CC to CV mode. You know how much capacitance is needed after testing the CC to CV mode cross over. The way the compensation for the voltage mode is done, this part may be relatively good, especially as the current mode regulation is slow.

The relatively slow regulation for the current mode could be a weak point however. This kind of acts a littel like a simulated capacitance, though worse at low voltage, while the real capacitance is more a problem starting at high voltage. The critical test would be something like looking at the current when apllying a near short (just a small resistor to measrure the current) from a high or low set voltage. For the start maybe add some extra resistance to prevent the current from reaching damaging levels.
Ideally R26 should be used to add an additional fast current limit (a simple transistror to give a fixed  limit of some 5-7 A).
 
The following users thanked this post: nemail2

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 914
  • Country: fr
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #27 on: March 27, 2021, 04:33:47 pm »
anyway your shunt is tooo big, redesing for lower value like 0r1
and if you stick to your 0.8, just put whatever you want, parallel or whatever, you will need to calibrate at some moment the crt measurement, if you obtain more than 1 A max scale it won't hurt, cut it in sw/hw
 
The following users thanked this post: nemail2

Offline nemail2Topic starter

  • Regular Contributor
  • *
  • Posts: 206
  • Country: at
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #28 on: March 27, 2021, 09:31:55 pm »
The AC signal seen with the 0.1 ohms shunt looks like mains hum. With a smaller shunt wiring gets more critical and the wiring may be just a bit different from the case with the 0.8 Ohms shung.
OK that doesn't sound too bad, thanks. The wiring should be 100% identical as I have just made two PCBs (completely identical), only the shunt and the MAX4080F/T was different and I had both PCBs in the very same case with same cabling and everything (just swapped them back and forth few times).
So can this hum be of any harm or can it be accepted and just leave it be? I mean it is not even 20mV peak to peak and that is under load, including potential ripple...

The relatively large capacitor at the output of the supply is often there to limit the over-shoot for the transition from CC to CV mode. You know how much capacitance is needed after testing the CC to CV mode cross over. The way the compensation for the voltage mode is done, this part may be relatively good, especially as the current mode regulation is slow.

The relatively slow regulation for the current mode could be a weak point however. This kind of acts a littel like a simulated capacitance, though worse at low voltage, while the real capacitance is more a problem starting at high voltage. The critical test would be something like looking at the current when apllying a near short (just a small resistor to measrure the current) from a high or low set voltage. For the start maybe add some extra resistance to prevent the current from reaching damaging levels.
Ideally R26 should be used to add an additional fast current limit (a simple transistror to give a fixed  limit of some 5-7 A).

I did try smaller capacitances at the output but below a significant amount under 100µF, the thing started to oscillate like crazy when transitioning from CV to CC mode, if I recall correctly.
Shorting the output doesn't really seem to hurt anything in the PSU, maybe because of the ESR of the capacitors and because the current spike is relatively short until the slow CC kicks in? I don't know...

I should be able to measure the current spike using a low side shunt at the output + a scope across the shunt, right?

Nonetheless, core question for me: is there anything obvious I should or could do about that (suspected) mains hum in CC mode when using a .1R shunt + MAX4080T or should I just leave it be?

anyway your shunt is tooo big, redesing for lower value like 0r1
and if you stick to your 0.8, just put whatever you want, parallel or whatever, you will need to calibrate at some moment the crt measurement, if you obtain more than 1 A max scale it won't hurt, cut it in sw/hw

Thanks, playing around with 0.1R again, having that mentioned 50Hz noise issue...
Boron rhymes with moron
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 16187
  • Country: de
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #29 on: March 27, 2021, 09:52:35 pm »
As far as one can see from the pictuture the layout around the shunt and flarge fitler cap looks Ok.
The extra wire links for the supply (linkely lower voltage) are a bit unusual, so may something wrong with the ground link between the 2 transformer parts.

One could see if the supply to the LM324 is clean or has similar looking ripple.

There may be shunt resistors in between some 0,8 Ohms and 0.1 Ohms.  The 0.1 Ohms are a bit on the low side for a 1 A power supply and would compromise on fine regulation.
 
The following users thanked this post: nemail2

Offline nemail2Topic starter

  • Regular Contributor
  • *
  • Posts: 206
  • Country: at
Re: Shunt resistor 0.8 Ohm 1W needed
« Reply #30 on: March 27, 2021, 11:57:59 pm »
The extra wire links for the supply (linkely lower voltage) are a bit unusual, so may something wrong with the ground link between the 2 transformer parts.
the connection should be good, the PCB which has the 50Hz hum doesn't have JST connectors but soldered wires, so there shouldn't be any contact issues (I was too lazy to crimp the JSTs on that one).

One could see if the supply to the LM324 is clean or has similar looking ripple.

SDS00006.png shows the LM324 supply voltage during CC mode, you can see a little bit of hum there, I guess. SDS00007.png shows the LM324 supply when the PSU output is turned off, so no load.

There may be shunt resistors in between some 0,8 Ohms and 0.1 Ohms.  The 0.1 Ohms are a bit on the low side for a 1 A power supply and would compromise on fine regulation.

I wouldn't want to replace the MAX4080 with some other current sense amplifier because I'm afraid that I may have to redo (or let someone redo) the compensation of the control loop opamps. So I'm stuck with 5x Gain (MAX4080F), 20x Gain (MAX4080T or 60x Gain (MAX4080S). Because I have 4mV resolution on the ADC (VREF = 4.096V, 10 Bit ADC, 1 Bit = 4mV), I'm left with 0.8R @ 5x Gain or 0.2R @ 20x Gain. I actually just realized that using 0.1R @ 20x Gain I can't even measure 1mA (not taking into account noise, inaccuracies and stuff like that which adds error).

So without having to change a whole lot of stuff, I could (and will) try 0.2R by just connecting two 0.1R shunts in series.
Higher values would require some additional gain stage at the DAC output which controls the CC max current (IC3B, Pin 5) because I can only output 5V absolute maximum using the MCP4922 (it already has an internal 2x gain stage and can go above the 4.096V reference voltage). That additional gain stage again would add error. Alternatively I guess I could add some feedback resistors to IC3B pin 6 (current measure feedback path) to lower the voltage needed from the current limit setting DAC output (IC3B, Pin5)... But that definitely would require a new PCB if I don't want ugly bodges on the board..

I have also attached the layout for your reference.


edit: wow, using 0.2R it realy does seem to look better, see SDS00008.png (0.2R) in comparison with SDS00004.png (0.1R)!
« Last Edit: March 28, 2021, 12:17:41 am by nemail2 »
Boron rhymes with moron
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf