DIY Scalable Bench Power Supply Design - Page 1
Forum section: electronics / projects

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 12:30:53 pm
content: First of all, since I'm new to this forum, I'd like to say hello to everyone.Off to the topic now...I've been digging into the internet for a good (read suitable for my needs) bench power supply design and I haven't found anything that suits my needs so I decided to design my own and I need a bit of help and a lot of opinions and/or suggestions. I won't post a schematic just yet because I don't have it, just the basic idea. Also, this is an El Cheapo build, so budget is limited.Here are the specs:--- 0-20V adjustable voltage (in 1V/ 100mV steps, gonna use a microcontroller with a DAC for that)--- max 3A current limit (also adjustable, haven't decided on the details so far but since I'm using a micro and a DAC I have plenty of options)--- front panel volt meter (using the ICL7107 just because I have a few lying around)--- front panel amp meter (ICL7107 again, with an INA168 as the current monitor - datasheet herehttp://www.ti.com.cn/cn/lit/ds/symlink/ina138.pdf)--- last but not least - IDIOT-PROOFSo far I have a 230V / 24V @ 4.17A mains transformer and I'm planning to use it (obviously).It's going to have the output rectified and filtered and fed into the following:--- +5V regulator (at something like 1A) using the LM2596-ADJ for the ICL7107 meters and micro (datasheet herehttp://www.ti.com/lit/ds/symlink/lm2596.pdf)--- +12V regulator using the LM2596-ADJ for the fans (which draws about 100mA max, so 3A max is overkill) followed by a 78L05 (100mA) for the DACs, because I want a clean supply for my reference voltages--- the 0-20V adjustable power supply using an opamp based linear regulator which will be fed from (you might have guessed already) another LM2596 configured as a step-down tracking pregulator which will (should) keep the linear regulator's input voltage 4V higher than the output (or that's how I want it to be).On with the boring details...--- the microcontroller will be a PIC and the DACs will connect on the SPI interface (I'm lazy and SPI is easy to program)--- will use two temperature controlled fans (el cheapo computer fans; no details so far as I haven't thought about it too much)--- box? damn it... why do I have to?! I'll probably buy one if it's cheap enough, otherwise I'll build it myselfNow the questions:--- should I use the SMD or THT version of the main LM2596 for the tracking preregulator? I'd go with the THT one and slap it onto a heatsink, just for good measure.--- could I use a LM317 for the linear regulator with an external PNP transistor to boost its output current? I know I'm going to need a negative supply of at least -1.25V to get down to 0V, so I might use an inverting charge pump off the +5V rail to get around -3V (the ICL7107 boards, already designed by the way, have an inverting charge pump using a MC14584 hex schmitt trigger inverter chip and I measured the output to be around -3.3V after I breadboarded the whole thing)Thanks in advance,void

author: sfiber
author_rank: Regular Contributor
timestamp: June 17, 2014, 01:18:59 pm
content: you should check to lm2676.I am working with this regulator for a few days and I strongly recommend to use this chip with a to220 package.

author: kizzap
author_rank: Unknown
timestamp: June 17, 2014, 02:06:02 pm
content: wow, this sounds similar to what I am doing atm.Fyi, to get to 0V output, you are going to need a negative voltage rail, so don't forget to account for that. Added to that, some op-amps won't go rail to rail, so the negative rail is crucial if you want the output to go to zero.What you feed your voltage reference from counts just as much as what you power your DAC from. Linear Regs are probably the safest bet to get a low input ripple, However,check the datasheetfor the ripple rejection ratio for the switching frequency you are interested in. Most of the specs are listed at 120Hz, or double mains, for where they are mainly used.for measuring current, I suggest using the MAX4081. Caveat: ensure it's ground is at your -5V, as both inputs need to be 5V above GND to work. thankfully the MAX4081 provides external pins for you to be able to reference your output voltage to.The switching pre-regulator will dictate the filtering that you need to put in place on the output to try reduce noise on the input to the linear regulator. As I stated before, The ripple rejection can fall to as low as 40dB at higher frequencies.As for the package types for all the regulators, It will depend on the power dissipated through the device. The datasheet will tell you how to calculate it.Also google the LM350 ;-)

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 05:54:21 pm
content: Quote from: sfiber on June 17, 2014, 01:18:59 pmLooked it up, the difference is that it runs at 260kHz compared to the LM2596's 150kHz, also its max duty cycle is only 91% compared to 100% for the LM2596 which means the max output voltage will be lower and I'm going to need every single volt if I want 24V at the output. Note that about 1.5V is lost on the internal switching transistor (NPN bipolar) of the LM2596 according to the datasheet. The 2676 uses a N channel MOSFET with a charge pump so it can't go to 100%.Quote from: kizzap on June 17, 2014, 02:06:02 pmI'm going to use a negative supply from voltage inverting charge pump from the +5V rail as I mentioned in the first post. The opamps are LM324 for the regulator and probably MCP617 (low offset) to buffer the DAC outputsQuote from: kizzap on June 17, 2014, 02:06:02 pmIf the high frequency ripple rejection is a problem then I'll just put a low pass RC filter in front of the 78L05 and it should clean everything up.Quote from: kizzap on June 17, 2014, 02:06:02 pmI'm sticking with the INA168 mainly because it comes in a tiny SOT23-5 package and it's pretty easy to configure. I'll probably add an adjustable gain low offset opamp after it so I can calibrate the whole thing.The dissipation for the 12V regulator is insignificant so I'll use the SMD versions for convenience since I'll be buiding this power supply at home (read 'I hate drilling holes. It's tedious and boring.'). As for the 5V one... at 1A output and 25V input (minimum) the duty cycle will be around 25% (taking switch and diode losses into account) which translates into 1A*1.5V*0.25 = 375mW. No problem using SMD. Temperature will rise to 0.375 x 50C + 50C = 68.75C which is reasonable but can be lowered with careful PCB design.The preregulator however will dissipate slightly more than 1.5V x 3A = 4.5W (let's say 6W) and with a junction to ambient thermal resistance of 50K/W it means it needs a small heatsink. Junction to case thermal resistance is 2K/W so for an ambient temperature of 50C I'll need a heatsink of max 10K/W just to be sure, assuming the thermal interface material has 1K/W. That would give me a maximum junction temperature of 130C which is below 150C so I'll stick with the THT version.Looked at the LM350 and at the LM338. LM350 has much better ripple rejection at 100kHz, although only 40dB, so I'll use that. No idea how I've missed it while searching for parts.Thanks a lot for the suggestions and I'll keep you posted and stick around, I'll probably have a schematic up later this week.

author: kizzap
author_rank: Unknown
timestamp: June 17, 2014, 06:40:36 pm
content: Quote from: void_error on June 17, 2014, 05:54:21 pmIs your transformer outputting 24V? They are generally rated as RMS, so your peak will be RMS * SQRT(2) = 33.94V approx. This may rise and fall depending on the line regulation from your wall outlet. In Australia for instance, our mains voltage can go -6%/+10% out of the 230V. Obviously don't forget to include diode drops, and you should have enough overhead for your circuit.Quote from: void_error on June 17, 2014, 05:54:21 pmHave a read of thisApplication Notefrom TI. With a simple change to a dual winding inductor and adding another diode and some capacitors, you get both rails, for quite cheap

author: dannyf
author_rank: Super Contributor
timestamp: June 17, 2014, 06:48:35 pm
content: I would suggest a gradual approach.1) Minimum output voltage > 0v: so you can use a 3-terminal voltage regulator as the base;2) Maximum output current < 1.5v: 3-terminal regulator again;3) MCU-based: no for now;4) Current limiter vs. current "fuse": do you want to maintain the maximum current output or just shut off the output?5) display: get one of those ebay led displays, for simplicity.Such a device can be fairly easily constructed. Once you get it going, you can add / refine features.The issue with mcu-based controller is that its ability is difficult to main, and it has poor transient responses.

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 07:38:25 pm
content: Quote from: kizzap on June 17, 2014, 06:40:36 pmIt's outputting 24V RMS with no load and a 222V mains input (it's evening and everyone has their lights on). I actually did a test a while back with a 3A load connected (8 ohm heater wire resistor) across the secondary and after doing the math it turns out that the transformer's internal resistance is about 0.5 ohm. That means the output will be 22V at 4A. The bridge rectifier I'm going to use is a KBPC1010http://pdf.datasheetcatalog.com/datasheet/wte/KBPC1004W.pdf(1kV overkill, 10A, but's that's what I found at the local store) which has a 1.2V diode voltage drop at 5A, so that makes 2.4V for two conducting every half cycle. If the output voltage of the rectifier + filter caps is not enough I could change the power supply's output voltage to 18V to ensure regulation.Now the output voltage after rectifying and filtering should be 22 x 1.414 - 2.4 = 28.708V which is not too bad while ignoring the ripple which is another can of worms since a bridge rectifier with filter caps is not a linear load and the peak currents will be much higher than 3A... I could use some help here...Quote from: kizzap on June 17, 2014, 06:40:36 pmMight actually go that way, I've seen this in a MC34063 app note, thanks for the tip.edit: I found I possible problem with that: the input voltage is variable so the duty cycle of the regulator will be variable and since the second output has no feedback it won't stay at a fixed value... am I right?If I am right then I can only use the negative rail unregulated derived from the +5V supply and use a low voltage negative linear regulator. I'll still need three LM2596s anyway because the pregulator has to be separate and the +5V and +12V rails must be regulated, especially the +5V one. Or maybe I could get a 5V fan and ditch the +12V rail?! Decisions, decisions...Quote from: dannyf on June 17, 2014, 06:48:35 pmI could indeed slap a smaller power supply together since I have all the parts lying around but that's not the point. I want a higher power bench PSU which would be easy to use. That's why I plan on using a microcontroller which will probably be last one to be implemented as I can replace the DACs with a TL431 set to 4V and a pot.I'm not using the micro for anything else than setting the output voltage and output current limit, basically using some buttons or rotary encoders (haven't decided yet) to set two voltage references.As for the current limiting I want constant current, but I might also implement fuse type limiting or hiccup current limiting, the latter requiring only a schmitt trigger, a cap and some resistors, or it could even be done with a 555 timer (I actually did that for experimental purposes and worked really well).

author: dannyf
author_rank: Super Contributor
timestamp: June 17, 2014, 08:11:35 pm
content: QuoteIt depends on what you meant by that.For example, using the mcu to read the output voltage setting and output a steady reference voltage (ie, letting the regulator maintain a constant output voltage) is fairly straight forward.Using the mcu to maintain the output voltage is actually fairly difficult - not impossible to do.Using the mcu to maintain the output current is even harder - they are inherently unstable.If you want, I posted a constant voltage + current limiter design using a mcu somewhere here. The interesting about it is that the opamps utilize floating rail design.

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 08:24:24 pm
content: The microcontroller just sets two DAC outputs used as voltage references and the analog circuitry does the rest. That's why I need a really stable supply for the DACs. The microcontroller doesn't interfere with any way with the feedback loop of the power supply.As for the floating rail design, it sounds interesting and I was actually thinking about it. I'd be grateful if you provided a link.

author: dannyf
author_rank: Super Contributor
timestamp: June 17, 2014, 08:26:51 pm
content: If that's the case, you actually could use pwm output as the DACs.I will find out the link for you later. That design utilizes the mcu to stablize the output voltage and maintains the current limit. So it is a little bit different.edit: here it is.https://www.eevblog.com/forum/projects/el-cheapo-mcu-controlled-power-supply/

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 10:13:53 pm
content: I'll avoid using PWM instead of DACs just because of the delay the RC filter at the PWM output will have.After I do all the math for the analog section of the PSU I'll start working on the code for the microcontroller. I'll be using a PIC btw (no idea which one yet) and I'll use an LCD display with it for the set voltage, set current limit, actual voltage and actual current and ditch the ICL7107 meters (I'll find another use for them). All the code will be written in C (i know assembly as well, that's how I learned PIC programming).Any idea on how to do the voltage adjustment and current limit on the LM350 with a bunch of opamps? The INA168 current sensor will output 1V/1A referenced to ground.Also, how much will it matter if I supply the opamps from the tracking preregulator output (which is variable)?

author: dannyf
author_rank: Super Contributor
timestamp: June 17, 2014, 10:38:41 pm
content: QuoteSince it is an open loop from the mcu's perspective, delays here don't matter.

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2014, 10:57:31 pm
content: How about the accuracy? The PWM output from the mcu won't swing to the rails (just very close to) and it'll be dependent on the mcu's supply voltage.In comparison, the DAC i'm planning to use, MCP4802http://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdfhas an internal voltage reference of 2.048V which will make programming a lot easier and I'll get precise 100mV steps at the output of the power supply (theoretically, practically this will be affected by component tolerances).

author: dannyf
author_rank: Super Contributor
timestamp: June 17, 2014, 11:01:04 pm
content: Since it is open loop, you have no hope at even moderately respectable accuracy - take a look at your regulator and you will see that the output typically go +/- 0.1v around the spec.In terms of resolution, it depends on the pwm mode or the dac used but 8-10 bits are fairly common, 16 bits are doable.

author: kizzap
author_rank: Unknown
timestamp: June 18, 2014, 05:07:41 am
content: Quote from: void_error on June 17, 2014, 07:38:25 pmTake a read ofthis website.Your ripple will be the peak voltage minus the lowest voltage that you can allow. It gives the rest of the information you need there, and gives you an idea of the minimum capacitance you need to ensure you have enough overhead.Quote from: void_error on June 17, 2014, 07:38:25 pmThe cores share the Ferrite core, the change of flux through one coil will be linked to the change in flux in the second coil. when the inductor takes the rail to the right level, the switcher collapses the field, thus dropping the output voltage. The net effect is, ignoring extreme mismatching loads, and losses in the inductor coils, the outputs track each other fairly well.Quote from: void_error on June 17, 2014, 10:13:53 pmUse a PNP transistor driven from the output of your op-amp, connect the output of the linear reg to the adjust pin via a 120ohm resistor (the regulator maintains a ~1.25V difference between those pins - the 120 ohm resistance provides your minimum output load), and then connect the adj pin through the transistor to your negative supply.I looked at using the pre-regulator as well for powering the op-amps. Pros: if you have a decent rail-to-rail op-amp it should be capable of doing what you need to do. Cons: Whatever noise you don't filter out of the rails could be coupled into the adj pin, and show on the output, thus destroying the ripple rejection.As for current measurement, do it just prior to the input of the linear regulator. The current both sides of it will be the same, however as you have overhead on the input, the voltage drop over your current sense resistor will not impact the output regulation.As an aside, be sure to have a look at the INL and DNL of your DACs. If you are not careful, you might not be able to get the full output range you want.

author: IanJ
author_rank: Unknown
timestamp: June 18, 2014, 06:04:44 am
content: Hi,Very similar to yours, my own design uses an LM2576 switcher for the pre-regulator. It's quite hard to completely remove all hint of HF noise getting through to the main psu outputs. You'll need everything from a good pcb layout, filtering and ferrites......albeit depends on just how far you want to go.Will be interesting to see how you intend to control the switcher output so that it tracks. It ain't so easy without causing some extra noise issues (I found anyways).DAC control of CV & CC (setting only) is great fun.......for info 10-bit is workable, but preferrably more. You always need more!Ian.

author: dannyf
author_rank: Super Contributor
timestamp: June 18, 2014, 10:21:25 am
content: QuoteThere are many ways to do it, but they typically follow the topology I used in that schematic linked above. The lm350 here functions like the mosfet in my design, with the control signal applied to the adj. pin of the lm350 / gate of the mosfet.The diodes / leds in my design are really the key. They effectively OR active low control signals from either the CC loop or the CV loop.In your case, you will have 2 - 3 loops, depending on your implementation:1) the resistive devider for LM350. As long as they are of sufficiently high resistance, you don't need to OR such signal. This is the default control signal - they will always be there.2) the CC loop: once the CC condition is reached, this signal goes low. It can be digital or analog;3) the CV loop: once the CV conditions are reached, this signal goes low. This can be digital or analog.2) or 3) can be combined. A digital implementation would be fairly simple, and if done via two LEDs, those LEDs also function as CC/CV indicators -> they light up when the corresponding conditions are reached / active.You will likely face challenges combining the resistive divider with the CV loop; and getting the CC loop to not oscillate too much.

author: void_error
author_rank: Frequent Contributor
timestamp: June 18, 2014, 11:53:13 am
content: Thanks for the tips, kizzapQuote from: IanJ on June 18, 2014, 06:04:44 amI did actually find your design just after I started this thread and borrowed a few regulator side things from it. However, I've done the tracking a bit differently.Quote from: dannyf on June 18, 2014, 10:21:25 amI'll probably have to place a cap somewhere in the constant current loop, although in simulation it seems stable.Here's the schematic of the main regulator. The values of L2 & C4 might have to be tweaked. The opamps are powered from an extra filter (R12 & C5) at pregulator's output. Hopefully this should get rid of some noise.The LM350 is set to 2.5V output. I'll probably use a PNP transistor to buffer the output of U4.1 as kizzap suggested. U4.2 handles the current limiting. The INA168 outputs 1V for each amp, so for 3A there will be 3V across R11.Can I make this any simpler?

author: dannyf
author_rank: Super Contributor
timestamp: June 18, 2014, 12:55:39 pm
content: QuoteI think so.1) I would build the thing without the pre-regulator first.2) LM350 can be replaced with a npn/n-ch device for higher current capability.3) u4.2 can be used to pull down the adj. pin directly - this isolates the CC loop from the CV loop.4) I would add a diode / led to u4.1's output. and use a led for d4 too.5) you will need to experiment this a little: I would reference the pre-regulator's ground to the output of the lm350. This makes the pre-regulator a floating design. See one of Jung's papers on this.

