Showing posts with label power supply. Show all posts
Showing posts with label power supply. Show all posts

Wednesday, April 29, 2015

PCB Net Ties and Grounding in Kicad

Just a quick post this week.  I've finally gotten around to doing the PCB for my power supply and I thought I'd talk about grounding.  I'm not claiming to be an expert, I'm just trying to follow best practice and all the bits and pieces I picked up from reading textbooks and app notes.  As usual, university basically teaches you nothing about this.  You're told that the little ground symbol is zeros volts and you can dump current into it and everything will be fine, but that quickly starts to fall apart in real world situations.

Kicad power supply schematic

What you consider to be a zero impedance connection in a schematic has resistance, inductance, and capacitance.  This means that if your circuit requires large currents or high frequency to operate, that ground will no longer be zero volts.  One strategy to deal with this is to segregate grounds into different types and then combine them at a central point via a star grounding system.  This means that individual subsystems will operate with a common ground.  It also allows you to treat each ground separately.  You can use wide tracks for high current grounds, or make sure that you have tight ground loops on high frequency sections to avoid EMI problems.  Either way you need a way to deal with this when designing your PCB.

In the schematic above I've created three different grounds to help manage these issues.  An power input ground, a power output ground, and a signal ground.  The power grounds are for high current parts of the switch mode converter, and the signal ground is for the controller and low current signal conditioning circuits.  I think I have everything segmented correctly, I guess I'll find out when it comes time to test the circuit.

So you have your separate grounds, how do you connect them.  If you connect them all to a ground node, Kicad will treat them all as one net and you loose the logical separation of them.  The way to get around this is to create a component called a net-tie or pavilion ground.  It's basically a component with multiple nodes that's made of copper to connect all the nets.  It allows all the grounds to come together at one point and still keep the nets logically separated.
Net Tie
Those of you that are familiar with Kicad will know that the schematic component and footprint are separate entities, so at the moment I only have the schematic component drawn, the footprint will come later.

Tuesday, April 7, 2015

Three Terminal Resistive Network Conversions

Warning - This article describes equipment and circuits that operate at high voltages.  Don't attempt to repair any high voltage circuits if you're not trained to safely work with electricity.  You may be seriously injured or even killed.  For further information read the blogs Terms Of Use. 

Recently I solved an electrical problem that got me thinking about 3 terminal networks, so I thought it would be a great opportunity to explaining how to measure and convert between the different topologies.

The Problem

I got a panicked call from my parents recently after they'd lost power and were unable to turn it back on.  I did the basic things before getting there, like checking the website of the power company for any outages, then checking twitter for any car accidents in the local area that could have cut power by damaging a power pole, but I drew a blank.  On a arrival the problem became clearer, they could turn the power back on, but five minutes later the residual current device (RCD) would cut out.  This indicates that an appliance had a fault, but not so serious that it would immediately trip the breaker.

To isolate the problem, all the individual circuits were turned off, then turned back on one at a time, waiting 5 minutes between each one.  The next step was to find the appliance on this circuit, the same process was followed, all the power points were turned off, and then gradually turned back on until the problem was found.  It turned out to be my mothers laptop power supply.

Power Supply
Toshiba Laptop Power Supply

I assumed that something like a capacitor in the input filtering circuit had failed, or the transformer had failed somehow, either way I'd accepted that the supply was dead.  I thought it'd be interesting though to find out how damaged it was.  To test this, I set up a test power point with it's own lead, but didn't connect the Earth.  On the back of the power point I connected a multimeter between the Earth and Neutral terminals.  This allowed leakage current to flow through the ammeter to neutral, without causing the main RCD to trip.  This was all powered by an extension lead that I could turn on and off from a safe distance. (I HATE mains voltage)  Also make sure that there are no children or pets around that can distract you or get injured.  The power point was dissembled and made safe immediately after the test, leaving dangerous things that look safe laying around is asking for trouble.

Power Supply
Toshiba Laptop Power Supply

