### Author Topic: EEVblog #259 - PSU Rev C Schematic - Part 12  (Read 47518 times)

0 Members and 1 Guest are viewing this topic.

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #25 on: March 14, 2012, 10:52:17 pm »
Hi Dave, did you reverse the +/- inputs on the U3B opamp, isn't ADC-IOUT suppose to go the - side? and the PWM output to the + side?

No, it is correct. Rev B was wrong.

Dave.

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #26 on: March 14, 2012, 10:56:15 pm »
Also, you mentoined in the video that the tracking regulator will be +2V of the output voltage. What happens in a long period short circuit operation? All the output power would go into the LT3080, which would be dissapating 12W (12V 1A) or more.. maybe make it so that it follows the live output voltage instead (or only if the output voltage deviates alot from the input).

The software knows that the output voltage is and if it's in constant current limit, so it can adjust the input as required.

Dave.

#### kkp

• Contributor
• Posts: 10
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #27 on: March 14, 2012, 11:20:39 pm »
Quote
I can't see how that would work. There would only be a fixed extra current current flowing through that extra 1ohm resistor, so it can't compensate the variable current flowing through R17 and R18 as the load current changes.

The current is not fixed (it varies with V+).
As long as U12B is not out of regulation*, the U12B inputs are at the same voltage. Therefore the current in R17 and R23 is almost identical. If you consider the case where U1 is removed (no output current, the difference should be 0), the negative terminal is fed with 18001 ohm, the positive 18000 ohm. So 'almost'. Once you add 1 ohm, they are identical. And thus the current in the shunt due to R17R18 should be suppressed with the matching of the real and dummy 1 ohm shunt.
It does mean that your shunt is effectively 1 ohm || 18k ohm, but that will be well below the resistor tolerance.

I will find a pen and paper, if required.

/Kasper

*I have my reservations about using LM358 with the output this close to ground. I recall it has problems below 0.6V. My first thought was LMV358, but it cannot handle your input voltage.

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #28 on: March 14, 2012, 11:46:43 pm »
Quote
I can't see how that would work. There would only be a fixed extra current current flowing through that extra 1ohm resistor, so it can't compensate the variable current flowing through R17 and R18 as the load current changes.

The current is not fixed (it varies with V+).
As long as U12B is not out of regulation*, the U12B inputs are at the same voltage. Therefore the current in R17 and R23 is almost identical. If you consider the case where U1 is removed (no output current, the difference should be 0), the negative terminal is fed with 18001 ohm, the positive 18000 ohm. So 'almost'. Once you add 1 ohm, they are identical. And thus the current in the shunt due to R17R18 should be suppressed with the matching of the real and dummy 1 ohm shunt.
It does mean that your shunt is effectively 1 ohm || 18k ohm, but that will be well below the resistor tolerance.

I think you are missing the point here.
The residual current is "zeroed" out by the user at a fixed output voltage.
The current through R17/R18 then changes with the output current, and that's the problem.
The current through R23/R24 and your new 1R resistor will however remain the same, and will not change with the output current. So it cannot be used to compensate for the changing current through R17/R18

Dave.

#### IanB

• Super Contributor
• Posts: 9618
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #29 on: March 14, 2012, 11:56:21 pm »
I only got part way through the video but I was a little puzzled at the battery charger chip and typical circuit. There did not seem to be a center tap on the battery or any cell balancing control. If the cells age and become mismatched that might lead to one cell being charged to 4.3 V while the other is at 4.1 V. It this a good idea, and do other integrated charger ICs behave the same way?
I'm not an EE--what am I doing here?

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #30 on: March 15, 2012, 12:03:24 am »
I only got part way through the video but I was a little puzzled at the battery charger chip and typical circuit. There did not seem to be a center tap on the battery or any cell balancing control. If the cells age and become mismatched that might lead to one cell being charged to 4.3 V while the other is at 4.1 V. It this a good idea, and do other integrated charger ICs behave the same way?

Yes, that is common for low-ish current two cell chargers like this. Cell balancing is not used as it would be for say a high current LiPo pack.

Dave.

#### Psi