author: void_error
author_rank: Frequent Contributor
timestamp: June 18, 2014, 06:23:53 pm
content: I updated the schematic (and it's also bigger this time). It'll probably be the final version.The next thing that should be done is to figure out all the connectors going to the MCU board (pretty easy), but first the auxiliary power supply and there's a change here...It'll supply +12V @ 500mA (or thereabouts), -12V @ 50mA from another winding on the inductor which is fed into a -5V linear regulator (most likely a 7905).For the MCU and DACs (I also plan to use external ADCs to get the voltage and current readings) I'll probably use 7805s fed from +12V. I'd like to keep the analog and digital stuff separate.

author: dannyf
author_rank: Super Contributor
timestamp: June 19, 2014, 11:59:47 am
content: QuoteI am not sure if we are talking about the same thing. This is closer to what I was talking about.U3 and associated parts form your current sense amplifier.U2 (in the middle) is your CC control loop.U1 (on the bottom) is your CV control loop.The output from U1/U2 are OR'd by the diodes and applied to the regulator (M1) - it can be your LM350 if you want but I don't know why you would want that.V1/V4 are the power supplies.V2 controls the output voltage and V3 controls the current limit.The DC sweep on the bottom is for V2. As you can see, the minimum output voltage for the power supply is about 3v. As V2 goes up, the output voltage goes up linearly (determined by 1 + R3/R4), until such a point where the current limit kicks in (the current limit runs at 1V/1A, in the current setting).Room for improvement:1) A pre-regulator: a floating pre-regulator, preferrably similarly to Jung's implementation but with a DC/DC converter would be quite helpful here in reducing the power dissipation on M1.2) current sense amplifier: it needs an opamp with wide common voltage range and preferrably R2RI operation.3) error amps: needs R2RO opamps to extend the output voltage to near zero....

author: dannyf
author_rank: Super Contributor
timestamp: June 19, 2014, 12:17:38 pm
content: Forgot this: R1 can be replaced with a CCS.The LEDs ORing the signals from U1/U2 also double as indicator. They lite up indicating if the power supply is in CV or CC mode.The plot on the bottom is for V2 (CV source). As V2 increases, the output voltage increases until the current limit is hit (1amp). At that point, the power supply maintains a steady output voltage even if V2 continues to increase.

author: void_error
author_rank: Frequent Contributor
timestamp: June 19, 2014, 06:35:23 pm
content: Now I get it and how come I didn't think about that in the first place?Oh well...Using the LM350 because it's convenient. Also, the LM358 doesn't swing to the positive rail (only about 2V below, but that's good enough). It doesn't even have to swing to the regulator's output voltage (4V higher than the opamp supply, or above that if I used a NPN darlington instead of the LM350), only to V_OUT - 1.25V or VCC - 2.75V.The only problem might be how close the CC loop opamp swings to the negative rail at about 8mA sink current... the maximum output voltage should be 0.6 + 1.25 + V_LED (around 2V I think), but I haven't tested anything yet and haven't bought any of the parts. Could use a LM317 for testing purposes.Anyway, here's yet another schematic.edit: the dual LED idea is a good one. Might use a bicolor common anode one.another edit: another schematic, this time for the part that outputs the +12V, +5V & -5V needed. Let me know if there's something wrong.

author: void_error
author_rank: Frequent Contributor
timestamp: July 10, 2014, 08:32:42 am
content: Here are some updates on the project (for anyone interested):---> Almost finished the digital part including programming:---> using a PIC16F887 (44pin TQFP44 package, dirt cheap, less than $3)---> MCP3208 12bit 8 channel ADC with SPI interface for the reading the linear regulator output voltage, linear regulator output current, linear regulator input voltage and heatsink temperature---> 2x MCP4921 12bit DACs with SPI interface as the linear regulator's voltage references, their Vref set to 4.096V, TL431 voltage regulator---> MAX7221 8 digit multiplexed 7 segment LED display driver with SPI interface for displaying the output voltage and output current, each of them on 4 digits and/or some stupid message if I wish---> 20x4 character LCD display for all the other stats like set voltage, set current limit, output power, linear regulator power dissipation and heatsink temperature---> 2x 2 bit Gray Code rotary encoders for setting the output voltage and curent limit---> two pushbuttons, one sends the settings to the DACs, the other one cancels the new settings and reverts to the previous ones---> output enable switch (probably independent of the micro)If you're wondering why I haven't used the LCD to display everything it's because the characters are not readable at a glance if I'm further than one meter.---> Design changes to the regulator part---> swapped the LM350 for a NPN darlington pair fed by a current source---> ditched the -5V rail---> using an LT1013 instead of the LM358 because it has lower offset---> since the +5V rail will have to output the highest current now (most of it used to light up the LED displays) it'll be using a LM2596---> +12V fan supply will be a 7812---> 78L05 fed from the 7812's output will power the DACs and ADCI'll be left with 4 unused channels on the ADC so I have an idea...Why not use them to measure external voltages via some probes? Might be handy. I'll obviously use an opamp buffer between the input and ADC with some additional protection circuitry.Post any opinions or suggestions below.

author: robimarko
author_rank: Regular Contributor
timestamp: July 10, 2014, 10:35:42 am
content: Can you post new schematics

author: extide
author_rank: Regular Contributor
timestamp: July 10, 2014, 05:01:18 pm
content: x2 I would love a full set of schematics. Seems like a fun project, and I could definitely use a bench PSU! I have some stuff laying around as well...

author: akis
author_rank: Frequent Contributor
timestamp: July 10, 2014, 06:46:23 pm
content: Some random thoughts:I have made 3 different versions of bench PSUs, both working on my desk, except the very first ones whose diodes melted everything around them. They are 0-30V/5A with 2 channels each (total 4 channels).The second version uses pairs of LM2679s (5A) to produce 3-6V over the required voltage and then followed by a linear regulator using two FETs to determine current limiting and voltage (one for each). Because of the LM2679s it runs very cool.I also have one wire (should have two) running all the way to the load to sense the voltage so that it stays good under large currents. The wire is soldered on the same crocodile clip as the power output so it is not messy at all.I added an ammeter from ebay at the output which has its own sense resistor, but that is a bit of a waste because I already have my own sense resistor for the current limiting circuitry. It would be more efficient to use one resistor only.There is also a linear version without the LM2679s and it gets very hot, so there are 5 fans in there controlled by another circuit, and thermal shutdown. The linear version produces very clean output especially at high currents (all the way over 5A) whereas the LM2679 introduces some noise spikes.

author: void_error
author_rank: Frequent Contributor
timestamp: July 10, 2014, 07:23:27 pm
content: Quote from: akis on July 10, 2014, 06:46:23 pmI was kind of forced to go with 20V 3A output mainly because of budget constraints. I've done the math and had to stick with a rather cheap (don't read crap quality) and readily available 24V 100VA transformer. The higher voltage transformers (would need a 36V one for 30V output) were significantly more expensive for the same VA rating. On the other hand, I still have two transformers taken out of an old Epson printer, one is about 30V @ 1A min, the other one about 10V @ 2A and I will use them for a second lab PSU. For this one however, the higher output current was more important.I was thinking about the feedback wires being separate to counter the voltage drop from the regulator output to the output plugs. PCB layout should be carefully done to avoid ground loops and other nasty stuff, especially since this design will probably use about half a dozen boards, the reason being my current lack of gear to make PCBs larger than about 5cm by 10cm at home, currently single layer only, and it's too expensive to have them made elsewhere (even locally) in one-off quantities.As for the switching noise and the ripple rejection (the LM2596 runs at ~150kHz), I'll go brute force and use LC filters at the input of the linear regulator. It was cheaper for me to use a smaller heatsink and a switchmode pre-regulator than have to get rid of 60+ watts of heat.Quote from: extide on July 10, 2014, 05:01:18 pmI'll have to warn you though, if you want to build everything yourself, especially the digital control part, you'll need a bit of experience to get everything right.The analog part, however, is pretty simple and it can work with analog controls (pots) and that was the initial idea, but then it all went south...As for the fun part, every project attempted with a certain level of complexity will have its ups and downs.To get an idea you could look at Ian Johnston's design, from which mine borrowed a few ideas. Also, since I haven't prototyped anything yet, none of the schematics posted so far are guaranteed to work perfectly or even work at all without some small tweaks (no matter how well you do the math, real world physics can and somethimes will always be one step ahead of you).

author: dannyf
author_rank: Super Contributor
timestamp: July 10, 2014, 07:30:30 pm
content: If you don't need very high voltage, you can start with a laptop power supply: about 20v, a few amps, light weight, and compact.

author: mariush
author_rank: Super Contributor
timestamp: July 10, 2014, 07:38:41 pm
content: ---> +12V fan supply will be a 7812suggestion.. use something adjustable, cheap and easy to vary voltage between something like 8v and 12v (add a thermistor in the adjust loop for example). Keep voltage above the 5v regulator + whatever voltage drop it has.---> 78L05 fed from the 7812's output will power the DACs and ADCYou're kidding. 78l05 is 100mA max and in a package that's not very good with heat. 12v in , 5v out.. you're looking at 20-30mA before it burns.Use something like 1117 (as common as 7805) if you want lower voltage drop... 1117 can do 5v @ 0.75-0.8A with about 1.1v voltage drop.

author: akis
author_rank: Frequent Contributor
timestamp: July 10, 2014, 08:12:22 pm
content: Quote from: dannyf on July 10, 2014, 07:30:30 pmI have done that. Not very successfully. I went and bought about a dozen laptop adapters from ebay, 19V-20V, 75W, and discovered with horror that they are very nasty. I also posted a thread here on this board. I put 2 * 19.5V in series to make 38V, they cost around £8 each, much cheaper than transformer. The problem is what comes out the output, namely huge voltages due to the Y2 capacitor, earth wire connected to V- for almost all of them except a very few and other nasties.

author: void_error
author_rank: Frequent Contributor
timestamp: July 10, 2014, 08:16:25 pm
content: To be honest, I have put a bit of thought into that, and I actually worked as a laptop technician so I know what's in them, but since I'm also an EE student and a future electronics engineer and I have a 'knack' for designing and building stuff I went with a homebrew design. Also, electronics has been a hobby of mine for the past decade so I think I know what I'm doing. I just thought I'd share a bit of my knowledge for the help I got on this forum and I dare say it's one of the finest I've come across so far.Quote from: mariush on July 10, 2014, 07:38:41 pmThe microcontroller will handle the fan control, it'll be either ON or OFF. Although it'll probably be overkill, I want an extremely reliable power supply.The bulk of the current will be on the +5V digital rail, to power the MCU, the LED displays and the character LCD display, and as I stated, It'll be a step-down switchmode regulator capable of 3A continuous output, bolted onto the same heatsink as the switchmode pre-regulator and the linear regulator.The ADC (MCP 3208, 500uA max @ 100 ksps) used at less that 100 sps and DACs (two MCP4921s, 700uA x2 + less than 2x500uA -> 2x10k output resistors to ground) which will have the data sent to them only when I push a button to apply the selected voltage and current limits (4V & 3V respectively) will be powered from a separate +5V rail and the total current draw will be tiny, less that 10mA average, so a 78L05 will be sufficient.If I remember correctly I have a few dead PC motherboards with 1117s still working on them and all the necessary equipment to take them off and still have them in working condition. I also have a leftover brand new 78L05 in a SOT-89 package (I might have got that wrong), so I might use that.Quote from: akis on July 10, 2014, 08:12:22 pmI'm absolutely disguisted by those cheap pieces of junk, had about half a dozen of those fail in the first few minutes after being taken out of the box and powered up.

author: akis
author_rank: Frequent Contributor
timestamp: July 10, 2014, 08:34:58 pm
content: I do not know why you cannot make larger or two sided boards. I have little more than an old tile cutter and some plastic tubs and regularly make two sided boards. Today I am making a two sided board 210 x 135mm, it did not fit well in the small tubs so now it's etching in a bigger one in the oven at 50 C.I could make a couple of boards for you, it's not that hard, as long as they are smaller than 20 x 15.Drilling is the most laborious job however.

author: void_error
author_rank: Frequent Contributor
timestamp: July 10, 2014, 08:50:42 pm
content: Quote from: akis on July 10, 2014, 08:34:58 pmMy photoresist drying box is made out of junk parts (free stuff) and I couldn't find a larger flat alu plate and adequate power resistors so I ended up having a 60mm x 120mm temperature controlled heating surface made out of two socket A copper CPU cooler baseplates soldered together using a heat gun. I'll probably build a larger one in the near future. So far I managed to make 0.4mm thick traces with less than 0.1mm spacing reliably. I'll mostly use SMD components because they're cheap and I don't have to drill so many holes.If I'm going to make two sided boards I'll have to find a way to plate them and I've seen a few methods on youtube which seem to work and use readily available chemicals. I'd have to drill the holes perfectly perpendicular to the board though and I have yet to find a reasonably priced stand (or whatever it's called) for my dremelSending stuff from Western Europe the where I live wouldn't be worth the money. Shipping is ridiculously expensive for no apparent reasons, even via snail mail.

author: akis
author_rank: Frequent Contributor
timestamp: July 10, 2014, 09:18:56 pm
content: You're using much finer resolution and tolerances and different methods to me. I am at 0.7-0.8mm tracks and spacings and have not tried to go lower. I use the very old fashioned method : photo-resist, UV exposure, development, etching, drilling. The only "heat" required is during etching and I do that by boiling the kettle

author: akis
author_rank: Frequent Contributor
timestamp: July 10, 2014, 09:37:56 pm
content: I bought this off ebayhttp://www.ebay.co.uk/itm/UV-Exposure-Unit-for-Hot-Foil-Pad-Printing-PCB-etc-/290496322574?pt=LH_DefaultDomain_3&hash=item43a2ee1c0eit arrived squashed, bent, broken glass, but it works (after I repaired it).The UV tubes are not great, they have developed black patches neat the edges so if the PCB is too wide it will not expose properly near its edges.I am now buying new UV tubes to replace the old ones.

author: void_error
author_rank: Frequent Contributor
timestamp: July 10, 2014, 10:07:39 pm
content: Quote from: akis on July 10, 2014, 09:18:56 pmI use the exact same method. The photoresist is POSITIV20, and it says in the datasheet that for higher detail it has to be dried at 70C for 15 minutes.Here's some stuff I made. The DIP14 IC is a LM324.I got a 5m 12V UV LED strip from ebay for about $25, put 48 of them in a box, works like a charm. The whole thing cost me $30. The tiny PCB with a SOT23-6 and 0805 passives is my latest creation. 5V @ 50mA from a single AA alkaline cell

author: akis
author_rank: Frequent Contributor
timestamp: July 11, 2014, 08:30:51 am
content: Do you have a close up picture of the UV box you have made? How far can you bend/twist those UV light strips, I presume you have made a serpentine shape?

author: void_error
author_rank: Frequent Contributor
timestamp: July 11, 2014, 08:45:52 am
content: Didn't bother bending it, used a PCB with some grooves cut for the power rails. Oh, and some black Duct Tape

author: akis
author_rank: Frequent Contributor
timestamp: July 11, 2014, 10:33:38 am
content: So you bought a UV LED strip, cut it into strips of the right length and mounted it on a PCB with simply a V+, a V- and a polarity diode? Is that all?Do you not have a glass panel to place the artwork and the PCB and something spongy to push everything down tight?

author: Zepnat
author_rank: Regular Contributor
timestamp: July 11, 2014, 10:51:54 am
content: Hi, I've not read this thread but saw LM2596 mentioned and had to throw my two pence in. My experience is DO NOT buy them from china as they are weak and nothing like the genuine ICs.I've bought 20 ICs and two regulator boards from ebay and aliexpress sellers and they have all exploded under test. Yes all 20 went bang.So I bought an IC from CPC in the U.K. and it's indestructible.In my experience if you've got a lm2596 from china any more than 1A out and 20v in, you are pushing your luck.Plus they only run at 50Khz, the real lm2596 runs at 150khz I don't know how you can fake a IC but they're rubbish.

author: akis
author_rank: Frequent Contributor
timestamp: July 11, 2014, 11:04:20 am
content: I have bought a bagful of thesehttp://www.ebay.co.uk/itm/5pcs-LM2596S-DC-DC-Buck-Converter-Adjustable-Power-Supply-Step-Down-Module-UK-/141210161794?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item20e0c81282I have blown up 3-4 of them, unfortunately, and have pulled 2A out of them before they start to buzz, what's fair however is they do say they need a cooler for over 1A.

author: void_error
author_rank: Frequent Contributor
timestamp: July 11, 2014, 11:53:32 am
content: Quote from: akis on July 11, 2014, 10:33:38 amThat's pretty much it.I'm using regular printer paper and make it transparent to UV with Transparent21 spray since I found out it works better than using overhead transparencies, especially because my printer sucks at printing on those (5 years old). I then put a piece of 2mm thick glass onto the coated PCB to keep the paper nice and flat, toner side down.I'm going to need a flat surface inside the box to put the PCB on, but I'm too lazy to come up with something so I'm using an old HDDQuote from: Zepnat on July 11, 2014, 10:51:54 amI'm getting most of my parts from herehttp://www.tme.eu/en/Some of them are more expensive than elsewhere but I won't get ripped off.I usually order them via my local parts shop, but only if I need small quantities and everything is less than $30.For this project though, since shipping is $7 and parts arrive in 2-3 days, and all the components I need cost about $70 I'll go for a direct order as it'll be the cheapest way, the local shop will be more expensive.

author: Zepnat
author_rank: Regular Contributor
timestamp: July 11, 2014, 11:55:07 am
content: Cooling them doesn't seem to make any difference, I tried soldering to a brass plate which was screwed to a heat sink but they still went bang.While the genuine IC with 40v input and a 12v 55w bulb on the output and no heatsink, just cycled the output as the thermal protection cut in and out.

author: void_error
author_rank: Frequent Contributor
timestamp: July 12, 2014, 03:44:41 pm
content: Just got to the part where I have all the main blocks figured out. Don't ask me why I have so many boards just yet.---> Rectifier + Filter board---> Regulator board - with all the power stuff + ADC & DAC---> MCU board - with a PIC16F887 and some glue logic---> Interface board - LCD display, 7 segment displays, controlsNow my question is regarding the feedback from the output plugs.Should I separate the ground on the regulator board in two and tie them up at the output ground (negative terminal), and run a separate feedback wire from the regulated output terminal (positive) back to the board?I suppose it should improve regulation.

author: akis
author_rank: Frequent Contributor
timestamp: July 12, 2014, 03:53:25 pm
content: What is in between the regulator board and the output jacks? Should not be very much.Sampling the voltage right at the output socket is a good idea you can do it with a 100k resistor. Then you can also sample the voltage right on the load via say a 2 k resistor. When the two voltages differ due to power loss on the wires the 2k resistor wins. Ideally you would also have a ground wire yo sample voltage at the load and a differential amp.

author: void_error
author_rank: Frequent Contributor
timestamp: July 12, 2014, 04:06:10 pm
content: I'll post a schematic in a short while, I'm currently working on it.Edit: ...and here it is.V_FB will be tied to V_OUT at the positive output terminal.AGND will be tied to PGND at the negative output terminal.

