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

505 posts / 0 new
Last post
RMM
RMM's picture
Offline
Last seen: 1 month 18 hours ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

I have had huge differences in silkscreens (precision and cutoff) and sometimes some minor milling errors, but never a huge mask issue like this, and I've ordered thousands of boards.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

but were they the wight boards? Smile  Dunno, maybe something bout what he does is technically correct and follows the rules, just confuses the panel fab software/system on occasion... Dan from OSHPark is sort of implying that.

Agree though - their support seems excellent, as shown in my copied response from them above. I got those replacement boards pretty quick too, like they put a rush on them.

RMM
RMM's picture
Offline
Last seen: 1 month 18 hours ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

No, they weren't wight's boards (that was the point I was trying to make).

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

RMM wrote:
No, they weren't wight's boards (that was the point I was trying to make).

Yes - I know, sorry, sarcasm Innocent. Ohh - got a couple of your RMM Mtn boards in - really like the design, like having those ground rings fully exposed and significant in size. Don't think you are offering the FET+1 board yet - would love to see one. Not sure if wight will be back, and actively supporting these in the near future.

Btw, 1000's is totally insane!! Those kind of #'s... Just can't get much sleep, 24/7 "time to make the boards"...

LED Boatguy
Offline
Last seen: 1 day 12 hours ago
Joined: 02/10/2015 - 17:28
Posts: 73
Location: Kollyforneah

Hell2Pay wrote:
No GND ring on both sides (component and spring) on all three driver boards that I just received from OSHPark.

Any idea why our boards show such variation in fabrication results? Just curious.

Thanks!

I think these boards are pushing the envelope as to what they can do. Here is my response from OSH re: solder mask over the ground ring:

OSH Guy wrote:
Hi Kurt,
Ah! One of Alex’s designs. Those have a relatively high failure rate due to the edge clearances on them. I’ve re-ran the order, and exposed a bit more of the edge copper to make sure that you can access the outer ring.

-Dan

Not knocking Wight in any way. OSH is happy to fix their mess up. My boards got put on a “Super Swift Service” panel today.

Hell2Pay
Offline
Last seen: 4 days 17 hours ago
Joined: 11/01/2014 - 18:08
Posts: 65
Location: MA, USA

Quote:
Dan (at OSHPark) says:

Another one! Heard of a similar issue this weekend. Looks like the fab’s routing clearance caused some of the outer ring to be removed, and so there wasn’t anything to expose (15 mil exposed board, and a 5 mil routing tolerance +10 mil keepout). It should be fine with a re-fab, so I’ve reran the order for you.

Checked this afternoon and the order has gone to fab again.
Good response!

DB Custom
DB Custom's picture
Offline
Last seen: 19 hours 56 min ago
Joined: 01/13/2013 - 22:28
Posts: 20382
Location: Heart of Texas

Virtually every board I have of Alex’s has most of the batt side ground ring covered up. I simply scrape em clean and move on. Some of them have way too much exposed at the batter contact, completely eradicating Alex’s name and the BLF statement as to the version number.

But they work. They just take a minute or two more to build. No biggie when you’re only doing a few at a time.

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany

I need a simple firmare for this driver in a rear clicky light. I found tk-otc and it seems perfect. Here is what the description says:

* Generic clicky-switch-with-offtime-cap firmware. * Expects a FET+1 style driver, supports two independent power channels. * Similar to blf-a6.c but minus the end-user config options.

But, I downloaded the .hex and flashed it on the driver it does all kinds of crazy stuff. Sometimes the light flashes and it does not switch modes as expected.

Can someone point me to a firmware? I want it to be simple, I need no things like batcheck or strobe modes etc. It should use the otc and have a dual pwm function.

RMM
RMM's picture
Offline
Last seen: 1 month 18 hours ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

finges wrote:
I need a simple firmare for this driver in a rear clicky light. I found tk-otc and it seems perfect. Here is what the description says: * Generic clicky-switch-with-offtime-cap firmware. * Expects a FET+1 style driver, supports two independent power channels. * Similar to blf-a6.c but minus the end-user config options. But, I downloaded the .hex and flashed it on the driver it does all kinds of crazy stuff. Sometimes the light flashes and it does not switch modes as expected. Can someone point me to a firmware? I want it to be simple, I need no things like batcheck or strobe modes etc. It should use the otc and have a dual pwm function.

STAR Off-Time or ToyKeeper's Starry FW.

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany

thanks, but with the starry fw I get an error if I try to build it

Quote:
Error 2 Program Memory Usage : 1086 bytes 106,1 % Full (Memory Overflow) Data Memory Usage : 39 bytes 60,9 % Full GccApplication3 0 0 GccApplication3

And the star off-time fw I don’t get how to get dual pwm to work properly. It says

Quote:

//#define DUAL_PWM_START 8 // Above what output level should we switch from the alternate PWM output to both PWM outputs?