I started the test and measured a small leakage current of 6 mA, but also heard a small crackling sound.  I shut everything down and did an inspection of the power supply.  The C5 type input plug was noticeably hot.  At first it kind of made sense that the hot spot was near the entrance to the power supply, that's where all the mains components should be, but the plug was way hotter than the power supply.

Electrical Plug
C5 Laptop Connector

On closer inspection I noticed what looked like melted plastic on the plug itself.  It could be left over from manufacturing, but the other side looked fine.  With the plug removed, I measured the resistance between all three prongs on the mains plug and got results in the range of 30 to 70 kilo-ohms.  When the lead was tested by itself with mains power and no load, the lead still got hot.  That shouldn't be.

Electrical Plug
Burn Marks on C5 Laptop Connector

To wrap things up I replaced the lead with an old one and have had it plugged in for about 5 hours now with no problems.  I don't know how the fault occurred, it seems strange to have resistance between all three pins.  It seems like something that a liquid spill could cause.  Other than that, I don't know.  After writing that last sentence I went and checked the resistance on the outside of the plug, I picked two random points and got around a mega ohm.  The outside shouldn't be conductive at all, so I'm almost certain that something was spilled on it, even if it wasn't noticed when it happened.

Three Terminal Resistive Networks

All the talk of resistance between 3 terminals got me thinking about delta and y topologies.  In the diagram below you can see the C1332 style Australian mains power plug.  The discussion above describes measuring the resistance between all three pins, but how would you represent that in a circuit if you wanted to model it?  You can't simply place resistors equal to your measurements between the pins in a triangle arrangement.  Measuring between Earth and Neutral would then give you that resistance in parallel with the sum of the resistance between Earth and Active, and Neutral and Active.  So we need to do some maths. Yayyyyyy!!!!

Electrical Plug
Australian C3112 Style Mains Plug

I find it easiest to start with what's called the Y or wye configuration.  It's called that because you place three resistors in a Y shape, as seen below.  You have a similar problem though.  Measuring between any two terminals gives you the sum of two resistors,  for example measuring between Active and Neutral gives the sum of the resistances R1 and R2.  It's trivial to write three equations to describe this arrangement and then solve the simultaneous equations.  I've done it via the reduced row echelon method.  You can now use the values of R1, R2, and R3 to model the circuit.

You can also model the circuit using a delta arrangement, which is three resistors in a triangle between the terminals.  Converting between the Wye and Delta topologies is easy enough and is a well known conversion.  After performing the conversion you can use the resistors Ra, Rb, and Rc in a delta (triangle) arrangement to replicate the circuit.

Engineering Calculations
Delta-Wye Calculations

Another technique not as well known uses an iterative method to go straight from measurements to the delta resistor values.  You write out three equations that describe your circuit and the values you want to find, make estimates for all three values, in this case 50 kilo-ohms was a good starting point.  You then use one equation and two variables to calculate a new guess for the third variable.  Do this for each variable and repeat until the resistor values converge. I've used a different naming convention in the example below (my bad), but you can see the process in action. The first equation uses guesses for Ry and Rz to calculate a new value for Rx, the second equation uses Rx and Rz to calculate a new value for Ry, and the third equation uses guesses for Rx and Ry to calculate a new value for Rz.  This is repeated until the values converge.

This is a numerical approach that sometimes works, it depends on how well behaved the equations are and if they converge.  For example if you were to use this method to get from the initial measurements to the Y configuration it would fail and the resistor values wouldn't converge, they'd just oscillate.  Typically you need a division by one of the variables in the equations for it to work.  I'm sure there's a formal mathematical definition for when it will and won't work, but I'll leave that for someone with more time, sleep, and mathematical ability.


Spreadsheet
Iterative Spreadsheet Solver


The above spreadsheet can be found here.

Friday, March 27, 2015

MeanWell LDH-45A-350W Dimmable LED Driver Evaluation