• Super Contributor
• Posts: 7442
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #31 on: March 15, 2012, 12:05:46 am »
I only got part way through the video but I was a little puzzled at the battery charger chip and typical circuit. There did not seem to be a center tap on the battery or any cell balancing control. If the cells age and become mismatched that might lead to one cell being charged to 4.3 V while the other is at 4.1 V. It this a good idea, and do other integrated charger ICs behave the same way?

also you may have missed the bit where he said the lithium batteries he plans to use have built in protection. They wont allow themselves to charge up past max or discharge below min volts.
Greek letter 'Psi' (not Pounds per Square Inch)

#### sacherjj

• Frequent Contributor
• Posts: 993
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #32 on: March 15, 2012, 01:12:23 am »
After looking through the INA219 data sheet, I'm wondering if it would be possible to move the shunt to the output.  The sense would still compensate for the voltage drop.  However, you would have to go with a 0.25 ohm shunt to get full range current.  It would allow you to measure Vin- as the actual output voltage, with the 12 bit DAC in the ship.  It would also calculate output power.  This sacrifices 1/4 of your resolution with current measurement, but is probably more accurate than ADC on the Atmel for output voltage.  Hard to say without a schematic to pour over, I'm probably missing something.

I briefly considered that, but the LT3080 driving sense would need to be on the output to compensate, and that might screw up the stability somehow. It would have to be tested.
But that would now fix the LM358 issue I've got...

It would also lower the shunt loss and allow you to run the tracking pre-regulator a little closer.

#### IanB

• Super Contributor
• Posts: 9618
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #33 on: March 15, 2012, 01:36:54 am »
also you may have missed the bit where he said the lithium batteries he plans to use have built in protection. They wont allow themselves to charge up past max or discharge below min volts.

I didn't miss that. But it depends a little on the batteries you actually have in the device and the quality of the protection circuit--individual 18650 cells with protection circuits are an "after market" item that are not available from the big name manufacturers and do not have any standardization on the level of protection.

If the protection circuit tripped on one cell in the pair while charging it would block the whole charging circuit and I'm not quite sure what would enable it to reset. Usually you would have to take the cell off the charger and then put a load on it.

I think the integrated charging ICs may expect a two cell protection and charge control circuit to be present on the battery with some internal cell balancing. I am unsure about this area but I don't quite see how having unbalanced cells in a pack is a good idea.
« Last Edit: March 15, 2012, 01:39:17 am by IanB »
I'm not an EE--what am I doing here?

#### IanB

• Super Contributor
• Posts: 9618
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #34 on: March 15, 2012, 01:41:41 am »
Dave,

I noticed how your schematic divides the circuit into separate functional blocks for clarity. Does the tool (Altium?) also then have the capability to produce a separate system block diagram showing the high level view of how those functional blocks are interconnected? I can see that being useful in more complex design.
I'm not an EE--what am I doing here?

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #35 on: March 15, 2012, 01:45:00 am »
I noticed how your schematic divides the circuit into separate functional blocks for clarity. Does the tool (Altium?) also then have the capability to produce a separate system block diagram showing the high level view of how those functional blocks are interconnected? I can see that being useful in more complex design.

Not automatically, no. But kinda can manually, with things like harnesses.
The functional block thing is purely visual, it can be done in any CAD package, nothing special about Altium here.

Dave.

#### IanB

• Super Contributor
• Posts: 9618
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #36 on: March 15, 2012, 01:49:00 am »
Not automatically, no. But kinda can manually, with things like harnesses.
The functional block thing is purely visual, it can be done in any CAD package, nothing special about Altium here.

Oh. I thought that might be one of the "added value" features of a package like Altium. It definitely seems like it would be a useful feature when designing complex systems.
I'm not an EE--what am I doing here?

#### TerminalJack505

• Super Contributor
• Posts: 1281
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #37 on: March 15, 2012, 02:51:48 am »
The battery powered feature is pretty cool.  Are shipping the batteries with the product going to be a problem?  Although I don't know for certain, some countries might consider them hazardous material and restrict shipping methods.  (Ground only, for example.)

Also, I noticed a possible issue with the schematic.  See attached.  Does ERC not catch that?  Or maybe that's not the actual net name coming from the connector.

