Creating a high voltage current source controlled by microcontroller - Page 1
Forum section: electronics / beginners

author: sean87
author_rank: Regular Contributor
timestamp: August 20, 2017, 08:41:04 pm
content: Hi all, I am back with another stupid question.I have a resistor as a DUT. This resistor (unknown material) can handle a shit ton of wattage. Its resistance at room temperature is10?and when put into a test oven at 185C is20?. My task is to force in 2A of constant current into this DUT and monitor if it breaks down or not.Since the resistance is variable, I can not only rely on a voltage source, hence I need a current source that I can hook up to my lab power supply (it can supply 50V@3A, 150watts).I have already anAPEX MP38CLpower amplifier that I hope to abuse its current limiting feature to achieve this task. In datasheet its written that the current limiting resistor can be calculated by0.7/IwhereIis the desired current. In my case, R will be 350m?.I want to be able to turn on/off this current using digital output of a micro (3.3V). Something like this:I know there will be at least 80watts dissipation in the op-amp?? I will be using an intel stock fan too cool it down!Here is my actual questions:1- How can I use that 3.3V signal to tell the OpAmp to enable its output without a feedback loop that has a gain of like 13 (15x3.3 roughly 40V). But I guess it has all sorts of problems in terms of stability, etc.2- What problems will I face if I ground the -Vs of the opamp? I only have one lab supply...3- Do you have a better idea?

author: Geerant101
author_rank: Contributor
timestamp: August 20, 2017, 09:00:10 pm
content: 1&3. Op amps don't dissipate "power" as you are describing. It would be better to drive a MOSFET which controls the current to the DUT. Then using a sense resistor in series with the DUST, the opbaml can use the voyage drop across it to control the MOSFET.2. Connecting ground to the -Vs terminal is fine. This eillean an op amp with +&- 5v supply range will have 0-10v supply. Will be fine for an application like this.Sent from my SM-G920I using Tapatalk

author: retrolefty
author_rank: Super Contributor
timestamp: August 20, 2017, 09:09:25 pm
content: QuoteSo your 'lab' power supply doesn't have a settable current limit function?

author: sean87
author_rank: Regular Contributor
timestamp: August 20, 2017, 09:15:27 pm
content: Well, it has...but the point is, I want to control when to turn on/off the current through software. the lab supply does not have this feature. even if it does I want to do it the opamp way.

author: Zero999
author_rank: Super Contributor
timestamp: August 20, 2017, 09:27:31 pm
content: Use a switched mode high current driver. See the tip #13 in the PDF linked below.http://ww1.microchip.com/downloads/en/DeviceDoc/41215C.pdf#utm_source=MicroSolutions&utm_medium=Link&utm_term=FY17Q1&utm_content=MCU16&utm_campaign=ArticleYou'll need a high side MOSFET driver to translate the low voltage output from the comparator, to the higher voltage required to drive the P-MOSFET.

author: sean87
author_rank: Regular Contributor
timestamp: August 20, 2017, 09:58:35 pm
content: Hmmm...The opamp I have says it can handle Up to 10A and supply inputs are 200V....You mean there is no way I can use just this opamp to get 2A constant current?

author: retrolefty
author_rank: Super Contributor
timestamp: August 20, 2017, 10:52:59 pm
content: Quote from: sean87 on August 20, 2017, 09:58:35 pmWhat you have is not an op-amp, but rather a hybrid amplifier comprised of op-amp(s) and higher power discrete semiconductors. An op-amp is a well defined semiconductor component, that board you have is not a component. This may sound pandemic but words and names this basic have specific meanings.

author: Zero999
author_rank: Super Contributor
timestamp: August 20, 2017, 11:07:18 pm
content: Quote from: retrolefty on August 20, 2017, 10:52:59 pmSorry you've got that wrong there. The MP38 is an op-amp. There's no rule saying an op-amp has to be a monolithic IC or even a semiconductor component. It could be made from numerous discrete components on a PCB module or valves. Indeed the early op-amps were made from discrete components, connected together and housed in a module.Quote from: sean87 on August 20, 2017, 09:58:35 pmYou could, but using the current limiting feature is not a very good way of implementing it, because it won't be accurate. The current limit is a safety feature, to protect the op-amp and shouldn't be relied upon for use a constant current circuit. You're better off using a traditional op-amp constant current sink circuit.

author: danadak
author_rank: Super Contributor
timestamp: August 20, 2017, 11:52:26 pm
content: A monolithic power OpAmp -http://www.ti.com/product/OPA541On the documents tab is an ap note describing single supply operation.Regards, Dana.

author: Geerant101
author_rank: Contributor
timestamp: August 21, 2017, 04:01:07 am
content: To get the drive voltage to drive the op amp just use a DAC output from the microcontroller or use 8 or 10 Digital outputs configured as an R2R ladder (essentially imitating a DAC) if you do do t have a dac on your current micro.Sent from my SM-G920I using Tapatalk

