Oshpark Projects

I am only able to guess right now about the weird bounce being the cause of erratic behavior, still have lots more configurations to look at before the fog will begin to clear. Specifically, what does the waveform look like on the SRK-DD boards, which have never had issues running correctly without the extra resistors. The overall trace length on the V2-up 17/20DD is longer than the SRK even when the 17/20's resistor is replaced with a jumper. I also have some of the first version 17DDs with the super-short trace and without the resistor pads, that would be an interesting comparison too. And then there's all the hardware variations and how they work with different firmware versions... like does the waveform look the same for fast-PWM luxdrv and fast-PWM STAR clicky and fast-PWM STAR momentary?

Your nanjg “east 92” should also be on that list.

Isn’t that what the BLF 17DD is, a re-do of the Nanjg “manual” build?

A purpose build nanjg east92

Yes but his original mod didn’t need the gate resistor.

List of things to look at with the scope, not list of Oshpark projects.

DOH!

See post #1045 for current status - new version that no longer requires an additional capacitor, but instead just relocates the single original cap


ATTENTION

Gate/pulldown resistors no longer needed on the 15/17/20DD drivers (and though the SRK-DD technically works as-is without the resistors, it likely has this same voltage spike issue, it just happens to not be as severe, so this same fix needs to be applied on that one as well).

In the normal build of these drivers, there's a HUGE voltage spike at the MCU's Vcc pin #8 when the FET turns off. Up to 6v or higher... and if it goes too high, the MCU's overvoltage protection kicks in and it shuts down until power is removed. It also puts 6v onto the FET's gate, but that's a result of the voltage spike issue, not the cause. This is what it looks like on a driver with the gate resistor bypassed with a piece of wire (blue trace is the signal at the FET's gate, yellow is the battery voltage (the signal looks the same when measured either before the diode at B+, or after the diode at MCU's Vcc):

This is what happens if you place another 10uF/16v capacitor in parallel with the polarity protection diode, no other changes:

That's not perfect but I wouldn't expect it to be, and as long as it stays in the less-than-6v safe range it doesn't matter. Problem solved.

See post #1045 for current status - new version that no longer requires an additional capacitor, but instead just relocates the single original cap

Would a resistor in series help? That capacitor sure does smooth out the pulse to the capacitor, would a larger capacitor smooth it further (or were you staying with the off time cap for commonality)

The off-time cap is 1uF, the 10uF is the same part as used as the main cap at C1. I don't think any value cap will totally eliminate the oscillation even if big enough to no longer fit inside a flashlight - and as long as it isn't a spike high enough to trip the attiny's overvoltage protection I really don't care. There are lots of hardware combos that work fine with less-than-perfect waveforms on various parts of the circuit. It just has to work, not look perfect.

I love what is happening here, improving the BLF-boards!

However (sorry for bringing it up again, I repeat myself I think ), I think it is also a service to enthousiastic end-users of the boards that they have access to these boards without having to dive into the electronics side. Tom already did an attempt by starting a thread about the 17mmDD board, and that thread showed directly how complicated it is for non-electronics expert flashlight hobbyists to understand how to just make one of those drivers without knowing all kinds of electronics stuff (for me, I can place the parts and reflow anything and live happy ever after with these great boards, but would not know exactly what is going on)

So I hope that all these great improvements to the BLF-boards are followed every now and then by a clear manual for dummies, like a picture of the current best led board with the right parts soldered in the right places (and cleaning up of old pictures of versions that did not work wel). Personally I would like to see scavenge information on the parts lists (like: 'also from 105C' , or: 'from old sk68 driver' , ) because there's no Digikey-like seller in the EU, every order of new parts comes with 25 dollar shipping.

Everything from a 105C, except the 7135s of course, is the same as on the BLF-15/17/20DDs. The 17 & 20 use a big TO-252 (also called 'DPAK') FET, the 15DD uses a tiny little SOT-23 FET. These were all designed to use the same components as the 105C in the same circuit design, on purpose. Same resistors for the voltage divider (4.7K & 19.1K), same capacitor (10uF/16v), same polarity protection diode, same MCU.

To fix the voltage spike thing you'll need a second 10uF capacitor, but it's the same part with the same specs as the main capacitor used on the 105C.

To add the off-time function, you'll need to flash the off-time firmware and a different capacitor, a 1uF/16v, placed between MCU pin #2 and ground (here, cheaper than retail even with price breaks, worldwide shipping): http://www.ebay.com/itm/181283883536

There are plenty of threads already showing the traces underneath a 105C to figure out what connects where. The circuit is the same on the BLF drivers, the components are just in different locations. But the same parts connect to the same places.