As you may have seen I've been designing a DC DC constant current power supply to drive some LEDs from a 12 Volt supply.  The main reason for doing it myself was because most of the drivers I've seen don't have a feature to dim the LEDs by reducing the drive current, they typically drive the LEDs at full power and pulse them on and off to vary the brightness.  This can be an issue when used for photography.

I'm getting there slowly, and am close to laying out a PCB, but during my research on LED drivers I found a nice little unit from Mean Well power supplies that allows you to dim LEDs by PWM and Analogue dimming.  Granted, they have one of the least reassuring names in the electronics industry, but I like their stuff and have never had an issue with them. (I think I've used their products 4 times before)  So I thought I'd get one and see how a professionally designed unit performs.  They're cheap enough, you can get one like mine for $20 excluding postage.

LED Driver
MeanWell LDH-45A-350W LED Driver

As the unit is potted I can't do much of a teardown, but I did pop the back off and you can see some of the signs of a switch-mode converter.  In two locations you can see arrays of vias probably used to dissipate heat into the copper pour from switching elements like diodes or transistors, and small traces coming off large areas most likely indicate parts of the feedback circuit.


LED Driver PCB
Bottom side of LED driver PCB

The banner specs are also worth a look.  The datasheet is for a family of converters, I have the 350 mA model.  I'm happy that they comply to an EMI standard, most cheap stuff from China doesn't worry too much about things like that.  Short circuit protection is expected, there's most likely a transistor on the low side of the LED string that's used for PWM control, when an over current is detected this transistor simply shuts off disconnecting the load.  Encapsulation is good as well, the unit feels rugged, like it would take some abuse.

Electrical Specifications
LDH-45 LED Driver Family Specs

My unit is capable of outputting up to 86 Volts and my panels run at 60 Volts, so that's fine.  The voltage input range is also fine, although there is a derating curve in the datasheet.  Any Vin lower than 12 Volts won't be able to drive the LEDs at full current.

Electrical Specifications
LDH-45A-350 specs

Usage is fairly straight forward, the input voltage is connected to the Vin+ and Vin- wires and the LEDs are connected to the Vout+ and Vout- ones.  That's all you need to do if you dan't want to use the dimming features at all, but it will drive the load at full capacity, 350 mA, and my panel is rated for 300mA, so I need to reduce the drive current.  For this post I'm not using PWM dimming, I'm just focussing on analogue dimming.

Reducing the drive current is as simple as placing a control voltage across the Analogue DIM and DIM- wires.  I assembled a test rig as per the diagram below using an adjustable power supply.  The LED panel I used to test the driver was the one I recently did a review of.  Voltages and current were measured at various places around the circuit.  You can get my measurements and the datasheet from here.
Electrical Circuit
Test setup

First up I wanted to check the relationship between the analog dimming voltage and the output current.  The datasheet gives a graph for this.  It's basically a linear relationship between 0.25 to 1.2 Volts.
Electrical Graph
Analogue dimming voltage control from the datasheet

Remarkably, my results were pretty much spot on.  I couldn't go to 100% drive current, but the curve matches well for the tests I performed.
Electrical Graph
Measured analogue dimming voltage control

I then wanted to test the efficiency of the unit.  The datasheet has a graph, presumably at full current, for the maximum efficiency of different number of LEDs with a Vf of 3.15 Volts.  In my case that would be 19 LEDs for an efficiency of 0.932
Efficiency
Efficiency for different LED configurations

Once again my measurements compared well. Once a decent load was applied I was able to get a consistent efficiency of around 92 percent.  Not too shabby at all.  This is great, due to its efficiency, it doesn't get noticeably hot, which means no active cooling needed. (YMMV depending on how enclosed it is)
Electrical graph
Measured Efficiency for different load currents

For my own reference I wanted to do some electrical tests.  These are all performed with an output current of 300 mA