author: void_error
author_rank: Frequent Contributor
timestamp: July 24, 2014, 07:28:33 pm
content: I have finally breadboarded and tested the whole thing.No magic smoke has been released during testing.Unfortunately I couldn't get rid of the negative supply so I used a voltage inverting charge pump made up of a MC14584 hex schmitt trigger inverter, two 10uF caps and 2 1N4148s, running off the 5V rail. The output is only about -3.3V but that's enough because it only supplies is the base current for the two PNP transistors via the LM324 and 2 10k resistors.Everything is really stable with only some 100nF decupling caps across the supply rails and output. I guess the breadboard's parasitic capacitances play a role here...Haven't used the INA138 for current sensing, used a quarter of the LM324 as a differential amp and set the current limit to about 1A max. For the pre-regulator I used a LM317 with a TL431 as a temporary solution, everything bolted onto a rather beefy heatsink I took out of an old server power supply.This is likely to be the final version and at the time of writing I was too lazy to redraw the schematic (It turned into a mess after I changed my mind about half a million times).Now, for the good stuff: a pic of the test rig

author: void_error
author_rank: Frequent Contributor
timestamp: July 28, 2014, 10:00:01 am
content: I finally got to the part where I design the PCB and look for parts. All fine until I get to the inductor selection part.Should I use a ferrite core inductor or a powdered iron core inductor?As far as I know from the LM2596 datasheet they should both work, although with a low loss core like ferrite ringing may occur when the regulator is operating in discontiuous mode, which will be most of the time, since I will rarely use it near it's nominal output current.Also, the duty cycle will go up to 100% (at max output voltage and output current) which means the inductor will have to pass DC without saturating.Damn it... I'm stuck.

author: dannyf
author_rank: Super Contributor
timestamp: July 28, 2014, 11:02:24 am
content: -LM324-it has a pnp input stage if I recall correctly. That means that it can swing to with 100 to 200 mv of the negative rail. Coupled with vbe or vgs of the regulator, it means that you don't need the negative voltage generator, unless you have to swing to 0v output.it also works well as the current sensor here.I would also use a pnp here in the current sense amp.

author: void_error
author_rank: Frequent Contributor
timestamp: July 28, 2014, 12:06:49 pm
content: Tested with both the negative rail and without it. Without the negative rail the series pass transistor doesn't turn off completely therefore CC mode doesn't work properly when I short the output (made sure nothing blows up by using the LM317 as the pre-regulator), since there is still base current flowing.Anyway, the final schematic minus a few caps which I'm not sure are absolutely necessary (so they're not in there) and the board interconnects is this one:The 560uF caps are Nichicon PW series low impedance low ESR. I went SMD where it was possible and/or cheaper/convenient. Still no idea about the inductor... I guess I'll have to slap together a pre-regulator using a TL494 and scope the damn thing. If it works with powdered iron core inductors I'm using those, Although since they have lower AL, they would require more turns per uH and therefore will have higher series resistance or be larger in size at the same resistance and inductance values.Changed the LM324 for a higher precision OPA4277.

author: extide
author_rank: Regular Contributor
timestamp: July 28, 2014, 08:50:53 pm
content: Cool, will keep an eye on this!

author: akis
author_rank: Frequent Contributor
timestamp: July 28, 2014, 09:47:28 pm
content: How will the OPA4227 sense the current when it cannot sense up to V+? You'd need a Jfet op-amp there no?

author: dannyf
author_rank: Super Contributor
timestamp: July 28, 2014, 11:48:06 pm
content: Because of the voltage over the adjuster, the common mode signal on the current sense amplifier will never swing to the opamp's positive rail.Jfet-opamps, due to their inability to swing close to either V+ or V-, are not a good choice here.

author: mikerj
author_rank: Super Contributor
timestamp: July 29, 2014, 07:35:41 am
content: Quote from: void_error on July 24, 2014, 07:28:33 pmGot to be one of the neatest breadboard constructions I've seen in a while

author: void_error
author_rank: Frequent Contributor
timestamp: July 29, 2014, 11:33:00 am
content: Quote from: akis on July 28, 2014, 09:47:28 pmV+ will always be about 4-5V higher than any of the inputs since it's supplied from the tracking pre-regulator's output. I have read the OPA4277 datasheet a dozen times before choosing it. However, I've only tested the PSU with the LM324 because I had half a dozen lying around.Quote from: dannyf on July 28, 2014, 11:48:06 pmAnd even if the output is shorted the inputs will be 3.3V above V-.Quote from: mikerj on July 29, 2014, 07:35:41 amThanks! I preffer keeping breadboards neat and tidy, although more time consuming than quick and dirty setups, but it saves a lot of time when modifying it. Also, it doesn't fly apart if you sneeze on it.Another thing... D6 & D7 are there to prevent excessive reverse VBEvoltages on Q4 and Q6. Used red LEDs on the breadboard because it was more convenient than probing around with a voltmeter.U4.3 will be used to buffer the voltage at U4.1 IN- for the ADC voltage sense channel. The current sense voltage will be taken directly from U4.4 without a buffer. I should probably use some resistors with zeners to limit the ADC input voltages to less than 5V just in case something goes wrong. 4V7 zeners should do.Apart from that I changed my mind yet again regarding the display part. I'm going for a 128x64 graphical LCD and getting rid of the LED displays and character LCD. It does save me some money but I'll have to write my own libraries since I haven't found any for XC8 or C18 or hi-tech C that suit my needs. I hope everything fits in a PIC16F887...

author: mariush
author_rank: Super Contributor
timestamp: July 29, 2014, 12:09:08 pm
content: PICs aren't that expensive.. you can easily move to another one or use a second PIC just as a LCD controller.I've used pic16f1519 in a project recently... 28 KB of flash.Why didn't you use one 0.1ohm 7w resistor or 3 0.33 ohm 7w resistors instead of those 10 1ohm resistors? They're cheap... seems such a waste of pcb space and bad thermals.

author: void_error
author_rank: Frequent Contributor
timestamp: July 29, 2014, 12:22:22 pm
content: Quote from: mariush on July 29, 2014, 12:09:08 pmIf the code doesn't fit in a 16F887 I'll choose another one. The code I wrote so far is easily portable to any 8bit PIC MCU.(0.1ohm)x(3A)2=0.9W which is not that much. Only 90mW on each resistor.I wanted to use 1% tolerance so I wouldn't have to use trimpots. SMD1206 ones occupy less than a 7W wirewound resistor.Actually, I'll test one SMD1206 resistor at 100mW to see how hot it gets. If everything's ok I'm going to use thesehttp://www.tme.eu/en/details/hp06-1r1%25/1206-smd-resistors/royal-ohm/hp06w2f100kt5e/.EDIT: Tested a SMD1206 resistor at 0.15W and it's cold enough to touch, actually I couldn't notice any significant change in temperature. 7W would be triple overkill.

author: mariush
author_rank: Super Contributor
timestamp: July 29, 2014, 01:06:46 pm
content: Be careful with those, as they don't say the temperature coefficient. Being thick film, they're probably 200ppm/C so the resistance will change a lot with temperature increase, which will definitely happen at 100mW dissipated in each smd resistor out of 10, which will all sit close together, radiating heat.You could go for example with one of these:http://www.tme.eu/en/details/ax5wv-0r1/5w-wirewound-resistors/royal-ohm/prm05wjw10kb00/#25mm tall, 10mm wide ... not that big.The temperature coefficient is worse at 400ppm/C but being 5w rated they'll heat much less especially considering that 0.9w seems to be worst case scenario and that you could potentially put a to220 heatsink on it or glue it on the large heatsink for the transistor (though not recommended). And you can use thicker traces on the pcb instead of being forced to use thinner traces (so you could solder the 1206 smd resistors).If you check the datasheet, you will also have a couple of graphs showing how much the temperature will go above ambient with various loads.Now of course, there's also another drawback - being wirewound there may be some inductance there but I doubt it's going to be a problem

author: void_error
author_rank: Frequent Contributor
timestamp: July 29, 2014, 01:49:49 pm
content: I know those resistors, unfortunately they're only available in 5% tolerance only, so as I've said, I'd have to use a multi turn trimpot to calibrate the damn thing, 5% way too high.The PCB traces will be quite thick anyway, at 2mm, which is adequate for 3A maximum current.

author: dannyf
author_rank: Super Contributor
timestamp: July 29, 2014, 05:46:32 pm
content: QuoteAny alternative would be to use the PCB trace as the current sensor.

author: akis
author_rank: Frequent Contributor
timestamp: July 29, 2014, 10:06:26 pm
content: Hmm, I use thishttp://uk.farnell.com/jsp/search/productdetail.jsp?SKU=2328369and thishttp://uk.farnell.com/jsp/search/productdetail.jsp?SKU=2328368

author: akis
author_rank: Frequent Contributor
timestamp: July 29, 2014, 10:34:15 pm
content: Quote from: void_error on July 29, 2014, 11:33:00 amOK, I am officially confused. I will explain why I made this comment. On the schematic you show the op-amp being powered by "VCC". Through a 10R resistor which might drop say 50mV. Now the next component is the pass transistor, looks like a darlington pair. Obviously to open this transistor up fully we need 1.2V over the rail. That should be one consideration. Of course I have no idea what Vcc actually is and what the max output requirements are. Now assuming we need max voltage on a small load, there will be no voltage drop on the pass transistor and then we hit the current sense resistors. We know the op-amp cannot "sense" that high, it needs a few volts off Vcc at its best. Else it may, probably will, invert. So the question is how sure are we that the pass transistor, that actually controls the output voltage, always, but always (under any settings and any condition, drops at least 2 V - at worst ?Another thing : in my transistorised PSU design I used a complimentary pair - a MJE15028 bypassed by a MJL1302A. The pair is driven via a 2.2K resistor straight from the op-amp, nothing else, no other transistors or anything. And for current control like you I use a BC337 to short the base of the MJE15028, where the BC328 is driven by the current sense op-amp. I only drop 0.6V at the pass transistors. My op-amps are powered by almost double voltage (two diodes two caps off of the main transformer). But I do not need negative voltages anywhere.As an improvement, since the PSU should be floating, we could actually place the sense resistors at the V- lead. That way sensing the voltage can be done by any "single supply" op-amp (eg MC33072) without "extra" Vcc and does not require a differential circuit, since we are already referenced to "ground".I would also suggest placing a strong diode at the output to prevent damage to the PSU or the components (imagine you plug in another PSU or a battery for example). With a power Schottky you'd be sacrificing Iout * 0.5 Watts. As you are sensing output voltage anywhere you like, even right at the load, it is not going to cause regulation issues.I would also suggest a relay to take the load "off load" when power is lost and at the press of a button, so that you can adjust the voltage as you wish while the load is off, and if you ever have multiple PSUs in the same enclosure/supply, you would not need to switch the whole damn thing off just to take one of the loads "off load".Finally, a very useful feature which I do not have, but you have MCUs so I presume you can do what you like, is the "slave" mode, where one PSU "follows" the settings of another so for example when you have symmetrical supplies, you only adjust one button.

author: dannyf
author_rank: Super Contributor
timestamp: July 29, 2014, 10:51:27 pm
content: QuoteNear 100%,.The opamp's output can swing to, at max, Vcc. Usually less than that, depending on the opamp used / output topology - an opamp with an emitter follower for example will only swing to 0.7v at least to Vcc.Assuming that's the case, the darlington itself will drop another 1.3-1.4v, more under heavily load, so the emitter of the darlington is likely 0.7v + 1.3v = 2.0v, at least, lower than Vcc / the darlington's collector.If you factor in the darlington's base current, the drop is even more.The calculation can be repeated if the output is on the emitter of the output device: in that case, the voltage drop is likely lower.QuoteIt requires the opamp to be able to swing to its negative rail. In a single supply case, that's actually worse than the high side sensing.QuoteA better implementation is to use a device to pull the base low -> that can be done with a mcu + npn transistor, or spare opamp, or an optocoupler, etc.It also allows soft start, or one-button on/off, in conjunction with a mcu.QuoteWith a mcu, a tracking supply is fairly easy to implement.

author: akis
author_rank: Frequent Contributor
timestamp: July 30, 2014, 12:01:43 am
content: If you pull the base of the pass transistor low, your output voltage drops to 0, and your mounted Voltmeter shows 0. If you have a relay, not only is the load safely isolated, but also, your Voltmerer shows the selected voltage which will be applied as soon as the relay opens (excepting bad regulation of course).

author: IanJ
author_rank: Unknown
timestamp: July 30, 2014, 12:29:35 am
content: Quote from: void_error on July 29, 2014, 11:33:00 amThat'll be interesting as thats what I used in my PSU design (Arduino based). I'm not sure what your thoughts are here but it's the font generation/storage that requires a lot of memory. I used U8GLIB with SPI interfaced 128x64 LCD's. The more font sizes you use, the more you need to accomodate for in flash.Ian.

author: void_error
author_rank: Frequent Contributor
timestamp: July 30, 2014, 10:17:54 am
content: Quote from: akis on July 29, 2014, 10:34:15 pmVCC is just the name of the pre-regulator output net, I was too lazy to make more custom compoents in DipTrace. VCC will always be 4-5V higher than V_OUT, so the emitter of Q5 will be 300mV higher than V_OUT at 3A, that means the maximum base drive voltage required will be V_OUT+0.3V+VBE(Q5)which is V_OUT+1.8V.I'm probably going to use a relay controlled by the MCU to switch the output on/off, it will also be off at power-up. Haven't decided yet.Quote from: dannyf on July 29, 2014, 10:51:27 pmThe REF_V and REF_I voltages come from DAC outputs so I have a lot of options here.Quote from: akis on July 30, 2014, 12:01:43 amTrue, but I have a trick up my sleeve. I won't be using a regular panel voltmeter/ammeter but the MCU paired with an 8-channel 12bit ADC to get the voltage and current and display them on a 128x64 (or 128x128) graphical LCD, along with the set voltage and set current limit, so even if the output is off I will know the voltage and current settings.Quote from: IanJ on July 30, 2014, 12:29:35 amUsually PIC code occupies less than Arduino code so I might get away with 8k or 16k program memory.Updated the schematic yet again...

author: dannyf
author_rank: Super Contributor
timestamp: July 30, 2014, 10:33:13 am
content: QuoteThis is where a high Vbe / Vgs output device is more desirable here: it allows you to pull the output to 0 without a negative power rail.

author: void_error
author_rank: Frequent Contributor
timestamp: August 03, 2014, 01:26:03 pm
content: Since the power supply part has been pretty much dealt with I've been working on the digital part for the last week or so.The problem is that I ran into some issues regarding the ADCs and I have an idea.Practically, a 12 bit ADC like the MCP3208 which I intend to use has a usable resolution of about 10 bits due to the INL, DNL and gain errors which is not enough for a 1mV resolution in the 0-4.096V input range and I want a 4 digit readout on the LCD.One workaround would be to split the voltage to be measured in half and use the pseudo-differential input capability to get 12 bits for each half of of the input voltage.However, this makes the measurement error worse because it puts the ADC errors just above half the input voltage which is a bad thing.I've found a workaround for that as well by ignoring the error LSBs which is easy for the lower half ADC but not that easy for the upper half. The solution is to overlap the upper half and lower half voltages so the upper side error is in the lower side measurement range thus it can be ignored.Basically I can get double the resolution with this method. That is 16 bits by using 8 bits of each ADC. Another thing to watch out for is the delay between the two conversions, that can add some errors too but it might not be a problem since the MCPs I'm using can go up to 100ksps (at 5V supply), the inputs will be low-pass filtered anyway and SPI is quite fast.Will this work? Any ideas/suggestions/opinions are welcome.

author: dannyf
author_rank: Super Contributor
timestamp: August 03, 2014, 02:34:17 pm
content: QuoteThat kind of "precision" may not be meaningful in this set-up. You will find out that when driving a dynamic load - a mcu, a digital circuit, a class B amp, etc. - this type of power supplies will always oscillate. The degree of oscillation will vary from design to design, or from build to build, or from load to load.It is a lot more important to get the circuit to stablize, or to minimize the zone of oscillation.

author: void_error
author_rank: Frequent Contributor
timestamp: August 03, 2014, 03:17:46 pm
content: I know the output will vary with fast changing load currents because the feedback loop has a limited bandwidth.The previous idea won't work.

author: void_error
author_rank: Frequent Contributor
timestamp: August 10, 2014, 01:00:18 pm
content: Here's a little update (for absolutely no reason).Finally managed to figure out how the whole thing should look like after the final assembly.This multi-board design should be rigid enough.In the meanwhile I've been fiddling with the digital part. A few details below.1x MCP1541 4.096V reference1x PIC16F887 MCU with the following peripherals:2x MCP3551 22-bit ADC for reading output voltage and current1x MCP4922 dual 12-bit DAC1x MCP23S08 8-bit I/O port expander for the front panel controlsThere still is quite a lot of work to be done on the code and PCB layouts. I'll probably use pin headers as board interconnects where possible.I'll use a relay for output switching as akis suggested.Leave your opinions below

author: akis
author_rank: Frequent Contributor
timestamp: August 10, 2014, 01:19:45 pm
content: Why do you need such a big fan I wonder? I thought the whole idea was to use the LMxxxx switchers so that there is very few watts, if that, consumed?

author: void_error
author_rank: Frequent Contributor
timestamp: August 10, 2014, 01:29:23 pm
content: The fan's only an 80x80mm one and it's only going to turn on if the temperature inside the case or the heatsink temperature exceeds a preset value. It'll also cool the mains transformer and move the heat away from the filter caps.I've done the math for the power dumped into the heatsink for the worst case scenario and it's around 25W. That's about 4W on the bridge rectifier under full load, 5W on the LM2596 and 15W on the series pass transistor.Most likely I'll use the same approach for a second, higher power bench PSU, something like 30V @ 5A with the same layout.

author: mariush
author_rank: Super Contributor
timestamp: August 10, 2014, 02:17:16 pm
content: I don't like the way you put the heatsink and fan... it would make sense to have the fan above the heatsink, pulling air from the bottom of the case or the sides though the heatsink fins and pushing the hot air out.I would screw the power devices onto the heatsink and then screw the heatsink onto the back of the case (if it's metal), this way the case itself would also act as heatsink, potentially making fan not needed at low power dissipation. I don't quite like how the power devices are supposed to be attached to the pcb and the heatsink and have the spacers there as well, seems like difficult to service if there's a problem, and there may be a problem with solder joints from fan vibrations or just accidental knocks of the power supply.Why make three boards when you could maybe compact everything into one or a couple of boards?Do you really need an 8 bit port expander? Maybe you could use a simpler shift register for some stuff (like sending data to lcd display for example). I would just go for something more powerful and with more IO pins, like... maybepic16f1947Yes, it's surface mount, but TQFP-64 is easy to solder and there's cheap tqfp to dip on ebay if needed, for examplehere.

