A very nice power supply with an smps pre regulator and a linear regulator output

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
May 11, 2008
21,848
1,318
126
I had been thinking,
The minimum load current or also called quiescent current for the LT3081 can vary between 1.1mA typical and 5mA maximum. There is nothing wrong with the circuit, just a bit of tolerance. I have not yet had enough coffee to be awake enough to think it through.
I guess when the current potentiometer is set to 0V, the LT3081 essentially turns the output transistor of the LT3081 off. The current throug the resistor R2 is reduced to the minimal required quiescent current, meaning the voltage over the resistor R2 is also reduced. The emittor of Q1 becomes more negative, starts saturating more and the collector voltage becomes more negative. The -0.76V is just the Vbe voltage.
If the circuit is calculated at 2*4mA but the required quiescent current is less than that, the voltage at junction R2 and emitter Q1 would be more negative, hence the negative voltage.
 
Last edited:

SOFTengCOMPelec

Platinum Member
May 9, 2013
2,417
75
91
I had been thinking,
The minimum load current or also called quiescent current for the LT3081 can vary between 1.1mA typical and 5mA maximum. There is nothing wrong with the circuit, just a bit of tolerance. I have not yet had enough coffee to be awake enough to think it through.
I guess when the current potentiometer is set to 0V, the LT3081 essentially turns the output transistor of the LT3081 off. The current throug the resistor R2 is reduced to the minimal required quiescent current, meaning the voltage over the resistor R2 is also reduced. The emittor of Q1 becomes more negative, starts saturating more and the collector voltage becomes more negative. The -0.76V is just the Vbe voltage.
If the circuit is calculated at 2*4mA but the required quiescent current is less than that, the voltage at junction R2 and emitter Q1 would be more negative, hence the negative voltage.

Without spending a lot of time looking in to this, so I could be wrong.

BUT R12, 100 Ohms 1%, in the schematic you supplied:

http://cds.linear.com/image/28952.png

Seems to show that it would/should stop the current limit pot from being set ALL the way to zero. I.e. It may/should keep the lowest setting to a value which copes with the 8 mA.

Or I am misunderstanding the circuit, because I CAN'T play with it, and DON'T want to spend time, thoroughly analyzing it.

Alternatively, you have NOT got it wired up the same, as that schematic ?
 
May 11, 2008
21,848
1,318
126
Without spending a lot of time looking in to this, so I could be wrong.

BUT R12, 100 Ohms 1%, in the schematic you supplied:

http://cds.linear.com/image/28952.png

Seems to show that it would/should stop the current limit pot from being set ALL the way to zero. I.e. It may/should keep the lowest setting to a value which copes with the 8 mA.

Or I am misunderstanding the circuit, because I CAN'T play with it, and DON'T want to spend time, thoroughly analyzing it.

Alternatively, you have NOT got it wired up the same, as that schematic ?

R12 is there, i have not changed anything to the board with exception of removing R2 and Q1.
And the quiescent current is not a constant as can be found in thew datasheet, it varies from chip to chip. But could be very similar in a production run.

From the LT3081 datasheet :

A resistor placed between ILIM and OUT on the LT3081 externally sets current limit to a level lower than the internal current limit. Connect this resistor directly at the OUT pins for best accuracy.

The value of this resistor calculates as:
RILIM = ILIMIT/360mA/kΩ + 450Ω

The resistor for a 1.3A current limit is : RILIM= 1.3A/360mA/kΩ + 450Ω = 4.06k.
Tolerance over temperature is ±15%, so current limit is normally set 20% above maximum load current. The 450Ω offset resistance built in to the programmable current limit allows for lowering the maximum output current to only bias currents (see curve of Minimum Load Current in Typical Performance Characteristics) using external switches.

I would get the impression from the text that 450Ω is enough instead of 100 Ohm for R12. But it i bet it is lowered to 100Ω with the bench supply to counter tolerance in specifications for the LT3081 during production.
 
May 11, 2008
21,848
1,318
126
Well, i succeeded in removing the potentiometers and the on/off switch. But i do have to rant about a sort of a non issue for mass production but it was annoying for me :
The whole pcb is a good design because the whole pcb is setup with as much as copper planes as possible. Turning the pcb in a giant heatsink.
But for the potentiometers and the switch, full contact solderpads are used. So, it took some good tools and patience to get the components out without damaging the components or the pcb. I had to preheat the pcb with hot air and then use a large high power soldering iron. And it is lead free solder, so temperatures needed to be high.
I do not get it, to use full contact solderpads for these components. At work, we use cadence allegro. And for as far as i know, we only use full contact solderpads when high current capacity is needed or high frequency(Impedance stub).
Normally, the default setting is that a solderpad is connected to a copper plane as a cutout version connected to the copper plane with 4 thin bridges of copper. This is known as a thermal relief. It lowers the heat transfer capacity of a solderpad connected to a copper plane. Makes it easier to (hand) solder as not all the heat gets transferred away to the copper plane.

