howto: Build a Nanjg-092

252 posts / 0 new
Last post

Pages

comfychair
comfychair's picture
Offline
Last seen: 3 years 2 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198
howto: Build a Nanjg-092

Go get some of these: http://www.ebay.com/itm/271319198579

Flatten out the legs and re-bend them like so:

http://75.65.123.78/driverhacks/nanjg-092/Dsc07254.jpg

And when upside down, the legs will now touch the PCB.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07259.jpg

Strip off everything not needed from any Nanjg 105C.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07256.jpg

With solder wick, clean off all the old solder, make sure it's nice and smooth.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07261a.jpg

These are the ONLY contacts on the top that are relevant, everything else can be painted over/taped over/ignored, it won't be used again.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07261b.jpg

http://75.65.123.78/driverhacks/nanjg-092/Dsc07263.jpg

Nope, not gonna fit in a 17mm pill like that, no way...

http://75.65.123.78/driverhacks/nanjg-092/Dsc07262.jpg

...so trim off the extra length on the legs, and round off that corner with your trusty diamond file. I've also covered everything with kapton tape, then cut away at the two spots needed for contact.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07264.jpg

Hey, where'd the little capacitor go? :~

http://75.65.123.78/driverhacks/nanjg-092/Dsc07266.jpg

...oh, there it is! Silly

http://75.65.123.78/driverhacks/nanjg-092/Dsc07265.jpg

Add a very small little dab of JB Weld, stick the FET in place, then solder the legs.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07272.jpg

http://75.65.123.78/driverhacks/nanjg-092/Dsc07273.jpg

Positive wire attaches at the normal place, the negative wire now goes to the big tab on the back of the FET.

http://75.65.123.78/driverhacks/nanjg-092/Dsc07282.jpg

 

For the Nanjg's ATtiny13 MCU to control the FET properly, it MUST use firmware running the unsexy 9.4kHz PWM. ALL of the 9.4kHz firmwares have the potential to cause an audible whine in the upper-middle modes (though not on the 100% mode). The non-whiny 19kHz firmwares will not control the FET properly, it's a different animal from the 7135s we all know so well (maybe a little too well...).

On this one, I used a customized version of DrJones' luxdrv. The ramping mode has been deleted, PWM levels are 2, 16, 84, and 255, with the mode order reversed. It still has the strobe and battery monitor modes. Hex file here, along with a batch file to flash it with just a double-click. Also has the source (in .txt file) used to make the .hex in case you want to make any changes or just have a look at it.

http://75.65.123.78/driverhacks/nanjg-092/luxdrv02(255,84,16,2)/

djozz
djozz's picture
Offline
Last seen: 39 min 51 sec ago
Joined: 09/07/2012 - 17:04
Posts: 15333
Location: Amsterdam

Ha, thanks comfy, I was already looking for moderator007's post in your lengthy FET-thread, this is easy now and very well presented, how lazy can modding be?

Hmm, Ebay-seller is not shipping outside USA, so not that lazy...

ryansoh3
ryansoh3's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 08/04/2012 - 08:21
Posts: 3878
Location: US

Good stuff comfychair, thank you very much for taking the time for this write-up. Smile

BLF ≠ B-grade Flashlight Forum

 

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Thanks for posting this!  Very nice and clear photos.

If you don't want to grind the FET body, you can also mount it right-side-up.  This is my preferred method because I am lazy and I don't want the LED- to be able to touch the top of the pill in those lights where I can push it all the way in.  

STAR FW works as well if you want turbo timer, etc.  Just change TCCR0A = 0x23 to TCCR0A = 0x21.  This works in both normal and momentary versions.  It doesn't have any strobe or ramping features though like luxdrv.

Here's a really bad cellphone picture that I took of my first one, which is obviously not very polished:



You can move it further inbound and still flash the driver if needed.  I cut the legs shorter then bend them down until they are close to the required output pad then solder in place.  This first one isn't quite where I place them now, but you can get the idea. 

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

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 4 days 13 hours ago
Joined: 01/04/2014 - 06:47
Posts: 5061
Location: H-Town

INCREDIBLE!!!

Any idea the power it pushes in 255?

Total brilliance!

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

At 255 it is very near what the cells will do hooked directly to the LED.  Can't remember what the exact value is but the resistance of this MOSFET is very low.  I've seen 6A+ to an XM-L2 from a 20R, 7.5A+ into a triple XP-G2, and 11A+ into an MT-G2, quickly falling to around 10A after 30 seconds.  

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

DB Custom
DB Custom's picture
Offline
Last seen: 22 min 42 sec ago
Joined: 01/13/2013 - 22:28
Posts: 19891
Location: Heart of Texas

Thanks Comfy, definitely some good work there! Now someone is gonna have to hold my hand through learning solder wick braid so I can clean up a board like that, man that is nice!

Sirius9
Sirius9's picture
Offline
Last seen: 19 hours 16 min ago
Joined: 03/04/2012 - 19:23
Posts: 4529
Location: South Europe

