2
\$\begingroup\$

I am trying to build a PV charger (PWM), which I guess is kind of a buck converter. Below is a first LTSpice simulation. V1 are the PV modules, V3 is the battery. V2 is the microcontroller's supply voltage. L1 is my estimate of the wire inductance. For D1 I chose whatever came to my mind first. M1 is about as close to my future buyer's choice as it can get.

The current is rather smooth, but the potential at the MOSFET drain jumps pretty high when the MOSFET turns off (and only then, turn-on is uncritical). The reverse current (discharge current) through the battery is only of the order 200 mA for the duration of that transient, so probably nothing much to worry about (battery capacity is 120 Ah). But who knows... batteries are said to have a human-like qualities.

Why does it happen and how can I stop the circuit from doing this?

Simulation

\$\endgroup\$
5
  • 1
    \$\begingroup\$ You've basically built a slightly weird boost converter (with L1 and M1), why do you think the voltage wouldn't shoot up as you try to suddenly change the inductor current? Why did you add L1 in the first place? \$\endgroup\$ Mar 25 at 17:52
  • \$\begingroup\$ Because the inductor is allowed to discharge over the diode? L1 is wire inductance (sorry for the late edit). Why is the buck converter weird (I apologize for being a noob). \$\endgroup\$
    – oliver
    Mar 25 at 17:54
  • 1
    \$\begingroup\$ Don't use node numbers; label a node and use the node name. You need capacitance across the microcontroller to soak up the energy and regulate the ripple. \$\endgroup\$
    – Andy aka
    Mar 25 at 18:01
  • 1
    \$\begingroup\$ For the inductor to discharge via the diode, the diode has to conduct, which means that its anode has to be at a higher voltage than the cathode. \$\endgroup\$ Mar 25 at 18:01
  • \$\begingroup\$ @JonathanS.: stupid me! But can I fix that somehow? \$\endgroup\$
    – oliver
    Mar 25 at 18:05

1 Answer 1

3
\$\begingroup\$

how can I stop the circuit from doing this?

You don't need to fix it. All buck regulators that enter DCM will exhibit this behaviour. Basically when the inductor energy has nearly depleted and cannot push current through the reverse diode any more you find that you get a decaying sinewave resonance where the frequency is dictated by the inductance and the parasitic drain-source capacitance of the MOSFET.

But, you do need to apply labels to your nodes and note plot using node codes like n007. It's only because the circuit is simple that I could see it was associated with the MOSFET drain node.

Another thing; this is an unusual (but valid) buck regulator circuit and, the advantage you get is the N-channel MOSFET is easily driven relative to 0 volts but, your load must be totally floating for this to work correctly and, that means connections from the MCU to anything else.

\$\endgroup\$
3
  • \$\begingroup\$ Sorry for the labels, I don't use LTSpice too often. Good to read that this is normal. But what do you mean by the load being totally floating? The load (the inverter) is connected to the battery terminals (the BMS terminals, to be precise), so it doesn't care about the charging circuitry. And the MCU has its own supply (5V dcdc) and is isolated from the rest by the optocoupler. \$\endgroup\$
    – oliver
    Mar 25 at 18:24
  • \$\begingroup\$ (and needless to say, that I did not incorporated reverse current protection to the PV yet) \$\endgroup\$
    – oliver
    Mar 25 at 18:27
  • 1
    \$\begingroup\$ @oliver looks like I misread that the load was the microcontroller. If a battery then that's fine. \$\endgroup\$
    – Andy aka
    Mar 25 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.