I wanted to see how noisy the converter was electrically and its operating frequency.  The first test I did was to clip the ground lead to the probe tip and hold it over the device, a poor man's EMI probe if you will.  You can notice that the device appears to be running at 95 kHz.  This is surprising as my design runs at close to 600 kHz, mine could be smaller, but may have more loss.  You can also see a few spikes created by switching elements.  I could guess what they are, but as I don't know the exact topology used I'd only be guessing.

Electrical Waveform
Scope probe loop held over the converter

I then check the input voltage ripple of the power supply, it's in the 50mV range.
Electrical Waveform
Input voltage ripple


I then checked the input current.  As I didn't have anything specifically set up to do this I clipped the probe leads across the input to a multimeter and used the internal shunt to measure the current.  Quick and dirty.

You can see that the input current resembles the charge discharge cycle you'd expect from a boost converter.

Electrical Waveform
Input current

As the input current is about 1.67 Amps, the ripple is around 30 mA.
Electrical Waveform
Input current ripple

There is also a bit of ringing in the input current, that could be the EMI filter or just inductance from all the test leads I was using.
Electrical Waveform
Input current ringing

I measured the output current in a similar way.  It was measure to be 300 mA by multimeter.
Electrical Waveform
Output current

The spikes in the output current have a magnitude of about 180 mA. Once again, this type of thing may be due to the way I'm measuring things.
Electrical Waveform
Output current ripple

You can see ringing in this case as well.  L and C as far as the eye can see.
Electrical Waveform
Output current ringing

Nothing too exciting here, the output voltage is 60 Volts.
Electrical Waveform
Output Voltage

Ripple in the output voltage that looks like this could be down to the ESR of the capacitors in the output filter.  As current flows into them, V=IR causes the voltage to rasise slightly, when they discharge the voltage drops.  Just speculation, but at 60 Volts, what's a couple hundred milliVolts between friends.
Electrical Waveform
Output Voltage ripple

I was very interested in the startup profile as I had a hard time getting mine to behave.  From the the point the voltage starts to rise it takes about 25 ms to get to the a stable output voltage.  There doesn't appear to be any noticable overshoot.  All in all quite nice.

Electrical Waveform
Startup voltage waveform
I'm definitely going to use these again.  They have all the features I want and are simple to use.  I'll need to come up with something to control the dimming inputs, but that shouldn't be too hard.  If they're using a chip similar to what I've been using in my design, you should also be able to use the analogue and PWM controls at the same time.

I really didn't want to build multiple units like this, don't get me wrong, I want to learn how to do it, but it's hard to beat a self contained module that sells for $20.


Update 03 August 2016

Andry posted a question in the comments and I thought it would be helpful to discuss the problem here.


Please give an advice with PWM and analog dimming on LDH-45B-350.

Input data: 24V DC as power supply. 8pcs in series 1W LED Red.
When I turned on power supply LEDs on the output start to shine on full brightness. Seems everything is fine.  The problem is in that when I connect DIM- and PWM DIM pins together with a wire directly as short connection to switch of LEDs on the output my LDH- driver still supply voltage and current to the output.  Also I've tried to connect DIM- and Analogue DIM pins together but unfortunately with the same result.  Applying PWM signal (0-5V) to DIM- and PWM DIM pins gives no influence to the output independently of duty cycle from 0% to 100% on the output there is full brightness of the LEDs.  I've trying everything above with two LDH-45B-350 devices with same negative result.


It took me a while to figure out what the problem was because I was focusing on how the the unit was connected.  I started by testing mine to make sure I understood how it operated.  By replicating the commenter's procedure  I was able to turn my light on and off.  It turns out the problem lies elsewhere.

Let's start by looking at the data sheet.