Nice, thanks. Beer
P.S. What’s with the other side of the driver, we strip all AMC’s? Maybe Nanjg 101 would be better solution then (with a bit more squeezing)!

 

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Yes, all 7135s are stripped.  You can see that in the pic where he says, "hey where'd that little capacitor go?".  He moved it to the opposite side of the board. 

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

Sirius9
Sirius9's picture
Offline
Last seen: 19 hours 16 min ago
Joined: 03/04/2012 - 19:23
Posts: 4529
Location: South Europe

RMM wrote:

Yes, all 7135s are stripped.  You can see that in the pic where he says, “hey where’d that little capacitor go?”.  He moved it to the opposite side of the board. 


Ah yes, you are right, where are my eyes…
Quote:

P.S. how about combining this mod with zener mod for 2s-3s MT-G2?

 

Werner
Werner's picture
Offline
Last seen: 1 year 6 days ago
Joined: 10/19/2012 - 15:00
Posts: 3677
Location: Germany

Wow, comfy that is a superb job. Very neat soldering.

DB Custom
DB Custom's picture
Offline
Last seen: 22 min 42 sec ago
Joined: 01/13/2013 - 22:28
Posts: 19891
Location: Heart of Texas

On the original board the capacitor is attached to the PWM trace and ground. This is the same trace the leg of the FET attaches to. When you moved the cap to the inside you went to the power lead and ground, does that have the same result? Is the capacitor doing the same thing when hooked to these different places?

never mind, I see now that I had the wrong via. Upside down and backwards. :~

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

DBCstm wrote:
On the original board the capacitor is attached to the PWM trace and ground. This is the same trace the leg of the FET attaches to. When you moved the cap to the inside you went to the power lead and ground, does that have the same result? Is the capacitor doing the same thing when hooked to these different places?

Newp! Find the MCU pin marked 'Vcc', follow it down and look for the through-hole right under the fork in the road...

http://75.65.123.78/105c/105c-annotated.jpg

...that goes over to the battery side, to the capacitor. Other end of the cap goes to ground.

The new spot I picked for it goes between the LED+ pad and ground.

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Sirius, you can use it with 2S MT-G2. Don't try 3S MT-G2 (this isn't a buck driver).

Also, you need to remember that this will go near direct drive, so it isn't a good setup for those lights that you need or want to limit the current on due to heat or battery life concerns.  This is a good solution for when you can or want to run at direct drive current levels.  This is a good "hot rod" light driver. 

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

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

Well, 40% (PWM=100) will limit a triple XPG2 to around 3A, sounds practical to me. :bigsmile:

Firelight2
Firelight2's picture
Offline
Last seen: 25 min 51 sec ago
Joined: 04/08/2011 - 15:17
Posts: 3577
Location: California

Awesome guide Comfychair!!!

I’ll have to give this a shot.

JonnyC
JonnyC's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 01/14/2011 - 19:12
Posts: 1145
Location: Green Bay, WI - USA

Comfy and Richard love to kick ass and chew bubble gum, and they are all out of bubble gum.  Thanks for the detailed write-up comfy!

Richard, I don't really have a need for this right now, but I assume this will be your next offering?

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Of course.  I have just been way too busy.  Next week I have a week "off" and will be catching up on everything and posting all of the new "stuff". Cool  

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

MRsDNF
MRsDNF's picture
Offline
Last seen: 2 days 12 hours ago
Joined: 12/22/2011 - 21:18
Posts: 12921
Location: A light beam away from the missus in the land of Aus.

Thanks CC and others. Very nice work.

 

djozz quotes, "it came with chinese lettering that is chinese to me".

                      "My man mousehole needs one too"

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

DB Custom
DB Custom's picture
Offline
Last seen: 22 min 42 sec ago
Joined: 01/13/2013 - 22:28
Posts: 19891
Location: Heart of Texas

The place the cap used to be located was on the VCC trace and now it’s on the +Vin trace. It does the same thing, either way? So what, exactly, does the cap do anyway?

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

It keeps the MCU happy Cool

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

Old-Lumens
Old-Lumens's picture
Offline
Last seen: 2 years 7 months ago
Joined: 11/04/2011 - 11:39
Posts: 7478
Location: Tyler, TX, USA

Master Slave? Possible as well with this? and you still need the zener mod for MT-G2 correct?

To control the DD effect, could you balance it out a little by just not having the high mode, like maybe 200 or 225 instead of 255 for the high mode?

My PayPal address: oldlumens (insert the @ sign here) gmail.com

My YouTube Flashlight Video Channel

The BLF Modding Links Thread 

http://imageshack.com/a/img922/1374/jQ2wdL.jpg

 

RMM
RMM's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Justin, yes you still need the zener mod to keep the MCU happy.  That's all the zener mod effects anyways--the voltage the MCU is seeing.

