So after finally getting my FET modules imported into LTspice and running a bunch of simulations on the driver, I’m going to recommend potting it after assembly. She’s gonna run hot - pushing 6A into a MT-G2 LED, I’m dropping around a watt in the high side FET, which is in a 3x3mm package without much copper around it. Unfortunately P-channel FETs suck, and I couldn’t fit a N-channel buck controller into the design.
For “sane” applications (eg, 5A in a XM-L) it should be OK, assuming the ambient temperature by the driver doesn’t get too bad.
I do it in LTspice itself, which does it by integrating over Id*Vds.
Do a time simulation and bring up a plot. Then hover over the FET, hold down CTRL (i think, maybe ALT) and you’ll get a thermometer hovering over the component. Click on the component and the power dissipation in that device will show up on the plot. Then in the plot window, zoom over an area where the circuit is running steady state - try to get lots (hundreds) of switching cycles displayed in the window so it’s accurate. Then hold CTRL/ALT/something and click on the text at the top of the window for the power trace. A window pops up that gives the RMS power dissipation. Handy little feature.
That’s a ambitious project, I guess the parts cost are exorbitant expensive compared to a stacked nanjg. I guess you have sampled the LT1773… by the way stacking works on the c8 copper pill from Ryan but it is no real constant current like you are building.
I have had a read on some models from lt in the magazines they send out, they havereally interesting things for boost and buck converting things. But i would have never thought of hacking a charger module to a LEDdriver :bigsmile:
—-
Has anyone ever tested a direct tiny out to a XML? Will this work as moonlight?
—-
Nice find texaspyro.
One thing I should state - my output current isn’t really constant. When battery voltage changes, the duty cycle of the converter changes, which brings up two effects:
- Delta-IL changes. The Ith voltage sets the peak current, not the average current. Delta-IL is at maximum when Vout=Vin/2, dropping to zero at Vout=Vin.
The LTC chip has slope compensation. As the duty cycle goes up (battery voltage goes down), the peak current threshold is reduced, resulting in less current in the LED.
Generally the second is dominant, and it results in the LED becoming darker as battery voltage drops. I’ll fire up LTspice again and take some numbers shortly.
To do “true” constant current I’d need either a current-regulating buck (which nobody seems to make in a suitably sized package), or add a current sense amplifier to drive the voltage feedback node of a voltage-regulating buck (I’d probably run out of board space)
The PCBs are waiting for me in a box at home. I’ll bang out the design early next week and see what happens.
Though I think I’m gonna abandon this design - I have a buck design created now based on the LTC LTC3783, which has far better current regulation. Current is still set with a pot.
Only catch is it’s not synchronous, which means there’s a schottky diode that’ll get hot at high output currents/low duty cycles. For driving MT-G2s it’s not really an issue as the schottky doesn’t do much conduction, but it’ll probably have to be potted for use with XM-L’s at high currents.
Wait a sec - will the LTC controllers work with just a PWM signal on the 'run' pin? Specifically the LTC1871 (see here for the context). That driver in its original form has no PWM (which I guess makes some people drool, whatever) because it just selects the mode by enabling/disabling the tiny FETs that each have their own limiting resistor. The LTC controller just runs wide open at all times.
That's a boost driver so I dunno if it's more or less complicated, but can I bodge a attiny13 on there, using it in the normal Nanjg-style configuration, with the PWM output to the LTC's 'run' pin and do away with the array of tiny FETs/resistors? (it'll need a single limiting resistor still, if all of them are bypassed the big FETs on the battery side get very unhappy and smoky)
That’s one of the things I’ve been confused about as well (as you saw in your thread!). The datasheet certainly never specifically addresses the subject of PWM input. The part that confused me and caused me to think that some sort of PWM may be supported was this bit “For applications where the RUN pin is only to be used as a logic input, the user should be aware of the 7V Absolute Maximum Rating for this pin!”. That clearly implies that the RUN pin may sometimes be used as_ somethingotherthan an on/off logic input…
Maybe it wouldn’t hurt anything to try PWM into the RUN pin. You could lift the pin on the PIC which enables the RUN pin on the LTC1871. From there a PWM signal could be fed from an ATtiny13A for testing. The stock DQG firmware will let you set the current limit and an e-switch firmware on the ATtiny would let you easily switch the PWM duty cycle. From what others have said, a very low freq may be a good place to start…
I must have missed this thread. I’m looking forward to any developments on your LTC3783 based driver (or the one from the OP, if you ever decided to assemble and test it).
That might be a tight fit for the pocket-rockets. I guess we’d probably use a Tiny10. The PCB is 1.6mm thick and a the ATtiny is 1.75mm (max) thick. So maybe <3.35mm. We’ve probably got a component height of 1.1mm on the top of gmarsh’s board. I think the tallest component may be the LTC1773 at 1.1mm and it’s basically in the center. So 4.43mm of stuff. Probably doable but it might not be fun getting the LED wires from the top of gmarsh’s board up through the top of the driver cavity. Remember that you’ve got to get power/GND/PWM wires to the Tiny10 board too.
I have some of the .8 mm tiny 10’s and both led+/- are vias on that board which leaves pwm and ground. Ground typically has vias available on both boards and the tiny 10 has a pwm via. Deciding which board to put on top might be tricky. Reflashing in place isn’t really an option with the tiny 10 due to the need for a B+ pad. It wouldn’t fit in many lights but might fit in some. Something to think about anyway since stacking boards seems commonplace.