[WIP] 17mm DD+single-7135 driver / single sided / Dual-PWM

505 posts / 0 new
Last post
comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198
chouster wrote:
Oooohh! Another comeback of a BLF-legend! Comfy, thanks for all your great contributions in the past. Welcome back.

Hey man, I’m just a blind squirrel who occasionally finds a lucky acorn. Beer

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA
  • I’m fairly confident that I can get Vcc flatter than B+.
  • Component location does matter. Remember, traces have inductance and resistance. It may not matter very much, but it matters. That’s not the central focus here and FWIW I use the term ‘move’ interchangeably for “logically moved in the circuit” and “physically moved in the layout”. I know, that should be a crime. Wink In this case C1 has been logically moved to a different location in the circuit!
  • I don’t feel like building one either. :-/ I’ve got a nice scope which I picked up a couple of months after you did all of that work in your FETs and gate resistors – scope images thread. It was clearly a really valuable tool and I’d wanted to get on the oscilloscope bandwagon for a while. If I get one built I can put the scope on it and see what’s happening.
  • Thanks for bringing up the capacitor in parallel to C1 thing… I completely forgot about it. AC / psuedo-AC is a mystery to me. I’ll have to think on that a bit.

EDIT:

comfychair wrote:
comfychair wrote:
Are you thinking you can get Vcc to stay flatter than B+? I don’t think that’s possible.

Oh, I see now that it is possible… you’re planning for Vcc to stay above B+, but only by a controlled amount that doesn’t zap the MCU. Is there anything to gain from that though? Have there been any problems caused by the swing in Vcc? I’ve been AWOL too long, I don’t know any of the new firmwares or the DD+7135 drivers.

Exactly! Yes, some members are using ATtiny25/45/84 and those seem to be more sensitive to a poor quality Vcc.

The new layout also makes this board “Zener mod ready” which it was not previously (doing a Zener build on v009 was at least a minor pain AFAIK). That said… I think it also means that a zero-ohm jumper should be used in place of the Zener’s load resistor when the driver is built for 1s use.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

chouster
Offline
Last seen: 3 months 4 days ago
Joined: 02/20/2014 - 15:05
Posts: 746
Location: germany