MkZdx.png
 
Last edited:
May 11, 2008
21,848
1,318
126
Well, i have connected the 10 turn potentiometers and it works great. :)
I have 4700 Ohm for the current, so the maximum current is now a bit less but, i am oke with that. The voltage setting potentiometer is still a 10000 Ohm model. The potentiometers allow for fine grain control and i can get the maximum current setting down to a minimum of about 500uA if i try. I was hoping for 10mA but now i got an assured minimum maximum current setting of 1mA. This modded bench supply will work nice as a current source when i need to try something quick.

The potentiometers i bought a long time ago. I think they are of Russian origin but i am not sure. Still crack free after 10 years in my component cabinet. :cool:

pot1.png

Anybody have an idea what brand this is ?

My bench supply looks a little bit different now.
I decided for the convenience to keep using the LM358 for the current sink circuit. I have it already laying around and could not find the LT1490A that i should have somewhere. Anyway, the 2mA led together with R13 is removed from the INTVCC rail to reduce the current INTVCC has to provide and the 700uA quiescent current LM358 will do the trick. The base current the LM358 has to source on the output is very low, only about 100uA i expect. Thus, still less than 1mA the INTVCC (3.3V) rail has to provide. The point is that one should not really use this regulated supply for external circuits according to the datasheet. Has to do with maximum dissipation i guess and the fact that the regulator supplies the internal circuitry of the LT8612. So keeping the current as low as possible is a good thing.


bps4.png


Speaking of Russian electronic stuff, i have also found my first oscilloscope again. I am going to give it a special place in my work room. I have to clean it up a bit and see if it still works. I also found the complete service manual with schematics but it is unfortunately for me in French. :|

myscope.png


Now i have to setup the prototyping pcb with the PIC16F1509 on it and additional circuitry.
 
Last edited:
May 11, 2008
21,848
1,318
126
Yahoo. From a friend i got a 40V / 1.4A SMPS PSU brick. Although it is not enough to get 2.5A at 24V. It is good enough for now to power my tiny adjustable power supply. I opened the PSU brick and it has a tiny potentiometer to adjust the voltage. I will lower it to about 36V and that will be in the input voltage to the adjustable psu. Since SMPS (Switching mode power supply) are power converters, it means that at 24V (Assuming 90% efficiency for the LT supply) i would be able to draw 1.89A at 24V max output. This will do fine for now until i get a PSU brick that can deliver 36V at 2A.

Of course, as the output voltage is lower, the output current will increase for the same amount of power. Until i have the maximum allowed current. :)

I was planning on using a toroid transformer and make use of a metal case i had laying around. But now i can go for a lightweight plastic case i have laying around. Much easier to process making a housing for it.

For the PIC16F1509 circuit, i will use a NCP3063 smps stepdown converter to create 10V. And behind that i will place a good old 7805 to get a clean 5V for the PIC16F1509.
I will make use of a MCP1525 as a voltage reference for the ADC.
 
Last edited:
May 11, 2008
21,848
1,318
126
I adjusted the voltage down to 36V. To stay on the safe side. The maximum input voltage however is 40V for the DC2132A.

smps_brick.jpg~original


I had to screw of part of the heatsink of and removed it for this view.
In the right lower corner, the orange adjust potentiometer can be seen.
Very carefully without touching any of the heatsinks (They are electrically isolated for as far as i can see but i am not taking any risks) i adjusted the voltage down to 36V. Pulled out the 230V plug, let the capacitors discharge first and only thereafter i screwed on the heatsink back on and screwed the plastic enclosure back together.

I did some tests now that i got the full voltage. The IMON outputs of the LT3081 pair work great. Together they gives of a pretty precise 100mV/1A. or 1mV/10mA. That is good enough for me. Since i am taking the easy way and using the PIC16F1509 internal 10bit adc with a MCP1525 2.5V reference, my actual resolution is about 20mA on my lcd. But i can live with that. I will be using external meters when doing precise measuring. The values i will present on the LCD are just for indication.

I had been thinking,
i looked for a simple delta sigma adc that i can solder easily and found several with multiple inputs and that are easy to solder. But not easy to get unfortunately.
However, i could for example use this one : the MCP3426. It has a 16 bit resolution so good enough for me. It has a I2C interface. That is easy too.
And it comes in a SOIC 8 150mil package. That allows for easy soldering on standard 1/10 inch proto pcb material.

