Author Topic: Does a MOSFET controlled DC-DC step down regulator need a flywheel diode?  (Read 1297 times)

0 Members and 1 Guest are viewing this topic.

Offline wassyTopic starter

  • Newbie
  • Posts: 8
  • Country: gb
Hello all,

-------- <TL;DR> -----
See paragraph 3
-------- </TL;DR> ----

I'm fairly green when it comes to electronics but I have been tinkering for a couple of years now and am trying to get my feet wet with a fairly typical "solar shed" scenario. I have a 12V 7Ah Yasua battery (not a deep cycle leisure battery, but don't care if it doesn't last too long). I have a very low quiescent current DC-DC step down regulator to 5V permanently connected to a Wemos D1 mini (esp8266 based) wifi microcontroller. I intend to have this in deep sleep a lot and wake up periodically to check the amount of solar being generated, current draw and voltage of the battery as well as temperature inside the shed just for the heck of it. It will also check with a message broker on my server in the house to see if it has been told to wake up and turn the lights on, at which point it will come out of sleep mode for a longer period of time to drive the LEDs I have. It will be connected via a GPIO pin to a 5M strip of WS2812 individually addressable RGB LEDs that will run round the outside of the shed (for BBQs, parties and randomly scaring the cat etc.). It will be a lot like the project on instructables here: http://www.instructables.com/id/Shed-12v-Solar-Lighting-System/, but with a microcontroller and some sensors.

Now the WS2812's run at 5V, so while I could connect them to a larger DC-DC step down and also have the microcontroller connected to that, it seems wasteful of precious mAh's as each chip on the WS2812 still draws about 1mA or so even if all RGB led values are set to 0. Overall it would be a constant current draw of at least 2-300mA when 'off'. My thoughts are to have another DC-DC step down converter to 5V but much higher rated (10A+), to drive from each end of the LED strip. So that the regulator and LEDs aren't drawing current 24/7 I intend to put an N-channel MOSFET between the 12V GND wire of the regulator and the "12V load" GND terminal connector PWM solar controller / load regulator. The gate of the MOSFET will then be driven by the WeMos at 3.3V. I have found a MOSFET (i forget the model # now) with TTL level input and very low RDS(on). I will try it direct at 3.3V logic from the WeMos GPIO pin, but could drive it via a transistor connected to the WeMos 5V input if needed to drive the gate voltage slightly higher, but I think the heat dissipation with my heatsink should be OK even at only 3.3V.

My question, as per the subject line, is the 12v -> 5V dc-dc converter an inductive load, and therefore do I need a flywheel diode to protect the MOSFET? I have googled this but without much success, lots of results relating to relays, coils and DC motors. As far as I can tell the step down converter is a switching LC device that uses an inductor and capacitor with its own diode internally to "switch" on and off the input voltage and use the reverse biased diode (when on) as a path to provide current (along with the capacitor) when the input voltage is switched off. What I don't know is if there will be a corresponding kick on the Vin side of the regulator. Do I need a diode in my configuration? Is there any cost to adding a flywheel diode? (bearing in mind I am looking for low power consumption when off, and don't particularly care about rapid switching time).

Thanks for reading.

The DC DC buck converter I intend to use
https://www.aliexpress.com/item/DC12V-24V-to-5V-10A-50W-Step-Down-Converter-Buck-Voltage-Regulator-Module-Waterproof-IP68-Accessories/32847316670.html
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Switching regulators do not present an inductive load because they include an input capacitor for decoupling.

Switching the input ground side of the switching regulator will only work with a floating power source.
 

Offline ocset

  • Super Contributor
  • ***
  • Posts: 1516
  • Country: 00
There will be a kick from the stray wiring inductance, and your input cap will  consume that.
Here is a sim in the free LTspice of a buck with wiring inductance stray) .
Just hit run.

You can see the effects of stray wiring inductance at switch on and off.

Give a shout if you want me to send you a quik start guide on ltspice.
« Last Edit: January 28, 2018, 06:18:53 pm by treez »
 

Offline Damianos

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: gr
...
Switching the input ground side of the switching regulator will only work with a floating power source.
... or/and floating load.
 

Offline wassyTopic starter

  • Newbie
  • Posts: 8
  • Country: gb
Quote
Switching the input ground side of the switching regulator will only work with a floating power source.

Please can you explain. I don't know what you mean by a floating power source. The setup I have planned has the MOSFET between the GND wire (on the 12V side) of the regulator and the return to the 12V load connections of the PWM solar controller. With my admittedly limited knowledge I thought that makes it isolated from the other devices connected to the 12V load connections of the PWM?

I am in the process of making a full schematic in Fritzing, but have only done the breadboard view, not the schematic view so it looks a bit of a mess at the moment. Attached is a crude MS paint drawing of what I am intending.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
When the power MOSFET is off, the ground to the high output switching regulators and LEDs will rise to the positive supply voltage.  This would not be a problem except that the ground to your Wemos is shared with the power source so the data line between the Wemos and LED strips is going to have ground on one side and power on the other which may or may not be acceptable.  A floating power source would not share a ground with the Wemos preventing this problem.

The usual solution is to use high side switching where the positive supply is switched using a p-channel MOSFET but there are other ways to handle it if necessary.  There may be a way to fix the data line so that it does not matter.  If you use low side switching, then this is just something which needs to be considered.

 
The following users thanked this post: wassy

Offline wassyTopic starter

  • Newbie
  • Posts: 8
  • Country: gb
Resurrecting an old thread (family life got in the way of taking this project any further), can someone tell me why, when the MOSFET is turned off, the LED lights would be at the supply voltage, as per David's comment? I understand that the ground to the 12V side of the 12V->5V regulator will be at 12V, but why would the LEDs and data pin by 0V on wemos side and +12V on the LED side. I thought the 12V->5V regulator would raise the LEDs to at most +5V, otherwise they would risk being damaged by the high voltage no?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf