thefreeman’s HDR Anduril 2 boost drivers - update : KR1 B35AM & D4v2, Buck driver

235 posts / 0 new
Last post
thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

Question about the positive contact. In this version the pad diameter is 10mm, based on the largest spring I had (from a D4v2.5 driver, very low resistance spring), but if I want to switch all the passives to 0603 (most are 0402) to make it easier for people to build, it would be beneficial to have a smaller pad, it would also help layouting a lot. 

In the Fireflies E12R they use a (bypassed) spring with 7mm diameter, it’s quite tall.

Some components on the back, but especially a lot of vias and traces that couldn't be placed with a larger spring.

BlueSwordM has small springs with a base diameter of 5.75mm, but I haven’t seen any resistance measurements in his thread.

There is the option of a button contact, can be of a small diameter and has virtually zero resistance (not counting contact resistance) 

For example in a Thrunite T1, it’s 5mm, they can cram a lot of components arround it. But button contacts can cause the cell to rattle inside the tube if there isn’t enough pressure from the back spring, or even break contact when shaking the light as often seen in Thrunites. Also I’m not sure where to buy them

Looking at the KR1/4, there isn’t much space available on the back for components and vias/traces, due to the 10mm spring and switch pad, despite the fact that the PCB is larger, so a smaller pad would help.

What do you think ?

mbp
Offline
Last seen: 8 hours 12 min ago
Joined: 04/01/2019 - 11:00
Posts: 381
Location: Baltimore, MD

I am a pretty novice modder, never gone beyond basic LED and driver swaps, so driver design is pretty much entirely over my head. Having said that I don’t like the button contacts, I prefer low resistance low profile spring like Emisar etc. The problem with the button is exactly what you said about Thrunite, battery fitment becomes a hassle.

I do not think going from a low resistance spring to a nigh-zero resistance button contact matters much. At that point we’re talking about such a small margin of improvement it isn’t relevant in my mind. I would prioritize reliability, ease of build etc. for the positive contact… just my opinion.

The BlueSwordM springs look like a good option to me, many modders on here have built some killer FET setups with them so they must compare to Emisar/Noctigon I would think.

icpart
Offline
Last seen: 13 hours 26 min ago
Joined: 04/15/2019 - 01:13
Posts: 332
Location: Bulgaria

Well done job thefreeman!
I missed that great thread and just now saw it. I had similar idea like you to try to develope some boost driver. If you want to share your shematic and whole design we can all of us with some sort of ЕЕ knowledge to discuss how to improve the design. I think that can become first trully open hardware contributed driver here in BLF from different peoples. I think your driver is based on lume1 driver just you used boost converter? I made for myself reverse engineering of lume1 circuit, I think you are done the same?
For PCB reflowing are you used stencil for solder paste?

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

Sorry icpart, I’m a bit busy with getting Anduril compiled and flashed on it for the basic functionalities, as I’ve never done that before, but I’ll get back for your questions.

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

Lume1 based on KR1 1 channel boost driver so better to use K1 config whats what i will do. BTW I added 1 more cap for signal filtering and ordeder PCBs at Oshpark.
Schematics of pop boost drivers

Mike C
Mike C's picture
Offline
Last seen: 1 day 4 min ago
Joined: 01/22/2014 - 08:03
Posts: 2584
Location: Sweden

icpart wrote:
For PCB reflowing are you used stencil for solder paste?

I don’t know about anyone else but personally I use stencils. For double sided drivers I used to only use them on the first side but now I’ve just receive some 3D printed “PCB rests” and they make it so much easier now, massive time saver:
https://budgetlightforum.com/comment/1756422#comment-1756422
thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

I used stencils yes, I put others PCBs arround it so that everything is well level, a bit of double sided tape so that nothing moves. It works pretty well IMO.

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

Hello, time for an update.

I’ve encountered some issues but all are solved except for one, that is Anduril compatibility with the dual sense resistor design, the functionality needed here is to be able to turn on a mosfet for a portion of the ramp, for example if there is 10 levels on the low current range, the mosfet needs to turns on from 11 to 150 (total of 150 levels). Unfortunately I don’t think I’ll be able to do this on my own as I don’t have much experience/knowledge of programming.

This is the schematic for version 0.3, the boards that I have now :

The first problem is that I wired the PWM to a pin that uses time/counter D, but there is no support for it yet, solution is to wire it to a TCA pin (e.g. PB0), which I did for testing. TCD could be advantageous for lower power consumption as Gchart Showed here.
Right now it is set at 10bit with TCA and a 5MHz clock, resulting in a 5kHz frequency, which is high enough to be filtered it with R12-C13.

Second problem, that I already mentionned, the mosfet resistance for the current sense resistor selection is higher than expected, about 4.2mΩ instead of 2.2mΩ, simple solution, just decrease R8 (from 7 to 5), but if it varies between parts it’s going to be a bit annoying to test the current for each driver. Though this is only a concern for a high output current driver, as the total sense resistance needs to be low for a low Vsense/OPA_ref (43mV on the driver I built).

One improvement for the mosfet resistance would be to use a gate driver (with charge pump) such as mic 5019 so that the mosfet is driven with a higher Vgs, but that’s 3 additional components.

Third problem, the LED flickers at very low output, more like blinking even, this is at level 1/1023, with a 3.3Ω (R7) sense resistor, about 17uA :


(Green is current, 1003.3Ω current sense for the probe)

Yep, 23Hz switching frequency, a moonlight strobe basically Ughh , in retrospect I should have though about this. The reason is that as the current decreases, the switching mosfet inside the boost IC reaches its minimum pulse lenght, at this point if the current continues to decrease it will start to skip pulses, effectively reducing the switching frequency. (This is opposed to forced PWM where the frequency stays constant but in this mode the efficiency goes into the trash).

At level 26/1023 (~330uA) :


(103.3Ω current sense)

Strangely enough the flicker is not visible anymore even though the frequency is still pretty low, this is probably because it’s a ripple and not a full on/off like PWM.

So this made me curious about how Zebralight manages this on the H600mkII I disassembled the other day, the first thing I did was to check whether it uses pulse skipping or not, because on the TPS63020 there is the option for both, it does, then I checked the waveform on the lowest mode :


(100Ω current sense, ~100uA)

390Hz at 100uA, no visible flicker, it makes sense that the frequency is higher because the TPS63020 switches at 2.4mHz, vs 500kHz for the TPS61288, so it has a shorter minimum pulse lenght.

This could be the reason why they have higher moonlight on their more recent lights, if the IC they use have a longer min pulse lenght than the TPS63020.

H600 driver :

I have a solution though, it’s not very elegant but it’s simple, just add a resistor between OUT and GND so that there is always enough current to keep the switching frequency high enough.

Here with 5K :

156Hz, no visible flicker and a truly low moonlight where we can see the dies structure :

Not that it is necessary, but the goal I’ve put myself to reach was H600 mkII level moonlight, 100uA at 3V, so 50uA at 6V, mission accomplished Party

The cost of this resistor is a current draw of 0.9~1.3mA, power of 4~8.5mW (depends on Vf), the resistor can be a little higher though, still without visible flickering, and it can be further increased if a higher moonlight is deemed sufficient.

Here is the schematic for the version 0.4 with the necessary changes :

I removed some passives, the gate resistor, as far as I know this is necessary to prevent ringing when switching, but here we’re not doing some high speed PWM on it, just on/off from time to time. I also tested with a puldown resistor, don’t see any change. ZL don’t use any gate or pulldown resistor on their current range selection mosfets.
I also removed removed R8 (v0.3 sch), it is often present on application notes about this type of op-amp circuit, as part of the compensation network (with C12) for loop stability. I don’t see any difference without it either.
By the way, it is fully stable (no flicker) with 10bit dimming and 43mV Vsense (42uV at 1/1023), but maybe it’s just this particular one and the next won’t be,but that wont be a problem with the dual sense design as we can develop a high dynamic range with just 8 bit, (9bit if we want 20uA with 5A max).

With this the hardware is fully functional, and the design can be used with any switching regulator/converters.

for the firmware it is functional right now without HDR, for the HDR functionality it’ll have to wait, I messaged Toykeeper the other day about this and she said that she has a non finalised branch that might have functionality for this.

I made the change to the board and ordered some, I’ll try to make another version with 0603 passive instead of 0402.

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France
icpart wrote:
Well done job thefreeman! I missed that great thread and just now saw it. I had similar idea like you to try to develope some boost driver. If you want to share your shematic and whole design we can all of us with some sort of ЕЕ knowledge to discuss how to improve the design. I think that can become first trully open hardware contributed driver here in BLF from different peoples. I think your driver is based on lume1 driver just you used boost converter? I made for myself reverse engineering of lume1 circuit, I think you are done the same? For PCB reflowing are you used stencil for solder paste?

I haven’t found schematics for loneoceans drivers, only the older GXB17 but that’s a more complicated design.

I started by analysing the D4V2.5 linear driver (I posted the schematic on the attiny1 thread), read some app notes about this type of circuit and applied it to a switching converter instead of a mosfet, the opamp inputs just need to be swapped, since with feedback pin on a switching converter, if current goes up, we want FB to go up, instead of down for the gate of a N mosfet.
But it wasn’t stable though (in simulations), something that was super helpful was this schematic of the Convoy XHP35 driver posted by agnelucio, many thanks to him. In which I took the idea of using the feedback voltage divider (R16-R17), the opamp just nudges FB up or down a bit, instead of freely driving it (oscillations hell), which is much more stable, that said I have doubts about the actual stability of the Convoy driver without a compensation capacitor for the op-amp.