But, i need speed. For my electronic fuse option to work, i need to sample fast. For example every 10000 samples / second continuously. Add some averaging over time with 64 samples to filter out spikes and that will do.
 
May 11, 2008
21,848
1,318
126
Well, for some time i have been busy slowly building the prototype pcb.

I can now start programming the PIC16F1509 to show voltages and current and do the electronic over-current protection.

mcu_atht.jpg~original



The supply circuit is a (almost) zero power loss polarity protection, an smps from 36V to 10V and a linear regulator for the +5V. Further is present the opamp circuit to keep the output at exactly 0V when all potentiometers are at minimum. And of course the MCU with a 2,5V voltage reference MCP1525 for the ADC. When all is finished i will make a schematic in pdf format.

EDIT:

The LCD is not the lcd i will be using, this one is a single line. I will be using a 2x16 characters LCD.
This LCD i normally use for prototyping on my breadboard.
 
Last edited:
May 11, 2008
21,848
1,318
126
The single line black connector on the right is a handy dandy USB to UART cable from FTDI : TTL-232R-3V3.

4466157.jpg


The signals are TTL 3V3 level. The PIC is on 5V, so it has TTL 5V levels.
A mismatch. A simple resistor divider on the PIC TX from 5V to 3V3 with a 1K5 and 3K3 resistor will do. A 1K series and 10K pull up resistor to 5V on the PIC RX will do fine. The RX of the PIC accepts 3V3 levels fine and the TX 5V level is divided down to about 3V3. This way, a uart to dump data is present and that makes debugging very easy.

For sale at Farnell.
http://www.newark.com/ftdi/ttl-232r-3v3/usb-to-serial-converter-cable/dp/34M8872
 
Last edited:
May 11, 2008
21,848
1,318
126
May 11, 2008
21,848
1,318
126
I accidentally posted a phage post into this thread last week, hence the to be updated post above. :|

Well, the front is finished, amazing what you can do with a calliper, a Bosch cordless drill with drill bits and a figure-saw. I do not have a milling machine at home so whenever i have to cut out some rectangle shape, i use the figure-saw.
I have been fiddling again with my darn camera settings. So, not the best picture quality.

frontpanel.jpg~original


Tomorrow i will put it all together and will continue with the software.
I noticed the ultoa function from the XC8 compiler of microchip does not seem to accept 32 bit unsigned integers. Oh well, i will just use my own function. Visual studio from Microsoft has a great debugger and is great to test c functions in, that are to be used in c programs for embedded devices.
 
May 11, 2008
21,848
1,318
126
All assembled with the new shiny blue backlight LCD from MIDAS :

And the blue knobs from multicomp.

Both for sale at Farnell.

LCD :
Manufacturer : MIDAS
Model : MC21605H6WR-BNMLW
http://uk.farnell.com/midas/mc21605...t=MIDAS_MC21605H6WR-BNMLW&selectedCategoryId=
or
http://www.newark.com/midas/mc21605...ll+Categories&categoryNameResp=All+Categories

Knobs :
Manufacturer : Multicomp
Model : CP-WB-D-3
http://uk.farnell.com/multicomp/cp-...0&selectedCategoryId=&categoryId=700000004727
or
http://www.newark.com/webapp/wcs/st...ries&selectedCategoryId=&gs=true&st=CP-WB-D-3

The knobs are meant for a potentiometer with a D shaft. So i drilled them up with a 5.9mm drill bit to make them fit on a potentiometer with a standard 6mm round shaft.


Some images :

supply1.jpg~original


supply2.jpg~original


supply3.jpg~original


In the lower right corner of the third image, my serial to parallel to lcd pcb is slightly visible.

The switch is to remove the output voltage from the output connector.
 
May 11, 2008
21,848
1,318
126
Meh, i just found out that with the XC8 compiler, that when i do a 16bit * 16 bit multiplication, the result returned is not a 32 bit answer but a 16 bit answer.

When i do :
Code:
value_32b = value * ref_val;

Where value = 100 and ref_val = 2444, the result should be 244400.
Hex : 3BAB0.
But what i get returned is 47792. Hex : BAB0. The multiplication returns only the lower 16 bit half of the 32 bit result. I guess have to read the XC8 manual to find out how to solve that :(.
 
May 11, 2008
21,848
1,318
126
That was easy, i assumed that normally a 16bit * 16bit multiplication is always a 32bit result. But the XC8 compiler truncates the result to 16 bit by default. An explicit cast to 32bit will give a proper 32 bit result.

Code:
value_32b =(uint32_t) value * ref_val;

:)
 