author: dannyf
author_rank: Super Contributor
timestamp: August 10, 2014, 02:18:35 pm
content: QuoteWhen the output voltage is low and output current is high, the linear adjuster portion of the circuit will dissipate tons of heat. Thus the fan.The existing design essentially replicated a low-power laptop power supply via the switching regulator - I think you are far better off just use a spare laptop power supply in lieu of it.If you are going to use a LM2596 or the likes, two ways to reduce the power dissipation on the linear regulator:1) configure the LM2596 as a pre-regulator so the linear regulator has a constant voltage drop over it -> the output of the LM2596 tracks that of the linear regulator;2) apply feedback on the LM2596 so its output is no longer constant.

author: void_error
author_rank: Frequent Contributor
timestamp: August 10, 2014, 03:12:37 pm
content: Quote from: mariush on August 10, 2014, 02:17:16 pmThe fan will pull air in from the bottom and push it towards the back of the case through the heatsink's fins and past the transformer. BTW, that's a rough sketch of how everything will be slapped together. The case will be metal and the heatsink will be attached to the bottom of the case. Actually I intend to bolt the whole assembly down using 4 screws (maybe 6, 2 for the front panel). I'll make sure everything is vibration-proof.Quote from: mariush on August 10, 2014, 02:17:16 pmIt'll make testing/troubleshooting a lot easier and currently the largest board size I can currently make at home is 60x120mm. I also like to keep things fairly modular so if I want to build another similar but slightly different power supply I don't have to do too much PCB redesigning.Quote from: mariush on August 10, 2014, 02:17:16 pmThe control boards (with the knobs and buttons) will be a separate board. With a serial I/O expander I get additional interrupt capabliity (I'll be polling for buttons changes 100 times a second) and only 6 wires are required for SPI including +5V and ground. After all the pin assignments I'll be left with 2 pins to be used as chip select for future expansion modules.Also, since I'm not a microcontroller expert yet, I'll keep things simple and use a dumber MCU. At some point I was thinking of using a PIC18F18xx for its USB connection.Quote from: mariush on August 10, 2014, 02:17:16 pmI'm already using a TQFP-44 package for the MCU and SO for all the other ICs to avoid the tedious task of drilling dozens of holes.

author: mij59
author_rank: Frequent Contributor
timestamp: August 10, 2014, 03:27:14 pm
content: Quote from: void_error on August 10, 2014, 03:12:37 pmIf there's not enough space between the fan and the bottom the fan will be noisier.You can't stack an other item on top of the power supply.May be you can use it as coffee warmer, but be careful, don't spill the coffee!

author: void_error
author_rank: Frequent Contributor
timestamp: August 13, 2014, 10:07:08 am
content: Looks nobody got the idea so I made another sketch.Arrows indicate airflow. All the connectors have been omitted for the sake of simplicity. The boards are green, the white rectangles are cutouts, the black rectangle is the fan.Everything can be removed by unscrewing a bunch of screws which will make servicing easy.

author: miguelvp
author_rank: Super Contributor
timestamp: August 13, 2014, 05:59:16 pm
content: Quote from: void_error on August 13, 2014, 10:07:08 amOf course they got it.But you didn't answer the clearance question from the bench to the case.And you didn't answer the concern about the stackability of your design. If on top of a hot device air will be preheated before entering your case and even if you decide to reverse the flow then it will heat the device under it.

author: akis
author_rank: Frequent Contributor
timestamp: August 13, 2014, 06:22:18 pm
content: I must say there comes the time to stop designing and start building!A few years ago I built a PSU based on a 300VA mains transformer, 2 channels, 0-30V/5A. Used a bypassed 317/337, insufficient heatsinks on the 317/337s, insufficient rectifier diodes (3A...), ended up melting components near the diodes and breaking down from time to time. The next design uses a complimentary pair for the pass transistors, better diodes, better cooling (4 small fans inside and 1 large fan outside), heatsink temperature controlled fans and thermal shutdown at 100C. Extra sense lead to monitor voltage on load. Relays that connect/disconnect the load with momentary push buttons. Still 30/5A and two channels.There could be a next design, but this works damn well. When it melts down, if it does, then it will be time.

author: void_error
author_rank: Frequent Contributor
timestamp: August 14, 2014, 09:45:34 am
content: Quote from: miguelvp on August 13, 2014, 05:59:16 pmA clearance of 2cm should probably do.As for the stackability, the PSU doesn't entirely rely on the fan for cooling, it's only going to kick in when the heatsink temperature reaches 70C. I estimated the heatsink's thermal resistance at around 3K/W (this onehttp://www.tme.eu/en/details/rad-a5723_60/radiators/#), although it's probably lower, which translates into a 75C rise above ambient at 25W without the fan running. Assuming that with the fan on the thermal resistance of the heatsink drops another 1K/W I think the PSU won't overheat.Quote from: akis on August 13, 2014, 06:22:18 pmThere's going to be a lot of PCB designing to be done. Plus the software part isn't finished yet as the digital hardware has suffered a few changes. I've built quite a few things before and what I've learned is that I have to be more careful with the way the whole thing comes together otherwise final assembly will be a huge pain in the ass.I still have to test another version of the linear regulator because I had an idea. This way I could lose the negative rail and use 5V rail-to-rail opamps. The current design requires opamps than can handle a fairly high supply voltage and I personally don't like that.

author: dannyf
author_rank: Super Contributor
timestamp: August 14, 2014, 10:54:37 am
content: Negative rails are not necessary unless you want to get to 0v output.A cheap R2R opamp will get you within 100mv of the negative rail / GND. How often do you need to output something that low?

author: akis
author_rank: Frequent Contributor
timestamp: August 14, 2014, 11:23:44 am
content: In my system the op-amps go near to ground but not quite (using MC33072 single supply op-amps). The op-amp that senses current on a sense resistor has an offset base with a biased diode to ground so the V+input is always 650mV above ground and that is its baseline. That means it can sense very small currents which would otherwise go undetected.For high side sensing there is also a problem so I feed the op-amps a higher voltage. On the transformer based PSU this is done easily with a voltage doubler (2 diodes and 2 capacitors off the mains transformer) followed by a linear regulator down to 40V. The MC33072 accepts up to 44V if I remember correctly.#Another solution would be to use jFET op-amps eg the TL082, or the much more modern TLE2142, for high side sensing if your sense resistor has one side permanently connected to the raw supply input (sense resistor before anything else).

author: dannyf
author_rank: Super Contributor
timestamp: August 14, 2014, 11:55:15 am
content: QuoteSensing small (differential) voltage / current isn't a problem - you just need lots of gain and that's easy to do.The difficulty with high-side sense amplifier is common mode range, ie the amplifier continues to function when the input voltages (on the + and - pins) goes very high or very low, sometimes even beyond the supply rails of the amplifier. Many, if not most, opamps will fail here because of that.QuoteBoth suggestions would make the designs more challenging: TL082 (and most jfet opamps) cannot swing to the rails (not R2R), and the 2nd approach unnecessarily expands the required common mode signal range - it is best to put it after the regulator which helps you reduce the opamp's common mode range requirement.

author: mij59
author_rank: Frequent Contributor
timestamp: August 14, 2014, 12:07:21 pm
content: Quote from: void_error on August 14, 2014, 09:45:34 amA clearance of 3 cm would be better, or place the fan on the rear of the unit.You could run the fan at low speed and ramp up as the temperature increases.A heat sink with no data on the thermal resistance

author: void_error
author_rank: Frequent Contributor
timestamp: August 15, 2014, 11:43:09 am
content: Quote from: mij59 on August 14, 2014, 12:07:21 pmMy PC case uses lower clearance for the 12cm bottom fan and for the PSU fan so I guess anything above 2cm should do. The surface area of the fan intake shouldn't be higher than the surface area through which the air comes in below the case if you know what I mean... not to cause an airflow bottleneck (?).Was thinking of using a PWM fan and freeing up a MCU PWM pin. This will keep the noise low at least.Yup. Dirt cheap though. I've done some thermal resistance measurements on my junkbox heatsinks (I do have a lot of them) a few years back and got some data. This one is quite similar surface area and fin spacing wise to what I have in my junkbox. Cooling on this PSU will still be overkill for reliability reasons.

author: mij59
author_rank: Frequent Contributor
timestamp: August 15, 2014, 12:44:22 pm
content: Quote from: void_error on August 15, 2014, 11:43:09 amYes, high air speeds means also high noise level.When the intake of the fan is close to the surface, the rotation speed of the fan increases, and the air flow decreases.

author: void_error
author_rank: Frequent Contributor
timestamp: August 17, 2014, 02:51:05 pm
content: Apparently I've had no luck with my second idea for the linear regulator part of the PSU so I'll stick with the first one with a few minor changes.Swapped the MC14584 charge pump with a 7660 and will probably go back to the INA138/168 for the current sensing part after I test everything again.I might reduce the negative rail to a lower value because I'm planning to use roughly the same circuit for a 0-30V PSU (got a smaller transformer out of an old printer) and I don't really want to change the opamp. As soon as this is dealt with I'll start designing the PCBs and finishing the software part.

author: mij59
author_rank: Frequent Contributor
timestamp: August 17, 2014, 04:41:05 pm
content: Quote from: void_error on August 17, 2014, 02:51:05 pmThe INA138 has minimal common mode voltage of 2.7V, so you can't use it on the output.You need a current sensor with a range from zero to the max. output voltage.If you use the current sensor you can also reduce the VCC of the opamp.

author: void_error
author_rank: Frequent Contributor
timestamp: August 17, 2014, 07:06:30 pm
content: Quote from: mij59 on August 17, 2014, 04:41:05 pmThere's one way around that but it has at least one drawback. If I measure the current before the series pass element the common mode voltage will be 4V + VOUTbut then I will have to do more math in the MCU to get the actual output current which is an unnecessary complication.As for reducing the VCC of the opamp, in the current design the output has to swing quite close to VCC to get 20V output. I'll have to do some more measurements to determine the least difference between VEE (in the last schematic) and ground to get 0V output.So far I could as well build the current version that works but I still think there's a bit of room for improvement.I'd appreciate it if someone would point me to a circuit that uses opamps with lower voltage than the PSU output voltage.

author: akis
author_rank: Frequent Contributor
timestamp: August 17, 2014, 07:19:15 pm
content: Just general ideas:The pass elements, they can be P-channel FET, or NPN/PNP complimentary. For example the P-channel opens at 0V.Use a jFET op-amp to sense current on the high side voltage and produce as an example 1V-5V output for say 0..5A current draw maybe with a raised ground (one diode) to get over the first 1V, eg TLE2072. Use another op-amp to drive your pass element depending on the voltage requirements.I have found the easiest way to do it, is to have 5-10V over the "Vcc" to power the op-amps then I know that I can deal with anything in the circuit (plus a raised ground of course).

author: void_error
author_rank: Frequent Contributor
timestamp: August 17, 2014, 07:30:36 pm
content: Quote from: akis on August 17, 2014, 07:19:15 pmI tried a PNP (actually a PNP driving a NPN) as the pass transistor but I couldn't get the thing stable, it would oscillate at some point. That was the whole idea in using lower voltage opamps. That way I could drive the PNP/P-channel with a NPN (grounded emitter) driven by an opamp. The opamp's supply voltage would be +5V/GND as it would only have to supply the NPN's base voltage/current.

author: akis
author_rank: Frequent Contributor
timestamp: August 17, 2014, 08:23:05 pm
content: Surely the idea would be to have the NPN driving the PNP so the load is on the emitter of the NPN so it acts as common collector? Then it is (more) stable by definition. I only use two transistors, MJE15028G driving a MJL1302A - driven by a simple op-amp no probs to 30V/5A. The op-amp is fed by 40V.Oscillations are caused by the op-amp driving - you need 10nF feedback on the op-amp and no other feedback.The NPN doing the driving is not required. OK, I actually use it TO SHORT the base of my NPN/PNP pair, as the current limiter control device. The op-amp does the voltage adjustmest straight into the base, and the other op-amp opens the NPN to act as a short.It looks like this: U3.2 is the voltage controller. Another op-amp, not shown, opens the Q3 to "fight" the U3.2 and provide current limit. Maybe it can be done better - get two op-amps to agree between them on a voltage level

author: void_error
author_rank: Frequent Contributor
timestamp: August 17, 2014, 08:45:34 pm
content: I've seen similar circuits in books from the 80's and several magazines from that era.My idea was to supply the opamps with a lower voltage than the input voltage so I had to use a PNP driving a NPN but it's not a stable configuration.I guess I'm sticking with the last schematic. I'll have to replace the opamps with higher voltage ones for a 0-30V version or use a circuit to boost the output voltage swing.

author: dannyf
author_rank: Super Contributor
timestamp: August 17, 2014, 09:57:48 pm
content: QuoteYou have just made a LDO. Yes, it is quite difficult to stablize them.

author: void_error
author_rank: Frequent Contributor
timestamp: August 18, 2014, 09:13:33 am
content: Quote from: dannyf on August 17, 2014, 09:57:48 pmI was aware of that and I was expecting it to be unstable. Not even a 100uF cap across the output would make it stable.Now I have a question:Does anyone know about a circuit to boost the opamp output voltage swing past the opamp supply rails?For example, let's say the opamp supply is +/-5V ground referenced and I want the output to swing from -5V (less would also do) to around 40V. I suppose such a circuit exists but I haven't found one suitable for my application yet unless I can remember where I found a circuit that might be suitable...Manged to trick google into displaying this among the search results:This is going to be the opamp voltage booster, with the following modifications:If I get rid of R and C and use an opamp to drive the base of the PNP it should still work.I'll also replace the P-channel MOSFET with a PNP.R4 & R3 set the gain.I'll also add a current sink across the output.I'll be really happy if this works.Current sensing will be handled by an AD8211http://www.analog.com/static/imported-files/data_sheets/AD8211.pdf

author: dannyf
author_rank: Super Contributor
timestamp: August 18, 2014, 10:27:52 am
content: QuoteYes, if there is a 40v rail somewhere.

author: void_error
author_rank: Frequent Contributor
timestamp: August 18, 2014, 11:16:56 am
content: Quote from: dannyf on August 18, 2014, 10:27:52 amThanks Captain ObviousWith this circuit the positive supply rail is going to be the rectifier+filter output, so with a 24V AC transformer it'll be around 33V DC at no load.Anyway, If it's possible to get a PSU output swing down to 0V without a negative rail it's even better.I'll breadboard the thing today and do some measurements. If everything's stable with no load I'll start abusing it by connecting some nasty non-linear loads. If it's still stable I'll post a schematic.

author: IanJ
author_rank: Unknown
timestamp: August 18, 2014, 07:54:20 pm
content: Quote from: void_error on August 18, 2014, 11:16:56 amOut of interest I am using OP295 op-amps (single supply rail to rail) in my design without any negative supply and I get down to about 50mV minimum with a 25v span.PS. How are you getting on with the LM2956-ADJ..........are you noticing any noise (on load) on the output. Albeit, less than 10mV at the switching freq?Ian.

author: void_error
author_rank: Frequent Contributor
timestamp: August 18, 2014, 09:19:28 pm
content: Quote from: IanJ on August 18, 2014, 07:54:20 pmI used an LM324 in my first tests since I haven't ordered any of the parts yet, so I'm experimenting with what I've got lying around.That also means I didn't get the chance to play with the LM2596 either, using a LM317/TL431 temporarily in place of the pre-regulator set to track the same way as the LM2596 would do.What I don't like about the current design is that its maximum output voltage depends on the opamp supply voltage so if I want a higher voltage version (like 0-50V) I'm screwed. I've been working on a version today that eliminates the opamp supply voltage dependency meaning that realtively low voltage opamps could be used and no, it's not going to be a LDO topology as they're really hard to be made stable.A schematic of the new version will be available as soon as testing/tweaking is finished.

author: dannyf
author_rank: Super Contributor
timestamp: August 18, 2014, 09:55:50 pm
content: :realtively low voltage opamps could be used and no,:you would need to use some dark force to be able to do that.

author: akis
author_rank: Frequent Contributor
timestamp: August 19, 2014, 06:14:34 am
content: Here is a table of op-amps for your perusalCode:Op-ampsMax SupplyInput resistance (Mohm)GBWP MHzSlew Rate (V/us)Input noise (nV/Hz)THD + NCommon Mode Voltage RangeOutput Voltage SwingSupply Current (mA)common mode groundcommon mode VddNotesPackagePrice £CommonDifferential+/- 15V2mA10mALT136136505800Vdd-2, Vee+24nonoHFDIP86.77LM617236404.93000Vdd-1.5,Vee+1.52.5nonoHFDIP83.47MC33072441504.513320.02Vdd-2, VeeVdd-1,Vee+0.3Vdd-1.6,Vee+1.63.8yesnoSingle supply, low sideDIP80.6TLE2141 TLE214244655.84210.5 @ 1KHz0.01Vdd-1.8, Vee-0.3Vdd-1.3, Vee+1.32yesnoAudio, Buffers, low sideDIP82.088TLE2072CP38infinite1040-45120.008Vdd, Vee+4Vdd-1.1,Vee+13.1noyesAudio, Buffers, high sideDIP81.668LM456234100030 Kohm202.7 @ 1KHz0.00003Vdd-2, Vee+2Vdd-1,Vee+110nonoAudio, BuffersDIP82.23LT163236450.001Vdd, VeeVdd-0.2,Vee+0.39.2yesyesRtoRDIP86.456LT1490ACN84415000170.20.0750Vdd, VeeVdd-0.25,Vee+0.250.1yesyesRtoR, DC, low powerDIP83.432LM733235150002115.215.50.003Vdd+0.3,Vee-0.3Vdd-0.2,Vee+0.0252yesyesRtoR, DC8SOIC4.104LM732232150002018150.005Vdd+0.3,Vee-0.3Vdd-0.25,Vee+0.062.5yesyesRtoR, DCVSSOP-81.212OP284364.2543.9Vdd, VeeVdd-0.2,Vee+0.1252yesyesRtoRDIP810.092TL072IP36infinite413180.003Vdd,Vee+3Vdd-1.5,Vee+1.5Vdd-3,Vee+32.8noyesAudio, low nse, high sideDIP80.84LM3243216001.20.535Vdd-1.5,VeeVdd-4,Vee1.4yesnoSingle supply, low sideLM61322421011140.0015Vdd,VeeVdd-0.2,Vee+0.151yesyesRtoR, low powerDIP82.99OPA2513645000.0350.0145Vdd-0.8,Vee-0.2Vdd-0.05,Vee+0.050.05yesnoSingle supply, low side, micropowerDIP82.98TSH22361002515140.003Vdd-1.8,VeeVdd-1,Vee+0.34.3yesnoSingle supply, low sideDIP81.44