Edit: I guess the two pins across the cap are just two passive pins to the ERC checker so I guess it might be hard for it to find issues like that.
« Last Edit: March 15, 2012, 02:56:41 am by TerminalJack505 »

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #38 on: March 15, 2012, 02:57:23 am »
The battery powered feature is pretty cool.  Are shipping the batteries with the product going to be a problem?  Although I don't know for certain, some countries might consider them hazardous material and restrict shipping methods.  (Ground only, for example.)

Yep, I won't be able to ship them.

Dave.

#### timelessbeing

• Frequent Contributor
• Posts: 803
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #39 on: March 15, 2012, 03:21:34 am »
Isn't it possible to let a switcher IC handle all the regulation? (I am not an EE)

Also, is there a ballpark total cost for this device?

#### jshonw

• Contributor
• Posts: 16
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #40 on: March 15, 2012, 05:44:35 am »
I have experimented with the INA219 a few years back.  From my foggy memory, I believe the dV/dt protection resistors  caused problems with the accuracy and I removed them while playing with it.  Then again, I was doing this with a breadboard, so take it with a grain of salt.

#### ModernRonin

• Contributor
• Posts: 44
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #41 on: March 15, 2012, 06:41:03 am »
Isn't it possible to let a switcher IC handle all the regulation?

You can, but switching supplies are notoriously noisy. If you need clean power (like for high gain or high precision analog circuitry), running the power rail through a good linear regulator to clean up the noise is considered good practice.

#### timelessbeing

• Frequent Contributor
• Posts: 803
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #42 on: March 15, 2012, 07:11:52 am »
Can't the noise be removed with filters?

#### Psi

• Super Contributor
• Posts: 7442
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #43 on: March 15, 2012, 07:35:09 am »
Can't the noise be removed with filters?

kinda, but it's complicated and it only reduces the noise, doesn't remove it entirely.
Greek letter 'Psi' (not Pounds per Square Inch)

#### kkp

• Contributor
• Posts: 10
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #44 on: March 15, 2012, 07:36:24 am »
Quote
I think you are missing the point here.
The residual current is "zeroed" out by the user at a fixed output voltage.
The current through R17/R18 then changes with the output current, and that's the problem.

Quite possible. I would have thought the 'size of the problem' would be 1 ohm / (1 ohm+18k), so the changing current in R17  causes a gain error of only 55 uA/A(at output), and 1/36001=27 uA/V(at V+) of offset.

The 1 ohm I suggested is purely for suppression of this offset going into the INA219. When V+ is 10V, R17/R18 current contributes 277uV across the shunt. Let's say the user zeroes here, then adjust so V+ becomes 20V.
The R17/R18 current now contributes another 277uA, so even if U1/U4/D3 have unchanging leakage to ground, the INA219 readout changes 277uA.  But one can also fix this in software.

/Kasper

back of envelope check: 1A output change, the shunt drops 1V, the opamp output rises 1V, 2V across 36k, 55uA, 55 ppm.

#### vk6hdx

• Regular Contributor
• Posts: 57
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #45 on: March 15, 2012, 08:06:19 am »
Are the Li-ion cells in series or parallel?  The choice of the charge controller (MCP73213) with its 8.4V VREG output seems to indicate they are in series, however the 3v3 LDO MCP1700 seems to have a max VIN of 6v.

Edit:  Without knowing how much space the current code takes up, is it worth going to the ATMega328?  AFAIK its pin compatible & Arduino compatible and would double the programming space available.  Around 50c more.  Then in addition to all the PSU smarts we may even have enough space left to program in a game of pong on the 20x2 LCD

Cheers,
Troy
« Last Edit: March 15, 2012, 08:47:15 am by vk6hdx »

#### A Hellene

• Frequent Contributor
• Posts: 601
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #46 on: March 15, 2012, 10:01:21 am »
Damn it, Dave! You made me finally decide to upgrade my lab PSU that I built in the early eighties! Especially now, that my time is very, very limited...

It is a 350W linear PSU (0.0-32.0V/0.00-10.00A) based on the legendary LM723, whose circuit I redesigned from scratch a couple of years after its initial construction, and it still goes strong with few recent minor losses (the 20 years old output filtering capacitors!) after having it used to debug crude switching power supplies! All these years it did never complain, even when I used it to be charging my motorcycle and car batteries!

