How to deal with “peaks” voltages in mosfet in boost converter?

I'm designing a Boost Converter to go from 5 [V] to 12 [V]. The design I came with is the following:

To understand better the design, please note the following:

1) To drive the mosfet I'm using a PIC4550 with an opto coupler (TLP250, http://web.itu.edu.tr/yildiri1/mylibrary/data/tlp250.pdf) so I get a PWM of 15 [Vmax] at a frequency of 40 [kHz]

2) I didn't find the model I'm using in the real converter in PSpice, so I put a rectifier diode there but the one I'm using is SBL2030CT (http://pribor-systems.ru/fromoremax/PDF/Diodes/SBL2030CT-SBL2060CT.pdf) which is a Schottky diode. 3) All the other values and components are correct with respect to the real converter

The problem is: I can't get 12 [V] in the load because when I'm raising the duty cycle, the current goes crazy. At approximately 53% duty cycle, the circuit is asking the power source about 3 [A]. Since it can't give more than that, I can't raise the duty cycle anymore so I can't get 12 [V]. The max output voltage I get is 10 [V]. One of the problems I've found measuring and seeing the waves in the oscilloscope is that the square wave in the mosfet has peaks like this (This picture IS NOT from my actual circuit, but the waveform is EXACTLY the same as the one I'm getting. I took this picture from another related post, please see EDIT 2):

The peaks at the maximum current that the power source is able to give me are of about 30 [V] (while the output voltage is 10 [V]). When I touch the components, the mosfet is really hot (in comparison to the load) so I think it has to do with the peaks. Is there any idea about how I can deal with this problem?

If there is any missing information please tell me so I can add it.

EDIT1: The circuit for the moment is mounted on a breadboard (I tried there first because I want it work property then I have to move it to a PCB). The input doesn't have any capacitor across it. It is just as it is in the diagram above.

EDIT2: The waveform I get in the MOSFET is exactly the same shown here: Hot MOSFET DC-DC Boost Converter . However, the answer there doesn't seem to answer mine because I'm using an enough voltage to turn the mosfet on.

EDIT3: This is the diagram for the optocoupler and the R and C used:

where R is calculated as $$R = \frac{V_{CC} - V_{OL} - V_{EE}}{I_{OLpeak}}$$ I came up with a value of R = 24 Ohm and yes, I'm using exactly that value of capacitor shown in the schematic for the bypass.

EDIT 4: Added images of the circuit and real images from oscilloscope from the actual circuit:

Also I tried: changed the frequency of switching to 150kHz, added (not shown in picture) a dissipator for the mosfet and changed the amplitude of the PWM to 20 [V] (it was of 12 [V] before. Did that because one of the answers suggested it). None of them worked and last measurement showed an efficiency of 47%.

• Can you provide photos of your setup? Is this on a PCB or breadboard or what? Is there any input bypass capacitance across V1? Also provide more details of the gate drive. – pericynthion Nov 17 '18 at 0:08
• And a photo of how you are probing the circuit for your scope measurements would be informative too. – pericynthion Nov 17 '18 at 0:09
• At the moment I can't (the circuit is at my university and I'm at my house now). I will edit now with the information I can for the moment. But I'll answer here as well: It is on a breadboard, there isn't any capacitance across V1. The probe is between drain and source of the mosfet. After the stage of the opto coupler, the gate has a square wave of frequency 40 kHz and 15 [Vp] – Miguel Duran Diaz Nov 17 '18 at 0:16
• Any series resistor between the optocoupler and the MOSFET gate? Bypass capacitance across the optocoupler supply? – pericynthion Nov 17 '18 at 1:20
• It sounds like your MOSFET is transitioning too slowly, how are you driving its gate. What is the maximum current that can be delivered to the gate? That is a critical part of the schematic. Of note, in these types of configuration, if you are already at 50% PWM with Vout<2*Vdd, something is going wrong and further increasing the duty cycle will just waste power and saturate your inductor which could destroy the MOSFET. What voltage/efficiency do you get at 50% PWM? – Edgar Brown Nov 17 '18 at 1:24

Ok assuming your drawing is of the mosfet drain voltage, are you sure that waveform is correct? You claim the waveform is the same as this one from the question you linked, but that's not the same as your drawing.

A spike right after the mosfet shuts off is expected. That's the "boost" voltage. The signal you've drawn... I don't know what that would be. Is it maybe the gate voltage and not the drain? idk.

I'm going to guess that your waveform does look like the one in this picture.

I think what's happening is your mosfet is not being driven with enough gate voltage, either that or the switching time is too slow. A dead giveaway is that the mosfet is getting hot. You should probe the gate and update the question with your results. I think you're going to want a different mosfet with a lower Vgs(on).

You should also post the complete circuit including the optoisolator, because there could be a problem there. For example, you might be able to lower the 24 ohm gate resistor, but I can't say because I don't know the part number of the optoisolator.

• Yes, you're right. I didn't notice the difference between the drawing and the picture but the one on the picture is what I'm getting. Thanks for your answer, I will do the tests and will update as soon as I can. – Miguel Duran Diaz Nov 17 '18 at 2:34
• How far away is the 5 volt supply? At 1 microHenry of inductance per meter of wire (is not twisted pair or coax), you'll see lots of inductive kick (likely destructive, or simply disruptive ---- that gate-drive problem). Make that GROUND node be 1cm square foil, and solder ALL the components that need grounding to that square of foil. This makes the GROUND inductance just one or 2 nanoHenries, and some of the disruptive spikes will go away. – analogsystemsrf Nov 17 '18 at 3:22

$$\ 3A \$$ is not so surprising going from $$\ 5 \, V \$$ to $$\ 12 \, V \$$ as your load already asks $$\ 1A \$$ and $$\ \frac{12}{5} \approx 3 \$$.
Actually $$\ \frac{12}{5} = 2.4 \$$ but if the circuit isn't optimized with regard to efficiency I'm not surprised with $$\ \frac{2.4}{3} = 0.8 \$$ efficiency.
You have to realize that for a steady current through $$\ L_1 \$$ its average voltage has to be $$\ 0 \$$, and as the average voltage over $$\ L_1 \$$ is

$$U_{{L_1}_{avg}} = \delta V_1 + (1−\delta) U_{out} = 0$$

which is

$$5 \delta + (5−12)(1 − \delta) = 12 \delta − 7 = 0$$

so

$$\delta=7/12$$

That means that more than half of the time all current goes through the FET, leading to losses. Further, if $$\D_5\$$ isn't opening fast enough, the current in $$\ L_1 \$$ will force the voltage over the diode, and over the transistor, to spike. As commented above, it could come from a long wire, as you're already using a fast Schottky diode.

You could 'calm down' this behaviour a bit by increasing the gate resistor such that the transistor closes a little more slowly, giving the current a chance to change its path from the transistor to $$\ D_5 \$$.
If you lower $$\ \frac{di}{dt} \$$, $$\ L \frac{di}{dt} \$$, the spike voltage, will go down as well.

On the other hand, the period that both current through the transistor and voltage over it are not zero, hence dissipation, increases, so you'd have to do a loss calculation to see whether you're not heating up too much due to the extra losses this will give.
How far you can go depends mostly on the switching frequency and the length of the wire, causing this parasitic inductance. But anyway it won't improve the efficiency.