Confused about diode orientation in boost converter operation - Page 1
Forum section: electronics / beginners

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 10, 2024, 10:38:26 pm
content: Made a boost converter that takes 5Vin and converts it to 12V, max 1.7A using a MC34063ABD IC. I selected an inductor of 22uH and Schottky diode that is rated for 2A max. When I apply power the whole thing draws 1.2A current without any load attached to the output and things get crazy hot.When I measure Voltage output is in the order of mV so I'm thinking a short somewhere.If I reverse the orientation of the diode, all is fine an dandy and I get 12V on the output and negligible current draw from the input UNTIL I start applying a load like a 12V fan which is supposed to draw 0.3A max. The fan spins fine but the current drawn on the input reads close to 1.7A and of course things get crazy hot again.According to the data sheet for the diode, the cathode is marked with a white stripe. In the first case I had the cathode connected to the first PIN of the IC and inductor. In the second case I have it connected to power and the anode goes to the first pin of the IC and inductor.I should mention I do not have a heatsink on top of the IC and I also do not have a current sense resistor in series with the inductor and the positive lead of the bulk cap on the input so I'm thinking that's should be the latter should be the cause for the large current draw, but I do not get why the orientation of the diode causes the behavior described.https://assets.nexperia.com/documents/data-sheet/PMEG2020AEA.pdf

author: SuzyC
author_rank: Frequent Contributor
timestamp: February 10, 2024, 10:57:29 pm
content: From what you've described, something in your 34063 circuit is mis-wired!If the voltage output is close to zero, something is shorted or you have the diode reversed. If this is the case you might have killed your 34063.Possibilities include a wrong (too small inductor), capacitor on the output not able to handle 15V, mistake in wiring.Check your circuit wiring again. The cathode (dark band) connects to the output of the boost circuit.If you take a pic of your circuit and post it with your schematic, it would help anyone to help you troubleshoot.

author: magic
author_rank: Super Contributor
timestamp: February 10, 2024, 11:23:13 pm
content: 5V/22μH is 0.2A/μs or 2A peak in 10μs, or 4A peak in 20μs - corresponding to 50kHz switching frequency. Are these numbers what you expect?This is a dumb chip with no duty cycle control, it will turn on for up to (almost) full oscillator cycle at a time. If this causes switch transistor rating to be exceeded, bummer.

author: Andy Chee
author_rank: Super Contributor
timestamp: February 10, 2024, 11:23:28 pm
content: Regardless of the switching device or controller, boost circuit topology is pretty much the same. For example here's one I quickly knocked up, note the orientation of the diode.Also, note that the internal switch of the MC34063 is limited to Ipeak 1.5A. To get your 1.7A output, you will need to drive an external MOSFET.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 12:22:20 am
content: My schematic attached. Bulk caps are 100uF 16V each.My math for max current of 1.7A comes from (IOut = (Vin x Duty Cycle) / L x switching frequency x efficiency)):Vin = 5Duty Cycle = 0,706 or 12V/(5V+12V)L = 22 x 10**(-6)switching frequency = 100000Efficiency = 0,9My math for Vout comes from 1.25 ( 1 + (866K/100K)) = 12.075I also put a discharge resistor of 100K in the circuit to discharge the output cap faster.

author: Andy Chee
author_rank: Super Contributor
timestamp: February 11, 2024, 12:41:53 am
content: Quote from: newtekuser on February 11, 2024, 12:22:20 amThere's your problem! MC34063 cannot run at 1MHz!

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 12:48:26 am
content: Quote from: Andy Chee on February 11, 2024, 12:41:53 amMy bad, sorry that was a typo, it should have said 100000. I have corrected that.

author: Bud
author_rank: Super Contributor
timestamp: February 11, 2024, 12:56:18 am
content: Jeesus, mate, flip the drawing for good sake, make input on the left and output on the right.

author: Bud
author_rank: Super Contributor
timestamp: February 11, 2024, 01:03:42 am
content: Try connecting two diodes in series, to increase reverse voltage margin, maybe your diode is experiencing breakdown. Other people may say what voltages are developed in boost converter.

author: Andy Chee
author_rank: Super Contributor
timestamp: February 11, 2024, 01:08:17 am
content: Quote from: newtekuser on February 11, 2024, 12:48:26 amEven the datasheet says maximum frequency 42kHz for the onboard oscillator.https://www.onsemi.com/pdf/datasheet/mc34063a-d.pdf

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 01:14:13 am
content: Quote from: Andy Chee on February 11, 2024, 01:08:17 amThanks! That's the confusing part to me. The first thing the data sheet lists about frequency is 100KHz. How are the two related?Now, If I plug 42KHz as the frequency value into the formula I get 4.2A !!!

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 01:27:39 am
content: Quote from: Bud on February 11, 2024, 01:03:42 amWhy would it experience voltage breakdown? The diode I'm using is rated for 20V btw.https://www.digikey.com/en/products/detail/nexperia-usa-inc/PMEG2020AEA-115/1157682

author: Andy Chee
author_rank: Super Contributor
timestamp: February 11, 2024, 01:48:18 am
content: Quote from: newtekuser on February 11, 2024, 01:14:13 amI've never tried it, but if you ignore the onboard oscillator and connect an external oscillator, maybe it will work at 100kHz? But if you're going to the trouble of an external oscillator, you should probably consider a newer more modern alternative part.But like I said, you should be able to drive an external MOSFET switch to handle the extra current.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 04:02:21 am
content: I'll have to change the values a bit to account for IC current limitation being 1.5A and also add a current sensing resistor to limit it.If I'm not mistaken, a 0.133ohm resistor should limit it to 1.5A considering a voltage drop of 0.2V.i.e.: Rsc = Vdrop/Imax = 0.2V/1.5A = 0.133 ohmThen I think if I'd use a 22uH inductor and the switching frequency is 100kHz (still not clear if it's supposed to be 100kHz or 45kHz max), then that should give me up to 1.3A.Do these add up?A current of 1.3A should be ok for what I need (i.e.: driving a bi-polar stepper that draws 1.2A)

author: Andy Chee
author_rank: Super Contributor
timestamp: February 11, 2024, 04:37:55 am
content: Please calculate Ipk(switch), using the formula in the table Figure 17 in the data sheet.Ipk(switch) must be less than 1.5A

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 06:38:22 pm
content: Quote from: Andy Chee on February 11, 2024, 04:37:55 amI realized that if I strictly go by the switching frequency shown on DigiKey (35kHz), I am using a too small inductor which gives me too much current. Per Iout max formula, I should be using a larger inductor like 100uH to get 1.12A.The data sheet says the switching frequency is 33kHz typical.https://www.digikey.com/en/products/detail/stmicroelectronics/MC34063ABD-TR/1038906Now about Ipk(switch), that determines the max switching current this IC can handle, correct?I'd like to check if I understand the formulas:2 x Iout [(ton - toff) +1)] where ton - toff = (Vout + Vf - Vin) / Vin - VsatVf is the voltage drop across the diode (my diode has a drop of 0.52V)Vout is 12VVin is 5VBut how do I determine Vsat for my circuit? Table 6 lists two saturations depending on used configuration and I'm not clear if I'm using darlington configuration or not because I do have pins 1 and 8 connected (not to each other), as well as a resistor from pin 8 to VCC.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 11, 2024, 07:51:18 pm
content: Quote from: Andy Chee on February 11, 2024, 01:08:17 amThe way I read this, is that with a1nFcapacitor on pin 3 and 0V on pin 5 and an ambient temperature of 25 degree Celsius the output frequency will typically be 33KHz but can be as low as 24KHz or as high as 42KHz. The desired frequency depends on Ct (connected between pin 3 and ground) and depends on the needed on time (4.0 x 10−5 ton). Page 11 of the given datasheet.So the given on page 1 is that it can operate to 100KHz seems to be valid.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 11, 2024, 08:04:29 pm
content: Quote from: newtekuser on February 11, 2024, 06:38:22 pmSince this device uses bipolar junction transistors instead of field effect transistors there is a voltage drop over the collector emitter junction. When fully saturated the drop over the pin 1 transistor is typical 0.45V. This is with a current of 1A through the junction.With pin 1 and 8 connected the drop is typical 1V again with a current of 1A through the junctions.Your setup only uses the pin 1 transistor so Vsat will be ~0.45V.To get better performance you might want to look into newer devices that do use MOSFET's. Will give better efficiency and allow higher switching frequencies. Something likethisone for instance.

