BLF17DD Info Thread - Reference

308 posts / 0 new
Last post
fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking

Ordered the programmer http://www.ebay.com/itm/3-3V-5V-USBasp-USBISP-AVR-10-Pin-USB-Programmer-51-ATMEGA8-Ribbon-Cable-/121398366395

Should be here by Wednesday. Saw one selling for 2 bucks in China.

Rig some wires to the chip. Don’t have time to wait for a good clip to come in

http://www.ebay.com/itm/1PCS-SOIC-SOP-8-Test-Clip-with-ISP-CABLE-MODIFIED-/171010515789

Thanks for the firmware dropbox Tom. I’ll see what I can do when it gets here! Smile Then I can look like that kid in the ad

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

This is a very DIY thing, if you want to source the parts yourself and assemble it and flash it yourself. It takes some outside research or prior knowledge to figure out what substitutions can be made (like, if you can't find a X7R 16v capacitor, should you look for a X5R 16v or a X7R 10v?).

This is a direct drive driver. It's job is to connect the cell/cells direct to the LED/LEDs as efficiently as possible, there is no regulation or limiting or anything else of any kind. You can use combos other than one cell/one LED, as long as the LEDs can survive being connected direct to your power source with no driver inbetween... 3 XML2s in series with 3 series 18650s, 1 MTG2 with 2 series cells, etc. Higher input voltages will require a Zener diode to limit voltage supplied to the MCU to 6v or less.

Here's the current parts list for the most recent board revision: http://www.digikey.com/short/dq403 Even if you do not live someplace where shipping from Digikey is reasonable, USE THAT LIST to get the part numbers and/or specs of parts used!

The board: https://oshpark.com/shared_projects/IHvO85FY

Capacitor on this latest version has been relocated from the original Nanjg spot between pin 8 & ground, to between B+ & ground. Same parts used, the pads just connect to somewhere different. (This is because with the 'hard' load the MCU's PWM pin has to drive (the big beefy FET instead of dinky little 7135s) the original Nanjg layout of capacitor & diode created a boost circuit, and MCU input voltage would rise above the shutdown point and create unreliable mode changing. The old gate resistor was a clumsy patch that eased the load and reduced (but did not eliminate) the voltage boosting. The cap relocation totally eliminated it, and the MCU now runs at battery voltage (minus the drop through the diode), as it should. If you'd like to see the investigation that discovered this, click here: http://budgetlightforum.com/node/32506)

 

http://75.65.123.78/BLF-17DD/17dd.jpg

U1 - Atmel ATtiny13A SSU (or SSH, interchangeable)

FET - N-channel MOSFET, logic-level gate, gate threshold as low as possible (most will be around or just under 1v), 'total gate charge' (Qg) less than 40nC, lowest possible Rds(on)at 4.5v

D1 - SOD-323 Schottky diode

C1 - 0805 ceramic capacitor, 10uF 16V 10% X7R

R1 - 0805 resistor, 19.1K 1%

R2 - 0805 resistor, 4.7K 1% (tip: the 4.7K resistor is the one that connects to ground on one end; the 19.1K is the one that does not have one end connected to ground)

'2', '3', '4' - these numbers correspond to the 'stars' from the original Nanjg board, NOT the MCU pins. For instance, 'star 4' is on MCU pin 2, and the official name for pin 2 is 'PB3'. Confused yet?

'A' - bridge the two pads to ground pin 2 when using some firmwares; install 1uF 0805 ceramic cap if using an off-time firmware; if using momentary firmware, connect one side of your switch to the inner pad.

'B' - return feed from the 19.1K/4.7K voltage divider

'C' - power feed to the MCU, from the polarity protection diode

vex_zg
Offline
Last seen: 3 years 3 months ago
Joined: 08/10/2014 - 11:08
Posts: 420
Location: Sweden

very informative post comfychair. I thank you as a flashnoob.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

Thanx confy! When I get a chance and get a V1.0 assembled, I'll update the OP with this info from your post.

vex_zg
Offline
Last seen: 3 years 3 months ago
Joined: 08/10/2014 - 11:08
Posts: 420
Location: Sweden

Anybody have an idea how much more is this efficient with one FET comparing to using a few 7135 ?

edit: oh and it seems that 7135 is a linear driver, not a FET? Than it is going to burn the excess voltage as heat, that can be calculated then.
But with the FET the current&brightness will diminish as the voltage is lowered during discharge, right?
What is the typical FET voltage drop, to calculate the losses.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

vex_zg wrote:
Anybody have an idea how much more is this efficient with one FET comparing to using a few 7135 ?

Both designs are current limiting, not current regulating and use PWM's for anything other than 100% Hi. They don't have any buck or boost that would lose voltage or current. Both are efficient, but I think the FET design would be considered more efficient because it's about direct drive as you can get. PWM based modes spike max current though, so if your FET based driver gets 5A on hi and a 7135 driver gets 3A hi, a 50% PWM mode on the 7135 based driver will be better than a 30% PWM mod on the FET based, because though they both are using about 1.5A, the 3A spikes will be more efifcient than the 5A spikes because the CREE LED's are more efifcient at lower amps. In implementation, not sure if the difference will be very significant, but it will be there.

Most of us want it both ways: super high turbo mode, but at least a couple of lower levels for more practical close-in uses. Any PWM based driver is less efficient at low modes, and even less efficient if it's max amps is higher.

HKJ
HKJ's picture
Offline
Last seen: 16 hours 13 min ago
Joined: 05/24/2011 - 12:23
Posts: 7426
Location: Copenhagen, Denmark

Tom E wrote:
Both designs are current limiting, not current regulating

 

That is wrong, a 7135 will regulate current.

The fet will be around 0.01 ohm resistance.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

vex_zg
Offline
Last seen: 3 years 3 months ago
Joined: 08/10/2014 - 11:08
Posts: 420
Location: Sweden

so what’s more efficient

1. strong FET requiring low PWM which is spiking current and driving LED in the inefficient work regime

or

2. weaker FET/7135 which is limiting current ?

Should a man (or a woman, child, or elderly) then not have more 7135 / stronger FET than he actually needs for the HIGH mode, because he is then driving the LED inefficiently high?

will manners
will manners's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 05/07/2014 - 05:00
Posts: 357
Location: NSW, Australia

It depends on what level you’re trying to determine efficiency.

In any PWM controlled light the lower the amperage is on high the more efficient the system will be in the PWM modes since the driver only has to switch 10% of 3A as opposed to 5A for example. As TomE already stated leds are more efficient at lower amperage and thus the higher the max amperage the less efficient the lower modes will be since the LED is still receiving 5A but for only 10% of the time for example.

To answer your second question it is more a case of safety rather than efficiency when children and/or inexperienced people are involved since most FET based (direct drive) lights run extremely hot on max. I would stick to lower output, current regulated (7135) lights for people unfamiliar with such hot rods.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

HKJ wrote:

Tom E wrote:
Both designs are current limiting, not current regulating

 

That is wrong, a 7135 will regulate current.

The fet will be around 0.01 ohm resistance.

Yes - of course a 7135 is a current regulator, but in a typical Nanjg/Qlite 7135 based design for one cell and one LED, it can easily fall out of regulation, therefore run at lower amps. For example, I can build up a 5.6A Nanjg driver with 16 350 mA 7135's, but for a Panasonic B cell and an XM-L2 on copper, I cannot achieve getting 5.6A, maybe only 3.5A or 4.0A at tops -- it falls out of regulation -- is this the right terminology?

HKJ
HKJ's picture
Offline
Last seen: 16 hours 13 min ago
Joined: 05/24/2011 - 12:23
Posts: 7426
Location: Copenhagen, Denmark

Tom E wrote:
Yes - of course a 7135 is a current regulator, but in a typical Nanjg/Qlite 7135 based design for one cell and one LED, it can easily fall out of regulation, therefore run at lower amps. For example, I can build up a 5.6A Nanjg driver with 16 350 mA 7135's, but for a Panasonic B cell and an XM-L2 on copper, I cannot achieve getting 5.6A, maybe only 3.5A or 4.0A at tops -- it falls out of regulation -- is this the right terminology?

It can only "fall out of regulation" if it has been in regulation.

But then it might be in regulation with a fresh battery and no ammeter in series.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

Truee HKJ - thanx! Smile

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

http://75.65.123.78/BLF-17DD/nanjg105Cschematic.jpg

http://75.65.123.78/BLF-17DD/17DDschematic.jpg

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 3 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

comfychair wrote:

http://75.65.123.78/BLF-17DD/nanjg105Cschematic.jpg

http://75.65.123.78/BLF-17DD/17DDschematic.jpg


NICE!!!!
fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking

I didn’t get a connector so soldered the wires on and got it working first try! jinx .. Backed up the firmware on the chip following the wiki. But wanted to ask- what software would you recommend for programming and a good firmware to start with that supports the eswitch? I seen in the wiki they say the BLF-VLD is a good start. I seen comfy had a cool firmware in that dropbox Tom posted too.

Is AStudio 6 any good? I’m running all this in a vm using xp (I know but.. when in rome) if that matters.



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

fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking

OoooO Thanks comfy.. Installed Eclipse Luna- But it says my hardware doesn’t support the tiny13a when I go to load the mcu. Guess have to manually flash the compiled. I got quite a few different source files it’s kind of out of control! Jonnys and Toms had some nice ones I went through the other night. Dr Jones had like 3 of them that were pretty nice and strait to the point too.

I gotta say it’s nice to see people sharing source and bothering to comment on it too

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

Since you have avrdude working, just copy/paste the line from the .bat file.

fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking
comfychair wrote:

Since you have avrdude working, just copy/paste the line from the .bat file.

That was a nice thing to do man.. I finally got eclipse working and building, burning the firmware but I’m not up on the fuses. I found a good site to set the bits you want but I don’t want to brick it. http://engbedded.com/avrdude

I see in the avrdude bat you set the Upload Fuse 00 low 75 high. And the memory lockbits 255? FF Is that what the -UhFuse setting does in avrdude?

Maybe I should set the bits once in dos and not set them in Eclipse. It only seems to work using Tiny13 anyway and I can see something going amok there.

Getting eclipse building was kind of a pain in the ass. I finally got it to build and burn without errors, when tried to upgrade avrdude- it went back to spitting them out.. So using the older version and put MinGW paths into c++ paths and symbols. It plays nice with the debugger finally.

I just saved a snapshot of the vm. Looking at your code. I switched STAR3_PIN and SWITCH_PIN around so I don’t have to reconnect that thing but going to test in the morning. My wife is trying desparately to get me off this computer. She texted some leg pictures but it’s nothing I haven’t seen a billion times lol

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

Are you on Windows, or not? Hard to figure out just from indirect stuff. If so, just double-click the .bat file and it opens avrdude and does everything for you, that's what it's for, so you don't have to figure out and type the commands each time you want to flash the same firmware. High & low fuses are already specified, lock bits are not because who cares with an open-source firmware?

If you're on something else, open the .bat file, copy the command string, and paste it into the avrdude window (assuming you've opened avrdude from the same folder where the .hex file is, otherwise navigate to the right folder first).

fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking

Ah nm.. I see now Smile It’s 75 hex low and FF high, leave the memory lockbits alone. Yeah using Eclipse, just wanted to make it all automated without using the command line, build and burn you know. I’m a linux guy but running this in a vm on a stripped install of windows xp. I could move it over to linux I guess, but this is good enough.

I think posted the wrong link last night it’s http://www.engbedded.com/fusecalc/

Yeah I’m still at the start ready to run. I haven’t really got around to modifying code yet, but it should be fun getting the modes I want. Was thinking of making the yezl ramp up and down between clicks and put in your crazy fast strobe on hold of the eswitch.

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

The F6DD beta is a tweaked version of ToyKeeper's SRK firmware. Mode order default changed to short press = higher, long press = lower, long press duration dramatically shortened (from I think 35, down to 17), press & hold and it steps down levels until you release, or it keeps going all the way down to 'off' if you keep it pressed. It still uses her hybrid thing of phase-correct on levels 1 & 2 (gives less light output with the same PWM number, so helps get a lower low/moonlight), and the non-whiny fast-PWM on all other levels.

If you go messing with the fuses without also changing all the relevant bits to match you'll totally throw off the switch timing. So don't do that. No need to change any of that.

fellfromtree
fellfromtree's picture
Offline
Last seen: 6 years 10 months ago
Joined: 07/25/2014 - 15:14
Posts: 470
Location: spelunking

You guys are so far ahead of the game and I’m just going to spend today messing around with code. Oh sheet it’s friday trash day! xd

Thanks comfy appreciated.

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 9 months ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio

New version of the 17dd_v3.1 released. A quick overview of the changes-

  • A real GND plane (on both sides) this means no more pulling off the thin gnd rings, it also means you can scrape a little mask and have a GND point almost anywhere on the board.
  • GND plane has “thermal’s” on the lower power components (for easier soldering) but is solid for the FET’s source leg and the batt nagative input via to supply the necessary higher current (this was not easy to make)
  • A dedicated zener pad, no more stacking (simply leave unpopulated for 4.2v builds)
  • C1 is in the proper position to eliminate “boost circuit” issue so no more gate resistors
  • “Star’s” are easier to short with just solder
  • Dedicated batt- input via (used for piggybacking)
  • Has a set of 1.1mm LED lead via’s (sized for 20AWG wire, even 18 will fit), this makes multi-emitter builds less of a pain.
  • Dedicated SW+ input via on pin3 for MOM FW’s
  • Batt+ spring pad is 8mm but only 5mm exposed (the size of standard 105C springs and those brass buttons), scrape to expose the full 8mm

Note this is not a mod of the V2, this was a total redesign

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

Ahhh - CK, this does look like a real killer!! Think it has everything, and better? No more 2 or 3 versions? This is one master 17DD, all-inclusive?  Hhhmmm. wow.

Big Q - tested yet? If not, how risky? Should we wait?

DB Custom
DB Custom's picture
Offline
Last seen: 1 day 8 hours ago
Joined: 01/13/2013 - 22:28
Posts: 20731
Location: Heart of Texas

So this single Ver 3.0 will be able to be built as a standard driver, or a Zener driver, easy peasy? Very cool.

I need to get some more components…

RMM
RMM's picture
Offline
Last seen: 1 year 7 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

It will work as a zener, with no possibility of voltage monitoring (which isn't important to most of us anyways).  Maybe it's time to just switch to a layout where the voltage divider doesn't pass through the diode on any of these, since we're all using custom programs anyways.  Same resistors could be used for single cell with a slight bump in the ADC values.  

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

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

RMM wrote:

It will work as a zener, with no possibility of voltage monitoring (which isn't important to most of us anyways).  Maybe it's time to just switch to a layout where the voltage divider doesn't pass through the diode on any of these, since we're all using custom programs anyways.  Same resistors could be used for single cell with a slight bump in the ADC values.  

Ahhh, ok, that's a "good-to-know" loss ??? You are losing me here. Speak slower Smile. Why is it breaking voltage monitoring? Why is that not a major loss? - thought that can be worked out. I can't follow this....

RMM
RMM's picture
Offline
Last seen: 1 year 7 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

I should clarify:  with no voltage monitoring with 2S+ cells and the zener diode, since the voltage divider is downstream from the zener diode they will always read the zener diode voltage with 2S cells instead of actual cell voltage.  

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

Tom E
Tom E's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 08/19/2012 - 08:23
Posts: 14637
Location: LI NY

Ok, so this PCB has a potential design flaw - not sure purposely or not, at this stage, or is it even a loss if the firmware is not doing voltage monitoring for zener mod configs. Need an explanation from CK.

CK? Please? Smile

Pages