The thing to pay attention to here is that the output voltage range of the LDH-45B-350 is 21-86 Volts.  Note 3 is also important.  The output voltage will always be at least 3 Volts higher than the input.  Andry is using a 24 Volt power supply.  This means that the output will always be 27 Volts or higher, and as there are 8 x 1W red LEDs connected to the output, each one has about 3.375 Volts across it.  The forward voltage of a 1W red LED is somewhere about 2.4 Volts.  So I think that's the problem, The unit is trying to drive a load that is outside of its regulation range.  As it stands, the LEDs are being over driven and are at risk of being damaged.  There are a few ways to fix things though.


  1. Add more LEDs.  Something like 12-14 LEDs should work properly.
  2. Add some power resistors in series.  Not ideal, as there will always be a small current flowing.
  3. Add some diodes in series to drop the voltage.


The solution that fits best will depend on the situation.  Hopefully this helps.




Monday, March 16, 2015

LED Driver Boost Converter

So, it's time for an update on the LED driver I'm designing.  I think I have the final design of the circuit and have most of the components selected.  I haven't bothered selecting actual parts for non critical components yet.  The design is mostly locked in, a value may change here or there but it's pretty much final.  The input filter added to remove conducted EMI may need some improvement as there may be the possibility of ringing.

I'll admit that this has taken longer than I would have liked, but I took it as an opportunity to learn how all the components of a boost converter interact and change the overall operation.  I didn't want to blindly follow a reference design and not know what I was doing.  I still have a lot to learn, particularly about compensation and stability, but it's been fun.

Boost Converter LED Driver - with PWM and Analog Dimming

The plot below shows the circuit starting up.  The PWM dimming function is in use with the frequency being swept from 0 to 3kHz.  The output slew rate limiting circuit does its job and brings the output voltage up gradually without causing too much current to flow through the main inductor.

LED Driver Sweeping the PWM Frequency from 0 to 3 kHz over 60 ms

In the plot below you can see a cycle of the converter operating.  The LED currentin dark blue slightly overshoots its target but comes into regulation rather quickly.  The main inductor current is shown in light purple and can be seen to have ripple, but nothing that wasn't anticipated.  The main supply current is shown in dark purple and has no noticeable high frequency component, but there is some ringing,  I don't want that.  So this area needs some attention.  If anyone has experience with this I'd be glad to take suggestions.

I've simulated the snot out of this thing, but that can only get you so far.  So it's time to actually do a board and see what happens.

Main Inductor Current, Supply Current and LED Current

You can grab the associated files from the GitHub Repository

Thursday, March 5, 2015

Boost Converter Output Capacitor Selection

I was a day late with this post as I was trying to select capacitors for my boost converter.  I knew it wouldn't be easy, but I didn't think It would be this hard.  The loose specification I'm trying to achieve is listed in this post, but basically I'm trying to convert 12 to 60 Volts driving a 300 mA load.

