Checking my math (fig) on modifying a buck driver

I have a Trustfire X6, with this driver . I have installed a MT-G2 in the light and applied a trimpot to “R5” on the driver, such that the emitter sees ~ 7500mA

The technical prefacing out of the way, Ever since I souped up this hot-rod I’ve wanted to dispense with the blinky modes and add moon-mode. Any of the traditional methods are not applicable, as this is a 3S light into a MT-G2.

Awhile back, in ye-great securitying mod thread of olde, Werner posted a pic of him piggybacking a 105C onto a SST-50 driver and I was at a loss as to how he did it. But this morning I looked-up how buck drivers work on wikipedia and it provided a clarifying moment. It also explained why buck drivers have two FET’s on them. One FET provides the switching to keep the toroid “full of electricity” to borrow a James May-ism. The second FET provides the PWM and is the one I wish to jumper.

Here is where I am a little confused. I had always understood the “sense resistors” as literally affecting a sensor function in the MCU that caused it to open the faucet further. But looking at, and trimpot-jumping “R5” on this SST-90 driver make me realize that “sense resistor” is more “current limiting resistor” as on the Securitying drivers. Is this the case with all buck drivers? And would this mean that jumpering the limiting resistors on this driver would cause it to be direct-drive, or try to be until the Toroid fried? I don’t see any voltage regulators on that board, none at least that would be big enough to handle the original 5-amp load.

That aside, it means I know what to do regarding piggybacking a 105C. The 105C here would exist purely to control PWM, and separating the FET on the “-” side of the driver from the MCU, and bridging it to the PWM output of a 105C, would allow for the proper modes I want while still allowing the original driver to handle voltage regulation.

It also gives me a direction to think about for adding low voltage protection. Richard sold me a parts kit for a Zener-DD17 driver that will [ostensibly] let me know when the LGD1’s in my BTU are at 3v each. The MCU on that driver is getting 3s voltage in, trimming it down for the MCU, but also putting it through a resistor so the MCU can have a secondary voltage source to treat as battery voltage monitoring. I would need to use a zener driver anyway to be able to deal with the 3s voltage in, so simply using a zener-DD17 driver assembled to have 3s low-volt warning would give me low-volt warning in the form of the PWM flashes and mode stepdown.

Does this logic seem firm enough to proceed on? I wanted to get some opinions before I started doing anything that involved permanent modifications to this driver.

Now all the extra room inside the X6’s driver cavity doesn’t seem like such a waste. :bigsmile:

It's late. So I will quickly throw a couple concepts down:

  • Since that's buck driver, it already regulates power to the MCU. No zeneer mod needed.
  • In the below image, the buck converter is the 6 pin component below the FET. The PWM output is coming from the MCU to the Buck Converter and then the Buck Converter is feeding a voltage adjusted PWM signal to the FET. The PWM out pin on the Buck converter is the top left pin in the image below (Bigger on product page). The signal from the MCU is going through that resister (labeled R4 on PCB) to the bottom left pin in the image.
  • For voltage monitoring. You will probably need to add a voltage divider circuit as the driver probably doesn't have one (hopefully, I'm wrong about that).

Struck out some wording after rereading your OP. I misunderstood what you were thinking of doing.

Your question about resistors being current limiting resistors is a good one. I think they are possibly doing both. In the picture I posted about, you see the resistors do indeed limit the current flowing to the Source Pin of the FET. But, they also are part of the feed to one of the pins on the Buck Converter. I imagine that is for voltage regulating purposes, but I really don't have a clue otherwise.

Have you seen my Crelant 7G10 mod were I air wired an Attiny13a and added voltage monitoring? The light has a parasitic drain issue that I have not yet tried to trouble shoot (I just lock out for now). The drain is probably due to something other than the voltage divider. BLF member wight has a thread on how to calculate the 2 resistor values you would need to build a voltage divider.

EDIT: Here is the wight post on voltage divider for 2S and more.

While synchronous buck converters have two FETs, it is highly unlikely that yours in synchronous, and so the second FET you see isn't an FET at all, but instead a diode. An inductor basically uses a magnetic field to store some energy and resist fast changes in electron flow. We use this in a buck converter or boost converter to smooth out or average out the pulses that are coming from the fast switching FET at a high voltage, to average out to a lower voltage--the current flow in the inductor cannot instantly change. It probably isn't 100% accurate, but you can imagine the electrons in the inductor after the switch is turned off as still having some momentum. This momentum, without anywhere to go when the FET turns off, will create a huge voltage spike that will fry the FET in a hurry. This is why the flyback/freewheel diode is there: to provide a path for that stored inductive energy a path to return to. The diode is wired in parallel, but backwards of how we would usually put it.

In short, only one FET is being PWM'd, but it is being PWM'd from the buck IC, not from the MCU. The MCU is telling the buck IC to use a certain duty cycle. The Buck IC's sole purpose in life is to keep the average voltage on it's current sensing pin at the specified level. It does this by using PWM on the FET and measuring the voltage drop after the current flows across the sense resistor(s). Simply jumpering those resistors would put the driver in direct drive, instead of reducing the voltage like you want it to. Simply put: don't jumper those resistors.

So, you need to find the pin on the buck IC that accepts the PWM input from the MCU and wire the PWM output from your attiny into it. You should be able to find it by tracing back to the original MCU. Besides ground and maybe VDD it will probably be the only other shared pin.

I’ll elaborate slightly on the bolded portion of ImA4Wheelr’s post. You must be careful of semantics and context, lots of terms get bandied about around here. In a buck driver there must be some way of sensing current. Typically this is done with a shunt resistor, otherwise known as a current sense resistor. This resistor does not limit current while the circuit is in regulation and the cells have a high enough current handling capability. Once you reach the dropout voltage (the voltage where the buck controller can no longer regulate because the available voltage and needed voltage are too close together) ANY resistance in the circuit (wires, springs, FETs, resistors, the resistance of an inductor, etc) will limit current. That does not make any of those things a “current limiting resistor.”

A current limiting resistor is a resistor placed in a circuit in order to reduce current. The resistor we are discussing here was placed in the circuit to measure current. Other components control the current while the driver is in regulation.

In regards to your understanding of the circuit’s operation as written in the first post - it’s very wrong. Definitely wrong. :frowning: Take a look at RMM’s post above for a better idea how things are going on.

Good thing I asked here first then. _ Thank you all for your help. :slight_smile:

Sure. It’s pretty easy to get confused when:

  • The exact same physical part can be used in multiple roles. Current sensing vs Current limiting being the case in point.
  • The same package can be used to hold entirely different types of electrical component. Plus, often the markings are sanded off!

The good news is that what you actually want to do is pretty straightforward.

  • There appears to be plenty of space for a child PCB with the ATtiny13A installed on it as well as a voltage divider made of either SMD or big through-hole resistors.
  • IIRC the buck controller ImA4Wheelr [/scold] pointed out is almost certainly a QX9920, who’s pinout we already know. In fact, the whole driver is very similar to the HX-1175b, so it might behoove you to look over ImA4Wheelr’s thread about that driver. I posted the QX9920 pinout in post #104 there, but it’s around elsewhere as well. Note that ImA4Wheelr does successfully piggyback an ATtiny13A in that thread.
  • The bottom left pin is the pin which gets PWM from the MCU. It’s called EN (Chip Enable) on the QX9920.
  • Note that HKJ has reviewed your driver as “TR-0124 14-66W 5-Mode LED Flashlight Driver for Luminus SST-90”