author: void_error
author_rank: Frequent Contributor
timestamp: August 22, 2014, 06:42:40 pm
content: Quote from: akis on August 19, 2014, 06:14:34 amThanks akis but I managed to get the circuit to work with 5V powered opamps.Quote from: dannyf on August 18, 2014, 09:55:50 pmIt seems I have found some dark force and put it to use.Jokes aside, here's the idea:Had a LM317/TL431 tracking pre-regulator instead of the LM2596 tracking pre-regulator for testing purposes. Won't order any parts until every detail is sorted out.Also, not all the components have the correct values, too lazy to do some math, I'll fix that soon though.For keeping the whole power supply module from falling apart I'll use a bunch of these:I think it's a simple and elegant solution.On a side note (rant): Why the heck did they make the LCD mounting holes M2.5 instead of M3?! They had enough space to use that but no, now I need to order two bloody spacer sizes and drill twice the amount of mounting holes on the digital board.

author: dannyf
author_rank: Super Contributor
timestamp: August 22, 2014, 08:31:01 pm
content: Quotethe world of physics would crumble down then,

author: void_error
author_rank: Frequent Contributor
timestamp: August 31, 2014, 11:17:15 am
content: All the tweaking has been completedThis is the version I'm actually going to build.You may notice that I've added a preload resistor to the output - R6, with it's own current sense resistor - R9. Now the output goes down to 50mV. U5 removes the output current offset caused by R6+R9. I could have done this in software but for the sake of versatility I decided to leave a hardware zero adjustment (via R8) for the current in case one wants to use this without MCU control.Opamp choice was based on price/offset/bandwidth that's why I ended up using MCP6021 where offset voltage needed to be low (single opamps because I found it easier to route a single-sided PCB using SOT23-5 as opposed to SO-8, on top fo that I might need single opamps in pther projects). The current sink (U4/Q7) could have been made simpler but at the expense of higher voltage drop on R21 which would have caused V_OUT to be higher with no load and maybe unstable operation at low output voltages.I've also made changes to the digital part (sorry, no schematic/code yet as it's still in the early design stages).Found some nice and extremely reliable pushbuttons so I'm ditching the rotary encoders.Planned features for the user interface (button part) will be, apart from setting the voltage/current and switching the output ON/OFF are the ability to lock the settings to prevent accidental button pushing (idiot-proof feature), setting the limits between which the voltage/current can be set and a preset button which cycles through some common voltage/current settings (just because it's convenient).Moved the LCD to a SPI I/O Expander (MCP23S17) and swapped the PIC16F887 for a PIC16F886 for two reasons: not in stock (at the moment from the supplier I'm using and I don't plan on paying shipping twice) and SO-28 is easier to route on a single-sided board than a TQFP44 (I hate using lots of jumper wires).Another planned feature is to add some form of self-calibration to minimize the errors introduced by the (reference) DACs and storing the offsets in an external memory (most likely an EEPROM). This relies on the fact that the ADCs used are 22bit delta-sigma type and can be used to measure the DAC error for each voltage step and compensate to a certain extent.

author: dannyf
author_rank: Super Contributor
timestamp: August 31, 2014, 11:28:26 am
content: QuoteI thought you were looking for an opamp that can output above its rail. Does this do that?QuoteA shift register, if you already have one, would do that.QuoteThe internal one doesn't do it? The chip is capable of self programming so that's another route.

author: void_error
author_rank: Frequent Contributor
timestamp: August 31, 2014, 12:12:15 pm
content: Quote from: dannyf on August 31, 2014, 11:28:26 amIt doesn't need to. I added an extra gain stage with Q5/Q6 - Q4 - Q3 - Q7. It has local negative feedback via R13/R15 (basically gain limiting). The opamp handles the overall feedback.QuoteIt will need to be able to tri-state its outputs for when I put the LCD into read mode to check the BUSY flag. A 4094 would probably do (two of them, one for data, one for commands). I'll consider the shift register option as well although hardware SPI is much easier to use than bit-banging a shift register.QuoteI suppose you mean I can use the program memory to store the values...?I'll have to do the math to see how much internal EEPROM space I need for the calibration data (400 points x 8 bits for 10mV steps (4.096V DAC reference) I guess? maybe half if I can use one byte for two calibration values). If that's the case 256 bytes will be enough. Haven't used the internal EEPROM before though, so I'll have too look at the datasheet.

author: dannyf
author_rank: Super Contributor
timestamp: August 31, 2014, 03:07:58 pm
content: QuoteYou can use hardware spi on a shift register too.QuoteNo.

author: dannyf
author_rank: Super Contributor
timestamp: August 31, 2014, 03:08:51 pm
content: QuoteToo bad. Finding an opamp that's capable of outputing beyond its rails has a lot of practical value.

author: void_error
author_rank: Frequent Contributor
timestamp: August 31, 2014, 04:20:43 pm
content: Quote from: dannyf on August 31, 2014, 03:07:58 pmI realized that just after I hit the post button. But I won't bother since I/O expanders don't cost much and have more features than shift registers.QuoteThought so. I'll go for an external EEPROM then, internal EEPROM is too small for storing everything I need to store plus they're dirt cheap.Quote from: dannyf on August 31, 2014, 03:08:51 pmToo bad you can only find those opamps as dodgy (maybe) SPICE models. Had it happen. I guess leaving the output voltage swing out of the simulation model requires less computing power. It's even funnier when EE students wonder why an opamp's output doesn't go higher than the supply voltage after they do the math for a higher gain circuit

author: void_error
author_rank: Frequent Contributor
timestamp: October 28, 2014, 04:39:26 pm
content: I've been recently working on the PCB (not done yet) for the main PSU board and made some improvements along the way. Here's the result:Then I had another idea - to add an option to disable the pre-regulator (the LM2596 can go up to 100% duty cycle - internal switch on all the time) while limiting the output current to a value that does not cause excessive heating of the series pass transistor. It cand be done by shorting the feedback pin to ground. This will basically result in a cleaner output which might be handy sometimes.

author: TonyStewart
author_rank: Contributor
timestamp: October 28, 2014, 08:24:24 pm
content: I just use any Universal Laptop Charger either with a dozen switched voltages from 12 to 24V 65W to 85W or use the kind with 4 pin adapters to many plug styles. They use remote sensing to the plug, which uses a 2.5V reference so a pot can be used to vary the output in a linear mode. I use to power 21V 65W LED arrays dimmable and only costs $30 at Walmart.

author: void_error
author_rank: Frequent Contributor
timestamp: October 28, 2014, 11:42:27 pm
content: Any Universal Laptop Charger I can get over here is a worthless badly engineered chinese piece of junk so it was out of question from the start. I've seen some break within minutes of being plugged in.Quote from: TonyStewart on October 28, 2014, 08:24:24 pmMost likely a TL431.

author: SharpEars
author_rank: Unknown
timestamp: October 29, 2014, 12:25:22 am
content: Quote from: TonyStewart on October 28, 2014, 08:24:24 pmWhere is the fun in that?What are its ripple characteristics?

author: prasimix
author_rank: Unknown
timestamp: October 29, 2014, 09:09:33 am
content: Hi, this is my first post and I'm came here attracted with this interesting project. I'm working on some prototyping of PSU and would like to share some thoughts, questions and problems.Quote from: void_error on October 28, 2014, 04:39:26 pmYes, that is something that I'd like to implement. It especially make sense when you are using MCU so you can limit a total output power that you're not limited only by voltage or by current.I didn't know that switching regulators such as LM2596 has possibility to go up 100% duty cycle. That's good news since I was prepared to disable pre-regulator and use extra relay to bypass it.I have one question. What is happening with output voltage when you are simply switch off the PS? I spent some time to create TINA9 simulation of only output transistor driver section and see what will happen if voltage and current regulation signals are removed (both switch are in off position). In that case I have 22.72V on output. So if have device that require i.e. +5V when I switch off PS and depending of input capacitor some dangerous voltage will be present on output. Ok, this is just an simulation. What's happening in practice? Please find in attachment screenshot and simulation file (zipped since attachment uploader do not permit .tsc file type).

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 10:01:44 am
content: prasimix - the circuit you posted has no overall negative feedback, only local feedback for the extra gain stage - R4 & R5.Also I forgot to mention SENSE_OUT_P connects to V_OUT at the positive output jack while SENSE_OUT_N connects to PGND at the negative output jack so there will always be overall negative feedback.This is to compensate for the voltage drop across the wires going from the board to the output jacks.Take a closer look at the schematic. Voltage regulation is handled by U9 & U10. U9 is the error amp while U10 is a differential amp (more like an attenuator here) with a gain of 0.2 (R37/R36 if R37=R44 & R36=R46 which is the case).D11 & D12 are for input protection so the opamp inputs don't get damaged in case there's a voltage spike coming from a load like a brushed DC motor. With that said I'll have to replace C17 with a 100nF-1uF ceramic in parallel with a 10uF electrolythic, both 100V rated. D5 protects Q2 from reverse voltages.The purpose of R28 & R30 in the local feedback loop is to limit the gain of the discrete gain stage to prevent oscillations and it's set higher than the minimmum required value.Quote from: prasimix on October 29, 2014, 09:09:33 amIt's in the datasheet. Only the ones which use a bipolar transistor (usually a NPN) can go up to 100%. The ones using a MOSFET (most likely an N-channel) will use an internal charge pump to drive the gate above the supply voltage. One example is the LM2676.

author: prasimix
author_rank: Unknown
timestamp: October 29, 2014, 12:02:14 pm
content: Thanks void_error for quick response! Yes, I'm aware of global neg. fb but I'm talking about an extreme case. I'm wondering does everything still works when you simply remove Vin. If, yes that great, just checkingSome more question:1. Does Q7, U4 works as constant current source or they are define some operating point?2. What do you think about current monitor such as INA282? In that case you don't need to spent one more opamp for buffering (U7)?3. Thanks to mentioning protection diodes on differential amp (U10). Do you think that TVS (Transient voltage suppressor) could be a better choice then zener diode? I believe that TVS reaction time should be better (of course if reverse current and parasitic capacitance do not influence overall stability).Thanks, once again.

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 12:51:56 pm
content: Quote from: prasimix on October 29, 2014, 12:02:14 pmYes, it will work.Quote from: prasimix on October 29, 2014, 12:02:14 pmIt's just a constant current sink to pull the base of Q2 to ground. Tried using a resistor but the output voltage wouldn't swing low enough.Quote from: prasimix on October 29, 2014, 12:02:14 pmI chose the INA138/168 for a reason: bandwidth. If you look at the datasheet of theINA282, page 4, youll notice that the bandwidth is only 10kHz. The gain of theINA138/168the gain is set by a resistor. With a 5k resistor the bandwidth is 800kHz, with the 15k resistor it's still over 250kHz. Just below that there's the step response, 1.8us for 5k, less than 6us for 15k which means the current limiting will kick in faster. I'll do some measurements after I build it on a proper PCB and design a simple constant current electronic load.Quote from: prasimix on October 29, 2014, 12:02:14 pmTheMCP6021opamps used have ESD protection diodes on the inputs so theoretically the zeners are not needed but it's a good idea to have them there. If there's a positive voltage spike exceeding about 23V the zeners will clamp the opamp input voltage to less than 5V - that way the upper internal ESD protection diode won't conduct - less chance of damaging the opamp.Quote from: prasimix on October 29, 2014, 12:02:14 pmI'm glad people are interested in my project

author: TonyStewart
author_rank: Contributor
timestamp: October 29, 2014, 01:30:22 pm
content: Quote from: SharpEars on October 29, 2014, 12:25:22 amThe fun was using a surplus fixed charger into a variable supply by adding a pot and a couple passives to make a useful cheap dimmable 65W LED ceiling lights by the bay window brighter than sunlight, because my wife hated the shadow cast by the mighty Maple tree.Another application was an LED powered patio table backlight. No regulator needed with 19.2V fixed into 6x3W leds on surplus MCPCB lights scrapped from Solectron intended for ambulance lights.https://www.dropbox.com/s/uusqgoqytkhho8m/2014-06-28%2023.02.29.jpgRipple was not a factor with lighting low ESR load.

author: macboy
author_rank: Super Contributor
timestamp: October 29, 2014, 03:08:12 pm
content: I was just looking at your most recent schematic. One thing jumps out at me... you chose to ground-reference your control circuitry (voltage and current error amps) to the supply negative output terminal, rather than the positive terminal. If you look at virtually any commercial design, those circuits are referenced to the output +, which makes sense, since the current sense resistor is right there, and the regulator pass transistors are there too. This makes interfacing the error amps to those things very simple. So I wonder why you chose to use the - output terminal? This necessitates fancy high-side current sense amplifiers and level shifters and all sorts of other compilcations.

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 03:59:54 pm
content: The DACs used for the reference voltages are ground (not mains earth) referenced. Also, if you noticed, the 'level shifting' (I think you mean the discrete gain stage) is needed since the opamps are powered from 5V. The only 'complication' is using an INA138 as the current sensor, plus a few opamps to increase bandwidth.

author: prasimix
author_rank: Unknown
timestamp: October 29, 2014, 04:17:30 pm
content: Quote from: void_error on October 29, 2014, 12:51:56 pmOh, that possibly could explain some of my misery when PS enters CC (Constant Current) mode. I'm playing with TL074 (and OPA4227) opamp that is connected to INA282 and current control loop is not so stable as voltage one. End result is output ripple that is 10 times higher than in CV (Constant Voltage) mode. Also it comes completely unstable when Iout goes over 2A with short circuit condition on output. Before starting to think about INA16x how you resolve a problem with monitoring current when Vout is below 2.7V?

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 04:54:24 pm
content: Quote from: prasimix on October 29, 2014, 12:02:14 pmThe collector of Q2 will always be about 3V higher than the emitter, that's how the pre-regulator is set up.

author: prasimix
author_rank: Unknown
timestamp: October 29, 2014, 05:22:23 pm
content: Oh, I completely forgot that shunt is BEFORE serial transistorSorry.

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 06:52:39 pm
content: Quote from: prasimix on October 29, 2014, 09:09:33 amAbout that other idea... it doesn't need a MCU, just a schmitt trigger comparator to switch between modes: for example, if the current limit is set lower than 500mA it disables the pre-regulator by shorting the BE junction of Q1, if it's higher than 550mA it enables the pre-regulator. Actual values will be decided according to the max allowable dissipation with the2.2 K/W heatsinkI'll be using. Dirt-cheap LMV321 + some resistors + 1NPN + 1PNP will do the job and maybe an LED to indicate the mode. As it is a one-off project this is basically for free as I'll have more parts than I actually need here.

author: macboy
author_rank: Super Contributor
timestamp: October 29, 2014, 09:00:10 pm
content: Quote from: prasimix on October 29, 2014, 05:22:23 pmThis is a poor design decision as the base current of the transistors also goes into the load. Sure, with a darlington drive, this is a relatively small current, but it is not close enough to zero to be neglected.

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2014, 09:44:32 pm
content: Quote from: macboy on October 29, 2014, 09:00:10 pmInstead of criticizing everything you might want to be useful and suggest something better than the INA168, preferably one availablehereorhere. I already have a second option.Also, FYI, the BDX33 has a minimum gain of 750 which means 4mA maximum base current at 3A. Slightly above 0.1% error.

author: prasimix
author_rank: Unknown
timestamp: October 30, 2014, 07:08:22 am
content: What's about hall-effect based sensor such asACS-712? Another possibility isINA193/196that goes down to -14V with nice bandwidth (up to 500KHz). Huh, this sentence I found in device description:Quote

author: void_error
author_rank: Frequent Contributor
timestamp: October 30, 2014, 09:26:16 am
content: The ACS712 is quite inaccurate. The other IC I found is theAD8211. It has a lower output error (according to the graphs in the datasheet) than the INA193 at low input voltages and it's also available on TME so I don't have to pay shipping from two different suppliers.

author: prasimix
author_rank: Unknown
timestamp: October 30, 2014, 09:37:34 am
content: Looks very promising, and price is right! Nice suggestion.

author: void_error
author_rank: Frequent Contributor
timestamp: October 30, 2014, 10:15:28 am
content: By using two of them like in LT'sAN105, page 117 - Figure 215, allows for higher sensitivity at lower currents. Looks like I'll have to redesign the current sensing circuitry. Time to look for MOSFETs. An N-channel type with low VGSis required since the P-channel will require a negative supply rail.The ranges should be 0-300mA and 0-3A.Or I could just stick with INA168 and also sense the base current then add it to the collector current. It would make switching between ranges easier, using a P-channel MOSFET.

author: prasimix
author_rank: Unknown
timestamp: October 30, 2014, 11:35:06 am
content: Are you still thinking about 10 resistor in parallel for shunt? Now you'll need 20

author: void_error
author_rank: Frequent Contributor
timestamp: October 30, 2014, 12:34:42 pm
content: Quote from: prasimix on October 30, 2014, 11:35:06 amLooks like you got that one a bit wrong. Only 1 extra resistor will be required for the low range. The 10 resistors were used to handle the power dissipation at maximum load current. For a 1 ohm resistor at 300mA the dissipation is below 100mW.

author: prasimix
author_rank: Unknown
timestamp: October 30, 2014, 12:38:50 pm
content: Yes, but you still need to find cheap 100mohm 1% (or even 0.1%) resistor, or you are going with something like 1ohm for low range?

author: void_error
author_rank: Frequent Contributor
timestamp: November 03, 2014, 03:15:29 pm
content: Quote from: prasimix on October 30, 2014, 12:38:50 pmI'm switching to low-side current measurement since the supply will be floating anyway. This will simplify things a lot. Or I could use an INA213.

author: prasimix
author_rank: Unknown
timestamp: November 03, 2014, 09:44:39 pm
content: Ok, what you are going to do with short circuit detection/protection in that case?

