Need some remarks for my 2.25 kW Buck Converter design - Page 1
Forum section: electronics / projects

author: biker.josh07
author_rank: Contributor
timestamp: September 05, 2014, 02:06:12 pm
content: I am designing and building a 2.25 kW Buck converter that is connecting an array of solar panels to the resistive element of a domestic hot water cylinder.On the board is a changeover relay to switch between sourcing power from the panels or from a 230V AC source. The AC input has an EMI filter to prevent conducted and radiated emissions from propagating back up the line.An LEM current sensor and a voltage divider are used to gather the panel current and voltage measurements.These are fed into fully differential op-amps and then in to a fully differential ADC which outputs data in SPI. A Raspberry Pi is being used to gather the data and drive the PWM in to a bootstrapped gate driver with the duty cycle dependent an an mppt algorithm. The Raspberry Pi also controls the switching of the relay but the relay driver is disabled via a comparator if the MOSFET hasn't been switched off which prevents the relay from switching a DC current. An auxiliary power supply is provided for the control circuitryFor my first pass of the the board layout I've tried to follow standard practice like keeping the input loop,output loop, and gate drive loop as small as possible. I have created a split ground to separate the switching circuit from the control circuitry.These are joined by a 0 Ohm resistor. I have tried to minimise trace lengths in the control circuitry to prevent EMI disturbing analog measurements. I still have long 12V supply rails to the gate driver which crosses the switching circuit traces, so I think this needs to be changed (or maybe just put some ferrite beads on the line?)Some component specsMOSFET: Infineon IPP60R099CP 650VDiode: Infineon SiC ThinQInductor: Ferroxcube PQ50/50 calculated to be around 560uH for a desired current ripple of 2A at full power.Film input output caps: Cornell Dublier 30 uF input 10uF outputKemet High frequency 0.1uF ceramic bypass caps on the input and outputGate driver: International Rectifier IRS21867 4A source and sink capability.Control IC's are from TI. All of the components that have been selected suitably rated.Please give me some feedback for the circuit and layout if you have any and I'll be happy to answer any questions. I've attached some screenshots of the PCB layout and also a pdf of the circuit schematic.ThanksJosh

author: dr.diesel
author_rank: Super Contributor
timestamp: September 05, 2014, 02:11:17 pm
content: Hi Josh, please recheck, don't see the pfd.

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 02:02:36 am
content: EEVblog website seems to be playing up on me and I can't upload anything.My apologies

