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

505 posts / 0 new
Last post
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

Ok, I’m looking at the component list for this driver and seeing that Alex built one with the ATTiny13A to start with and bypassed the Zener Resistor (200 ohm) . What UI then was used?

And this makes me wonder WHY the 13 components instead of 7? I’ve built a LOT of these with zero issues, so what are we trying to fix if staying with the 13A and normal A6 firmware? If all this is to make it work with the lighted tail cap, leaving that out is far easier!

Even a factory ATTiny25 driver with Bistro runs my Quad Cu X5 with ease, making right at 3000 lumens on the little 14500. I had the tail cap down to a 0.14mA draw with 2 LED’s and a 12K resistor, but removed that this afternoon.

So I’m trying to figure out what firmware to flash, which MCU to use, and just why all the xtra components…. Has R5 been established? Is 1uF still good for the OTC? ATTiny25 and the latest Bistro? Got parts in hand, ready to go, need to know where before I start driving. Wink

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

DB Custom wrote:
Got parts in hand, ready to go, need to know where before I start driving. Wink

In theory, any firmware should work. I don’t think anyone has actually done it yet though, so I wouldn’t expect the best results without a few trial and error steps in the middle.

It doesn’t have to be bistro, but if you go with tiny25 there aren’t a lot of other compatible options yet.

I don’t even use bistro on lights I build for myself. It’s like those big cafeterias you go to when the whole extended family is together and you need dinner but nobody can agree on anything. It has enough variety that everyone can eat something, but none of it is as good as what you’d get at a more specialized restaurant.

Fritz t. Cat
Fritz t. Cat's picture
Offline
Last seen: 2 years 6 months ago
Joined: 05/07/2013 - 00:33
Posts: 2535
Location: Si Valley

What if one used a capacitor between the FET gate and ground? That would smooth out the signal to turn the FET on, which would reduce transient spikes and make the FET operate in linear mode at least some of the time, absorbing some of the energy that is going to the battery and the LED now. The LED and battery would heat up less and operate more efficiently with a more nearly constant current. It would not effect turbo mode.
In the BLF A6, for instance, LED heating in the higher PWM modes is quite significant because of the small head. I am not sure how much it would help the battery but it would certainly be better for it.

Flashlight designers should look at lighthouses and pottery.
这些谁设计的手电筒应该看灯塔,以及在陶器。

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

The FET needs to be switched hard and fast, doing otherwise is generally frowned upon. Generates massive heat. FETs are great when used as switches, pretty terrible if you try to use them as variable resistors. 'Smoothing out the gate signal' is the last thing you should try to do.

A gate resistor does what you're speculating about adding a capacitor (a capacitor won't have that effect), and it also slows the FET's switching time, leaving it in that not really on but not really off bad zone. If it can be made to work without a gate resistor the FET will have a much easier life.

Put a choke (inductor) inline with the LED to soften the square wave and cut the output on lower PWM timings way down. Leave the FET switching as-is. Problem is fitting a large enough inductor on the driver (and adding the choke requires a large flyback diode as well). This was already done on the 1st-gen BLF-SRK boards. Between 0.8 and 1.2uH, with a rating of 12-15A, works well. Higher uH gives greater reduction at small pulse widths. Inductors with those specs are rather large, fine for giant drivers, not fine for 17 or 20mm.

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

Or, forget all that nonsense and use a single 7135 controlled by a second PWM output for the low modes. Has anybody tried that yet? (/snark)

fixed it
Offline
Last seen: 1 year 5 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

comfychair wrote:

Or, forget all that nonsense and use a single 7135 controlled by a second PWM output for the low modes. Has anybody tried that yet? (/snark)


I think I read something about that a few months ago in some obscure GB thread Wink

But for what it’s worth, I’ve done some experimenting recently and found it’s possible to get beautiful, PWM-free low modes from the FET by giving the gate a small charge from the pull-up resistor (about 150-250 cycles @ 4.8MHz on the attiny13a). It can then be left floating for a while.

The nice thing is that it makes a nice linear looking ramp, probably because the FET has exponential response to gate voltage. It will also go as low as you want it too, with the led barely visible in a dark room. The ugly part is that the charge time needed changes significantly with voltage and probably also from part to part and with temperature. So this will be difficult to use without some sort of feedback loop but I’ve not given up on it yet.

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