I started by looking at different converter topologies, and decided to go with a boost converter due to what parts I could get (I didn't want to hand wind transformers - walk before I can run).  I'm reasonably sure it's not the optimum topology, but it should be doable with off the shelf parts.  I'm at the point where I've got a stable design that does what I want, and am now trawling through suppliers to find actual parts.  Things were going great,  got an inductor, got a switching Mosfet, got a Schottky diode, hit a wall when it came to the output capacitor.

The problem is that the capacitor needs to be rated for 60 Volts, and to minimise ripple needs to be low ESR, and has to be around 5 uF.  That's like trying to find pixie dust.  Let's look at the equations that determine what capacitor I'm looking for and see if we can't tweak some things, keeping in mind that the purpose of the output capacitor is to minimise ripple in the output voltage.

Equation
Levels of Output Voltage Ripple in a Boost Converter

The output voltage ripple consists of two parts, the first part occurs when the capacitor discharges while suppling the load while the Mosfet is on and charging the inductor.  This means it's related to the duty cycle, frequency of operation, load current and the capacitor size.  I can't change the load current or the duty cycle, but I did decide to up the frequency of operation from 400 kHz to 600 kHz.  This means I can get away with a smaller capacitor.

The second part of the voltage ripple is caused by the ESR of the capacitor. When current flows into and out of the capacitor through the ESR during its charge discharge cycle, a ripple is created.  Reducing this ripple can be done in two ways, decrease the ripple current in the inductor, or get a low ESR capacitor.  I've increased the inductor size to reduce it's current ripple, but the best option is to select a low ESR capacitor.  Ceramic capacitors have such a low ESR they are essentially considered to have none, and for this reason have become a favourite in DC-DC converter designs.  When going through all my searches and considering specs against cost, they're pretyy much the best option.  They have one drawback though, when biased with a DC voltage their capacitance is reduced.  In some cases, significantly.  I'll let EEVblog explain.




So finding the capacitance I need isn't easy, particularly when I need to find parts rated to 60 Volts.  In the end I decided to go with 4 x 12101C225KAZ2A from AVX.  They're X7R 2.2 uF capacitors rated to 100 V each and when biased to 60 V I should get at least 550nF out of them, giving a total of 2.2 uF.

I need to investigate how the dynamic resistance of the load interacts with all of this, but in the end I think everything should work.  I've upped the frequency of operation, and slightly compromised on my acceptable level of ripple.  After all, isn't engineering is the art of intelligent compromise?

Electrical Schematic
Boost Converter Design

.

Saturday, February 21, 2015

Boost Converter Startup

My ongoing series on designing a boost converter continues.  Today's post will be short one.  What happens in the converter during startup?  The period between when you first apply power and when the controller starts to do it's thing.

Using the schematic further down the page as a reference, the startup waveforms below can be described.  It's also helpful to know the period of an LC oscillator as well.

equation
steady state period of an LC oscillator
  1. During startup the power mosfet (M2) is off, and can be ignored in this analysis.  The current in inductor L1 (36 uH) is zero and the voltage across the output capacitor bank C5, C7, C8, C9 (9.9 uF) is equal to zero.  When the 12 volt supply is first applied, the inductor L1 and the capacitor bank start to resonate.  This causes the initial peak.  The initial inductor current (purple) should resonate around zero amps.  Knowing that the peak voltage deviation will be 12 volts (i.e. the voltage across the capacitor will have a range of 12 ± 12 volts) it can be shown that the current through the inductor L1 will be equal to 12*sqrt(C/L).  In this case that equals 6.29 Amps.  We get close with around 5.8 Amps.  The forward voltage of the diode means that the supply is more like 11.4 Volts and there are also some series resistances that will cause the current to be lower.  That equation is only valid for steady state analysis as well.
  2. In theory the voltage across the capacitor bank (red) should peak at double the input voltage, as an undamped LC circuit will swing to double the magnitude of a step input to give 24 Volts.  In this case however, the forward voltage of the diode and small resistance of the inductor has reduced this to the 22.4 ish volts observed in the simulation.  At this point we have approximately one half period of oscillation.  Although meant for a steady state conditions, this can be checked against the formula above.  t = 2*pi*sqrt(LC) = 118us.  Half a period is approximately 60 us, pretty close.  Another effect starts to happen at this point as well, for the first time the inductor current goes to zero and tries to reverse.  The diode doesn't allow this to happen, leaving the output capacitors charged at around 22.4 volts.  The inductor starts to immediately resonate with the parasitic capacitance of the mosfet.
  3. The damped oscillations have a period of approximately 1.05 us.  Using the equation above it can be shown that the parasitic capacitance is 775 pF.
  4. The current ripple can also be seen in the inductor.
(Click for larger images)
electrical waveforms
Startup waveforms of a boost converter


Boost converter schematic
Boost converter
Get the associated files here.


Tuesday, February 10, 2015

How Can Current Flow Backwards Through The Inductor of a Boost Converter?

I've been keeping myself occupied by (slowly) designing a boost converter for an LED light panel, and during one of my simulations I noticed something weird, there was current flowing backwards through the inductor.  I couldn't seem to find any reference to this anywhere so I thought I'd write up what I think is happening.

First I'll give a quick explanation of how a boost converter is meant to work using the schematic below.  When the power mosfet M2 conducts, the input voltage is placed across the inductor L causing the current through it to rise.  When M2 is switched off, the current through the inductor now flows through D21 to fill the capacitor C5 and supply the load.  I won't go into the maths, but it's trivial to calculate the voltage gain of the converter.  It's important to note that current can't flow backwards through the inductor at any point.  For this to happen, current has to either go backwards though the diode D21 (which happens a tiny bit, but isn't what we're seeing) or it has to come out of the mosfet M2, which doesn't make much sense either.

Schematic
Boost converter schematic
The simulation that initially caused me to look into this is below.  It occurs during startup, when the output capacitor isn't fully charged and when the controller is in soft start mode.  At this point the circuit is operating in discontinuous mode, meaning that the inductor current will fall to zero during each switching cycle.  Nearly every textbook will illustrate this with a triangular waveform with a flat section in between triangles to indicate the zero current section.  This isn't what happens though.  I'll step through the stages of operation in the image below.

  1. The mosfet is turned on (gate voltage is the green waveform) and the current in the inductor starts to ramp up (light blue).  The voltage at the point between the inductor and mosfet drops to zero (red) and there isn't any current flowing through the diode (dark blue).
  2. The mosfet is turned off.  The current flowing through the inductor starts to ramp down.  The voltage at the point between the inductor and mosfet increases to near the output voltage. It can be seen that the inductor current goes through the diode as the dark and light blue plots are the same in this section.
  3. This is the point where traditional explanations fail.  The mosfet is still off and the diode current has reached zero.  The voltage between the mosfet and inductor starts to fall as you would expect.
  4. The inductor current keeps ramping down though, and in this case reaches around 200 mA in the reverse direction.  The only place this can come from is the mosfet.

electrical waveform
Boost Converter Simulation
So what's going on here?  I contend that this can be explained by taking the parasitic capacitance of the mosfet and diode into account.  I'll leave exactly what capacitance causes this up to someone more familiar with semiconductor physics.  To demonstrate this and remove other variables I've put together a simplified model below.

The input voltage source remains. As the output capacitor is made increasingly large it starts to act like a voltage source, therefore it can be replaced with a voltage source set to the output voltage we are interested in, and a steady state analysis can be performed.  The mosfet has been replaced by a voltage controlled switch with a parallel capacitance, in this case 500 pF, to represent the parasitic capacitance.  A reverse biased diode has also been placed in parallel to represent the mosfet body diode.  The Schottky diode connected to the output has been replaced with an ideal diode with an appropriate forward voltage.

Electrical Schematic
Simplified Model
Note: I apologise for the graphs, you may need to click on them to see things more clearly.  The voltage and current scales don't have a common zero either.

Running this simulation gives an almost identical plot to the one above, but we can now see what is happening more clearly.  The inductor ramps up as before (dark blue), it then ramps down to zero amps and the output diode stops conducting (red), but we can now see that the parasitic capacitance is still charged (green), it starts to discharge, but can only do this via the input inductor.  This is the reverse current through the inductor.  What's happening is that the parasitic capacitance is resonating with the main inductor around the zero volt point.  In the simulation below the resonance occurs at a frequency that makes it look like it's part of normal operation.  The period of resonance for an LC circuit is 2*pi*sqrt(LC), in this case that's equal to approximately 0.5 us.

It's hard to see but you may also notice a tiny delay between the time the mosfet is turned off and when the diode starts to conduct.  This is the first bit of current from the inductor charging the parasitic capacitance.  Once this capacitance is charged and the voltage reaches a high enough point, the diode will then start to conduct.

electrical waveform
Simplified simulation
All of this can be made clearer by shortening the on period as seen below.  Ideally the time spent with a negative inductor current should be around half a period of the resonance 0.25 us, which is close, but there is another effect at play that can be see in the green trace.  The voltage between the inductor and mosfet hits a limit of -0.7 volts.  At this point the body diode starts to conduct, effectively dampening the resonance.

electrical waveform
Simplified simulation - reduced on time
If we were to reduce the parasitic capacitance by a factor of 5, the resonance period would be reduced by a factor of sqrt(5), giving 0.22 us.  Which is once again close to the simulation below.  This time the resonance is clearly seen in the voltage between the inductor and mosfet.  It can also be seen where the bottom of a typical resonance waveform has been clamped by the body diode.

electrical waveform
Simplified simulation - lower capacitance
This is another one of those theoretical cases.  I don't know if this will really happen when a real device is built.  I don't even really know if it's a bad thing, I just had to put an explanation up in case someone else has the same issue.

You can get the related files here.

Edit:  On reflection, it is a bad thing.  High frequency noise is a bad thing in any circuit and leads to EMI problems.  I've since found out that googling "Boost Converter Switch Ringing" will yield more information about this issue.

Saturday, January 31, 2015

12 to 60 Volt 300 mA DC-DC Converter Design - Part 3

I've done a little more work on my design for a boost converter.  You can catch up on my previous posts here.

12 to 60 Volt 300 mA DC-DC Converter Design
12 to 60 Volt 300 mA DC-DC Converter Design - Part 2

It's been a busy week, so I haven't managed to get a lot done, but I've have made the design more stable and experimented with ways to dim the LEDs.  I've reduced the capacitor (C2) that controls the startup time from 20 to 10nF.


Electronic Schematic
Boost converter schematic.

The overshoot on startup seems to be a lot less now.  Startup time is still shown on the schematic as 2 ms but it's really 1 ms.

I've added two voltage sources that can control how the LED panel is dimmed.  It can be done by using a PWM method or by reducing the drive current of the panel.  First up I'll demonstrate the PWM method by driving the PWM pin with a square wave.

You can see that the initial pulse has a little bit of overshoot but after that it's a nice stable waveform.  The current though the LEDs is shown in dark blue.  Not shown in this plot is a current spike when the the load is switched back on.  It goes up to about 2.4A for a couple of micro seconds.  From what I can tell, this is due to the junction capacitance of the LEDs charging up and shouldn't be damaging.  I also think it's unlikely to happen in a real world circuit.  You can see the other side of this effect in the green line which is the voltage across the LEDs, after the load is turned off the junction capacitance starts to discharge.  As these are LEDs, even though there is still 40% ish of the operating voltage across them, there is essentially no current and no power, as indicated in the light blue plot.

Electronic Plot
PWM Dimming Waveform

Now on to the analog dimming mode.  This is controlled by applying a voltage to the CTRL pin.  The current through the load is equal to (Vctrl - 0.1) / (Rled * 4) for Vctrl under 1 volt.  Between 1 and 1.2 Volts this equation breaks down.  When Vctrl is 1.2 V the current supplied is at a maximum and the voltage across Rled is regulated to 250mV.  In my circuit this gives a maximum load current of 304 mA.

Just to test things out, I put a ramp voltage on the CTRL pin.  There is a bump at the start which I think has something to do with how the LT3761 regulates the supply, but I'm not sure.  Either way it doesn't matter, it's low down in the supply range of the LEDs

Electronic Plot
Analog Dimming Method

I don't intend to use this control method, but you can combine the analog and digital dimming methods as shown below.

Electronic Plot
PWM and Analog Dimming Method
To overcome the initial bump in the current waveform I tried delaying the ramp voiltage on the analog dimming method, but it didn't seem to have much effect.

Electronic Plot
Delayed Ramp Voltage

Once again the thing I am concerned about is the current in the inductor shown in purple below.  The steady state current doesn't worry me, the peak current on start up is way too high though.  I don't want to buy an inductor that's 3 times the size I need only to handle startup current.  I've been playing with the simulation and I think that I can control this by controlling the voltage on the CTRL pin more carefully on startup.  Essentially it needs to be ramped up slowly.  Hopefully I can have this sorted by my next post, have some actual components selected, and look at laying out a PCB.

Electronic Plot
Inductor Current


As usual, you can find files associated with this project on the Github repository.