What should I put here if I use the default modes? What does the number 8 says?

I would prefer a more inuitive method like in the tk-otc fw

Quote:
// PWM levels for the big circuit (FET or Nx7135) #define MODESNx 0,0,0,6,56,135,255 // PWM levels for the small circuit (1×7135) #define MODES1x 3,20,100,255,255,255,0 // PWM speed for each mode #define MODES_PWM PHASE,FAST,FAST,FAST,FAST,FAST,PHASE
ToyKeeper
ToyKeeper's picture
Offline
Last seen: 41 min 54 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10105
Location: (469219) 2016 HO3

finges, this might be helpful:

http://toykeeper.net/torches/finges/

I took starry-offtime and tk-otc and did very small modifications to them to do what it sounds like you want:

  • Turned off all blinky modes.
  • Turned off 3-level offtime (so, it only senses short and long presses, no medium).

This should also reduce the size by enough that you can rebuild them without any special options. I got 812 bytes (69.3%) for starry-offtime and 562 bytes (54.9%) for tk-otc.

If you need any help calibrating the PWM levels for the FET and 7135, the bin/level_calc.py tool can estimate what those numbers should be according to your specs and lumen measurements. For example, to get six evenly-spaced modes on a FET+1 with XP-L emitter (including moon mode):

> ./bin/level_calc.py
How many total levels do you want? (4) 6
Lowest visible PWM level, for moon mode: (6) 1
How bright is moon mode, in lumens? (0.25) 10
How bright is the highest level, in lumens? (1000) 1300
Use dual PWM? [y/n] (n) y
Second channel, lowest visible PWM level: (6) 4
Second channel, how bright is the lowest mode, in lumens? (0.25) 0.25
Second channel, how bright is maximum, in lumens? (140) 140
1: visually 0.63 (0.25 lm): 0.00/255, 4.00/255
2: visually 2.69 (19.39 lm): 0.00/255, 38.39/255
3: visually 4.74 (106.74 lm): 0.00/255, 195.26/255
4: visually 6.80 (314.48 lm): 33.39/255, 255.00/255
5: visually 8.86 (694.83 lm): 108.28/255, 255.00/255
6: visually 10.91 (1300.00 lm): 255.00/255, 0.00/255
PWM1/FET  values: 0,0,0,33,108,255
PWM2/7135 values: 4,38,195,255,255,0
On a non-FET driver, the last mode should be 255 on both channels.

You may also need to calibrate the CAP_SHORT value, depending on how fast your offtime capacitor drains.

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany

wow great work, thank you ToyKeeper

I flashed tk-otc on my driver and it works good.

Now I only would like to reduce the number of modes, I don’t need 7 or 6 modes.

Where exactly can I find the level_calc.py tool?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 41 min 54 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10105
Location: (469219) 2016 HO3

finges wrote:
Where exactly can I find the level_calc.py tool?

It’s under bin/ at the firmware repo linked in my signature.

You can, of course, also adjust the levels manually. The tool just gets you some ballpark estimates to start with.

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany

Ok thanks, found it. Yes I know that I can adjust the levels manually, but in previous drivers I had trouble to find the right values for a linear increase in brightness.

Anyway, I have another problem with this driver. I build another one but now with a zener mod for a light with a XHP50 and rear clicky.
I flashed the same firmware as on the non zener modded driver and now the mode switching is totaly buggy. It seems it switches at random, sometimes I need to half press the button like 10 times to get it to switch. It also sometimes starts in moon mode and stays on for around 10sec and than switches off. Sometimes it cycles through the modes high to low and sometimes low to high … and so on.

Do I need to change some values in the firmware for zener modded drivers?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 41 min 54 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10105
Location: (469219) 2016 HO3

finges wrote:
Do I need to change some values in the firmware for zener modded drivers?

Yes. And you may need to change some of the resistors too, if you want any voltage-related functions to work. Or it might need voltage-related stuff turned off entirely.

The PWM levels will also need recalibration for each type of emitter, since the relative contributions of the FET and 7135 change. A single-channel driver can usually get by with one set of levels for all emitters, but two-channel drivers need the firmware reconfigured/rebuilt for each.

(if a light maxes out at 4amps, the 350mA channel can handle 8.75% of the total, but the 350mA channel can only do up to 2.3% on a 15-amp light… and the relative balance should be updated in the firmware to account for this)

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany

Ok, so I think I need to change the CAP_SHORT value, and I can use offtime-cap.c to calibrate it, am I right?

And to get the right resistor values, I use the battcheck firmware?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 41 min 54 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10105
Location: (469219) 2016 HO3

The offtime-cap firmware can give you values for CAP_SHORT; just half-press the button for the amount of time you want to set as the threshold between short and long presses, take a few readings, get an average.