I did take a look at pictures posted on loneoceans’ github, it looks to be basically identical (ignoring the dual sense resistor part), also reference for some interesting parts (MIC5019 and TPS706).

Quadrupel wrote:
Lume1 based on KR1 1 channel boost driver so better to use K1 config whats what i will do. BTW I added 1 more cap for signal filtering and ordeder PCBs at Oshpark. Schematics of pop boost drivers

I already discussed this with icpart on the lume thread, I don’t think adding another RC stage is useful. At 50% output, where ripple would be the highest (edit : that’s wrong it’s not at 50% that it is the highest Facepalm )

I don’t see any 5kHz ripple.
R=10kΩ, C=470nF, rise time to 90% ~ 10ms

Agro
Agro's picture
Online
Last seen: 2 min 56 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6813
Location: Ślōnsk

I see that you use a 10mm² MOSFET for reverse polarity protection…why does the driver need something this large?

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

I didn’t look much at what in available for smaller PFETs, which would be 2×2mm I suppose, but I doubt their resistance will be low enough.
Also there is enough space for a 3.3×3.3 sized one.

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

I just found space for 1 more additional cap for second level filtering, i’ll play and see what i get. Smaller then 3×3 Pfet will burn out. Now looked at your SiSS61DN and it looks like to burn as well. It have low safe operating area in DC mode…

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

I measured the voltage drop across the 2×2 PFET on the H600, 104mV at 3.4A = 31mΩ
Looking at Vishay’s offering, the DC current they can take is rather limited, arround 8A max.

Quadrupel wrote:
Smaller then 3×3 Pfet will burn out. Now looked at your SiSS61DN and it looks like to burn as well. It have low safe operating area in DC mode…

Are we looking at the same DS ? The Rdson limited DC current goes up to 20A, the TPS61288 caps at 15A.

Dlux
Offline
Last seen: 14 hours 50 min ago
Joined: 05/27/2019 - 18:43
Posts: 66

Great job thefreeman!
I´ve recently take a look to 2×2 FETs and even the better ones had too high resistance and too low ampacity.
If you want to save space, placing inductor over the rest of driver components, may be a better approach.

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

https://www.vishay.com/docs/75322/siss61dn.pdf page 4 last graphic . At 3-4v it can take only 800mA in DC mode?
Mounting coil on top of component is Chinese crap engineering ;))

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

The horizontal axis is Vds, drain source voltage, not Vgs (which is negative for a Pfet, in our case it varies from -4.2 to -2.8V), Vds is very low, Vds = Rdson x I

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France
Dlux wrote:
Great job thefreeman! I´ve recently take a look to 2×2 FETs and even the better ones had too high resistance and too low ampacity. If you want to save space, placing inductor over the rest of driver components, may be a better approach.

Thanks.
Coilcraft has a series with raised inductors but their thermals are not as good and in the end quite limited in current compared to the XAL7030 equilavalent. And if something taller is to be used, I think a XAL7070 better suited.

Quadrupel : at 15A Vds ≈ 0.075V.

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania
Agro
Agro's picture
Online
Last seen: 2 min 56 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6813
Location: Ślōnsk

thefreeman wrote:
I didn’t look much at what in available for smaller PFETs, which would be 2×2mm I suppose, but I doubt their resistance will be low enough.
Also there is enough space for a 3.3×3.3 sized one.

I’m used to seeing reverse polarity protection before the MCU only. I guess here it’s on the power path. Why does it have to be there as well?
Hoop
Hoop's picture
Online
Last seen: 6 min 30 sec ago
Joined: 12/20/2012 - 05:33
Posts: 1042
Location: Spokane, WA

I was looking at Pfets the other day. SiSS63DN looks good for 3.3×3.3 yea?

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

Agro wrote:
thefreeman wrote:
I didn’t look much at what in available for smaller PFETs, which would be 2×2mm I suppose, but I doubt their resistance will be low enough.
Also there is enough space for a 3.3×3.3 sized one.

I’m used to seeing reverse polarity protection before the MCU only. I guess here it’s on the power path. Why does it have to be there as well?

Im talking about power patch, for mcu… whatever.
Mike C
Mike C's picture
Offline
Last seen: 1 day 4 min ago
Joined: 01/22/2014 - 08:03
Posts: 2584
Location: Sweden

Agro wrote:
I’m used to seeing reverse polarity protection before the MCU only. I guess here it’s on the power path. Why does it have to be there as well?

https://budgetlightforum.com/comment/1717110#comment-1717110
See Loneoceans answer two posts after.
Agro
Agro's picture
Online
Last seen: 2 min 56 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6813
Location: Ślōnsk