author: MrAl
author_rank: Super Contributor
timestamp: February 11, 2024, 08:43:06 pm
content: Hello,If the requirements are 5v input (constant, no sag at any current) and the output 12v at 300ma, the design looks very marginal no matter what you do.We have to remember that the peak current is related to the output power and input and output voltages. The ideal duty cycle is related to the input and output voltage, and the peak current is related to the output power and the duty cycle, along with the efficiency. The efficiency plays a role too as it may only be 85 percent or even less.The transistor drop could be as high as 1v maybe even higher. The drop across Rsc could be roughly 0.4 volts. We end up down to maybe 3.5v effective input voltage if that. If the duty cycle was 0.58 in the ideal case, it will have to be even much less which drives the peak current up even higher. It seems like the limit of 1.5 amps just may not be enough.We haven't even looked at the minimum duty cycle given the limitations of a boost circuit with resistive losses, which may be greater than that required to get the right output, if that was even possible.The 22uH did not sound high enough for this device right off the bat. If anything, maybe 250uH or greater.We should go over this design more carefully. With all these limitations I'd be surprised if this ever works with the given input/output requirements. I guess there is a chance that things are not as bad as they read from the data sheet, but one build may work while the next one fails.A good, simple simulation may help decide also.So ok, 22uH is definitely out. Probably 100uH min, but the startup surge is going to be too high and may cause a problem. 200uH would be much better. 20uf output cap, 1000uf low ESR input cap. This might just work.A drawback with this chip is not only the use of internal bipolar transistors, but also no slow start that came in with more modern chips. No slow start means higher input startup surge current and higher output surge voltage at startup.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 10:12:41 pm
content: Quote from: MrAl on February 11, 2024, 08:43:06 pmBut with a 200uH inductor, I'll get only 560mA max current, right? (considering 35kHz frequency)

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 11, 2024, 10:18:42 pm
content: Quote from: pcprogrammer on February 11, 2024, 07:51:18 pmHow can I calculate that? Or can I just use a 1nF cap to get ~33kHz frequency?

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 12, 2024, 12:50:48 am
content: I've updated the schematic, I think pin 7 and 8 were not connected properly in my initial version and I was also missing the current sense resistor on pin 6.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 12, 2024, 07:31:06 am
content: Quote from: newtekuser on February 11, 2024, 10:18:42 pmThe frequency also depends on the feedback. The specification given are with the feedback voltage being 0, and is only useful as a test. To calculate the needed capacitor you have to follow the formulas given on page 11 of the onsemi datasheet.First you choose the power supply characteristics and then you calculate the components. The frequency is one of the characteristics. If you want it to be 33KHz you choose that. The ratio between the voltages then leads to the on/off time and based on the frequency you can calculate the needed on time, which is the base for the capacitor you need to use.

author: MrAl
author_rank: Super Contributor
timestamp: February 12, 2024, 01:47:36 pm
content: Quote from: newtekuser on February 11, 2024, 10:12:41 pmHi,What do you mean a max of 560ma?Did you change the output spec from 12v at 300ma, to 12v at something even greater than 500ma?

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 12, 2024, 05:47:15 pm
content: Quote from: pcprogrammer on February 12, 2024, 07:31:06 amAre we referring to the same data sheet? the one I have is from STM and there are no formulas on page 11:https://www.st.com/content/ccc/resource/technical/document/datasheet/03/f9/c4/3d/7f/eb/4c/5e/CD00001232.pdf/files/CD00001232.pdf/jcr:content/translations/en.CD00001232.pdf

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 12, 2024, 05:49:59 pm
content: Quote from: MrAl on February 12, 2024, 01:47:36 pmHello!I meant that if I plug in the value for the 200uH inductor of into the Iout max formula (attached), I get 560mA.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 12, 2024, 05:55:16 pm
content: Page 13 in your version

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 12, 2024, 06:02:24 pm
content: Quote from: pcprogrammer on February 12, 2024, 05:55:16 pmMuch appreciated!