As for resistor values, I can’t really help. Battcheck doesn’t provide resistor values; it only provides ADC values to use after you’ve already gotten the resistors worked out. You need to divide the voltage in hardware to get it completely in the range of 0.1 to 1.1V though. Battcheck can at least tell you if you’re getting usable values though; try it with a full battery vs a low battery, and if the values are too close to each other (or if any readings are 255), then the resistors are wrong.

vestureofblood
vestureofblood's picture
Offline
Last seen: 1 day 11 hours ago
Joined: 08/17/2012 - 15:21
Posts: 1838
Location: Missouri

Am I understanding correctly that all the components for this board are the same as the single sided FETDD board with the exception of the 7135 chip?     I just piggy pack the zener on the 10uf cap, and flash with the dual PWM firmware?

In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.

finges
Offline
Last seen: 2 hours 11 min ago
Joined: 11/19/2014 - 14:50
Posts: 495
Location: Germany
Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

[quote=finges]Yes, and for the Zener see this post http://budgetlightforum.com/node/36710?page=2#comment-716463[/quote]

Do you have a post#? Those links don't work for me, and depends on your posts/page setting. I'm interested in that too, and couldn't find it.

pilotdog68
pilotdog68's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 05/30/2013 - 23:31
Posts: 6420
Location: Held against my will in IOWA, USA

For zener info Look at posts 78-83. For 6v lvp you’ll need to swap out R1 for a higher value as well. Anything between 30k-40k seems to work fine.

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

pilotdog68 wrote:
For zener info Look at posts 78-83. For 6v lvp you'll need to swap out R1 for a higher value as well. Anything between 30k-40k seems to work fine.

Yes, thanx for the LVP tip too!!

pilotdog68
pilotdog68's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 05/30/2013 - 23:31
Posts: 6420
Location: Held against my will in IOWA, USA

I’m sure Tom knows, but I’ll add this for anyone else reading: the firmware lvp values will still need to be tweaked, even with the correct R1.

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

I may forget more than I remember Smile. Haven't done a zener mod in a long time, though I know it's a combo of the resistor and firmware values read in. Would the 30-40K work for 3 cells as well, and just tweak the values in firmware also?

pilotdog68
pilotdog68's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 05/30/2013 - 23:31
Posts: 6420
Location: Held against my will in IOWA, USA

Hmm I’m not sure, I haven’t done a 3S zener. Just guessing you’ll probably need to go closer to 50k

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

RMM
RMM's picture
Offline
Last seen: 1 month 18 hours ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Tom E wrote:

I may forget more than I remember Smile. Haven't done a zener mod in a long time, though I know it's a combo of the resistor and firmware values read in. Would the 30-40K work for 3 cells as well, and just tweak the values in firmware also?

Depending on your required voltage cutoff, 36K will still work with 3S cells.  

Recall the simple voltage divider formula (for these newer drivers without the diode voltage drop):

(Desired Voltage * R2 * 255)   ((R1 + R2)*1.1) = ADC Value

 

Where the 255 is the highest possible value (which is true, since we are using 8-bits worth of resolution) and 1.1 is the reference voltage.  

So in your case, you'd get the following for a 9V LVP ADC value: 

9*4700*255 = 10,786,500

(36000+4700)*1.1 = 44,770

10,786,500/44,770= 240.93--round to 241.  

OK, now we know the math and understand what's going on.  For those who don't like to slog through the math every time (like myself Cool) I created a Google sheet that you can just punch the values into.  

P.S. As many here have noted, the voltage divider resistors can, and will, affect the off-time timing.  You'll find that with the zener-mod setups the divider's effect is minimal (the circuit is different).

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

Tom E
Tom E's picture
Offline
Last seen: 10 hours 46 min ago
Joined: 08/19/2012 - 08:23
Posts: 12402
Location: LI NY

Ohhh - thanx again Richard! I know you posted this stuff before, but this time I'll really tag it/copy it some where I won't forget Frown. Frustrating - just can't get to all the mods I want to... Limited time, and my mod sessions are much shorter now because of several things goin on - neck, back, access to my modding office, etc.

ImA4Wheelr
Offline
Last seen: 3 weeks 17 hours ago
Joined: 02/03/2013 - 14:51
Posts: 7918
Location: SC

That spreadsheet works nice for seeing many options at once.  I plugged in my 4S buck setup (100K and 5.1K) and got the right answer.

Werner
Werner's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 10/19/2012 - 15:00
Posts: 3679
Location: Germany

The voltagedivider consumes “standby” current so for electronic switch lights it might be recommended to use higher values like 100k and 22k as a standard…

Has anyone compared the so8 fets? Is the 0R9 one worth the dollar more?
What resistor Sizes are optimal for this driver 0805 or 0603?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 41 min 54 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10105
Location: (469219) 2016 HO3

For a single-cell light with a clicky button, a 19.1k resistor is the way to go. 22k also works, but it messes with the offtime capacitor.

Specifically, 22k pushes the offtime values to the far end of the measurable range, and makes the “off” timings very temperature-sensitive.

Pages