I don't think you will need to master/slave this setup, the MOSFET is good to 30A+ no problem and is very low resistance.  After running an MT-G2 at 10A-11A it didn't get hot at all sitting in the open air.  Heat is not an issue with this.

You could definitely run a lower PWM value, which is what Comfy hinted to earlier.  You could also run higher-resistance cells.  (Like a a Pana B vs. a 20R or PF).

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

Old-Lumens
Old-Lumens's picture
Offline
Last seen: 2 years 7 months ago
Joined: 11/04/2011 - 11:39
Posts: 7478
Location: Tyler, TX, USA

DBCstm wrote:
Thanks Comfy, definitely some good work there! Now someone is gonna have to hold my hand through learning solder wick braid so I can clean up a board like that, man that is nice!
I just take off the components and flux the board, heat each pad, (or several pads at a time), with the soldering tip and wipe with a rag, as I pull the tip away. Cleans off fine.    Just an alternative...

My PayPal address: oldlumens (insert the @ sign here) gmail.com

My YouTube Flashlight Video Channel

The BLF Modding Links Thread 

http://imageshack.com/a/img922/1374/jQ2wdL.jpg

 

DB Custom
DB Custom's picture
Offline
Last seen: 22 min 42 sec ago
Joined: 01/13/2013 - 22:28
Posts: 19891
Location: Heart of Texas

Wipe with a dry rag? Or a damp paper towel? I like that clean look, makes it much easier starting over with new components.

Thanks Justin! Smile

Old-Lumens
Old-Lumens's picture
Offline
Last seen: 2 years 7 months ago
Joined: 11/04/2011 - 11:39
Posts: 7478
Location: Tyler, TX, USA

DBCstm wrote:
Wipe with a dry rag? Or a damp paper towel? I like that clean look, makes it much easier starting over with new components. Thanks Justin! :)
I usually use a paper towel, sometimes damp, sometimes dry, depending on my laziness level. A rag works a little better and dry works fine. You just have to wipe quickly. I place the rag over the tip and wipe in one motion rapidly. Excess flux is cleaned off with alcohol.

My PayPal address: oldlumens (insert the @ sign here) gmail.com

My YouTube Flashlight Video Channel

The BLF Modding Links Thread 

http://imageshack.com/a/img922/1374/jQ2wdL.jpg

 

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

DBCstm wrote:
The place the cap used to be located was on the VCC trace and now it's on the +Vin trace. It does the same thing, either way? So what, exactly, does the cap do anyway?

The only difference is that it used to be after the polarity protection diode (between diode & MCU), now it's before the diode (between B+ & diode). These little caps aren't polarized, so they won't explode (like the little yellow tantalum caps) if you stick the battery in backwards, so it shouldn't have any effect.

There are other places it can go on the topside and still be after the diode, but they all either interfere with either the driver fitting in the pill, or block a programming clip from attaching to the MCU. It can go from the bottom of R1 to ground, or from the bottom of the diode to ground. Both those would need a notch in the ID of the pill for clearance. It can also go between the lower tabs of the R1 & R2 resistors (since the lower tab of R2 just connects to ground anyway) which takes a little less room, but would still need a notch in the pill. If the driver is still using the 7135s, it can go from MCU pin 8 to the middle ground pin of the 7135 to the left, but that blocks the programming clip.

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

This type of driver can have the max current limited by using a PWM value of less than 255, but it will always be proportional only, meaning, for example, PWM=200 will give you 80% of a 20R's 8 amps, or 80% of a ICR's 5.5 amps. Changing the cell type or state of charge will change the output current, it is only regulated by the cell's voltage as compared to the LED's Vf, even at less than 100% PWM values.

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

^^^ But this can be a good thing... the mode spacing will remain the same, even if you change from a 8 amp cell to a 5 amp cell. Other big-current-but-regulated drivers will not maintain a pleasant-looking mode spacing if you use a cell that can't do the full max output on the high mode - mid & high end up looking too similar, and makes the reduced light output more apparent.

DB Custom
DB Custom's picture
Offline
Last seen: 22 min 42 sec ago
Joined: 01/13/2013 - 22:28
Posts: 19891
Location: Heart of Texas

So the capacitor is to make sure the mcu doesn’t get a spike? And it can do this from either trace? Sure helps to have the spring side of the board completely clean and smooth, I like that.

So, let me ask you this…do you think this FET could be floated above the mcu? Made to fit on the BLF Tiny10? Thus keeping everything on one side of that tiny board? Or is this FET physically too large? Is there a smaller FET that would do that? Even if it didn’t allow so close to 100% of the battery’s potential?

I’m looking for a way to make a 10mm driver run between 2 and 3A from a 10440 cell. An Efest IMR10440 cell to be exact, which is fully capable of supplying in excess of 3A.

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

Yeah the cap is just like a shock absorber, or an accumulator... stores extra incoming power when the MCU turns the PWM output off, and discharges it when the PWM output switches back on. With the firmwares that work with the FET, that happens 9,400 times a second.

Pages