fixed it wrote:
The ugly part is that the charge time needed changes significantly with voltage and probably also from part to part and with temperature.

That’s the same thing I discovered, and I wasn’t able to do much about it in software. It seems led4power ran into the same issue, and used a separate power channel for the lowest modes. The FET is incredibly unstable at the low end.
wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Up front: Sorry if I miss anything folks – I don’t have a lot of time so I’ve skimmed the last 10+ posts.

DB Custom wrote:
[lots of posts]
I used the ATtiny13A for a couple of reasons: (a) because I’m rusty and I wanted something I knew I could program properly. (b) I also knew that it would be stable regardless of the hardware, so I’d be able to move through the modes properly and view them on my oscilloscope.

Having done those things, it looks to me as if this driver is ready to use with the more sensitive ATtiny25/45/85 MCUs. The extra components are present for a variety of reasons – one resistor is for the tailcap LEDs, one is for OTC pulldown, one is an FET gate pulldown resistor, and then I think the rest are there for regulating the voltage to the ATtiny25/45/85 (spike reduction). For more details look at #‘s 301, 314, 326. I’m sure there are more details in there somewhere. (I’m under the weather today and my mind is elsewhere to boot. Sorry!!)

R5 hasn’t been established, but Sharpie made a suggestion a few posts ago. I left the OTC pad at 0805 with the intention of testing moving to 10uF w/ a pulldown. Sharpie suggested 100K. His suggestion was also to change R1/R2 out for 10x the resistance, which I find to be a very reasonable suggestion. (so approximately 191k / 47k) Rather than bypassing R3, 10ohm might be a good start. Sharpie seemed to think so too. I still haven’t ordered 0603 sized components, but once I do I’ll test that myself.

Looks like you and comfy may be onto something with that SiR404DP. Good work.

fixed it][quote=comfychair wrote:
So this will be difficult to use without some sort of feedback loop but I’ve not given up on it yet.
Unfortunately I think you’re exactly right. In order to avoid a large increase in component count it may be possible to use a current sense resistor and measure it with ATtiny25/45/85 using the 20x gain setting. The ATtiny13A doesn’t have this 20x gain setting and would be unsuitable. I assume that an RC circuit would be used to maintain the voltage on the gate pin.

comfychair wrote:

Or, forget all that nonsense and use a single 7135 controlled by a second PWM output for the low modes. Has anybody tried that yet? (/snark)

lol

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)

fixed it
Offline
Last seen: 1 year 5 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

wight]
[quote=fixed it
wrote:
comfychair wrote:
So this will be difficult to use without some sort of feedback loop but I’ve not given up on it yet.
Unfortunately I think you’re exactly right. In order to avoid a large increase in component count it may be possible to use a current sense resistor and measure it with ATtiny25/45/85 using the 20x gain setting. The ATtiny13A doesn’t have this 20x gain setting and would be unsuitable. I assume that an RC circuit would be used to maintain the voltage on the gate pin.

Yeah, I can build a UI I’ll be happy with within those restrictions but it won’t be something most people will like.

Would people bypassing springs and trying to find FETs with slightly lower resistance accept a current sense resistor? I really don’t know. Haven’t worked out the values needed either as it’s not something I can easily do in any case.

What I might try, as it’s a simple change, is to connect the LED negative to an ADC input and try keeping a stable LED Vf. I’m thinking I could self-calibrate it with the 7135.

As for voltage on the gate, that would be easiest indeed as you could use built-in PWM. Or you could do it with just a large enough resistor to ground, using the gate’s capacitance and the internal pull-up resistor of the MCU. Somewhat harder to program though. It can even be done with none of that by fully draining and recharging the gate every time a change is needed (what I did in my testing). It takes about 50 µs so it should not be noticeable.

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

fixed it wrote:
comfychair wrote:

Or, forget all that nonsense and use a single 7135 controlled by a second PWM output for the low modes. Has anybody tried that yet? (/snark)

I think I read something about that a few months ago in some obscure GB thread Wink But for what it's worth, I've done some experimenting recently and found it's possible to get beautiful, PWM-free low modes from the FET by giving the gate a small charge from the pull-up resistor (about 150-250 cycles @ 4.8MHz on the attiny13a). It can then be left floating for a while. The nice thing is that it makes a nice linear looking ramp, probably because the FET has exponential response to gate voltage. It will also go as low as you want it too, with the led barely visible in a dark room. The ugly part is that the charge time needed changes significantly with voltage and probably also from part to part and with temperature. So this will be difficult to use without some sort of feedback loop but I've not given up on it yet.

Read this piece of ancient history. Feel free to laugh.

It does work, I've built the circuit with a 10K pot (higher would be better, since it's wired direct between B+ and B-) as texaspyro describes there. The FET does get uncomfortably hot in the upper half of the range, like between 70-98%. At WOT it stays cool.