author: David Hess
author_rank: Super Contributor
timestamp: August 21, 2017, 04:28:04 am
content: The built in current limit for the Apex MP38CL is based on the voltage across a Vbe junction so it is meant for protecting the amplifier and load and not for precision current limiting.A ground refereed current sink will do exactly what you want:https://www.electronicsweekly.com/blogs/engineer-in-wonderland/current-sink-stability-2015-10/Make the current sense resistor 2 amps / 3.3 volts = 0.61 ohms but beware that it will have to dissipate 6.6 watts. Better would be to use a resistor divider to reduce the 3.3 volt on voltage allowing a lower value sense resistor to be used.The output transistor will need to be able to dissipate upwards of 20 watts of power if the load resistor is changing value by 10 ohms. That will not be difficult for a single large transistor to handle.If you want to use just your Apex MP38CL then there is a way to do that also. Configure it as a non-inverting amplifier with the current sense resistor between ground and the inverting input and the test resistor between the output and the inverting input. Now the Apex MP38CL is essentially duplicating the current sink example above. You will need a low current negative supply voltage of at least -15 volts for the input section of the Apex MP38CL for this to work.Figure 2 in the Apex MP38CL datasheet shows the circuit. The load resistance RL is removed and the feedback divider with your test resistor as Rf becomes the load and the sense resistor becomes Ri. Your switched 3.3 volt source is applied to the non-inverting input.When 3.3 volts is applied to the non-inverting input, the output of the MP38 rises until 3.3 volts is present at the inverting input through the divider. Since 3.3 volts is then across the 1.65 ohm sense resistor, 2 amps flows from the output through the feedback resistor which is your test resistor. The inverting and non-inverting inputs of operational amplifiers draw practically no current.

author: sean87
author_rank: Regular Contributor
timestamp: August 21, 2017, 10:02:31 am
content: Thanks a lot for the detailed answer, it's in the lines I need to be I think.Regarding the circuits in the link that you put (which circuits at the bottom of the page? left or right?), the LT1492 has a maximum supply of 36V, but I need at least 40V for 2A over a 20Ohm load. So I need an OpAmp that accepts more than 40V as supply, or preferably 45V or higher to account for voltage drops. Do you have such OpAmp in mind?Also, I did not get the idea about the changes I have to make in Figure 2 of the MP38 datasheet...it might be too much to ask but can you kindly attach a schematic?

author: David Hess
author_rank: Super Contributor
timestamp: August 21, 2017, 01:57:06 pm
content: Quote from: sean87 on August 21, 2017, 10:02:31 amThe operational amplifier does not have to see the high supply voltage. Operate it off of a lower voltage.Quotehttps://en.wikipedia.org/wiki/Operational_amplifier_applications#Non-inverting_amplifierR2 is your resistor under test. R1 is the sense resistor.

author: Zero999
author_rank: Super Contributor
timestamp: August 21, 2017, 02:44:03 pm
content: Yes, power the op-amp off a low voltage and the load can be run off the higher voltage.

author: sean87
author_rank: Regular Contributor
timestamp: August 21, 2017, 03:04:17 pm
content: Ok I am slightly getting the idea...Will I need to use a parallel arrangement of mosfets? Or can I find a mosfet which can survive 40V@2A = 80Watt?

author: danadak
author_rank: Super Contributor
timestamp: August 21, 2017, 03:33:40 pm
content: You will have to do a thermal analysis to make sure you don't melt silicon.Google "mosfet thermal analysis utility", lots of info, tools.A HV high power OpAmphttp://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=OPA549&fileType=pdfRegards, Dana.

author: David Hess
author_rank: Super Contributor
timestamp: August 21, 2017, 06:40:10 pm
content: Quote from: sean87 on August 21, 2017, 03:04:17 pmHow much voltage are you expecting across the load after it heats up? You said 20 volts at 2 amps earlier so with a 40 volt supply, that leaves just 20 volts across the power MOSFET and sense resistor.With a big but inexpensive TO-247 part, the thermal resistance could be 0.75C/W so at 40 watts, the junction temperature will be 30C above the case temperature and a reasonable heat sink will double that. So the junction temperature will be 60C above ambient, say 25C, so 85C. At 2 W/C derating, that subtracts 170 watts from the power rating. There are many inexpensive TO-247 parts with a power rating of 210 watts or higher and the higher the better.You might need a linear rated part however. Many parts intended for switching applications lose 95% of their current rating at 20 volts. This is the power MOSFET version of secondary breakdown in bipolar power transistors. That leaves parts like the $8 300 watt 500 volt 15 amp 0.48 ohm IXYS IXTH15N50L2 which lose none of their current capability at 20 volts or even 100 volts.I think IXYS makes the least expensive linear rated MOSFETs but maybe someone else knows of others. If you want to use a cheap switching type of MOSFET, you will need to evaluate the datasheet very carefully.