I see, thx Mike. Smile

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania
thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

Agro wrote:

I’m used to seeing reverse polarity protection before the MCU only. I guess here it’s on the power path. Why does it have to be there as well?

Loneoceans post explains it well, basically it does this :


Plus probably through the logic circuits as well.

Since we need to protect the power path we need a power mosfet. High side PFET is the easy way,here the SISS61DN has max DC current of 20A and max Rdson of ~5mΩ at the voltage we’re driving it, with 15A in still means a voltage across it (Vds) of 75mV and 1.125W of power lost.

We can also use a low side NFET which have better characteristics than PFETs, but this means that the circuit GND and batt- are different, the layout is bit less simple, it’s quite practical to have a GND/batt ring around the circuit, some drivers use a NFET, I saw pics of an Armytek driver and they used one.

Or we can use a high side NFET with an ideal diode controler (a gate driver with a charge pump) but that’s more components.

Hoop wrote:
I was looking at Pfets the other day. SiSS63DN looks good for 3.3×3.3 yea?

It looks slightly better indeed, good find.

Quadrupel wrote:
Some more reading
Those are interesting links but they don’t contradict what I said.
You seem to be confused about what Vds means since you want it at 3~4V (battery voltage ?)
The drain source voltage is the voltage across the mosfet. It is that high when the mosfet is off (very high resistance) and the rest of the circuit is at 0V. But when we drive it below Vgs=-2.8V the resistance drops very low, below 5mΩ, it’s like a resistor and the voltage across this resistor is our Vds.
If we’re drawing 10A then Vds will be 0.005 × 10 = 50mV. This is simply ohm’s law and this is what the Rdson limit line is.
At some point though we hit the thermal stability limit for DC, which for SISS61DN is 20A, same for 63DN.

What is the rest of the diagram for then ? Linear mode, that is when when have a higher Vds due to a higher Rdson.
An example is a linear led driver, when we want to drive an LED at 5A with a 3.2Vf and a battery voltage of 4.2V, then Vds = 1v (4.2-3.2V) and Rdson = 0.2Ω. In that case it would not be in the SOA of the 61DN and it would blow.

Now imagine drawing 10A with a Vds of 4V, that’s 40W in the mosftet, of course it’s going to blow!

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

OK.. whatever( i do not understand and i wont ;)), but my choice is Pfet with higher safe operating area in DC mode .

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France
Quadrupel wrote:
Drain to source No?

Fasltad’s mosfet models have high resistance by default, change beta to ~90 to simulate a ~5mΩ PFET : https://tinyurl.com/yhsmyjqr

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

Oh yesss!

I managed to make anduril works with HDR Party I used the LED2_ENABLE function, normally it just mirrors LED_ENABLE. To change that I copied the code for enabling the LED channel 1 only for a portion of the ramp in fsm-ramping.c. Now I can put in cfg :

 

 

LED_ENABLE_PIN_LEVEL_MIN 1 //boost enable
LED_ENABLE_PIN_LEVEL_MIN 150

LED2_ENABLE_PIN_LEVEL_MIN 18 //high range enable
LED2_ENABLE_PIN_LEVEL_MIN 150

 

The high range mosfet turns on level 18 (for example).

There is one issue, that I kind of knew would happen, it blinks at full power when the mosfet turns on. When we are on top of the low range, that is 1023/1023, the RC filter needs some time to settle to 1/1023( about 10ms to 90%, ~20ms to 99% with the current RC filter), so when the mosfet turns on the output is very high and falls to the expected power in ~20ms,  hence the blink. Reducing the capacitor of the RC filter would help but it will only do so much since it can’t be too low for filtering the PWM signal.

 

For now I have added one buffer 1/1023 level before the mosfet turns on, obviously not ideal since if you stop ramping exactly on it you’ll find yourself in moonlight (0.01lm) instead of a low mode (~3lm). The actual solution would be to add a delay to the mosfet, something like 40ms should be plenty, not sure how to do that though.

But for now this a good enough solution.

I’m so happy to have it now fully working after so much time developing it  Big Smile 

 

thefreeman
thefreeman's picture
Online
Last seen: 4 min 54 sec ago
Joined: 01/06/2020 - 09:56
Posts: 873
Location: France

I received the 0.8mm PCBs, they look quite sturdy, I roughly cut a ring in a 1mm copper sheet :

With this the XAL7030 only stick out about ~1.9mm above the ring, probably low enough to fit in a D4v2, KR1, or other linear/fet lights with shallow driver cavity.

Quadrupel
Quadrupel's picture
Offline
Last seen: 1 hour 38 min ago
Joined: 12/03/2017 - 10:40
Posts: 730
Location: Lithuania

I ordered 0.8mm 2oz cooper option too. It will perfectly fit in to D10 headlamp ;))

Pages