fixed it
Offline
Last seen: 1 year 5 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

comfychair wrote:

Read this piece of ancient history. Feel free to laugh.


It does work, I’ve built the circuit with a 10K pot (higher would be better, since it’s wired direct between B+ and B-) as texaspyro describes there. The FET does get uncomfortably hot in the upper half of the range, like between 70-98%. At WOT it stays cool.


I did come across that thread when searching for previous similar attempts. And no, I did not laugh. I actually tried something similar with good old transistors about 10 years ago, trying to put a touch sensitive switch on a project. But I’m getting off topic now so I’ll spare you the details of that failure.
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

My first build failed. Nada, nothing, zip. I have a short across a couple of components due to not having proper sized smaller parts. Will punt later. Today has been a grandpa day, 1st time for everything I suppose. They don’t know it yet, but I sprinkled some small resistors and XP-E2 emitters in the diaper bad, see if anything grows there… Wink

Fritz t. Cat
Fritz t. Cat's picture
Offline
Last seen: 2 years 6 months ago
Joined: 05/07/2013 - 00:33
Posts: 2535
Location: Si Valley

Though I admit that I am week at circuit level electronics, this isn’t an FET from a typical budget flashlight that overheats if you take its series resistor out. It is bigger than the LED and, properly cooled, it should be able to absorb a comparable amount of power. I didn’t get this out of the blue. I don’t remember which thread but the EE who suggested a gate resistor said it could absorb power. If the gate resistance of the FET is high enough, then probably a gate resistor is better, using the FET’s gate capacitance.

Flashlight designers should look at lighthouses and pottery.
这些谁设计的手电筒应该看灯塔,以及在陶器。

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

I have tested it with the big beefy TO-252 Vishay 70N02 and it gets hot enough to burn you. FET hasn't died yet, but what kind of a reduction in lifespan would be acceptable to you, to get something that can be had by other means that doesn't cause components to fail?

Tom E
Tom E's picture
Offline
Last seen: 53 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14225
Location: LI NY

I’m real happy with using PWM level of 2 on the single 7135 of a FET+1 driver. I can now set the moon mode PWM value via the UI from 1 to 7 in my latest Narsil version, and 2 has been working well so far, even on a low cell. It’s soo nice now to set the PWM level of moon via clicks to see the differences easily, in the the light.

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

Nice. I always end up having to add a bunch of moon modes then test them in a light box to figure out which one works best, then remove all but that one. I can get it reasonably close just by shining it next to a reference light, but the light box is still necessary to make the final choice.

Tom E
Tom E's picture
Offline
Last seen: 53 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14225
Location: LI NY

A value of 3 seems the best for the lowest, stable value for a 350 mA 7135 and that’s what I’ve been using lately, and I’ve found you have to raise to maybe 5 for a 380 mA 7135, so I’ve been using 350’s now exclusively. What value to use for moon mode has been bugging me for a long time, so best to make it configurable, just wish it was easier in the UI to adjust. Right now it’s in the configuration settings, but would love to be able to tweak it while in moon mode. Sometimes I like it super low (2), other times 3, or higher at 6 or 7 is nice to have. Should treat moon mode as a separate state with it’s own button actions.

My configuration settings are now stored in 3 bytes to cover the 10 different setting values.

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

It also depends on the exact 7135 chip and the emitter, and even how many. Some 350mA chips work better at PWM=2, others work better at PWM=3, and the 32×7135 SRK driver lights up even at fast PWM=0. Older emitters require a higher PWM level than newer ones, usually. The highest I’ve seen was an old XM-L which needed PWM=9.