author: MrAl
author_rank: Super Contributor
timestamp: February 12, 2024, 11:26:48 pm
content: Quote from: newtekuser on February 12, 2024, 05:49:59 pmHello again,Ok, that sounds like it may be the maximum current deviation not the absolute maximum output current. If not, then the formula can not be correct, or they mean something else by it. BTW, where did you get that formula from?What changes when you increase the inductor is the ripple current, not the average current, unless the controller maxes out at it's max current handling ability.For example, with 12v out and 0.325 amps out, the average current with a 200uH inductor is about 1 amp, and the deviations are about 185ma above that and 185ma below that, approximately.With a 100uH inductor, the average current is still 1 amp, but the deviations above and below that are roughly twice that as with the 200uH inductor. If we go too much lower than that though, the average current plus the positive deviation will exceed 1.5 amps, so we have to watch out for that.Another consideration with all of these switcher circuits is the ripple current. We want to keep it low enough so the output filter capacitor does not get banged too hard with the changing current. We have to choose a cap that can take it, and the lower the ripple is the better as the cap would last longer. Choosing the inductor controls the ripple current, so we have some control over that.The other consideration with the inductor (and the capacitor) is the initial surge current when the power is first applied. With no slow start, the current will exceed 1.5 amps with a 100uH inductor and 20uf cap, but would probably be ok with 200uH. You can test for that.The calculation of the average current goes with the power out and the power in. If you had say 4 watts out and 4 watts in (for a theoretically ideal circuit) then if the output voltage is Vout and higher than Vin, then the average current input will be higher than the average output current:Vout*Iout=Vin*Iinso:Iin=(Iout*Vout)/VinWith Iout=0.325 and Vout=12 and Vin=3.9 volts, we get:Iin=1.0 amps.That is the average current which means the average DC current into the input.Note I used 3.9 volts for the input voltage, not 5.0 volts. That is to compensate for some of the losses in the circuit that makes the input look lower for a simpler calculation.I also assumed 35kHz.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 13, 2024, 02:32:50 am
content: Quote from: MrAl on February 12, 2024, 11:26:48 pmThank you for taking the time to explain how the inductor is involved in all this and the formulas ! I got mine from ChatGPT and it wouldn't surprise me if it was incorrect although it seemed like it understood perfectly what I was askingSo if I wanted to power a 12V stepper motor that draws 1.2A from 5Vin, it would draw 2.8A from the input.How did the switching frequency fit into your calculation above?

author: Andy Chee
author_rank: Super Contributor
timestamp: February 13, 2024, 02:46:09 am
content: Quote from: newtekuser on February 13, 2024, 02:32:50 amUse the following graph to choose your own operating frequency.https://www.onsemi.com/pdf/datasheet/mc34063a-d.pdf

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 13, 2024, 03:04:27 am
content: Quote from: Andy Chee on February 13, 2024, 02:46:09 amMany thanks!

author: MrAl
author_rank: Super Contributor
timestamp: February 13, 2024, 12:22:24 pm
content: Quote from: newtekuser on February 13, 2024, 02:32:50 amHello again, On ChatGPT...OMG, ChatGPT is totally bogus on technical issues for the most part. Maybe for some simpler stuff it might work, but after a lengthy 'conversation' with it some time ago I determined that it is not to be used for technical issues especially advanced ones. I had asked it about a special numerical calculation for the sine of an angle, and it would give me an answer. After I told it that was wrong, it would apologize, then give another wrong answer, then after I told it that was wrong too, it gave another wrong answer, and this went on for a while. One of the answers it gave me even mentioned a mathematician that gave that result, and when I checked it, it was totally bogus too. I went back the next day and gave it the same answer and it said that it didn't work, and that there was no such algorithm.After that I realized you can't use if for stuff like this.On that same note, see what it gave for the duty cycle D of the boost converter:D=Vout/(Vout+Vin)which is totally bogus. The correct expression is:D=(Vout-Vin)/Vout=1-Vin/VoutTo prove the first one is wrong, just enter Vin=5 and Vout=5.01 and see that it comes up with a duty cycle close to 1/2, which is by far and wide the worst estimate in the history of the universe, or at least in the history of boost converters. The real duty cycle would be close to zero, which means the switch is always off, and thus the input goes right to the output (not including the diode drop which is considered zero in theory with ideal elements).To modify the duty cycle to include efficiency, which can be low, we can multiply Vin times the efficiency Eff:D=1-Vin*Eff/VoutWith Vin=5 and Eff=0.78 and Vout=12, D comes out to 0.675 which is very reasonable.Note Eff=0.78 is the fraction for 78 percent efficiency. On the stepper motor current drive...If you have 5v input and 12v output at 1.2 amps, then the input current in the ideal case is 2.88 amps.The expression was:Vout*Iout=Vin*Iinand solving for Iin:Iin=Vout*Iout/Vinand we can include the efficiency estimate in that formula as:Iin=Vout*Iout/(Vin*Eff)and again with Vin=5 and Vout=12 and Iout=1.2 amps, Iin comes out to 3.69 amps.I used 78 percent (0.78) because that's a reasonable efficiency for a bipolar with all those other resistive losses, but it could be 70 to 85 percent. I doubt we would see 85 percent with this chip though, maybe not even 80 percent. On the switching frequency...The switching frequency fits in with the duty cycle to estimate the excursion above and below the average DC current in the inductor for one. If the duty cycle is 0.675 and the frequency is 100kHz, then the period is 10us and the switch 'on' time is 6.75us. Using the familiar:di=v*dt/Land with v=5 and dt=6.75us and L=200uH we get:di=169maand half of that is:di/2=84.5maso the excursions above and below the average DC current would be about 85ma.If the DC current was 1 amp, then the upper current peak would be 1.085 amps.What we assume in the above is the current waveshape is a very close approximation to a true sawtooth wave, even though it curves very, very slightly, but this is usually a good approximation. The input current surge...Lastly, the input surge is a little more complicated. With feedback it's even more complicated. I think the best bet here is to do a simulation, but we could look into the math behind it too as there are calculations that could estimate this. SummaryJust to recap a little here...1. It's not a good idea to use ChatGPT for technical issues, especially advanced issues, even mildly advanced sometimes.2. You understood the input current calculation very well.3. The frequency and duty cycle work together to allow the calculation of the absolute peak current [see also #6 below].4. The input surge is another matter which requires a little more thought when there is no slow start mechanism. Unusual Chip Activity, another note on the frequency and duty cycle...This chip happens to be an unusual switching converter because there are times when it might skip an on or off cycle. This means the ripple on the output goes higher. The other thing is it is somewhat random when this happens so the output could look very different than a more typical switching converter. The peaks and valleys can go higher (and lower) sometimes than other times. This is one of the things I did not like about this chip. There are of course advantages too though for using this chip.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 14, 2024, 05:39:02 am
content: Quote from: MrAl on February 13, 2024, 12:22:24 pmThank you very much for the lengthy write-up and explanations!