Thanks to you, the LT3080 got my attention and I found it to be an excellent voltage follower for the upgrade of my lab PSU, even though I might need to change the power stages (2 x 2N3772) with faster ones. I initially intended to add a few exotic features like, a deep memory to be storing real time the output voltage and current history and to display or send the data to a graphics display or over a serial line, and a few hundred steps of arbitrary output waveform programmability. Now, I think that adding a switching tracking pre-regulator stage would not be that irrational...

Anyway, I have made a few drafts that simulate perfectly well, in a hope that you will find them useful for the PSU you are constructing. I am using the AD8628, this lovely Analog Devices's chopper, that does not only have one of the best offset values in the market but it also needs only a few micoseconds time to recover from an I/O saturation or overload condition, instead of the usual 50ms most choppers need. There is also the AD8616, if you need any faster solutions.

Linear PSU v1

This, above, was my first attempt. Kelvin connections for the I/V sense resistors and dividers. R4 adds to the output voltage the shunt resistor voltage drop (= <Vout-> * R2/R4), while V_Set has a gain of R2/R3; R1 balances the overall gain of U1, adding to the output an amount of 0V * R2/R1. My initial thought was to keep my current shunt configuration as it was (low-side current sensing), but I ditched that idea because this way I insert extra stages to the regulation loop, compromising LT3080's accuracy and speed. Next, I used a current-sense IC but the overall stability is not of the standard I expect it to have. But the voltage regulation loop seems to be flawless:

Linear PSU v2

This is only a draft, but the solution you might be seeking for your PSU is the U3 stage, above: Personally, I need 5.0V for the 16-bit, <1 LSB INL ADCs/DACs and, possibly, for the graphics LCD; otherwise, everything can run on 3.3V. Vcc can be anywhere between 3.3-5.0V while Vee=0.0V. If you are paranoid about the ground level accuracy, set Vcc=3.3V and Vee=-1.0V and you are done! You can use any low voltage op-amp to drive the LT3080 voltage follower by using an extra high voltage (>40V) MOSFET with an Rds of 100 milliohm or better: See the U3 stage. Additionally, if your LT3080 drives a power stage instead of the load directly, R8 shuts the power stage off, providing the first milliampers to the load by the LT3080 itself and after that the power stage takes over; R9 ensures that the LT3080 will never provide more than 40mA, keeping it always cool on the PCB -no need to mount it in the hot heat-sink and have its characteristics drift off.

I hope that the above could be of some help; of course, any ideas are welcome!

-George
« Last Edit: March 15, 2012, 10:51:05 am by A Hellene »
Hi! This is George; and I am three and a half years old!
(This was one of my latest realisations, now in my early fifties!...)

#### Psi

• Super Contributor
• Posts: 7442
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #47 on: March 15, 2012, 10:13:11 am »
Are the Li-ion cells in series or parallel?  The choice of the charge controller (MCP73213) with its 8.4V VREG output seems to indicate they are in series, however the 3v3 LDO MCP1700 seems to have a max VIN of 6v.

Give this man some points!
That does look to be a critical error
« Last Edit: March 15, 2012, 10:15:50 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)

#### tomwulf

• Newbie
• Posts: 1
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #48 on: March 15, 2012, 11:44:20 am »
Hello folks, hello Dave,

I have a little question about the op amp U12A in the PSU REV C schematic. This op amp is powered from V+ and the input pins are also connected to a potential close to V+. But the LM358 common-mode-range does not include V+. This op amp has a maximum input common mode range approximately 2V below the positive supply rail. Is this right ? I didn't understand the reason of the correct function under these conditions.

Great blog- Dave.

Best regards,

Thomas

#### EEVblog

• Posts: 30635
• Country:
##### Re: EEVblog #259 - PSU Rev C Schematic - Part 12
« Reply #49 on: March 15, 2012, 12:31:24 pm »
back of envelope check: 1A output change, the shunt drops 1V, the opamp output rises 1V, 2V across 36k, 55uA, 55 ppm.

Yes, without the opamp it would be 5 LSB's error or so for a load change of 1A.
With the opamp in there there is zero load change with output current.
Adding a resistor V+ side does not compensate for that change, because V+ is fixed.

Dave.

Smf