author: sean87
author_rank: Regular Contributor
timestamp: August 21, 2017, 08:36:05 pm
content: Quote from: David Hess on August 21, 2017, 06:40:10 pmNo no, I said I have a variable load that goes from 10 Ohm to 20 Ohm...so the worst case is 20 ohms and in order to have 2A the FET will have to pass 40V (or slightly higher).I checked IXYS IXTH15N50L2...it seems none of the major vendors have it available at least for a next day delivery. Is there another part with same characteristics?I have heard that MOSFETs work good in parallel, is that right? how about 2 or 3 cheaper ones in parallel?I prefer not to use switching...I mean I want to perform a destructive test on my DUT and current should be continuous.

author: Zero999
author_rank: Super Contributor
timestamp: August 21, 2017, 09:47:27 pm
content: The switched mode idea I proposed earlier doesn't have an issue with power dissipation, but it emits more noise and there will be a significant amount of current ripple. I did design a similar switched mode PSU, using standard easy to get components, awhile ago but don't have the schematic handy or the time to redraw it at the moment.

author: David Hess
author_rank: Super Contributor
timestamp: August 22, 2017, 09:01:42 am
content: Quote from: sean87 on August 21, 2017, 08:36:05 pmFor the purposes of power dissipation, the power transistor only sees the voltage drop and not the 40 volts. So if the load is 20 ohms, the voltage across the load is 40 volts at 2 amps but the voltage across the power transistor is the difference between 40 volts and the input voltage which needs to be higher. With a 50 volt input, that will only be 10 volts.QuoteIXYS has a bunch of transistors in that series and the IXTH15N50L2 was the lowest power and least expensive one. I only suggested it because Digikey carries it. You can get a list of the IXYS partsfrom Mouserbut Mouser does not list the power ratings.I am not sure who makes power MOSFETs rated for linear operation other than IXYS. NXP has some which should work though like the PSMN4R8 and they should be easier for you to find.QuoteThat is true for switching applications but for linear applications, bipolar transistors are actually easier to use in parallel because MOSFETs have more variation in Vgs than bipolars have in Vbe so MOSFETs need a higher ballast resistance for equal current sharing. So parallel MOSFETs would not be my first choice.What you could do though is use a smaller power MOSFET to drive a bunch of power bipolar transistors which are in parallel which should be less expensive anyway. A couple of TIP35 transistors would work.

author: sean87
author_rank: Regular Contributor
timestamp: August 22, 2017, 06:16:05 pm
content: Well, I did find this example circuit inAPEX AN13 Figure 7:I think using this circuit I can get away with the MP38 and do not go with the MOSFET solution. Right? If it is the case, what Wattage should be the Rs or the sense resistor?

author: Zero999
author_rank: Super Contributor
timestamp: August 22, 2017, 07:00:30 pm
content: Quote from: sean87 on August 22, 2017, 06:16:05 pmThe current should be positive in that circuit, which will probably not work in real life because the MP38's common mode range only goes to 15V above the negative rail.Does one side of the load have to be connected to 0V?

author: sean87
author_rank: Regular Contributor
timestamp: August 22, 2017, 09:48:30 pm
content: Quote from: Hero999 on August 22, 2017, 07:00:30 pmThere was an error in my simulation...LTSpice regards the pins of the resistor...so by rotating the resistors 180 degrees I am getting the correct positive current. Regarding the common mode range, you are absolutely right according to its datasheet...Since I need 40V over 20 Ohms to conduct 2A, then does it mean the +Vss should be 60V and -Vss should be -35V?Quote from: Hero999 on August 22, 2017, 07:00:30 pmYes it should because I will put a MAX9611 which is a high side current sense amplifier with a 0.1 Ohm sense resistor to monitor the exact current which goes into the load.

author: Zero999
author_rank: Super Contributor
timestamp: August 22, 2017, 10:02:41 pm
content: Quote from: sean87 on August 22, 2017, 09:48:30 pmDoes the actual current need to be controlled by the MCU or will just on/off action do?

author: sean87
author_rank: Regular Contributor
timestamp: August 22, 2017, 10:18:52 pm
content: Quote from: Hero999 on August 22, 2017, 10:02:41 pmWell On/Off is fine in the worst case, but now that we are going to this much trouble, why not a true VCCS? is there too much difference between having it as On/Off or a true VCCS?

author: Zero999
author_rank: Super Contributor
timestamp: August 22, 2017, 10:38:39 pm
content: Quote from: sean87 on August 22, 2017, 10:18:52 pmBecause there are simpler ways of doing this if it only needs to be on or off?

author: sean87
author_rank: Regular Contributor
timestamp: August 22, 2017, 11:03:45 pm
content: Ok i am all ears for only an on/off solution...

author: Zero999
author_rank: Super Contributor
timestamp: August 23, 2017, 06:02:19 pm
content: I'd use the TL431. Q1 and Q2 can be replaced with a single TIP121, to reduce complexity.