author: MrAl
author_rank: Super Contributor
timestamp: February 14, 2024, 05:12:08 pm
content: Hello again,You're welcome.Funny how they made this chip so different than the typical controller. Most controllers will produce a constant pulse width for the same input and output conditions, while this one doesn't always do that. It's as if the controller dithers the output between two possible set values in order to get the average output. If the average is low, it will keep the higher set value until it gets to the level just above the right level, then produce the lower set value until the output gets back down to just below the right level, then repeat. It's more like a digital controller than an analog controller, probably because of that internal flip flop.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 24, 2024, 05:23:02 pm
content: Hello All,I'm attaching the schematic and PCB layout of my boost converter. There is a short caused by R5 Rsense which was causing the board to get extremely hot and only output 3V instead of 12V.However, after removing R5 there's absolutely no voltage coming out of the output cap.Did I do something foolish when layout out the PCB?

author: Andy Chee
author_rank: Super Contributor
timestamp: February 24, 2024, 06:19:06 pm
content: Quote from: newtekuser on February 24, 2024, 05:23:02 pmI suspect you did not correctly calculate the power dissipation of R5.Use ohm's law, P = I2R

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 24, 2024, 06:40:08 pm
content: Quote from: Andy Chee on February 24, 2024, 06:19:06 pmI used a 0.051ohm resistor rated for 1/2 watt so that's a power dissipation of 23.7W for my 1.1A circuit (I did not have any load connected). However, even with this huge power dissipation, my output was not 12V so I'm thinking something else must be wired incorrectly.The input was connected to my PSU set for 5V at 1.2Amp.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 24, 2024, 08:33:56 pm
content: Quote from: newtekuser on February 24, 2024, 06:40:08 pmNo idea how you got to 23.7W of power dissipation. At 1.1A the power dissipated in the 0.051 Ohm sense resistor is 0,06171W.For 23.7W at 1.1A you need ~21,5V.

author: newtekuser
author_rank: Frequent Contributor
timestamp: February 24, 2024, 11:37:37 pm
content: Quote from: pcprogrammer on February 24, 2024, 08:33:56 pmMy bad, I divided I**2 by R instead of multiplying itSo, for 1.1A at 12V I need a 10 ohm resistor to dissipate 13.2 Watt? (i.e.: 1.1**2 Amp * 12V = 13.2 Watt, then 13.2 = I**2 * R so R = 10.9)That seems like a very low resistance for such a high wattage, so I must be doing something wrong. I'm not even able to find a 10.9 ohms resistor that is able to handle that much wattage.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 25, 2024, 08:06:04 am
content: Quote from: newtekuser on February 24, 2024, 11:37:37 pmPower resistorsdo exist, but to get 10.9 Ohm you will have to put some in series. There are alsoelectronic loadsthat can be used for testing. With these you can set the desired current.