See post #1045 for current status - new version that no longer requires an additional capacitor, but instead just relocates the single original cap

Updated shared-cart links for BLF drivers:

BLF-15DD: http://www.digikey.com/short/dcdj7

BLF 17DD & 20DD: http://www.digikey.com/short/dcndn

BLF-SRK-DD: http://www.digikey.com/short/dcdtq (last two items, the inductor & big schottky diode are optional - but if you want to use the inductor, you must also use the diode - either both parts together, or neither) (*note: this 5A/40V diode is a different part than used in earlier lists but is interchangeable, the old one is currently out of stock)

Those are parts lists for ONE driver. Adjust quantities to suit.

Please hold off on ordering these boards from Oshpark, they all need a new revision to add a dedicated spot for the second capacitor and to eliminate the gate & pulldown resistors. The parts lists will not change from what's shown here though. If you already have older revisions they can be used safely, just put the second capacitor where the diode goes, piggyback the diode onto the side of the capacitor, and replace the gate resistor with a jumper wire and skip the pulldown resistor.

I have not built or even looked closely at any of the recent updated Oshpark boards (like, the dedicated zener/resistor versions) so parts lists for those other boards will have to come from whoever has actually built (or designed) them.

edit: This is the capacitor for off-time memory builds, if you'd prefer to make a single order instead of some from here and some from over there, etc.: http://www.digikey.com/product-detail/en/C0805C105J4RACTU/399-8001-1-ND/3471724

See post #1045 for current status - new version that no longer requires an additional capacitor, but instead just relocates the single original cap

Thanks comfy, that is is the kind of 'my level information' that I need to hear every now and then :-)

It will make a lot more sense after you've built a few. :p

So if you are using the current versions of the boards the new carts are correct but if you use this new method to stabilize the modes you would add an extra cap to the old cart and use a jumper instead for the gate resistor?

The drivers are pretty darn simple, what’s confusing is keeping the different versions straight with up to date carts.

On every one of the modified nanjg boards(both 7135 and FET versions) there are just a few areas of them with easily understood functions. Once you understand those few functions the layout and parts become almost obvious.

B+ power comes into the boards and splits, one part feeding directly to led+ and the other going through the reverse polarity diode to power the mcu and to the voltage divider.

The voltage divider is 2 resistors connected in series going from the reverse polarity diode to ground. Pin 7 of the mcu connects to the junction between these 2 allowing the mcu to monitor the battery voltage as it drops. These 2 resistors drop the entire battery voltage between them passing only a very small amount of current. Most of the drop occurs in the first 19.1k ohm resistor leaving less than 1V left for the 4.7k ohm resistor to dissipate. Pin 7 monitors this smaller voltage and when it drops to ~.5V the mcu changes the pwm signal causing the led to blink and power down.

Pin 6 on the mcu is the pwm pin and sends pulses varying from very short(see ComfyChairs pics above) to constant on and controls the amount of time (duty cycle) that either the FET or the 7135’s are on and conducting current.

When they are on current flows through the board, the led, back to the board, and passes through either the FET or the 7135’s to the ground ring and back to the battery. The convention is actually that electrons flow the other way from negative to positive which is why the ground pin of the FET is called the source and led- is called the drain.

I believe C1 is just a filter on the input power of the mcu to protect it from voltage spikes caused by pwm but it may also have to do with the memory function. I haven’t had to learn about that one so I haven’t. :stuck_out_tongue:

Does the BLF15DD suffer from the spike as well?

The new shared carts have two 10uF capacitors, one of everything else. Parts required are the same if using either the current, older, or yet-to-come revisions. The new revisions will just add a dedicated spot for the new capacitor, in parallel with the polarity protection diode. Older revisions can use the same 'fix', like so:

Put the cap on the D1 pads, and put the diode alongside the capacitor.

If it's a driver that doesn't change modes correctly without a gate resistor, it's because of the voltage spike issue shutting down the MCU. The 15DDs I built didn't act right without a resistor, so I'd say that's one that needs the extra capacitor. I'm pretty sure Rufus also didn't have any luck running the little IRLM2502 without a resistor.

Apparently Dale was able to use the smaller FET on a modded Tiny10 without the resistor but I wouldn’t count on it.

Well I have pics in the 'scope thread that show the voltage spike even on drivers that change modes reliably, it just happens to not quite reach the point that the MCU shuts down. It's an easy fix and as far as I can tell has fewer drawbacks than using the gate resistors to hide the effects of the voltage spike. Much better to address the spike itself. The waveform on drivers using the gate resistor are just incredibly ugly, like I pretty much always suspected they would be.

comfy, if you have a look on the scope of the waveform of an ordinary 105C, would that also have the spike?