May 11, 2008
21,848
1,318
126
After a few hours of programming : I have to say it again, visual studio from Microsoft has a fantastic debugger and i use it to write c functions. I test my c functions step by step in visual studio, and when the function works(or at least seems to work), i copy paste it into mplabx IDE or in my very own W-ARM IDE and use it in my embedded program.

I almost got everything working. The current trip function of the supply is operational. This means that whenever a current flows higher than the trip current, the MCU will shutdown the SMPS on the LT PCB. I have a transistor that emulates the Power switch.

The switch on the front is to turn the smps on and off and to set the trip current when the smps is off.
The switch is read out by the MCU and the MCU switches the SMPS on the LT board.


Trip current.
supply4.jpg~original


And actual current flowing when a 5% resistor combination of about ~20.2 Ohm is connected.
supply5.jpg~original


I thought i had it debugged, but the rounding part of my format to lcd function still has some errors. :|
Oh well, for now i am happy. :)
The 10bit ADC is sufficient enough. I do not use floating point math, I just normalize. i use 32bit variables and i calculate in units of 0.0024438 mV.
The voltage reference for the ADC is 2.50V. 2.50V / 1023 = 0.0024437927663734115347018572825V.
Since the ADC has a maximum of 1023 and 1023 * 24438 = 25000.074mV. In uV that is 25000074uV, so i work in uV units.
I forgot to mention that i already added in the (x / 10) attenuator. That is why i work with a value 10 times higher.
That is why it is 24438uV and not 2443,8uV.
When doing a little shifting of characters after a 32bit utoa and placing the separator at the right spot, it is relatively easy. It also helps that the voltage and current attenuators are a power of 10. The rounding hides the relative low precision of using a 10bit adc.

And since it is 0 to 24V, i use almost the maximum resolution of the ADC.
 
Last edited:
May 11, 2008
21,848
1,318
126
Well, i just found out that (but yeah, a less than a euro micro controller on a prototyping board combined with noisy smps) the adc has a bit of offset and picks up random noise ocassionally. So instead of using a fixed calibration value. I have a sort of auto calibration function added. Whenever the MCU turns of the LT smps, the MCU performs an offset calibration for the adc channels. Now it is pretty accurate.

Luckily the noise is filtered out by an averaging filter over 16 samples. The ADC state machine takes a sample every ~75us on a different channel. There are 5 ADC inputs, and a 16 positions deep ringbuffer for each input. The ADC state machine constantly samples and then updates the values of one of the 16 positions of the ring buffer. This is done in a sequential order. The oldest value is constantly overwritten with a new value. Each buffer gets a new sample every ~375us. ~75us conversion time * 5 inputs. When i call the function to request an ADC value of a given input, all 16 (16 bit) values are added together and shifted right 4 times (division by 2^4 = 16). It takes about 6ms (375 * 16) before all 16 positions of the ring buffer of a given input have the same value.

This is a kind of low pass filter i guess. But i have no idea how to describe it mathematically.

I think this is called a finite impulse response filter but i am not sure. I could be wrong about that.
 
Last edited:
May 11, 2008
21,848
1,318
126
Well, i got almost everything working. I disabled the rounding part of my conversion function for now because it still has some errors with some specific values.

On the debug port i can see all values. :)

supply6.jpg~original


The first value is the output voltage.
The second value is the output current.
The third value is the temperature of the first LT3081.
The fourth value is the temperature of the second LT3081.
The fifth value is the trip current.

The trip current is where the mcu will turn off the smps on the LT pcb. This fuse functionality can also be turned off when needed by turning the trip potentiometer to zero.
The temperatures are easy, with the current resistor choice ok 10K, it is about 10mV / degrees celcius. The temp outputs are current sources with a value of 1uA/degrees celcius when above 5C.
The MCU will turn of the smps on the LT pcb when either or both temperatures are above 85C.
 
Last edited:
May 11, 2008
21,848
1,318
126
So, it is finished for now. Ready to be used. I implemented code for the watchdog timer and of course functionality through the debug uart port to test the watchdog timer if it works. And it does.

I also added functionality that when the supply is switched into the trip menu, the lower line of the 2x16 character lcd will display the trip current that is currently set.
The upper line will display the last recorded temperatures and the output voltage in a sequential way. Every 2.5 seconds, the supply will alternate between Temp 1 , temp 2 and voltage. This will give me an idea about the temperature of the system without using the debug uart port.

Now, i can go back to programming my SAM7S ARM and see if i can get that nokia 6100 LCD i had laying around to work. After that, i will be ordering a very special sensor that can determine what is in front of it and if that object moves. A bit like a ccd or cmos camera but a real tiny one. When i have it and got it to function, i will post about it.