author: void_error
author_rank: Frequent Contributor
timestamp: November 03, 2014, 10:09:26 pm
content: Quote from: prasimix on November 03, 2014, 09:44:39 pmHere's a bunch of application notes, this might clear things up for you as far as current limiting goes:http://cds.linear.com/docs/en/application-note/an105fa.pdfhttp://www.intersil.com/content/dam/Intersil/documents/an18/an1827.pdfhttp://www.diodes.com/_files/products_appnote_pdfs/zetex/an39.pdfhttp://www.analog.com/library/analogdialogue/archives/44-12/high_side.pdf

author: void_error
author_rank: Frequent Contributor
timestamp: November 04, 2014, 12:12:19 am
content: Quote from: AcHmed99 on November 03, 2014, 10:55:35 pmYou clearly haven't read this whole forum topic.Quote from: AcHmed99 on November 03, 2014, 10:55:35 pmGuess why I ended up designing my own... because I haven't found any design that I liked. And I did google a lot.Quote from: AcHmed99 on November 03, 2014, 10:55:35 pmI started this thread because I had a bunch of questions and an idea of how the power supply should be. If I would have designed it before that I wouldn't have even bothered posting anything.Quote from: AcHmed99 on November 03, 2014, 10:55:35 pmThanks captain obvious.

author: prasimix
author_rank: Unknown
timestamp: November 04, 2014, 08:49:52 am
content: Quote from: void_error on November 03, 2014, 10:09:26 pmThanks for that. I didn't saw before that Zetex app note. They have some nice examples there.Almost all documents talks about high side sensing and in Linear (an105, pg.2) there is a clearly stated disadvantages of thelow sidesensing which you'd like to deploy:Load activated by accidental short at ground end load switchHigh load current caused by short is not detectedFrom my existing experience I'd like to say that accidental short circuit condition is the reality not an exotic case which don't deserve serious attention. It can hurt serial transistor/mosfet badly because it easily push condition outside the SOA (Safe Operating Area). Linear in their app note on pg.16 and pg.18 show low side current protection but it is for-48Vand to me it looks like "high side". Anyway I think that one should be ready to test PS with current limit set to rated max. value and try "controlled" short circuit condition after the PS is switched on (another case is trying to power it up with shorted output terminals which should be easier to manage).

author: void_error
author_rank: Frequent Contributor
timestamp: November 04, 2014, 10:53:44 am
content: About the SOA... I might replace the darlington with two paralleled transistors just to be sure I don't exceed the SOA. Emitter resistors will be required to balance the currents.After I build it one test will be shorting the output at 10kHz or something and look at the response on the scope. Starting up with a shorted output won't be an issue with the MCU control in place as the output will be zero by default at startup. May as well set the LM2596 up for delayed startup to ensure the control circuitry gets powered before the high power stuff.

author: prasimix
author_rank: Unknown
timestamp: November 05, 2014, 12:31:03 pm
content: I foundINA206interesting. Its bandwidth is up to 500KHz and comes with two comparators and internal reference. Good thing is that comparators inputs are reachable from outside. Thanks to that you can use the same DAC signal to set max. ("trip") current which could be i.e. 20% higher than allowed current for CC (constant current) mode. Comparator has latch and reset. Another comparator could be used for monitor "under current" condition.

author: void_error
author_rank: Frequent Contributor
timestamp: November 13, 2014, 11:08:37 am
content: Quote from: prasimix on November 05, 2014, 12:31:03 pmUnfortunately, like most high side current sense chips, it has roughly a 1:10 accurate measurement range which translates into 300mA - 3A for my design and that's not enough. Below 1/10 of the full scale current the output error goes through the roof.With that thought through I've moved to low-side current sensing and made a few changes to the pass transistor + driver circuit. Managed to get rid of a few parts without any drawbacks... or at least that's what I'm going to think until I breadboard it and test it for stability.If anyone is interested let me know and I'll post the revised schematic. I bet you're all sick of this thread already.

author: liquibyte
author_rank: Frequent Contributor
timestamp: November 13, 2014, 02:51:19 pm
content: Quote from: void_error on November 13, 2014, 11:08:37 amI haven't commented but I've been watching the progress you're making and I may build one of these if I ever solve my own problems. So, nope, not sick of it yet unfortunately. I don't like watching videos to try and grep concepts, doesn't work for me. Watching threads progress with ideas, concepts, and differences of opinion does though. Hell, I'm still trying to wrap my head around all the different ways you can use op amps.

author: prasimix
author_rank: Unknown
timestamp: November 13, 2014, 05:11:07 pm
content: Quote from: void_error on November 13, 2014, 11:08:37 amYes, please. Nothing sick so far, just lots of exchanging of good ideas. I'd like to know if you had a chance to test short circuit condition and if any overshooting exists during power up and power down phase. How is going with switching pre-regulator? Did you test tracking?

author: void_error
author_rank: Frequent Contributor
timestamp: November 15, 2014, 01:47:26 pm
content: Quote from: prasimix on November 13, 2014, 05:11:07 pmNext week.

author: David Hess
author_rank: Super Contributor
timestamp: November 19, 2014, 03:15:01 pm
content: Quote from: prasimix on November 04, 2014, 08:49:52 amThis neatly explains why bipolar supplies do not use simple ground side current sensing; a short to the opposite supply would go undetected.Tektronix (PS503) used singled ended high side current sensing with current based level shifters to avoid instrumentation amplifiers and matched resistors. HP/Harrison (HP6236B) made the ground the high side achieving the same thing without level shifters, instrumentation amplifiers, or matched resistors. The Tektronix design is more flexible and allows remote programming but the HP design is simpler.I hate using instrumentation amplifiers and/or matched resistors for high side current sensing.

author: prasimix
author_rank: Unknown
timestamp: November 19, 2014, 05:27:37 pm
content: Quote from: David Hess on November 19, 2014, 03:15:01 pmWhat do you think about PGAs (programmable gain amplifiers) that comes with matched resistors?I spent some time now examining current monitors (theoretically and in practice) and it's really challenging to find a single chip to cover CM (common mode) range of 0-50V with good frequency bandwidth and precision when CM goes below 3-5V or Vsense (voltage drop on shunt) below 20mV. I start to think about dual monitor solution (with two shunts, "auto range") or even to try some PGA with required CM, gain, precision and bandwidth. I'm trying to stay on "high side" monitoring.

author: David Hess
author_rank: Super Contributor
timestamp: November 19, 2014, 09:27:57 pm
content: Quote from: prasimix on November 19, 2014, 05:27:37 pmDid you have any specific parts in mind?Most still have common mode input range limitations and are usually slow and/or noisy compared to the alternatives which may not matter.Some of the integrated high side current monitoring solutions work like I mentioned using current for level shifting. It is pretty easy to do the same thing with a discrete solution over wide voltage ranges and with high bandwidth. This also avoid specialized parts.One reason I like the single ended designs like in the power supplies I mentioned earlier is that it simplifies feedback loop compensation. If you have to do a lot of active signal conditioning within the current control loop, the frequency compensation can get out of hand.QuoteSome designs are amendable to bootstrapping the integrated circuit supply voltages and a cascode can be used to increase the output voltage range. Nobody likes to use a separate floating bias supply but that also works like in the HP 6271B which is 60 volts and 3 amps. Where it gets tricky is if you want programmable current and/or voltage when your reference is no longer ground referred.I have less interest now in power supplies above 30 volts because a floating dual tracking 0 to 20 volt supply can be used as a single 0 to 40 supply. Doing this doubles the number of circuits though and is probably only desirable if you want the dual tracking supply function.

author: prasimix
author_rank: Unknown
timestamp: November 20, 2014, 08:55:33 am
content: Quote from: David Hess on November 19, 2014, 09:27:57 pmNothing yet in particular, still looking what offer i.e. TI, Linear and Analog devices. I found that there is in general two types of PGA: one with digital interface (like SPI) and another one without it.Quote from: David Hess on November 19, 2014, 09:27:57 pmI'm agree. More parts make frequency compensation difficult. Do you have any reference to discrete solution when we comes to current monitoring?Quote from: David Hess on November 19, 2014, 09:27:57 pmYes, separate floating bias supply add some parts but I'm still fine with it if overall result is good. Talking about HP/Agilent/Keysight solution I don't want to polute this thread with it so I openeda new onewhere I asked a couple of question about E3634 model. I'll appreciate your feedback.

author: void_error
author_rank: Frequent Contributor
timestamp: November 20, 2014, 09:33:08 am
content: If I'm going to use high side current sensing I might as well use a 'regular' 5V rail-to-rail opamp with low offset and a P-channel MOSFET like in one of the application notes on high side current sensing. I'll probably replace the resistor with a curent sink and the zener with a TL431. It'll still be simpler than auto-ranging and won't require any 'special' components which was the initial goal of this design.

author: David Hess
author_rank: Super Contributor
timestamp: November 20, 2014, 04:56:29 pm
content: Quote from: prasimix on November 20, 2014, 08:55:33 amBesides using the methods that the mentioned Tektronix and HP power supplies use for their current limiting, this application note from Analog Devices pretty much covers it:http://www.analog.com/library/analogdialogue/archives/44-12/high_side.htmlI favor the first circuit shown above but the problem with it is that at low output voltages, the current monitoring circuit runs out of compliance if the output is referenced to ground. I would reference the output to a point below ground to avoid this and level shift the control signal if necessary.QuoteThe solution I like for a simple separate floating bias supply is to include a small and inexpensive auxiliary transformer. Split bobbin power transformers like the Hammond 229, Pulse LP, and Triad FP series have high isolation and low capacitance if that matters. They are inexpensive, small, and have dual primary and secondary windings so they support 120/240 VAC inputs and provide a center tapped output or dual outputs if needed.

author: void_error
author_rank: Frequent Contributor
timestamp: November 20, 2014, 05:29:30 pm
content: Quote from: David Hess on November 20, 2014, 04:56:29 pmThat's exactly the circuit I was thinking about, having done a lot of research on high-side current sensing. The last version I've been working on allows easier substraction of the base drive current from the output current which means I can move the current sensing circuitry before the pass transistor, at least 5V above ground.

author: dannyf
author_rank: Super Contributor
timestamp: November 20, 2014, 05:43:59 pm
content: The use of p-ch mosfet vs. pnp is an interesting trade-off. A pnp allows the sensor to work at lower voltage differential; HOwever, because of base current, the error rate is higher; The use of a p-ch minimizes that current error but doesn't work at as low of a voltage differential.

author: David Hess
author_rank: Super Contributor
timestamp: November 20, 2014, 07:01:30 pm
content: Quote from: void_error on November 20, 2014, 05:29:30 pmI think one of the more recent Agilent power supplies did exactly this by mirroring the base drive to the power transistor and adding it to the measured current.

author: David Hess
author_rank: Super Contributor
timestamp: November 20, 2014, 07:02:49 pm
content: Quote from: dannyf on November 20, 2014, 05:43:59 pmIf high voltage JFETs were still available, I would consider one of them. I was going to suggest a p-channel depletion mode MOSFET but I could not find any.

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 10:03:55 am
content: Quote from: David Hess on November 20, 2014, 04:56:29 pmExcellent article, thanks for recommendation. Yes, first one has a real issue with low output voltages. Second and third cannot be used for low output currents.

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 10:07:08 am
content: Quote from: David Hess on November 20, 2014, 07:01:30 pmDo you possibly have anything to share with us (a model name or circuit block diagram or schematic)?

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 10:51:27 am
content: Quote from: David Hess on November 20, 2014, 04:56:29 pmWhat's about "quiet" hybrid bias supply, like solution presented (or marketed)here? In that case you can avoid auxiliary transformer and use the same Vin as main power loop. Yes, it's cheaper then switching regulator + 2 LDO's but possibly require smaller PCB space and do not need 115/230VAC to be present on the PCB.EDIT: bad link reported by David Hess is corrected.

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 02:44:00 pm
content: Quote from: prasimix on November 21, 2014, 10:07:08 amI just remember studying the schematics in connection with a discussion on the EEVblog forums months ago. I think it was one of their recent programmable power supplies.Quote from: prasimix on November 21, 2014, 10:51:27 amYour link does not work for me but there is nothing wrong with generating the floating bias supply directly. Switched capacitor techniques can even be used to avoid magnetics. I would probably use a small high frequency inverter with an isolation or pulse transformer because the noise is easier to control than with a switching regulator. High frequency sine wave drive is quieter and easier to filter yet.

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 03:09:47 pm
content: Quote from: David Hess on November 21, 2014, 02:44:00 pmSorry, now it should works.

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 03:16:28 pm
content: Quote from: David Hess on November 20, 2014, 07:02:49 pmIf 40V is high enough then there is a possibility to get some LSJ74 following thisannouncement.

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 04:35:25 pm
content: Quote from: prasimix on November 21, 2014, 03:09:47 pmI was thinking hybrid like in integrated versus hybrid instead of a switching pre-regulator combined with a linear post-regulator. There are three problems with what is described in the article you linked:Linear regulators have line rejection which falls with frequency. If you want to keep the noise out, then you need to passively filter it anyway so why include the linear regulator if it is not needed?It is complicated compared to a charge pump or inverter.The outputs are not floating.With careful design the noise from an isolated switching regulator will not be a problem. It is just easier to get low noise out of an inverter which is why I suggested it. Transformer flux is low so flux leakage is attenuated and the frequency and harmonic components are relatively fixed making them easier to filter. If sine wave drive is used then harmonics are a non-issue.If you do not want to wind your own transformer, they make standard transformers for this type of thing if you know where to look. Pulse transformers designed to provide isolated base or gate drive work well also.http://www.coilcraft.com/lpd5030v.cfmhttp://www.coilcraft.com/prod_isolation.cfmhttp://www.coilcraft.com/prod_gatedrive.cfm

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 04:50:52 pm
content: Quote from: prasimix on November 21, 2014, 03:16:28 pmThey used to make JFETs with Vds ratings above 100 volts. A p-channel high voltage depletion mode MOSFET would be ideal because of the low Vgs but it is not really necessary. A p-channel enhancement mode MOSFET will also work fine in this application as long as the bias supply can provide the higher voltage for the gate drive which should not be a problem at all.

author: Marco
author_rank: Super Contributor
timestamp: November 21, 2014, 05:19:06 pm
content: Quote from: David Hess on November 21, 2014, 04:35:25 pmWhy isolated? Why not just go say 1V below the bus voltage and boost from there? (You can buy single cell to 5V boost modules dirt cheap.)

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 05:20:47 pm
content: Quote from: David Hess on November 21, 2014, 04:35:25 pmI suppose that you are suggesting inverter only for negative bias supply connected to the output of positive bias supply or to the main rectifier.Using sine wave instead of square has obvious advantage. Does some of inverters or low power switcher widely available use sine wave? Thanks for Coilcraft recommendation. I'm aware of their offer, they have some really nice items.

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 06:36:41 pm
content: Quote from: Marco on November 21, 2014, 05:19:06 pmI thought we were discussing how to use a floating bias supply in connection with the control circuits of a higher output voltage power supply. This is a simple but sometimes confusing way to avoid the problem of using 5, 15, or 30 volt operational amplifiers to control a power supply with a 30 volt or higher output.Quote from: prasimix on November 21, 2014, 05:20:47 pmI was suggesting an alternative to using a separate 60 Hz power transformer to produce a bipolar floating power supply for the control circuits of a high voltage power supply. If you were winding your own transformer or just added a second transformer, you could have a pair of floating supplies from the same inverter.QuoteLow noise inverters may use sine wave drive. Some low noise switching power supplies use quasi-resonate operation which amounts to the same thing and has the same advantage.I linked the Coilcraft examples because they have good availability from distributors. Other companies make similar products. Few people want to wind their own.

author: Marco
author_rank: Super Contributor
timestamp: November 21, 2014, 07:03:34 pm
content: Quote from: David Hess on November 21, 2014, 06:36:41 pmOh ... why not just use somediodes and emitter followersfor that? I thought you wanted to use the separate power supply so you didn't need to keep as much headroom from the bus voltage (boosting a little on top would give you headroom for the control circuitry, wildly inefficient of course but the control circuitry doesn't use much static power with a FET pass transistor).

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 07:09:46 pm
content: Quote from: Marco on November 21, 2014, 07:03:34 pmThat is essentially what it amounts to. It is just another way to go about it.

author: prasimix
author_rank: Unknown
timestamp: November 21, 2014, 07:29:47 pm
content: Quote from: David Hess on November 21, 2014, 06:36:41 pmOk, so what about solution like one in the attachment? Of course it could be without LDO's on output but just with proper filtering.EDIT 2015-02-26: A tested solution is presentedhere.

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2014, 09:52:12 pm
content: Quote from: prasimix on November 21, 2014, 07:29:47 pmThe point is to generate a floating supply relative to the output and not the ground. For that the ground and input connections of your switching regulator and LDOs would be reversed. If you wanted a negative bias supply below ground, then a third winding would be needed.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 10:21:23 am
content: Quote from: David Hess on November 21, 2014, 09:52:12 pmThanks for correction. I'd like to skip for now usage of third winding or aux transformer and try to do everything with main transformer.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 10:33:35 am
content: Quote from: Marco on November 21, 2014, 07:03:34 pmThanks Marco for suggestion. I think that we are talking here about two different things. My initial conversation with David Hess was about bias power supply for control circuit op amps with split rail (i.e. +15/-15V) what is not used in void_error design. My main question is how to generate negative voltage without deploying additional winding or aux transformer.Suggested bootstrapping could be beneficial to drive serial BJT/FET for what void_error used so far additional driver circuit (U4, Q3-Q7).

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 10:46:52 am
content: Quote from: David Hess on November 20, 2014, 07:01:30 pmDoes something like this make sense? Current monitor is located before serial BJT/FET so main current + serial regulator current are measured and available on the LTC6102 output. To remove serial regulator current from the measurement, two additional op amps is used: one to measure voltage drop on R11 that is delivered inverted to the IC1A and subtracted from LTC6102 output voltage. Resulting value is then delivered to the current control "logic".EDIT: LT6102 corrected to LTC6102

author: dannyf
author_rank: Super Contributor
timestamp: November 23, 2014, 12:24:53 pm
content: QuoteI am not sure why you want to do that. The rest of the circuit could consume considerable current, rendering a bigger error before the current sense amplifier's reading and true load current, not to mention the tougher common mode signal at the higher end.I would put the current measurement after the regulator, and power the current sense amplifier before the regulator.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 12:31:02 pm
content: Rest of the circuit here is mainly supplied by separate bias power supply. So it is effectively "before the regulator" as you pointed out. Idea about current measurement before the regulator will ensure staying within working range of LTC6102 (over 2.7V) when Vout approach 0V.