author: David Hess
author_rank: Super Contributor
timestamp: September 06, 2014, 02:04:01 am
content: If the Pi is directly controlling the buck switch, what happens if it crashes or otherwise fails leaving the switch turned on? I do not see any sort of cycle-by-cycle current limit or timeout or fail-safe on the power switch drive.

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 02:12:22 am
content: The converter will be part of a larger system which includes a fuse for overcurrent protection

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 06, 2014, 03:56:07 am
content: As a former postgrad who has to help out a lot of undergraduates with their 3rd/4th year projects I don't like it when I see them designing mains circuits. Especially of this complexity, in 3rd year, rather ambitious!My first and most important suggestion would be to neaten the schematic so that others can read it and so that you can check things instead of relying on "remembering" how you connected it. You don't need to fit everything on a single page. The way I'd separate it is to have the power stage on one page and the control stage on another page with clearly defined signals going between them. A nice left to right flow also makes it easier to read, instead of for example the vertial AC grid filter. Include the device model numbers in the schematic, you can put this detail in the individual part as a comment and make it draw on the schematic. Listing the banner specs of components is completely useless to someone external looking at your work.As for what I can make out in the design... I'll left to right, top to bottom:- 450V is some seriously dangerous voltage, do you understand the creepage and clearance requirements (i.e. you don't have ground plane near your 240V input)? Do you understand the safety requirements for any exposed metal that a person might touch (such as a low voltage signal wire that goes over to your Raspberry Pi)? What's dangerous to a person is the voltage with respect to each, not the voltage with respect to your local ground.- 5A max, do you need the LEM to have 4 turns?- The "input EMI filter inductor" L2 may cause problems if it's not properly designed. Usually the DC input stage will have a common mode inductor to prevent common mode EMI travelling out the DC port to earth. Solar panels don't really care about differential mode EMI.- Why is the snubber circuit D1, C23, R13 across the MOSFET? In a buck converter it's the diode turning off when the current goes discontinuous that causes dangerous ring, hence the snubber should be accross the diode.- Do you understand the X1,X2,Y1,Y2 safety ratings of capacitors to make a safe filter? Use an off the shelf EMI filter for the incoming AC. You can get IEC connectors witt built in filters. Not only easier, but safer. Your setup of the incoming AC mains needs a lot more thought. You appear to be referencing your power circuit ground and control circuit ground to earth. You are only switching the active line in and out, <B>the neutral is going nowhere!!</B>- A fuse is not suitable overcurrent protection. A fuse takes milliseconds to blow, semicondutors take microseconds to blow.I'll stop here. I don't want to sound too negative, but I really think you are biting off more than you can chew. There are several different fields of electrical engineering you are trying to combine here, each of which are challenging and potentially dangerous on their own. Power electronics (the buck converter) is a reasonable project in itself if you were aiming around the 50V level, without any mains involvement. Once you get up to the 450V you're talking about things get a lot more complex and hazardous, especially around EMI (not just EMI that goes into the world, but the EMI that will go back into your control circuit and make you cry). Adding in a mains connection without properly understanding the implications is just compounding the dangers.If you are dead set on this project you are long way away from laying out a PCB. Does your supervisor know this detail of your project? You need to really rework your fundemental design with your supervisor (who may know what they are doing, but then again may not).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 06, 2014, 04:16:39 am
content: The transistor blows in 10us, the fuse blows in 10ms. Which one do you think is going to win?Software control: no. Not even no, hell no. Current mode control, or smoke, those are your choices...What are the differential amplifiers for? You can get 12 bit 1MSa SPI ADCs in single ended -- no need for an amp at all. And why 95MHz amps at that? Nyquist is 500kHz, unless you're trying to ET for some reason. But that still doesn't make sense as the LEM's bandwidth ends around 100kHz (, and the 10uF on the voltage feedback has a screaming 159Hz bandwidth.Why such a massive transistor? You can use larger transistors to reduce conduction losses, but switching losses go up from all the capacitance. The SiC diode is probably fair though. Mind its capacitance, and cost. You'll probably want a dI/dt snubber on there as well (otherwise ringing from hard switching turn-on might smoke the diode or gate driver). (What gate driver, anyway?) Speaking of, monolithic gate drivers aren't usually used for this sort of voltage because of ground bounce (check the datasheet, see how far it says VS can go below COM).Also, your AC neutral doesn't go anywhere..Regarding EMI: what matters is not so much the AC line as the cable length attached. You probably want one for both DC input and DC output (don't need anything on the AC side).Pretty sure you're going to want a DPDT contactor (or two DPST), so DC- can be grounded. Connecting it to AC neutral isn't going to do anyone any favors.Finally... why RPi? This thing will easily fit on an Arduino (and probably should). RPi is the wrong choice for many reasons, non-real-time OS being the most important. Although with hardware voltage and current control, you won't have to worry about that; the MPPT can be done very slowly indeed once that's set up.Tim

author: Rasz
author_rank: Super Contributor
timestamp: September 06, 2014, 04:19:53 am
content: burning 2W (pee) just to toggle some mosfets?

author: NiHaoMike
author_rank: Super Contributor
timestamp: September 06, 2014, 04:32:31 am
content: You don't need an output filter to drive a resistance heater. The freewheeling diode can be a lot smaller as it only has to deal with stray inductance. A low side MOSFET is easier to drive in your design. A rather low switching frequency like 1kHz would give good efficiency but not require particularly large input caps, as well as reduce EMI.You can easily do with much less than a Pi for MPPT. A PIC or similar would be enough. There is a trick you can use to get rid of the input current sensor. The controller can sense the input voltage and it knows the output duty cycle, so it can calculate the power applied to the heater. Then you just move the duty cycle around trying to get the maximum power. For a good starting point, every few minutes or so, drop the duty cycle to 0 for a split second in order to get the open circuit voltage, after which it tries to bring the input voltage to about 3/4 of the OCV before trying to refine the exact point.

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 07:56:49 am
content: Thanks very much for the feedback. I thought I could be an electrical engineer but maybe I'll have to try harder.QuoteI have researched about creepage and clearance but probably not sufficiently. I have read the relevant parts of the IEC 60950-1 standard. FR4 (material class IIIa) with a pollution degree of 2 has 2.5mm minimum creepage distance for 500V. I haven't read the relevant IPC standards so if someone could point me to the most relevant one that would be appreciated.Safety requirements with regards to people touching high voltage equipment I am also not familiar with. Again the relevant standards would be appreciated.QuoteFor one turn the LEM changes 0.625mV for the nominal primary current of 6A. My thinking was that more turns would increase the dynamic range for measuring purposes but as is being made clear this is probably overkill.QuoteQuoteOk so overcurrent protection should be one of/if not the highest priority for a design like this. This should be implemented in hardware.QuoteI really was hoping to get some feedback on my layout.QuoteI checked this and the datasheet says that Vs can go the Vbootstrap - 25V. I couldn't find a value for how far it would go below COMQuoteQuoteWell the single ended to differential conversion and the differential ADC was to minimise the EMI generated common mode noise from screwing up the measured signal, and from what I've read,differential measurements are good for this. I have no idea how much affect noise would have if the op amps weren't there but I was under the presumption that there would be quite a lot.Ok, so the 95 MHz op amps are overkill,can go to a much lower bandwidth.QuoteThankyou,that was embarrassing.QuoteI am committed to using a Raspberry Pi as it also has other functionalities like wireless,datalogging and the ability to write python code in Linux.QuoteQuoteThe transistor isn't that big, It's rated up to 20 A and has reasonably low Ciss(2800pF) and Coss (130pF). These values are a lot smaller than say the Infineon C7 range. The diode is an SiC with no reverse recovery current so I was thinking that a diode snubber wouldn't be necessary.QuoteBy DC output filter are you meaning a common mode choke on the output.I'm not sure why I would need one so an explanation would be helpful. The cable length to the resistive load is short (~1m max) while the cable length to the solar panels is around 20m. I would think that an output filter isn't necessary but then I can't be so sure of myself.Thanks NiHaoMike for your suggestions. Your method would be much simpler to implement and cost a lot less.So just to clarify thingsNeed a diode snubber as well if I continue down the buck converter path, and can also get rid of the MOSFET snubber potentially.Also will need a DPDT relay as I don't want to be connecting my AC neutral to the negative terminal of the solar panels.Get an off the shelf EMI filter for the AC input. Might need common mode chokes on the input and output as well.For high voltage/power I need to implement some isolation between the power and the control circuitry and this would require an optocoupler or transformer gate drive circuit.All this talk of high voltage makes me think that it would be better to wire up the solar panels differently to get 80V at 30A and have a boost converter instead.I will take on board the suggestions about schematic layout and come up with another circuit but I think that you are right in that this is a hard project and I am biting off more than I can chew. I will aim for something simpler, no AC connection. Just a simple buck converter, some current and voltage measurements and some maximum power point tracking. Keep it around 50V and less than 300W. Implement current mode control for protection.Even this will be a challenge. For circuit,how should I go about isolating the control circuitry from the switching circuit if I will have a hardwired gate driver IC. Should I have one continuous ground plane or separate ground planes connected at small junction, or some other configuration.Thanks very much.Josh

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 06, 2014, 09:10:43 am
content: QuoteIt's not only a matter of knowing the numbers, i mean 2.5mm is probably just fine, but why strive for the minimum. It's a matter of knowing where to apply them and actually getting your PCB package to apply those rules (or checking manually).QuoteThough I can't much of your PCB other than the small corner in the .png, you've put ground pour everywhere on your PCB. The control circuitry should be as far away as it can be from the main buck switching circuitry, and of course it has a ground plane. The power electronic buck circuit should not have a ground plane anywhere, this is due to the capacitive coupling it creates and the large high frequency switching currents potential to disrupt other components. The switching current flow (capacitor-FET-inductor-diode-capacitor group) should have it's own short path so it doesn't stuff up your other circuitry.Most component labels are too small. Components are not layed out with consideration of the main power flow and switching components. Tracks are not sized for their appropriate task. Clearances between traces are too small. Are you sure that's the right orientation for the common mode choke T1? C33 a high enough voltage rating, it's a small SMD (I would assume you're going to stuff up at some point and the full input voltage is applied to the output side of the buck and size accordingly).Without the rest it really is hard to make anymore specific comments.QuoteWhat do you mean by dynamic range? Which model LEM? This is why it is important to put model numbers on your schematic, rather than just the "300kHz" banner spec's which is largely meaningless. The main reason to use a LEM here over a CT is that you want to measure down to DC frequency.QuoteMeasuring differential voltages are important as the control ground should not be tightly coupled to the power circuit. But you should be just fine with a single ended signal from the Opamp back to the microcontroller (referenced to your controller analogue ground). I guess going differential can't hurt, <B>but there are many larger problems with a switching circuit layout and grounding that will have a far more drastic impact on its operation.</B>QuoteHigh Opamp bandwidth is next to useless in this circuit.QuoteYou know, I've never tried a SiC diode. Don't expect it to be a panacea, you can very easily add pads for an R and a C and just not populate them.QuoteCommon mode EMI occurs when current is coupled from the circuit to earth, usually this is by capactive means. Recall that i=c dv/dt; in your switching circuit you have dv/dt potential in the order of 100V/us (or 100,000,000V per second) you need very little capacitance to couple a lot of current in. This current must return then through either the DC or AC side connections. Putting in common mode chokes limits the amount of this current flowing externally to your box. However it does nothing for internal EMI, if you have 2 traces next to each other or one over the other on a PCB they are capacitively coupled and current will flow where you don't want it and screw up your system. Hence why you need a lot more thought in your PCB layout and your various types of grounding (digital ground, analogue ground) and power paths (no ground plane). This has a major impact on internal EMI.QuoteIsolation would be useful for the gate drive circuit. It will also reduce EMI coupling. You can get isolated gate drive chips. You may not even need isolation if you are only going up to 50Vdc, just careful layout.QuoteOh dear, a boost converter is a whole 'nother kettle of fish. It has the potential to produce very large voltages on the output and blow things up quickly if you arn't careful. It will also have all the other problems of a buck converter.QuoteI think this is a much better idea, though still very ambitious. 50V is about the point where touching voltages goes from tingle to ouch and doesn't involve the sheer power of the mains. 5/6A is probably a reasonable amount too. With a lower voltage you will experience less EMI (though it still needs full consideration). To be honest even the complexity of a buck converter at these levels is going to be a challenge and given you will also need to program a microcontroller for it IMO is at 4th year project level. Is this a 1 semester or 2 semester project?

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 11:41:08 am
content: Hi Phoenix,Thanks for your reply.QuoteYes, the orientation of T1 was wrong.C33 is rated for 630V.Thanks for the constructive feedback regarding the small portion of my layout although I'm a bit unsure whether I want the rest of my layout to be indignified with a severe appraisal but I guess I better face the music and learn a thing or two at the same time. I haven't altered anything since reading your post so the ground plane in the power circuit is still present and the orientation of T1 is still the same.The layout now is a tad redundant if the circuit design needs have fundamental changes/additions, but it would be good to get some feedback anyway

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 06, 2014, 11:58:07 am
content: QuoteI can't offer much on the control circuitry, it looks like control circuitry should from a distance, my work has been mostly power stages. I would suggest separation of analogue and digital ground, the microcontroller board you're plugging in should have these come out seperate headers. I.e. they will be joined on the microcontroller board itself. But not knowing what products you are using I don't know how the voltage rails would be distributed.

author: mamalala
author_rank: Unknown
timestamp: September 06, 2014, 02:18:48 pm
content: Hmm, is it just me or do the traces that are supposed to carry all the power are a bit flimsy? I mean, 2.5kW, right? Or is the board meant to use a very thick copper cladding, like 150µm or even 300µm?Greetings,Chris

author: kizzap
author_rank: Unknown
timestamp: September 06, 2014, 02:49:57 pm
content: Firstly, let me just get this out of the way:AAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!after having a look at the gerbers, I can do naught but wonder as to what the hell you have going on there. Firstly, you pointed out (and had pointed out to you) that you need to have some amount of isolation between the high power side, and the control side. I would also extend that to the input from the Solar panels. For some reason you have all those electronics jammed up near the connector input from the solar panel. Obviously you plan to mount whatever your display/controller is just below that, on some kind of standoffs. Why not utilise some of that wasted space, and move those sensitive electronics down under that display? It gives you a little breathing room at least.Secondly, I agree with what others here have said about the mains input filtering, to a point. IMO If you are not powering anything else (like the control circuitry) then I would suggestcompletelyforgoing it, and instead simply wire it through the relay. In the Real WorldTM, hot water systems are wired directly from the meter box to the controls in the hot water system.Even better if you don't need to mount the relay to the PCB. I would also consider using a dual throw relay to switch both Active and Neutral, so that you aren't tying your ground plane to neutral like you are atm.mamalama is right I feel in their questioning of the current carrying capacity. If it is a 2.25kW system, then it will need to be capable of carrying 10 Amps!!! you might need a hefty relay! I couldn't see what voltage your solar system runs at, but at a guess, it will be lower then 230V, so to get the same power, your current is going to be higher. Make sure you take that into consideration. For example, in Australia, You might have to run 2.5mm2cable or even 4mm2cable, so that you aren't going to burn down the house. I very much doubt that the traces you have there will be able to handle that amount of power.That's all I could really see/bothered to look for. I wish you luck, be CAREFULNinja Edit: I am also pretty sure that your rail splitter is not going to work.

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 03:34:42 pm
content: Wouldn't trace width be more dependent on current rather than power. I was hoping to get the the board made with at least 2oz copper. With 2 oz copper a trace width of 55 mil is sufficient to carry 5A of current. But wider would still be better.I'm not convinced about separating digital and analog grounds completely. It is sufficient to group the analog and digital circuits separately but with their grounds connected via a narrow section under the A/D according tothesesitesQuoteI realise that I was given this advice but since I will need to redesign the circuit there is little point continuing to work on this board. I just hoped to receive some feedback in relation to the circuit as it stood.QuoteI was trying to minimise the trace length coming from the current sensor. My logic was that having a long signal traces would lead to EMI corrupting the signal. My intention was to low pass filter the waveform to minimise any ringing, and compute the RMS current. The alternative would be to low pass filter before the differential amplifier, similar to the voltage measurement circuit.The output would be a steady voltage. Or as NiHaoMike pointed out earlier,a current sensor isn't really necessary.QuoteCan you explain why? I realise that the rail splitter is presenting a high impedance supply to the differential op amps but if they only draw 1 mA of current then wouldn't this be fine? I was just trying to get away without using a charge pump to create the negative supply.QuoteIt was mean't to be able to go up to a maximum of 450W 5A, coming from an array of 12 solar panels connected in series. I was planning on switching reasonably fast ~100kHz to keep my inductor and caps small.I will make sure to have wider traces for future designs. Thanks for the feedback.

author: biker.josh07
author_rank: Contributor
timestamp: September 06, 2014, 03:42:35 pm
content: I tidied up the circuit,and included part numbers. Although the circuit will change, I thought I would post it anyway if there was anything else important that needed to be said.

author: mamalala
author_rank: Unknown
timestamp: September 06, 2014, 04:28:05 pm
content: Quote from: biker.josh07 on September 06, 2014, 03:34:42 pm2.25kW at 230V is about 10A, not 5. Power is a function of current and voltage, so yes, trace width does indeed depend on power. Also, trace length and placement influences how much current you can push through a trace safely. If you want to have the traces run hot, then sure, keep them thin. Your PCB will tell you what it thinks about that after a while. Oh, and if you go for 150µ copper, be aware that this can start to cause problems with the pads for fine pitch SMD parts.About ground planes, yes, it is possible to have a shared one. But it all depends on what is actually going on. In your case you have a high power section, with fast switching to boot, and a sensitive low power section. And with very lilttle clearance between those two planes. As for the groundplane in the low voltage section, it really isn't that much of a groundplane at all. You have a lot of traces cutting through it, which will cause the return currents to flow where they don't really like, so to say.But i'm sure you will find out all about that once you built it...Greetings,Chris

author: oldway
author_rank: Super Contributor
timestamp: September 06, 2014, 05:31:43 pm
content: And you hope that the relay or the thermostat of the domestic hot water cylinder will succeed interrupt 230Vdc 10A ?NEVER !It will stay arcing and destroy them.

author: eneuro
author_rank: Super Contributor
timestamp: September 06, 2014, 07:21:06 pm
content: Quote from: T3sl4co1l on September 06, 2014, 04:16:39 amIn one of my projects during testing mosfet do not blow, but... was overheated while gate voltage was too low for full open and finaly it simply behaved like... conductor but with quite high resistance shared with output loadSo, proper choosen fuse could brake circuit even after those 10ms and avoid wires/PCB destruction and changing this circuit into heater.Fuses are needed and can help limit disasters, so it does not matter if mosfet loses with fuse, while circuit PCB wins with fuseQuote from: T3sl4co1l on September 06, 2014, 04:16:39 amFor such reasons I used to use galvanic isolated gate driver supply with optocouplers on MCU pins and no AVR's burned so far in power convertersBTW: Which is designed switching frequency PWM of this solar panels converter ?

author: NiHaoMike
author_rank: Super Contributor
timestamp: September 06, 2014, 07:53:14 pm
content: I suggest using the original thermostat (set way low like 110F) to switch the mains, then add a thermal sensor (properly insulated!) as a high limit, set for 145F or so to signal the logic.You can also leave the upper element connected to mains with its original thermostat set way low and the lower element connected to your solar MPPT with its thermostat as the high limit. Then you wouldn't have to mess with the mains.

author: oldway
author_rank: Super Contributor
timestamp: September 06, 2014, 08:22:17 pm
content: Quote from: eneuro on September 06, 2014, 07:21:06 pmThe only semi-conductors you can protect with fuses are diodes, scr's and triac's. (perhaps GTO's too)You must choose ultra-fast fuses (as Ferraz for example) with i²dt 30% lower than the i²dt of the semi-conductor you want to protect.No way to protect bipolar transistors, IGBT's or Power Mosfet with fuses.Often, Mosfet explode before fuse brake open.

author: eneuro
author_rank: Super Contributor
timestamp: September 06, 2014, 09:52:14 pm
content: Quote from: oldway on September 06, 2014, 08:22:17 pmI will test after weekend my new mosfets gate driver, so I will try broke mosfet in short circuit condition for fun while all setup costs less than 1$IRFZ44N 50A (ID) mosfet vs crappy 15A slow glass fusein short circuit event connected to car start battery for no sourvivers and we'll see who wins

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 07, 2014, 01:09:07 am
content: Point being... if it's so easy to build a circuit that doesn't explode itself... why would you, apparently intentionally, build a circuit that's prone to exploding? Whether or not it literally explodes, electrical failure is obviously a failure of the designer. Fuses are the absolute last resort, when the circuit can no longer protect itself and fails catastrophically. Fuses will not protect transistors from burning out.The fuse should be the last thing to fail, and the first thing to fail when nothing else succeeds.Quote from: eneuro on September 06, 2014, 09:52:14 pmUh... the car battery, hands down. Everything else is toast.Tim

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 07, 2014, 01:49:36 am
content: Quote from: biker.josh07 on September 06, 2014, 03:42:35 pmWith it seperated you can follow it a lot better. Since you're going to redesign it all there isn't much point going into detail. I did want to mention your differential opamps though. You seem to have the "differentialness" on the wrong side for it to be useful. The output of the opamp can be single ended because you will have a strong/clean analogue ground plane underneath, you don't need differential because you arn't trying to get anything high speed/fancy. The input side should be differential but you are currently relying on the cleaness of the coupling between your analogue ground and the output switching ground/negative side.Here's a drawing of an opamp configuration for measuring high voltages and referencing the output measurement to AGND. The IN+ and IN- can be connected pretty much anywhere on your power circuit because both inputs to the opamp are high impedence. The string of resistors on the input is provided for higher voltage rating and should be equal value, if you're only going 50V you just want 1. The hashed brown shows what components should be contained above the AGND plane, the ground plane should stop before the resistor string. You can also put low pass filter caps in parallel with the feedback resistors.Does your uni have the Altium component libraries? It's not recommended to make your own components unless they arn't in there due to the high possibility of mistakes. For example there is no indictation that PD is inverted logic. Also makes it hard for others to read the circuit when the opamp doesnt look like an opamp.Where is V_diff- created? Something like this is a simple (albeit slightly expensive) way of creating isolated analogue rails for opampshttp://www.digikey.com.au/product-detail/en/MEA1D2415SC/811-2174-5-ND/2199624. Then you can tie the output common to AGND.

author: coppice
author_rank: Super Contributor
timestamp: September 07, 2014, 05:26:05 am
content: Quote from: biker.josh07 on September 06, 2014, 07:56:49 amUsing a Raspberry Pi might be a reasonable, if very expensive, way to manage things. Its an insane way to build a control loop, though. Others have pointed out the contact damage problem you would have feeding DC through a thermostat designed for AC. Another problem you would have with a Raspberry Pi is that when the contacts open the supply loop would go crazy, because of the extremely slow response of the control loop. This is not a processing speed issue. Its a latency issue. Controllers designed for control loops, like TI's C2000s, Freescale's 56800, and things from Microchip and others, are specifically designed to keep the loop latency down by keeping the ADC sample to processing to PWM response sequence as tight as possible. For your needs the response time of a small MCU might be fine, and a lot of solar systems use general purpose MCUs. The response time of a Linux system will be horrible, even if you make your own driver and try to do all the work within an interrupt handler. Even your use of an SPI interfaced ADC is hurting you. Its serialisation time eats into your phase margin. When designing control loops you really need to think close to the metal. A high level block diagram view of how things work is the road to failure.Your loop doesn't need to keep continuous tight control, if the only load is something as benign as a water heater. If the output voltage sags badly as the load switches on, you don't really care how long it takes to recover. You do, however, need to do something about all that energy which is in flight when the load suddenly disconnects.

author: biker.josh07
author_rank: Contributor
timestamp: September 07, 2014, 09:15:09 am
content: Thanks for the comments,QuoteQuoteThat's what the RC snubber in parallel with the load is for , C1 and R9. I was also planning on setting the thermostat at a reasonably high threshold.Then I would monitor the temperature using a Maxim ds18b20 temp sensor and when the temperature reached a threshold (say 65 degrees C) level then I would switch off the MOSFET.QuoteI'm not too sure what you mean here. Isn't the supply loop and the control loop one and the same? If the relay contacts opened while there was still DC current, then you would measure open circuit voltage and zero current coming from the panels. You could have a condition in your code that if this measurement was for longer than say x ms then you would know that either the thermal cutoff off or thermostat had switched and disable the PWM.Anyway,I'm going to ditch the relay changeover circuit. I will just have a simple buck converter and keep it reasonably low voltage and power ( ~50V, 300W). If all I have to worry about is MPPT and temperature sensing,then the Raspberry Pi should be sufficient for this.QuoteIt was going to be 100 kHz but this will most likely change nowQuoteAdvice noted.They do have libraries.I must make better use of them.Thanks for the op amp schematic. I am going to go with a single sided design using a microchip MCP3008 as the ADC. Input op amp will be an opa2376. It has 90dB CMRR so should do the the trick.My dual supply to get V_diff- was similar to the circuit attached,except in my circuit, ground was connected in between the two capacitors as well.

author: Richard Head
author_rank: Frequent Contributor
timestamp: September 07, 2014, 09:56:46 am
content: I presume this is your first switch mode PSU design. I think you are way too ambitious to go for a 2kW+ converter. My first SMPS (25y ago!) was a simple 10W unit and I even had problems with that. When you get to the high power levels there are all sorts of issues that develop that aren't apparent at the lower power levels. I'm not trying to damp you enthusiasm but you are probably setting yourself up for failure. Rather have a string of lesser successes and slowly improve and learn about power electronics. It is a specialized are of electronics that looks deceptively simple, but isn't.Dick

author: oldway
author_rank: Super Contributor
timestamp: September 07, 2014, 10:07:01 am
content: Quote from: eneuro on September 06, 2014, 09:52:14 pmWrong way to test, does not prove anything.With such a low voltage, sum of the resistors (Rdson, Rfuse, R internal battery, Rwiring, ...) is probably enough to limit short circuit current to an acceptable value (Ipeak) who will not destroy the mosfet.Try the same with a normal PFC voltage of 390 - 400Vdc...As T3sl4co1l wrote:"Software control: no. Not even no, hell no. Current mode control, or smoke, those are your choices..."That's right, control of the gate must be done by an UC3842A or an UC3843A not by a Raspberry Pi.

author: Niklas
author_rank: Frequent Contributor
timestamp: September 07, 2014, 11:06:44 am
content: The gate driver U1 is not going to work without a transistor connected to the LO output. When that transistor is on it will charge the bootstrap capacitor C6 through the diode D2. With the present configuration, the VS end of C6 will be floating and the voltage over C6 is zero.Move the ferrite bead FB2, on the 5V regulator output, to be between the two capacitors. C3 will then be "visible" to the regulator even if the bead is starting to increase in impedance. As it is now, at noise frequencies U7 has no filtering caps on its output. Also consider adding another ferrite bead on the 12 V input to the same regulator.One comment about the isolation distances, trace widths and thermal issues. Pollution degree II will put some constraints on the kind of enclosure that can affect the trace width. The enclosure can almost certain not have any holes for a fan or natural convection as it must also keep away possible dust from entering. That will also increase the thermal resistance of the complete setup and the ambient temperature will rise inside the box.I had a problem like this with a whirlpool control box, supplied with 3x230Vac, each with 13 A, inside a 20x20x5 cm plastic enclosure with IPX5-rating. 5 pcs Mate-N-Lok connectors, a 30VA Hahn PCB transformer, 4 pcs G2R 16A rated relays and 70um copper traces were enough to heat up to just over 100'C at room temp. The copper traces were designed according to the "+30'C above ambient" trace in the IPC spec. As the loads were mainly EMC-silent resistive heating element, we decided to maximize the trace width to comply with the creepage distance. The temperature went down a couple of degrees.We also went from post plating of copper on the PCB to use 70 um to start with. And as mamalala pointed out, we then had a problem with a TQFP80 package and the pad-to-pad distance.

author: coppice
author_rank: Super Contributor
timestamp: September 07, 2014, 12:01:40 pm
content: Quote from: biker.josh07 on September 07, 2014, 09:15:09 amSo, you have 100kHz PWM. Every 10us you have a PWM cycle pumping energy into the load. If the load suddenly goes from maximum to zero, because the thermostat cut out (or a switch is turned off, or whatever) how many 10us cycles will continue to run at maximum before your control loop reacts and backs off the on time? How much energy will you need to absorb before the control loop is back in control?A well designed digital power supply waits until a point well away from the main MOSFET switching, which causes such horrendous noise even a well designed PCB won't allow you to measure anything accurately. The ADC then samples and converts. So, the ADC runs synchronous with the PWM cycles, and samples well away from trouble. You should not anti-alias filter when you sample. Out of band energy is not your enemy. Latency is, and an anti-alias filter of any quality will incure considerable latency. Based on your samples you need to filter with the lowest latency. This severely limits the complexity of your filter. Based on your result you need to get the very next PWM cycle updated, In a low of analogue loops you can cut short a PWM cycle in progress, but a lot of digital PWM hardware will only let you catch the following cycle.

author: biker.josh07
author_rank: Contributor
timestamp: September 07, 2014, 01:17:51 pm
content: QuoteWhat if I reference the ground of the gate driver to power ground with a bypass capacitor from the VCC pin to power ground (which I've just read to do inthisapp note).The anode of diode D2 is connected to 12V.When the high side transistor is off, VS will be one diode drop above below ground due to freewheeling diode D5. Therefore the bootstrap capacitor will charge up from the VCC bypass capacitor and the current will pass through the bootstrap diode and capacitor, and though the freewheeling rectifier to close the loop.QuoteQuoteIdeally I would like to have the Raspberry Pi providing the PWM signal which is input in to an IRS21867 gate driver.For protection I'm thinking that I could use a feedback circuit which would sense large di/dt at the output use that to pull the VCC pin of the IRS21867 below the UVL level. I have an RC snubber in parallel with the thermostat switch to suppress the initial di/dt but to absorb additional energy would a MOV or TVS in series with a resistor connected across the output capacitor be sufficient?

author: David Hess
author_rank: Super Contributor
timestamp: September 07, 2014, 04:46:18 pm
content: Quote from: oldway on September 07, 2014, 10:07:01 amEven voltage mode switching regulators often have current limiting on the power switch to prevent catastrophic failure. It does not apply here but this can be especially important in transformer designs where flux imbalance can lead to difficult to diagnose reliability problems.