I know little to nothing about all these things, but I think this comment (#581) from Tom E in the attiny25 thread could be related.

EDIT: sorry, didn’t see the above two posts, this want meant as a reply to comfy’s post #331.

@Comfy, you seem to find very important acorns for a blind squirrel. Beer

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198
wight wrote:
The new layout also makes this board “Zener mod ready” which it was not previously (doing a Zener build on v009 was at least a minor pain AFAIK). That said… I think it also means that a zero-ohm jumper should be used in place of the Zener’s load resistor when the driver is built for 1s use.

I dunno, the current through the Zener with 1S would depend on how much current the boost circuit is able to generate. I have no idea how to figure out what that would be except by poking it with a pointed stick. Since the boosting happens every time the output switches the amount depends on the duty cycle which changes with each mode/level. It would also change by battery type and also state-of-charge. Makes my brain hurt, easier to just build it and measure. I can only model it by comparing to a positive displacement pump connected to a variable speed motor…

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 2 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

On some high-powered FET lights, VCC spikes were rebooting the MCU. This happened sometimes as low as 5 amps, or sometimes required more like 12 or 15 amps to trigger. It was worst on strobe modes.

The short-term solution was to make C1 a lot bigger, but this design attempts to fix it more properly.

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

MCU can’t get a voltage spike on drivers where C1 has been relocated, Vcc tracks with battery voltage. That means B+ would have to bounce up over 6V when the output turns off, and I’d have to see a scope image of that happening before I would believe it.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 2 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

I have no scope and virtually no clue about circuit design. I just know that some sort of spike happened at the trailing edge of a full-power pulse, when the FET closed, and the spike was enough to reboot the MCU. And, unfortunately, I got one of my drivers permanently stuck in 128kHz mode when I slowed it down enough to see what was happening.

(can be recovered with a high-voltage serial programmer or fuse-resetter, but I don’t have one)

I’d imagine that abruptly going from ~10 amps to zero hits hard enough to have a splash effect, but I don’t really know any details of what that effect would be. Any thoughts?

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

There’s a little bounce higher than resting voltage after the output turns off, but it’s small and very short lived. Pics in the scope images thread show a max of about 4.4ishV with a cell at 4V resting.

I have a 6x XML2 SRK, with the original BLF driver, without the giant capacitor or giant flyback diode or the choke/inductor. It’s an exact copy of the original 105C circuit with the exception of the 10uF C1 cap moved from after the diode to before the diode. It only gets used with 25Rs and I don’t have anything capable of measuring that kind of current but I would guess, based on output, it’s got to be near 20 amps. It doesn’t have any issues at all. I can’t think of a more extreme scenario than that one.

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

wight: see this post for a trace with a flat Vcc.

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

TK, are you sure this is happening with drivers with a revised PCB, one that does not use the original Nanjg diode/cap arrangement? Cause this sounds exactly like the problem I was fighting and solved with the relocated capacitor.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 2 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

comfychair wrote:
TK, are you sure this is happening with drivers with a revised PCB, one that does not use the original Nanjg diode/cap arrangement? Cause this sounds exactly like the problem I was fighting and solved with the relocated capacitor.

Yes, it happens on wight’s FET+1 drivers (this thread) (as built by either DB Custom or Manker), and on RMM’s FET+1 drivers. But it doesn’t happen on tiny13a MCUs — only on tiny25/45/85. Swap a tiny13a onto the exact same board and the rebooting stops. Or drain a cell 0.2V first and it works fine. Or use a low-amp cell. In some cases, it also depends on the quality of the springs connected to the battery, or even how far an individual spring is stretched or compressed. I could probably send you an affected driver if you want to look more closely. I don’t recall exactly where they all are right now (and most of them are bricked due to failed flashing), but I could probably find one.

The bricked ones are likely recoverable if I remove the MCU or perhaps some other component, but I haven’t investigated that yet. I just know that, for some reason, I can’t get Manker’s recent drivers to flash on-board. Other people have done it without issues though.

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

If the driver layout will allow it, rigging a second 10uF cap between MCU pin#8 & GND should prevent Vcc from seeing any of the battery voltage ripple. Check the two pics in the post I linked wight to above. Just for experimentation. That may not be the solution wight chooses, but it will definitely give you a 100% stable Vcc.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 2 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10654
Location: (469219) 2016 HO3

I think the cap between pins was something Tom E already tried, and it worked, and it worked with a smaller cap. I’m not entirely sure it’s the same as what you described though.

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Hmmm, good point comfy. Maybe I’m over-thinking this.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

Yeah but, the Zener regulator solution ticks more boxes than just ‘smooths Vcc’. It also makes several different types of driver possible using the same PCB. If it were a single-cell-only thing then I guess it would be a wash, even down to the same part count between them (assuming the single cell Zener version didn’t need a load resistor).

And, I have no idea what effect different values for the second cap might have. Tom I think used a 0.1uF in the original C1 location between pin#8 & GND, but there’s no scope images or other data to say what Vcc looked like. I only have that one pic using two 10uFs.

Tom E
Tom E's picture
Online
Last seen: 2 min 38 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14226
Location: LI NY

Yes - I've been using a 0.1 uF cap across the MCU, pins #4 to pin #8. On all the 85 board I've built on this wight FET+1 driver (v009, done maybe a dozen or so), this small cap does the trick - keeps the MCU running stable. I also use a 12K resistor on the SIR800DP (grnd to gate) when needed - that clears up the flash/blink on starting moon mode.

hers' an example showing the extea 0.1 uF cap wired (pic came out dark, sorry):

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Thanks to you all for constantly fine tuning these drivers. Comfychair, welcome back!

.

As it is talked about re-moving (or adding) C1 behind the diode, I’d like to add some thoughts. Following some recent discussion I came to the conclusion that this might not all be common ground:

  • The value of C1 – if behind the diode – influences OTC timing and the values needed for the CapThreshold in the firmware
  • The stock value for C1 is/was not 10y, but 4.7y on a Nanjg105c(8x) and 2.2y on an AK47a(3x)
  • Even the good X7R 1y OTC variates within the 20% spec and I measure between 0.83y and 1.07y

Note: All said is experience with linear driver (7135 only) where LVP is behind the diode and dual OTC threshold (3 timeframes) used.

When I started selfbuilding (linear) driver I used 10y for C1 as everyone else did, in the same time I used the AK47a as a single sided driver with added OTC. The OTC timing was greatly different (and I had to use firmware-values over 250 in some cases).
Then I started measuring the C1 stock values, as they were probably the basis for JohnnyC’s Star firmware. Of about 15 105c and Qlites I salvaged in 2014 all had a 4.7y C1 (may change or have changed with time and supplier). The AK47a on the other hand had a 0603 2.2y C1 – and I used some 10y. Results varied greatly.
So the value of C1 behind the diode does seem to influence the OTC timing.

The 20% production variance of the OTC influences the timing as well, but not as strong.

My conclusion was to bin C1 and OTC. I use C1 only in the range of 4.32y – 4.52 y and OTC in the range of 0.87y – 0.93y (greatest yield after binning…) and adapted my firmware to the middle values. I get very consistent OTC timing for dual threshold ever since.

This led me to the conclusion that the variance in the 1.1V voltage reference of the ATtiny13a a is negligible (a member had stated so somewhere).

I never followed the change to bypass the diode for LVP (R1 on Bat+) as this seemed to influence OTC timing as well. I had no intention to open that can of worms.

I just wanted to bring to notice, that if you re-introduce a cap behind the diode for FET-related reasons, that this might mix up OTC timing again as well. Especially if inconsistent values for C1 are used.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

Tom E
Tom E's picture
Online
Last seen: 2 min 38 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14226
Location: LI NY

I never seen 'y' used for µF. Is this intentional?

For the example above in post #347, and I think for all my uses, using the 0.1 µF cap is for e-switch lights only, so these don't have a need for OTC (thank goodness!). Timing is rock solid, dead-on in the 85's for e-switch use, and long clicks are with the MCU running, so very different, much much better for the user experience.

It's a good point you are making though, since the vast majority are still modding clicky lights, and I and others see timing issues with the long clicks for OTC.

I had not heard about 4.7 µF caps used in 105c's and Qlites. Maybe the 10 µF was measured earlier than 2014? It's easy to measure a cap - I've done it several times, but don't recall someone actually measuring the values.

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Tom E wrote:
I had not heard about 4.7 µF caps used in 105c’s and Qlites. Maybe the 10 µF was measured earlier than 2014? It’s easy to measure a cap – I’ve done it several times, but don’t recall someone actually measuring the values.
I have no idea where the 10µ come from. I even had bought 10µ for the first driver I wanted to build, as C1 was stated as 10µ everywhere. Then I ran into OTC timing problems and measured the C1 from disassembled Nanjg boards as 4.7µ and 2.2µ. Not on the board, but the single dissoldered capacitor. I bought my last Nanjg and Qlite in 2014. I’m sure that the chinese will use any capacitor that is handy at the time, so they might be different earlier, or today, or with the 105d. The main point is not the value itself, but that C1 seems to interfere with the OTC timing, if on the MCU side of D1.

Tom E wrote:
I never seen ‘y’ used for µF. Is this intentional?
oops, old habit. quick and dirty way on a keyboard that does not have a µ.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

Tom E
Tom E's picture
Online
Last seen: 2 min 38 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14226
Location: LI NY

I just confirmed the cap myself. I had a 105c missing an MCU because I needed the 13A at the time. It's a 105C 6x7135 bought from FastTech probably in 2014 as well - should be this one: https://www.fasttech.com/products/0/10001683/1122301-6-amc7135-4-group-25-modes-led-flashlight-driver-c.

So, I melted some solder on the iron tip, applied it to the side of the cap while holding the cap with a tweezers, and it came right off, quick and easy. Now that it's off the board, measured it on my old Fluke DMM, and it showed 4.6 µF, which is typical - the readings I get are always lower than the rating, so probably a 4.7 µF.

This is really interesting... Think'n further back, maybe the 10 µF value was more common... comfy or maybe RMM might know more?

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Unfortunately I realized after setting this up that it’s a pretty terrible setup, so these scope images are somewhat worthless. My test LED was an old XP-G, probably with some damage, which only pulled around 2.5A from a high-drain cell. That said, they aren’t entirely worthless so see below. Scope probes are placed with (1) on FET gate, (2) clipped through the center via onto the BAT+ pad, and (3) clipped onto C1 right next to MCU VCC. I’ve got about 60mm total of 26AWG LED wiring and about 600mm of 18AWG battery wiring. I need to swap the LED out for something which will pull more current and use a bit heavier LED wiring.

The build here is using a v030 PCB with these parts:

  • C1 – 1uF (X7R – #C2012×7R1E105K125AB)
  • OTC – n/a
  • R1 – 19.1k (Apparently I got the R1/R2 markings backwards on v030. Oops!)
  • R2 – 4.7k (Apparently I got the R1/R2 markings backwards on v030. Oops!)
  • R3 – bypassed (0-ohm)
  • R4 – n/a
  • R5 – n/a
  • R6 – n/a
  • D1 – stolen from Nanjg (~0.2v drop)
  • Z1 – 4.3v SOD-123 Zener w/ legs bent to fit on SOD-323 pads (#MMSZ5229B)
  • MCU: ATTINY13A-SSU
  • FET: PSMN3R0-30YLD

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

DB Custom
DB Custom's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 01/13/2013 - 22:28
Posts: 20718
Location: Heart of Texas

Thinking of getting some V030 boards and building a few with ATTiny25 MCU’s, shall I? Tired of the issues I’m seeing on my triples and quads.

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

I think they are functional enough for an advanced builder like you to make something out of them. As I mentioned above, my first test was a crappy one!

Definitely don’t forget that you’ll need SOD-323 and 0603 components. For the build above I populated R1/R2 with 0805 size and it was beyond “tight”: one had to lie down on it’s side. The SOD-123 w/ bent pins was also a very poor fit and very close to the resistor pad next to it. (The 0805 on C1 was no problem though, even w/ the Pomona clip.) You might want to make yourself a note about R1/R2 being reversed in case you forget before they come in (sorry about that, I’ll correct it in the next revision).

I wouldn’t be surprised if a limiting resistor was needed for the Zener. If we use a 5.1v Zener maybe something in the range of 10 to 50 ohms would be good? We’ll know more after I do a higher current test.

You know the drill… no guarantees… you’re the official test pilot! Big Smile Big Smile Big Smile

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

comfychair
comfychair's picture
Offline
Last seen: 5 years 1 month ago
Joined: 01/12/2013 - 05:39
Posts: 6198

Uh… I was given the 10uF number by someone who claimed that checking capacitor with a multimeter wasn’t accurate enough, and that he had measured the 105C part properly with whatever super-technical lab grade stuff and that it was a 10uF. Not saying any of that is fact, just that that’s where the number came from. I’m pretty sure I remember who it was but haven’t gone looking for the exact post, so I don’t want to name names.

DB Custom
DB Custom's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 01/13/2013 - 22:28
Posts: 20718
Location: Heart of Texas

Ordered. And to get a solder paste mask? Where do I get the layers Zip file?

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

comfychair wrote:
Uh… I was given the 10uF number by someone who claimed that checking capacitor with a multimeter wasn’t accurate enough, and that he had measured the 105C part properly with whatever super-technical lab grade stuff and that it was a 10uF. Not saying any of that is fact, just that that’s where the number came from. I’m pretty sure I remember who it was but haven’t gone looking for the exact post, so I don’t want to name names.
I probably wouldn’t sweat it at this point.
DB Custom wrote:
Ordered. And to get a solder paste mask? Where do I get the layers Zip file?
I just double checked. The tcream layer in the zip from OSH Park is correct.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

DB Custom
DB Custom's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 01/13/2013 - 22:28
Posts: 20718
Location: Heart of Texas

Ordered stencils as well, time to double check parts inventory… Smile

Tom E
Tom E's picture
Online
Last seen: 2 min 38 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14226
Location: LI NY

comfy – no sweat really, like wight said. Just interesting in pt of history – could be they used 10 uF caps early on. 10 uF caps are so well proven, I’d feel it would be risky to experiment with lower values, unless it’s a major re-design as wight is doing, of course.
Just fyi, I’ve measured 10’s, 1’s, and 0.1’s uF caps with 2 different DMM’s (Fluke and advanced model UNI-T) and they all measure slightly lower, but pretty consistent in the range, clearly identifiable.

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

wight wrote:
comfychair wrote:
Uh… I was given the 10uF number by someone who claimed that checking capacitor with a multimeter wasn’t accurate enough, and that he had measured the 105C part properly with whatever super-technical lab grade stuff and that it was a 10uF. Not saying any of that is fact, just that that’s where the number came from. I’m pretty sure I remember who it was but haven’t gone looking for the exact post, so I don’t want to name names.
I probably wouldn’t sweat it at this point.

I had no intention to point a finger at someone and I always saw it as minor details – which it probably still is.

The reason I brought it up now and here is that you all thankfully invest a lot of time and effort and I wanted to avoid that you – unknowingly – might use different components and have strange results, be it at the FET, at the OTC or while adapting firmware. I can’t help otherwise with these drivers but I follow with interest.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

Tom E
Tom E's picture
Online
Last seen: 2 min 38 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14226
Location: LI NY

Alex - didn't look carefully at your v030 til now. Wow, impressive all that fits! Ohhh - is that a MCU pin #3 pad connected, but covered up? I'm really not lik'n soldering a thin wire to pin #3 directly on the v009's for a locator /LVP LED. Looks like I could just scrape off the covering of the pad?

Edit: Debating whether I should order these 030's now or wait til some testing is done. Not sure I followed everything, but have you been able to breadboard/proto/test this out somehow?

Pages