author: dannyf
author_rank: Super Contributor
timestamp: November 23, 2014, 12:50:12 pm
content: QuoteNot sure what "2.7v" is. But if it is the minimum supply voltage, you don't need to put the sensing in front of the regulator.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 12:55:43 pm
content: Sorry, it's 4V is the case of LTC6102 used in example. So if I understood correctly you cannot measure let say a current of 100mA when Vout is 1.2V. Therefore current monitor need to be before serial regulator with min. 4V drop.EDIT: Hm, I'm little bit confused with this one. LTC6102 has indeed separate V+ and it seems that it can be anything between 4 and 60V. But in all their examples V+ is connected to positive rail. Is it just because they presume that current monitoring will be performed on higher voltage then 4V?

author: dannyf
author_rank: Super Contributor
timestamp: November 23, 2014, 01:09:41 pm
content: One is supply voltage range, another is common mode voltage range.Apples and oranges.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 01:10:55 pm
content: Yes, just edited my previous post

author: Marco
author_rank: Super Contributor
timestamp: November 23, 2014, 01:43:48 pm
content: If it's not before the pass FET the high side current sensor becomes more complex or you'll need an extra negative supply.I don't see the problem with a FET really, yeah the gate displacement currents will cause errors in the dynamic case ... but the current sensor has it's own internal FET which does the exact same thing and they are heavily bandwidth limited any way. The dynamic case isn't that interesting.

author: prasimix
author_rank: Unknown
timestamp: November 23, 2014, 02:26:34 pm
content: I probably need to get a couple of LTC6102 (or maybe better -1 version) and see what is possible. According to absolute maximum ratings table -INF and -INS can go down to V+ – 4V. In another table (electrical characteristics) for V+ min. is 4V. So to be able to make measurement for Vout close to 0V (or let say below 1V) one have to use min. supply voltage.

author: David Hess
author_rank: Super Contributor
timestamp: November 23, 2014, 03:03:08 pm
content: Quote from: prasimix on November 23, 2014, 10:46:52 amI think that is basically what they were doing. I remember studying the base drive circuits wondering why they were so complicated and concluding that they were compensating for the base current so the current limit measurement could be made on the other side of the pass transistor for the reason you mention in your other post.As Marco mentions if you use a power MOSFET, then this would not be an issue.

author: void_error
author_rank: Frequent Contributor
timestamp: November 23, 2014, 09:22:08 pm
content: Quote from: David Hess on November 23, 2014, 03:03:08 pmThere's still the gate-source capacitance which will matter with fast-changing load currents, I think, although I'm not sure how much it'll impact the current measurement precision if you measure current before the series pass element.

author: David Hess
author_rank: Super Contributor
timestamp: November 24, 2014, 02:15:31 pm
content: Quote from: void_error on November 23, 2014, 09:22:08 pmDynamic current as far as the load is concerned is already poorly controlled because of the relatively high value output capacitor typically present.If high precision dynamic output current is desired, then a different topology would be appropriate like a transconductance output with a minimum of output capacitance. It would be a precision current regulator with a secondary voltage control loop.

author: void_error
author_rank: Frequent Contributor
timestamp: November 26, 2014, 02:30:15 pm
content: Had a look at the LTC6101 and I'm wondering how well it's going to work with a variable supply voltage as it's going to be after the pre-regulator which tracks roughly 5V above VOUTalthough I'm more comfortable AD's discrete solution with a few modifications.Thinking of replacing the zener diode with a LMV431 and RBIASwith a current sink using an N-channel MOSFET...That way 5V could be used to power the opamp driving the MOSFET with the best thing being the avoidance of specialized parts like integrated current shunt monitors. I'll also include some input protection diodes.If there's anything wrong with this idea please let me know.

author: void_error
author_rank: Frequent Contributor
timestamp: December 03, 2014, 06:34:38 pm
content: After a truckload of simulations I've settled on the final design, I hope (I always find something to simplify/tweak).Used a 3.3V zener for the floating opamp and two PNP transistors in a darlington configuration instead of the P-channel MOSFET. They will be slower but at an overall gain of (literally) over 9000 the base current can be safely ignored.Linearity seems to be better than 0.5% with a current measurement range of 30mA to 3A. The reason it can't measure lower than is the output voltage swing of the MCP6021 (why this one? because it's quite cheap for its performance), at 1V/1A that means 30mV for 30mA after the difference amplifier used to remove the current drawn by the series pass transistors drive circuirty, which has been substantially simplified (does this even make sense?) in the last version.I'll most likely order the parts somewhere in January next year as I still have a few other smaller projects to deal with as well as designing a PCB I can make at home for this one - using solder paste and a hot air rework station for SMD components, without soldermask/silkscreen on the board - done that before and it works well, trace orientation relative to the component pads is critical or surface tension will screw things up.

author: mikerj
author_rank: Super Contributor
timestamp: December 03, 2014, 07:51:12 pm
content: Low voltage zeners have pretty horrible performance. If you need a low cost but reasonably stable reference the TL431 is hard to beat.

author: void_error
author_rank: Frequent Contributor
timestamp: December 03, 2014, 08:26:22 pm
content: Quote from: mikerj on December 03, 2014, 07:51:12 pmThe zener is used only as a voltage regulator (fed by a current sink) so stability is not that important. Might replace it with the LMV431 as it requires a lower current to operate (TL431 needs 2mA minimum) so I don't waste power on the current sink's transistor (33V @ 3mA worst case is a bit too much for a SOT-23 device).

author: void_error
author_rank: Frequent Contributor
timestamp: December 04, 2014, 01:57:25 am
content: Red stuff is there to make it easier to read.

author: holko
author_rank: Contributor
timestamp: December 04, 2014, 03:59:36 am
content: Quote from: void_error on December 04, 2014, 01:57:25 am(Removed picture in the reply for obvious reasons...)I don't believe it is a a big issue, but I would add an resistor in the >1k range on the output to tame the output capacitor.Other wise it looks as like a really nice and robust design!To really keep it robust It might be an idea to but a bidirectional TVS at the output.-Holko

author: void_error
author_rank: Frequent Contributor
timestamp: December 04, 2014, 04:22:29 am
content: Quote from: holko on December 04, 2014, 03:59:36 amOr I can move pin 2 of R16 to the other side of the diode...Quote from: holko on December 04, 2014, 03:59:36 amThe TVS isn't on the schematic but there's going to be one on the output jack board.Quote from: holko on December 04, 2014, 03:59:36 amThanks! I'm glad I didn't get stuck at the first version that worked on the breadboard. One thing about this design is that it's easily modifiable for different input/output voltages and currents (just change some resistor values) and doesn't use expensive / hard to get / specialized parts. I suppose it can even be scaled up to something ridiculous like 70V/5A (or more?) if the pre-regulator and LM317 are replaced with something suitable and more paralleled series pass transistors are added for that kind of voltage/current.

author: hugo
author_rank: Regular Contributor
timestamp: December 06, 2014, 09:22:17 pm
content: "That also means I didn't get the chance to play with the LM2596 either, using a LM317/TL431 temporarily in place of the pre-regulator set to track the same way as the LM2596 would do."Could you elaborate/share the schematic of a such pre-regulator using LM317 and TL431 ?

author: void_error
author_rank: Frequent Contributor
timestamp: December 06, 2014, 09:43:08 pm
content: Page 22, Figure 20, LM317 instead of 7805, R1 replaced with Q1/D1/R1/R2/R3 (like in the last schematic), resistor values chosen to work with the TL431's 2.5V reference. Used the LM317 mainly for current limiting so the magic smoke is confined to the inside of the semiconductor packages in case something goes wrong.Oh, and I forgot to include the 'tracking pre-regulator disabled below 300mA (or whatever, TBD after thermal calculations are done) current limit' featurein the last schematic but that's pretty easy to implement - only a comparator, a bunch of resistors and a PNP transistor are needed.

author: hugo
author_rank: Regular Contributor
timestamp: December 07, 2014, 03:38:58 am
content: How did you come up with those feedback resistor values R1/R2/R6 ? R6 should be between 1k and 5k according to the data sheet. Are you using a circuit simulator ?

author: void_error
author_rank: Frequent Contributor
timestamp: December 07, 2014, 09:57:27 am
content: Quote from: hugo on December 07, 2014, 03:38:58 amI first did the math for minimum output voltage (approx 4.7V with the chosen values) which ended up being 680R & 1k8, then selected R2 to have an output voltage higher than the minimum input voltage I needed for the linear regulator part (about 25V for 20V out). With the 15k resistor in place that'll be 33.4V assuming VFBis exactly 1.23V which will most likely not be the case as it could be anywhere between 1.18V & 1.28V. R6 was chosen to be high enough to reduce the current that would flow through the BE junction of Q1 (working as an emitter follower) into the output. If you reduce the value of R6 the minimum output voltage will increase. If the output needs to go lower then a load resistor is needed between R16 pin 2 & R22 pin 1. R22 may require tweaking.Quote from: hugo on December 07, 2014, 03:38:58 amI simulate some parts I'm not sure about before I prototype it on a breadboard.

author: void_error
author_rank: Frequent Contributor
timestamp: January 04, 2015, 03:11:14 pm
content: Small update: I found a better chip for the pre-regulator - theLTC3824. It can also go up to 100% duty cycle, uses an external P-channel MOSFET which means there's more headroom for the linear regulator as the LM2596 will drop roughly 2V at full current with the switch permanently on while the MOSFET will drop a lot less, depending on the actual part used, but overall I'll end up with increased efficiency.Two more nice features are the higher input voltage and current limit set resistor which means that now I can build other bench PSUs with different specs based on the same schematic. Maybe I'll need a small linear pre-regulator for the LM317 for higher input voltages... details, details.I might have reached my goal of designing an easily scalable PSU.

author: prasimix
author_rank: Unknown
timestamp: January 04, 2015, 10:15:58 pm
content: Do you have any information to share about your experience with LM2596? How it was works and does tracking is doing well with different voltage and load?

author: void_error
author_rank: Frequent Contributor
timestamp: January 05, 2015, 11:07:19 am
content: Quote from: prasimix on January 04, 2015, 10:15:58 pmNo, I don't. Found the LTC3824 and I'm planning to use that as it's more flexible. A switchmode regulator will always be slower than a linear one so I suppose if there's enough bulk capacitance at its output I shouldn't have any problems. So far I don't have a constant current DC load or a good scope so I'll have to improvise a circuit to measure the output ripple under various loads after I build it. I still have a PCB to design though...

author: prasimix
author_rank: Unknown
timestamp: January 05, 2015, 12:18:48 pm
content: I understand. Did you already find an appropriate P-ch mosfet for LTC3824?

author: void_error
author_rank: Frequent Contributor
timestamp: January 05, 2015, 02:11:41 pm
content: Quote from: prasimix on January 05, 2015, 12:18:48 pmHaven't looked but it shouldn't be difficult to find one. I only need to balance Rds(ON)and CGS. Higher input capacitance means more drive current for the LTC3824 but also lower Rds(ON)usually. A 100V MOSFET like the IRF9520 or IRF9530 should do.

author: cd-i
author_rank: Newbie
timestamp: January 06, 2015, 02:58:07 pm
content: HelloI might be a bit "out of topic" since you are discussing about preregulators again, but I found some interesting current monitors that might be useful for you.http://www.diodes.com/datasheets/ZXCT1082_87.pdfTake a look maybe you can use these to simplify your design.

author: void_error
author_rank: Frequent Contributor
timestamp: January 06, 2015, 06:34:08 pm
content: Quote from: cd-i on January 06, 2015, 02:58:07 pmHad a look and ruled them out for the same reason I ruled out the INA168 - Error vs. VSENSE. If you take a look at the graph on page 7 this basically gives a 1:10 (maybe 1:20) range for current measurement, that's why I ended up with a discrete solution.

author: void_error
author_rank: Frequent Contributor
timestamp: January 11, 2015, 09:55:26 am
content: A few more simulations revealed that the linear part is an unstable mess and that's probably the last nail in the coffin for this project.

author: prasimix
author_rank: Unknown
timestamp: January 11, 2015, 10:08:47 am
content: Did I understand correctly, you are giving up with your PSU or you are just referring here to the ZCXT1082 mentioned above?

author: void_error
author_rank: Frequent Contributor
timestamp: January 11, 2015, 10:11:32 am
content: Quote from: prasimix on January 11, 2015, 10:08:47 amI'm probably too stubborn to give up. Transient response is a huge mess - ringing and overshoot due to the transistors not turning off fast enough. Back to the drawing board. Nothing to do with the ZXCT1082.

author: prasimix
author_rank: Unknown
timestamp: January 11, 2015, 10:20:26 am
content: Oh, nice to know! It will be pity that everything just goes down the drain. You have my support to continue with your experimenting, offering various interesting ideas and fruitful discussion as before

author: void_error
author_rank: Frequent Contributor
timestamp: January 15, 2015, 01:23:57 pm
content: Managed to fix it, sort of, at least that's what the simulation tells me. Only the voltage feedback loop was simulated. Damn lazy power transistors...How can I improve it?V_OUT is the output voltage - red. The green one is the MOSFET gate voltage.EDIT: Output current in blue.

author: prasimix
author_rank: Unknown
timestamp: January 16, 2015, 11:13:49 am
content: Why do you think that is only due to lazy power BJT? What's about your control op amp closed loop performance? It BJTs is really the source of the problem maybe it's time to start thinking about MOSFET.

author: void_error
author_rank: Frequent Contributor
timestamp: January 16, 2015, 05:15:39 pm
content: Quote from: prasimix on January 16, 2015, 11:13:49 amThe opamp has 7V/us slew rate, fast enough, slowed down by C5 for stability reasons. I suspect it overshoots because of Q1, Q3 & Q4 not turning off fast enough. Increasing the value of C2 to 10uF pretty much solves the problem but I'd like to have the least amount of capacitance on the output because with higher value capacitors the output takes longer to settle.The pulse in the simulation has 5us rise/fall times (0-3A and back to 0) and I have absolutely no idea if that's a bit too demanding or not.The drawback of using a MOSFET is that it needs a VGSof at least 4V so I'd need at least 5V across it in case of a P-channel MOSFET with the drawback of higher power dissiption (15W for a 3A output). Then there is the MOSFET input capacitance which could ruin stability... I'll have to do a few more simulations to see if it's a better alternative. As for real world performance, I don't have a digital scope so experimenting is quite pointless as far as transient load response goes.

author: prasimix
author_rank: Unknown
timestamp: January 16, 2015, 05:50:27 pm
content: Quote from: void_error on January 16, 2015, 05:15:39 pmYes, but you are going to use SMPS pre-regulator. It gives you a simple way to generate additional n Volts on top of its output voltage to bias MOSFET.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 16, 2015, 05:50:55 pm
content: If you're concerned about the error amp, reduce C5 or add a resistor in series. Tweak values.The waveform shown is simply what overshoot you'd expect. The slew rate is limited by C2-R2. The overshoot and undershoot are characteristic of an integral type compensator. If you want better transient waveforms, test between 10-100% or 50-100% of rated load, not 0-100%.Also, the voltage gain stuff is really weird. Why does X1 need a follower? It can't be for current capacity, the pull-up resistor is quite weak. The gain stage seems to be wired for a gain of about 60, ten times what's necessary (the op-amp presumably has a range of 0-5V, give or take actual voltage range; the output stage can only ever use 0-30V). The gain stage has this weird emitter-feedback, but miller-compensated topology, which probably works fine, but probably also not as well as can be. It's also wide open on sheer current capacity.Q6 can pull a maximum of 7.6mA, which will more than saturate Q5, even to >500mA Ic. Which will more than saturate Q4 (Ic > 6A), and dump some serious current into R4/R8 and Q1/Q3 base. Normally this simply won't occur, but even a momentary short circuit WILL destroy the transistors and/or resistors. Which will then burn R1/R6 as the transistors most likely fail shorted. If they actually go open-collector (unlikely, but possible), and if Q4 or Q5 survives, the circuit will still appear to work, but at much reduced ratings, which is even more strange. (Q5 delivering load current via shorted B-E's, or R5/R9.)The suggestion for PMOS is funny because you've already got such an inverting gain stage (Q5). It just doesn't have the current capacity of an output device (well, it's not supposed to..), and is probably much faster (though slowed down by C4, oddly enough). But I wouldn't bother with MOS (P or N) for a bench supply, emitter followers are fine.At the very least, an emitter resistor for Q5 would be a decent start, as well as a current limiter circuit for any of Q1/Q3/Q4. Foldback or adjustable current limit can be optional extras, but a hard wired limit is a must.I would much rather see something like,- TIP31C followers (no need for excess current capacity, unless it's just what you have on hand), two in parallel is good- Modest e.g. 2N4401 driver, with suitable current limiting (collector can be supplied by a current source, if you're really hard core about protection)- At least simple current limiting (e.g., 2N3904 or 4401 wired across one or both of the output emitter resistors, collector back to the voltage gain node -- the driver base)- Gain stage should be passive current source (not sink), active pull down (common emitter amplifier), with shunt feedback (resistor from voltage gain node to base to op-amp). Offset needs to be adjusted, so some resistance from base to ground (or -V), and/or bias voltage at the emitter, will help there.- Both C5 and C3 should have series resistors; C5 for improved compensation (type II / proportional-integral compensator), C3 because otherwise, transients at the output are coupled directly into the op-amp, potentially causing problems. R11-C3(-series R) also constitute a lead-lag network against the op-amp, which is useful for very difficult compensation needs, but likely unnecessary here. (Maybe it was necessary, as shown: with the already double-integral system from C2, C4 and C5?)Tim

author: void_error
author_rank: Frequent Contributor
timestamp: January 16, 2015, 07:18:45 pm
content: Quote from: T3sl4co1l on January 16, 2015, 05:50:55 pmReducing C5 reduces stability, I'll try adding a series resistorThat was based on an older schematic, now I'm just using a 1N4148 for voltage and another one for the current (not shown), OR'ed together.The gain is overkill, needs a bit of tweaking.V3 - reference voltage - is between 0-4V for the 0-20V output version.Quote from: T3sl4co1l on January 16, 2015, 05:50:55 pmI was thinking of using some faster simple current limiting set somewhere above the PSU's normal range to avoid blowing my series pass transistors as the current limiting loop is most likely too slow to prevent that.Quote from: T3sl4co1l on January 16, 2015, 05:50:55 pmI'll have to check the datasheets for some followers with good enough SOA for the worst case scenario for this specific version - they'll have to survive 25V @ 3A across them for a brief period.Next step would be basically turning the gain stage upside-down and still keep the input voltage ground referenced... the opamp inputs will be protected using zeners.Thanks for the input Tim, back to the drawing board...

author: void_error
author_rank: Frequent Contributor
timestamp: January 18, 2015, 11:22:18 am
content: ... and stupid me ended up with a discrete opamp...The series pass transistors are now driven by a current source...More simulations are required to see if whatever, I'm trying to break it. If I can't it means it's a good idea.Forgot to put R10 in and then I was wondering for a few hours why the output voltage doesn't swing to ground

author: dannyf
author_rank: Super Contributor
timestamp: January 18, 2015, 11:35:58 am
content: QuoteI would suggest that you take a step back and ask yourself what your design goals are and how should you prioritize them.A great design is a compromised design.

author: void_error
author_rank: Frequent Contributor
timestamp: January 18, 2015, 01:24:33 pm
content: The design goals have changed a lot since the first post, took a lot of things further and I ended up with something far more versatile than I intended, which is a good thing.I generally don't like compromises, for me it's either go big or go home. But then again that doesn't mean that all my designs suck. Small compromises are ok though...Back the the improved crap linear regulator which I was just starting to hate, transient response is much better with a lot less overshoot. Load current varied from 1%-100% with rise/fall times of 10us. Had to increase the output capacitor to 10uF.

author: void_error
author_rank: Frequent Contributor
timestamp: January 20, 2015, 02:33:36 pm
content: Tweaked a bit more - it should be stable now.1us rise/fall times. 1%-100% load.X1_outV_OUTQ4-baseEDIT: Changed C2 to 1n and R21 to 100R - response looks much better now. After little more fooling around I found out that it can output 40V @ 3A and be stable with a 50V supply, nothing changed except two feedback resistors. I think I nailed this one... it's breadboard time again for the next few days and hopefully I'll be able to contain the magic smoke if any

author: Solder_Junkie
author_rank: Frequent Contributor
timestamp: January 20, 2015, 05:36:02 pm
content: Back in 1976 I built a power supply from Electronics Today International. It is project ETI131, mine is still going strong and has stood the test of time. The only modification done recently was to fit one of the low cost (eBay, from China) dual LED meters to replace the original meter which had started to become a bit "sticky".There is a link to a couple of zip files of the construction article on this page:http://www.thebackshed.com/forum/forum_posts.asp?TID=4422The output will go down to zero Volts and zero Amps (well a few mV and mA), so is suitable for a lot of bench work.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 20, 2015, 08:41:25 pm
content: Heh.. the gain/level shift is neat, though doing a whole four transistor diff amp / VAS / feedback seems rather overkill. Downside: because it's noninverting, the emitter ("tail") voltage will vary all over the place, which means R14 bias current varies all over the place. Probably if you add just one more transistorit'll be better guaranteed. By which I mean, a current source (one transistor, or two like Q6-Q7... whichever you prefer).If your V1 is guaranteed to be more than, I don't know, 10V or so, you could just as well delete R14 and run R18's bottom end there instead. Saves a milliampere, too.Also begs the question, if you're going to go to the trouble of using a discrete diffamp, why not get rid of the IC altogether -- it's not doing anything for you anymore!You can get IC level performance by a couple of tweaks: instead of R20, use a current mirror (between the diffamp collectors) to considerably boost the voltage gain, and reduce offset voltage. (You'll still be left with maybe +/-10mV offset for using unmatched transistors in the diff pair, but oh well. You can trim that out, or if it's going to be an adjustable power supply, who even cares?) The common mode input voltage won't include GND, so you won't be able to adjust output voltage or VREF all the way to 0V, though you could add a small -1V or something rail to allow that.Tim

author: void_error
author_rank: Frequent Contributor
timestamp: January 21, 2015, 12:59:31 am
content: Overkill is goodI'll use a current source in place of R14, used a resistor to keep things as simple as possible for the simulator.Not getting rid of the IC because of two reasons: 1. Offset voltage 2. Need for a negative supply (which I think is a pain in the ass - yeah I know it's not difficult stick a charge pump in there but I can't be bothered).Hmm... current mirror... transistor matching... eww tedious. Not going for the dual NPN either, not jellybean enough. A LMV321 will outperform the discrete-only version in terms of offset voltage anyway, btw the VREFis a DAC.I'm trying to go for something less fiddly here - just slap it together with the least amount of tweaking.About V1... that's actually going to be a tracking pre-regulator with an option to be disabled, I'll simulate that using a normal voltage source in series with a VCVS and probably do a multi-step analysis for different output voltages and currents.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 21, 2015, 02:35:12 am
content: You can also go for the darlington-esque input stage, e.g. LM339, 324, etc., which allows operation below GND.You don't need matched transistors for a current mirror any more than you do for the diff pair. The first priority is gain, which any current type load will instantly boost from ~25 with the resistor to >2000. Mismatch in the mirror causes mismatch in the Vbe of the diff pair, which (if intentionally imbalanced -- the exact same way you use a single op-amp with trimpot to the supply) can be used to null the input error.Or if you're still keen on using the op-amp for performance, why not go the whole way and use a proper (higher voltage, optionally R2R) op-amp directly? Dump about half the components count in one fell swoop!Tim

author: void_error
author_rank: Frequent Contributor
timestamp: January 21, 2015, 10:04:53 am
content: Quote from: T3sl4co1l on January 21, 2015, 02:35:12 amWell there's the problem... for this version the maximum input voltage is about 37V DC (24V AC rectified and filtered, no load), which makes finding a suitable opamp quite difficult, not to mention it's nearly impossible to find one if I want to go for a 30V or 40V output version so I'm sticking to this solution for flexibility and performance.Yeah, I know I could trim the output voltage to null the offset as I'll have a 12-bit DAC and a 24-bit ADC at my disposal at some point down the road but why create an extra problem? I can get the MCP6021 for $1 in one-off quantities in a SOT-23-5 package and it will always outperform the discrete solution when it comes to offset - less hassle with trimming stuff. If I want it to be cheaper I could just use a LMV321 - it's almost for free.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 21, 2015, 10:40:48 am
content: So, you're going with a more complicated and expensive solution because it's simpler..? Excuse me if I don't followTim

author: void_error
author_rank: Frequent Contributor
timestamp: January 21, 2015, 11:27:54 am
content: Which part are you referring to? DAC + ADC?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 21, 2015, 08:48:59 pm
content: No, I mean the op-amp and discrete stuff... structurally speaking you have the worst of both worlds. Might as well wrap it up into a slightly more expensive op-amp, or get rid of the amp altogether and clean up the discrete to be competitive. No point in having both.Tim

author: void_error
author_rank: Frequent Contributor
timestamp: January 22, 2015, 08:03:50 am
content: Hmm... I might as well go full discrete then, but I'll still need to 'OR' the voltage control loop with the current control loop which uses floating high-side current sensing (there's a schematic in one of my previous posts). Fortunately the current sensing circuit output is a current source so it's pretty easy to reference to ground. What I'm trying to do here is to design a version easily scalable for different output voltages and currents - just change some component values but not the PCB as I'll get 3 anyway from OSHPark.Driving Q10 directly with the MCP6021 seemed really unstable.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 22, 2015, 12:28:24 pm
content: Nice thing about discrete is, you can plug whatever you want into it -- you can tag on another diff+VAS in parallel with the first to do exactly that, without having to worry about making decisions between op-amp outputs (and the slew rate limited decisions allowing overshoot!).Tim