If I have an e-switch I don’t bother with specific modes. I just use a smooth ramp from moon to maximum. On a single-channel driver (or tiny25/45/85 FET+1 with a slightly different pin setup), the low end can have extra-fine adjustment by using PWM+PFM, so you can get lots of precision in the moon range instead of just a couple levels. I haven’t actually seen a driver set up with two channels on independent PWM counters though, and now I kind of want one.

Killforfood
Killforfood's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 02/16/2016 - 14:41
Posts: 351
Location: Left Coast USA

Some happiness arrived in the mail yesterday. Those 0805 SMD pads look soooo tiny.
I’m ok with learning to reflow the one sided boards but how do you reflow a two sided board and not lose all the parts off of the other side?
Is it time to add a hot pencil to my soldering station ?

CPF to BLF Convert

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

Killforfood wrote:
how do you reflow a two sided board and not lose all the parts off of the other side?

Surface tension of the solder is greater than gravity. They stay floating in place on their pads just fine. Unless you bump it while the solder is still liquid. A big heavy part with small pads can sometimes fall off, but that's why you do the side with heavy parts last (or hand-solder them afterwards).

DavidEF
DavidEF's picture
Offline
Last seen: 16 hours 42 min ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA

comfychair wrote:

Killforfood wrote:
how do you reflow a two sided board and not lose all the parts off of the other side?

Surface tension of the solder is greater than gravity. They stay floating in place on their pads just fine. Unless you bump it while the solder is still liquid. A big heavy part with small pads can sometimes fall off, but that’s why you do the side with heavy parts last (or hand-solder them afterwards).


Cool! 8-) I had been wondering this for a long time as well. But, I’m not doing any re-flowing yet, so I never asked the question. Innocent

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

Killforfood
Killforfood's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 02/16/2016 - 14:41
Posts: 351
Location: Left Coast USA
comfychair wrote:

Surface tension of the solder is greater than gravity. They stay floating in place on their pads just fine. Unless you bump it while the solder is still liquid. A big heavy part with small pads can sometimes fall off, but that’s why you do the side with heavy parts last (or hand-solder them afterwards).

So assuming I use a toaster oven,
1. I would populate one side of the boards
2. Ramp up the heat.
3. Hold max temp till reflow is complete.
4. Ramp down till cool.
5. Flip over, repeat.

The other less sophisticated method that I am considering is to place the populated boards on a solid bar of copper and heat from below with a torch. Then again, maybe the copper bar would only work good to reflow LEDs.

CPF to BLF Convert

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

Spend the ~$50 for a hot air station. Search Amazon for '858D'.

Hot air is so much more versatile than an oven. You can heat just one area and pluck off one component without disturbing anything else or re-melting all of the solder on the whole board. It's also easier to control the total heat input - time can be just as critical as temperature. With the board right out in the open in front of you, you can watch the paste flash over and then remove the heat right away. Hard to do that when it's inside an oven.

Killforfood
Killforfood's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 02/16/2016 - 14:41
Posts: 351
Location: Left Coast USA

About fifteen years ago I bought a Weller WSR1002 Rework Station. I never purchased the hot air pencil for it. It’s dis-continued model now so I don’t know if I can find hot air pencil that will work with it. The 858D looks like a lot of tool for the money so that’s my backup plan.

CPF to BLF Convert

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

comfychair wrote:

Killforfood wrote:
how do you reflow a two sided board and not lose all the parts off of the other side?

Surface tension of the solder is greater than gravity. They stay floating in place on their pads just fine. Unless you bump it while the solder is still liquid. A big heavy part with small pads can sometimes fall off, but that’s why you do the side with heavy parts last (or hand-solder them afterwards).

I’m not personally familiar with the industry, but I believe that mass produced boards are sometimes done using two different temp solders. Neat-o.

Killforfood wrote:
So assuming I use a toaster oven
comfychair wrote:
Spend the ~$50 for a hot air station. Search Amazon for ‘858D’.
Personally I do my reflows using a large 1500W heat gun – mine is the MHT3300. Those run about $40 and are good for other types of project. They are definitely not as flexible for soldering work as the little stations. I do own a hot air station, but never learned to get the proper use out of it. Since I’m space constrained it’s in storage, unlike most of my other soldering gear.