author: void_error
author_rank: Frequent Contributor
timestamp: January 26, 2015, 09:41:38 am
content: Made some progressNo. of opamps used: 0 (integrated ones)Only simulated it for 5V so far, common mode input range should include ground.Here's the result.V_OUTQ4-base- actually Q5 base but I didn't bother renaming itQ2-GIt only overshoots 0.23V - load from 1% to 100% in 1us which probably won't happen in real life.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 26, 2015, 11:58:34 am
content: Nice!It should poop out maybe 0.2Vaboveground, because of diff pair Vbe minus load Vbe (the current mirror or voltage gain transistor, respectively), plus Vce(sat) headroom. Do mind that "pooping out" means full output voltage (i.e., phase reversal), so this will be necessary to avoid.You could simply bias the inputs up with resistor dividers, or biased diodes, or PNP emitter followers, to push the common mode range back into place, or use yet another variant on the diff amp (like a folded cascode) to extend operating range.Also shows you don't need the 5V anymore, since it's just supplying a current. Pretty handy.Tack on a current limiter and you've got a pretty passable bench supply!Tim

author: void_error
author_rank: Frequent Contributor
timestamp: February 04, 2015, 12:57:05 pm
content: On to the current sensing part now... -5V rail needed, also more current mirrors for level shifting. All done on the output. All that's left is to figure out how to add this to the circuit... any ideas?I_OUTI_SENSE

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 04, 2015, 01:07:39 pm
content: Eww... you've got three things wrong with that, which is 90% of the circuit... the darlington is going to be sloppy (mainly slow to turn off, but probably still stable), and not just one but two current mirrors, that are discrete; they might be good enough (a few %), but geez, why play ping-pong when you can use a diffamp part directly?AD8210 comes to mind. Probably don't need one that fancy, but that type of (5-ish terminal) "diffamp with voltage output" current sensor is the way to go. There's also the three terminal high-side sensors, which are what you're doing here, but they're less accurate -- and as you know, don't work with zero dropout!I'd rate the "diffamp with resistors you need to trim" method as better than this. But even better still, yeah, this is one of those cases where you really just want to give in and use something pre-trimmed.Tim

author: void_error
author_rank: Frequent Contributor
timestamp: February 04, 2015, 01:26:12 pm
content: A BSS84 would be a better replacement for the darlington, or I could use a LTC6101 for current sensing. However it will still need to be referenced to -5V so I'll still have to play ping-pong with its output voltage in order to reference it to ground. I have two options here: 1. current mirrors 2. opamps, with the first one being a buffer and the other one a level shifter which is the first idea I tried. Decisions, decisions...Transistors are dirt cheap though and therefore more tempting

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 04, 2015, 07:12:18 pm
content: Transistors are cheap, but you end up paying for it in space, design time and so on.I mainly play with transistors because it's fun and "good enough". I wouldn't recommend it for precision (sub-1%) work -- it'll be too damn drifty, even after calibrating it.Sadly, it's rarely economical as a design staple, these days -- development costs are that much greater than a few cents here or there for the parts, and the cost of transistors versus ICs varies with where you're buying parts from, and assembling them at. Automated SMT is definitely the leader around here, but through hole may still be cheapest from some Chinese factories!Tim

author: void_error
author_rank: Frequent Contributor
timestamp: February 05, 2015, 01:19:01 pm
content: I'm only going to make 3 of these power supplies, not 9k+, so they're going to be hand-built. Development costs don't matter that much since I'm using this project to learn new stuff.Now here's the catch: I'm trying to design a power supply that's scalable for different output voltages/currents while keeping the same circuit board. Oh, and there's another thing: it must use only one DC input voltage.EDIT: Changed the thread title as the whole thing went south...

author: void_error
author_rank: Frequent Contributor
timestamp: February 10, 2015, 11:20:21 am
content: Had a little play with current mirrors today and everything that I was expecting to happen just happened. As it was pointed out to me they are very sensitive to temperature - any temperature difference between the transistors will cause a relatively large imbalance. The hotter transistor to conduct more current which is obvious given the -2mV/K of the BE junction. I did equalize the currents first using a multi-turn trimmer in the same way it's used to null opamp offset.One solution would be to use dual transistors, pretty hard to get compared to single ones but at least they'll be at almost exactly the same temperature. Not liking this. Another option might be to keep the transistors physically close which probably wouldn't be difficult with SOT-23 devices.Either way I'm stuck here.

author: blackdog
author_rank: Frequent Contributor
timestamp: February 10, 2015, 12:16:57 pm
content: Hi void_error,Please, dont make the mistake because Spice tels you its stable (power on, Power off and Load variation)I did extensive testing on power supply's, and i can tell you, its is difficult to get it all wright.Just test the real thing, you will be amazed how much Spice is lying to you.Take a look @ this Dutch website (a lot of pictures!) how i measured the AC Ri. of a powersupply i'am designing.http://www.circuitsonline.net/forum/view/110029/8/noise+amp+power+supplyBe aware that i use 2x 0,5M kabel to my Dummy Load, in the Dummy Load there is a 6,8uF capacitor (High Q)This make's the ringing on the output of the power supply.The better the power Supply the smaller the ringing(its complicated, bandwith of the opamp, bandwith compound stage, ESR and L of the output capacitor, wiring etc.)With de best compound output stage, and a fast opamp, there was only a view mV over and undershoot @ almost 10A change in load.Thise is only possible with good wiring technics.Keep up the good work!Kind regarts,Blackdog

author: void_error
author_rank: Frequent Contributor
timestamp: February 10, 2015, 02:00:20 pm
content: Quote from: blackdog on February 10, 2015, 12:16:57 pmI'm not entirely relying on simulations, just using them to get a general idea of how the circuit will perform and which components affect which parameters.Unfortunately I don't have the test equipment you have (no DSO, just a crappy analog scope and a bunch of crappy multimeters) so it's going to be a bit of a pain in the arse to test the whole thing.Quote from: blackdog on February 10, 2015, 12:16:57 pmI couldn't get away with using an integrated opamp because of the relatively high supply voltage involved in case of a higher voltage version. I know I could use another winding like a few HP/Agilent/Keysight/(wonder what's next) use to bias some stuff but that translates into another separate transformer and I'd like to keep this bench supply as simple as possible - only one transformer winding required.I'll post an updated list of project goals soon. The one on the first page has become obsolete.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2015, 06:28:53 pm
content: Quote from: void_error on February 10, 2015, 11:20:21 amDuals don't actually save you much, because the lateral thermal resistance (from one die to the other -- no, they don't use monolithic transistors in the duals, unless they very specifically say so) is not much less than the thermal resistance to ambient for a single device. So if the powers are unmatched, the temperatures will be, and you'll have a predictable current mismatch.One thing you can do to address this is try to enforce equal conditions on both transistors. The Wilson mirror cascodes the output device with another, so both transistors at the bottom (which are doing the mirroring) see low collector voltages. They're still not exact (indeed, the error goes the opposite direction now), but it's a big help if you're dropping more than a few volts.QuoteNo need to be stuck. Just do it with op-amps: they have much more predictable Vbe.Tim

author: void_error
author_rank: Frequent Contributor
timestamp: February 11, 2015, 07:04:28 am
content: Here are the updated design goals:Analog partScalable for different output voltages/currents - up to 40V & 5A output using the same PCBStep-down switchmode pre-regulator which can go up to 100% duty cycle - for low output currents it will automatically be disabled to provide a cleaner outputNot use highly specialized/hard-to-get partsOnly one transformer winding fed into a bridge rectifier + filter caps or any fixed DC supply with the required voltage/current output used to power itVoltage/current can be set either using DACs or regular multi-turn potsDigital part(optional, incomplete)MCU controlVoltage/current and maybe other things displayed on an LCDUSB interfaceAuxiliary 5V and/or 3.3V earth-referenced output to power logic circuitry (the USB connection to a PC will be mains earth referenced anyway)As always suggestions are welcome.

author: prasimix
author_rank: Unknown
timestamp: February 11, 2015, 12:50:21 pm
content: Quote from: blackdog on February 10, 2015, 12:16:57 pmHi blackdog, the link that you providing is full of interesting pictures and diagrams. Do you possibly have any related english text?

author: void_error
author_rank: Frequent Contributor
timestamp: February 11, 2015, 01:05:39 pm
content: Quote from: prasimix on February 11, 2015, 12:50:21 pmYou could use google translate to translate from dutch to chinglish and then try to decipher the chinglish, it's doable.

author: prasimix
author_rank: Unknown
timestamp: February 11, 2015, 10:55:08 pm
content: Quote from: void_error on February 11, 2015, 07:04:28 amI'd like to propose a modular design with some sort of "motherboard" and plug-ins with various functionality. In that case we can share the best part of many designs like:input filtering, protection and rush-in limitation (in case of huge toroidal transformer)PFC or transformerpre-regulator stage which can be DC-DC (step-down or even step-up battery or solar panel powered!) or AC-DCbias power supplypost-regulator (SMPS or linear, serial or shunt)voltage referenceOVP, OCPcontrol section: manual or digital (ADC/DAC, PIO)MCU with with various types of connectivity to PC, other equipments, etc.control panel sectionoutput filtering and protection, etc.That could be a group effort with different level of commitment when we have to define physical boundaries, type of connection, levels and signals (both analog and digital). That possibly slow down a progress on the beginning of the process but can be beneficial on the long run since we can reuse and much easier multiply certain functionality with such buildings blocks. I'm aware that due to the nature of analog circuits it's not so simple to do that like in digital world but we can examine existing solutions and see what is applicable for DIY level or construction and usage. At the end I believe that will be possible to organize various group buys where participants don't necessarily need to select the same configuration depends of their taste and requirements.

author: void_error
author_rank: Frequent Contributor
timestamp: February 12, 2015, 08:38:46 am
content: That's quite close to what I'm aiming for and as you said the analog part is the tricky one because of the initial requirements - having no separate floating bias supply like the E361xA does. However this has some advantages with one being the possibility to use an open-frame AC-DC switchmode power supply.I'm planning to make the whole thing modular with the minimum configuration being the following:Rectifier + filter caps - in case a (single winding) mains transformer is usedSwitchmode pre-regulator - optional but recommended for higher output powerAnalog board - adjustable linear regulator (the post-regulator) with adjustable output voltage and current limit and maybe electronic fuse mode current limitingControl board - powered by the analog board, contains a voltage reference, connections to off-board pots to adjust output voltage/current limit and off-board panel meters as well as an output-enable switch/relay

author: prasimix
author_rank: Unknown
timestamp: February 13, 2015, 09:50:35 am
content: Great, do you think that we can open i.e. a new topic where we can start to define a general specification which will be open for suggestion and discussion with all interested members?

author: void_error
author_rank: Frequent Contributor
timestamp: February 17, 2015, 10:20:53 am
content: I'll start a new topic as soon as I have a schematic, do some tests and settle on the specs.I've also figured out relatively simple way to do all the level shifting on the current sensing part, looks good on the simulation. The TLC277 probably isn't the best choice when it comes to accuracy but it's cheap and meets the input voltage requirements with a reasonably low input offset voltage.Yes, I'm playing ping-pong with voltages and currents to get the output referenced to ground, but at least supply voltage variations won't affect the circuit.