At the end of the day hobby reflow will probably still require skilled soldering touchup – especially as you learn the ins and outs of reflow. It’s quite possible to solder the entire boards by hand, take a look at my videos here: Nanjg stripping and A17DD-SO8 building videos

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)

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

I may have to get one of those…

Any idea if it would run on a 15A 120V circuit which is already at ~30% capacity? Some reviews suggest it may need its own dedicated circuit or even a 20A circuit. Pretty big change from my weak little 40W soldering iron.

DEL
DEL's picture
Offline
Last seen: 3 years 3 months ago
Joined: 06/28/2015 - 08:35
Posts: 559
Location: Canada
wight wrote:
Personally I do my reflows using a large 1500W heat gun – mine is the MHT3300. Those run about $40 and are good for other types of project. They are definitely not as flexible for soldering work as the little stations. I do own a hot air station, but never learned to get the proper use out of it. Since I’m space constrained it’s in storage, unlike most of my other soldering gear.

Heads-up….there may be a latent defect with that model.
Wanted to see what it looks like and one of the top google hits was this:

http://www.cpsc.gov/en/Recalls/2009/Wagner-Spray-Tech-Recalls-Heat-Guns-Due-to-Fire-and-Burn-Hazards/

Quote:

Hazard:
An electrical component failure inside the heat guns can cause them to continue to produce heat after the power switch is turned off. This can melt the heat gun’s plastic exterior, causing a burn if the heat gun is touched and ignite nearby combustibles, posing fire and burn hazards.

Incidents/Injuries:
The firm has received nine reports of the heat guns overheating. No injuries or property damage have been reported.

Description:
The recalled heat guns emit hot air and are used for paint and flooring removal, defrosting freezers and water lines, bending plastic, hobbies, etc. Recalled models include the Milwaukee Heat Gun MHT3300, ACE HT3500 Heat Gun, and the Wagner Heat Gun HT3500 with date codes V300R through Z365R and A001R through A111R. The heat gun’s name and model number are located on a black label on the bottom of the heat gun’s barrel. The date code is stamped into the bottom of the handle near the power cord. The heat guns are black or yellow plastic and measure about 10 inches long, 8 inches high and 3 inches wide.

This is old news from 2009 so of course YMMV, but something like this can ruin your day.

DEL
DEL's picture
Offline
Last seen: 3 years 3 months ago
Joined: 06/28/2015 - 08:35
Posts: 559
Location: Canada

ToyKeeper wrote:
I may have to get one of those…

Any idea if it would run on a 15A 120V circuit which is already at ~30% capacity? Some reviews suggest it may need its own dedicated circuit or even a 20A circuit. Pretty big change from my weak little 40W soldering iron.

1500 W = ~12.5 A and the fan motor may also create an additional inrush current at start.

So a 15 A circuit may give you nuisance trips, especially if there are other stuff on the same circuit. You are also not supposed to load a breaker above 80% of its rating. That said, I use a 12.5 A generic to shrink sleeving and flow the occasional emitter, no issues on a 15 A circuit.

Tom E
Tom E's picture
Offline
Last seen: 53 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14225
Location: LI NY

Sorry, been way behind on this, so just ordered my first set of v032 boards. I took a close look at MCU pin#3 and looks like it’s connected to a pad covered over by the solder mask, but that’s fine – easy enough to scrape off, and I no longer would have to solder a wire direct to the MCU pin.

Somewhere above it was mentioned to use R1/R2 as 10x the values — this would be great to cut down parasitic drain, which is a problem I’m trying to address. How would this work exactly in the voltage divider, and the values to use in the firmware? Anyone try this or should it work ok?

fixed it
Offline
Last seen: 1 year 5 months ago
Joined: 12/08/2015 - 14:27
Posts: 396
Location: Canada

ToyKeeper wrote:
Any idea if it would run on a 15A 120V circuit which is already at ~30% capacity?
Depends a lot on the type of circuit breaker or fuse. Some large 15A breakers will easily supply 20-25A forever. The slimmer type, especially if next to another loaded circuit, may not fare as well. I used to have a microwave pulling 19A (official rating was 1500W…) on a 15A circuit together with about 2-3A of lighting. The lights would dim when using the microwave… but the breaker never tripped. The only sure way to find out is to try it.

Pages