Toroids and MOSFETs and firmware, oh my! (aka:'Tiny13+N-FET=???')

247 posts / 0 new
Last post
MRsDNF
MRsDNF's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 12/22/2011 - 21:18
Posts: 13473
Location: A light beam away from the missus in the land of Aus.

Thanks comfychair. I could understand your last post. It makes more sense now. Smile

 

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.

 

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

comfychair wrote:

HA, 70N02 does 4.34A, single XML2, single 20R (two 20Rs=4.62A, 3=4.78A, 4=4.86A). Works fine connected straight to the attiny. Bypassing the FET (short drain to GND) with the same single cell/LED gives 4.45A. So it's a good'un. Party

-----

And YES, adding the toroid makes the low much much lower. I checked by jumping across it while running in various modes. Makes barely any difference in higher modes but affects lower modes A LOT.

I'm beginning to think that toroid with short spikes of power due to the PWM makes the ckt act like a joule thief...charges the toroid field, as it collapses it pushes the energy it built right back down the line, longer PWM cycles don't let the field collapse and it just shoves the power thru it

http://www.youtube.com/watch?v=0GVLnyTdqkg

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

Ok comfychair, I tried it out, if understand correctly what your doing. I used a stripped down version of a old DX 7612 board. Mainly because I wasn’t using it and all the amc7135’s had been removed for something else. I used the T70N03 FET, a little soldering and added some wire and presto.
.

.
A direct drive driver using a attiny13v with Dr.jones code and nothing removed but the amc7135’s. Changed the modes to 1,2,3,4,5,15,78,255 for testing purposes. It lights up even in the low pwm value of 1. That’s a pretty awesome moonlight mode. High mode yeilded 4.5 amps of draw from a single 20r. I may strip my 4 board amc7135 2800ma kung and try the direct drive method. All modes worked reliable and perfect.

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

Flip the FET over and bend the legs so they're a mirror image of stock, glue it to the PCB with epoxy, then solder the legs. Voila - a super-East092! You can also trim off the overhanging part of the tab and file down the corner that sticks out to get it to fit in a 17mm pill.

{0,1,3,8,20,50,120,255} is really nice with a FET (doesn't work so great if still using the 7135s).

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

The (pwm value 1) moonlight mode is just a faint glow, the die turns from yellow to white. Its nice to 4.5 amps on the high end and still have a very faint glow on the low end. Really when driving a single xml or xml2 around the battery direct drive current, there’s no need for the amc7135’s, their not doing a thing.

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

Is there any particular reason why 0,1,3,8,20,50,120,255, is such low on the low end, would starting at 0,3,5,7,9,20,50,255 be better, at least have the light start with a little oomph, or since it's so low it's for reading or something like that

I understand what the 0 thru 255 is for the binary equivalent of all 0's all the way up thru all 1's...pretty nifty (I guess some way to calculate the on/off time of the cycles)

I guess I will have to build me one to see, then figure out how to program the ATTiny13A

 

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

I can’t seem to manage to get a picture of pwm value 1 that actually represents what I’am seeing.

@WarHawk-AVG I use moonlight mode with my EDC light more than any other mode, while everyone else in the house is a sleep. I can see just enough to get around without disturbing anyone.

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

This still doesn't hardly represent what I'am seeing, but its the best i can do. You can actually see only the die lite up white in a square shape. You can even see the bonding wires without being blinded. Pic is with pwm value of 1, Mouse over for pwm value of 5. Five is the lowest I have been able to run the amc's at stable.

 

Pwm value 1, mouse over value 5

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

Try it with the flash on.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

musicmagic
Offline
Last seen: 6 years 9 months ago
Joined: 10/28/2013 - 09:53
Posts: 984
Location: CT

comfychair, why don’t you just transplant the microcontroller?

If you can’t blind them with your brilliance, baffle them with your bullcrap.

The real currency in the world is not money, it’s trust.

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

musicmagic wrote:
comfychair, why don’t you just transplant the microcontroller?

That’s what he actually does, but the footprints of the Controllers Are Not the Same.
So he uses the nanjg as a mothership, also the nanjg has a voltage divider for the battery protection and a reverse voltage diode on board…
musicmagic
Offline
Last seen: 6 years 9 months ago
Joined: 10/28/2013 - 09:53
Posts: 984
Location: CT

Werner wrote:
musicmagic wrote:
comfychair, why don’t you just transplant the microcontroller?

That’s what he actually does, but the footprints of the Controllers Are Not the Same.
So he uses the nanjg as a mothership, also the nanjg has a voltage divider for the battery protection and a reverse voltage diode on board…

aah… all is clear now. thanks

Edit: by footprint do you mean pinout?

reedit: answered my own question: different pinouts.

If you can’t blind them with your brilliance, baffle them with your bullcrap.

The real currency in the world is not money, it’s trust.

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

musicmagic wrote:
Werner wrote:
musicmagic wrote:
comfychair, why don't you just transplant the microcontroller?
That's what he actually does, but the footprints of the Controllers Are Not the Same. So he uses the nanjg as a mothership, also the nanjg has a voltage divider for the battery protection and a reverse voltage diode on board...
aah... all is clear now. thanks Edit: by footprint do you mean pinout? reedit: answered my own question: different pinouts.
Yeah the controller on those big FET boards ain't a ATTiny13A like on the 105c, so he uses a stripped 105C as the brains to control the FET, it's actually incredibly simple and effective other than having to use another "daughter" board, kind of like a shield plugged into an arduino...but in reverse
moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

Rufusbduck wrote:
Try it with the flash on.

Thanks RD, Ill try that next time, I already tore it down to install in the 4x kung.
Both pics where taken with a desk lamp pointed straight towards the led, that’s the only way I could get the pics from being a light ball glare. Its still not as faint as I see it.
comfychair
comfychair's picture
Offline
Last seen: 5 years 7 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198

SRK driver swapped into the last 'Securitylng' light that was still using the stock driver/MCU...

http://75.65.123.78/driverhacks/Dsc07146.jpg

Running Werner's 098b, PWM=7 on the left (3-toroid SRK driver), MiniMo PWM=1 on the right (JB driver with added single toroid):

http://75.65.123.78/driverhacks/Dsc07147.jpg

Tom E
Tom E's picture
Offline
Last seen: 2 hours 41 min ago
Joined: 08/19/2012 - 08:23
Posts: 15006
Location: LI NY

With this FET option, it sounds like 4.5A is the best it can do with an XM-L2 on copper (used a Sam 20R)? This sounds a bit too low - yes, I'm a amp nut. But for example in a pretty decent well heat sinked host, like a HD2010 or XINTD X3, I would like to push it above 5A, and would expect direct drive to have lower resistance than a pile of 7135's?

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

Quote:
Bypassing the FET (short drain to GND) with the same single cell/LED gives 4.45A.

My meter, my battery box, my test leads, my LED, and so on... your stuff may give different numbers. But if it only increases by 0.1A when the FET is removed from the circuit, it's an excellent FET for single cell voltages.

reliant_turbo
Offline
Last seen: 1 month 2 weeks ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

have you tried this with a supfire M6 Driver?

i so want to do this to my king and my m6. Smile

Brian

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

reliant_turbo
Offline
Last seen: 1 month 2 weeks ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY

comfychair wrote:

Werner’s used this with a M6: http://budgetlightforum.com/node/28140#comment-528702

did he remove the original MCU and hook in there similar to what you did to the SRK?

Brian

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

comfychair wrote:

SRK driver swapped into the last ‘Securitylng’ light that was still using the stock driver/MCU…

http://75.65.123.78/driverhacks/Dsc07146.jpg

Running Werner’s 098b, PWM=7 on the left (3-toroid SRK driver), MiniMo PWM=1 on the right (JB driver with added single toroid):

http://75.65.123.78/driverhacks/Dsc07147.jpg


Are you still using the momentary switch. I cant see one connected to any of the pins on the attiny13.
comfychair
comfychair's picture
Offline
Last seen: 5 years 7 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198

Switch wires are connected to the underside (black+red twisted, you can see them heading off to the left out of frame) so as to not block access to the MCU pins for reflashing.

moderator007
moderator007's picture
Offline
Last seen: 23 hours 8 min ago
Joined: 12/23/2012 - 04:47
Posts: 3741
Location: North Carolina

comfychair wrote:

Switch wires are connected to the underside (black+red twisted, you can see them heading off to the left out of frame) so as to not block access to the MCU pins for reflashing.


Ah, good idea. I think I had mine hook to one of the stars, seems like it was the last one on the right.
I guess it depends on which one is used in the code. I’ll have to go back and get a little refresher coarse in how to make lower modes, the one I have only goes to pwm 5 and it has a few more lines that reference that value.
.
One more thing comfychair, have you looked at your joined date and your post count. Wow!
Werner
Werner's picture
Offline
Last seen: 2 years 2 months ago
Joined: 10/19/2012 - 15:00
Posts: 3679
Location: Germany

Yes I have used this on my M6 that’s how I came to the idea of using a nanjg as mothership.
I have stripped the original mcu and there was a special mode order necessary because the 7136 behave a bit different than a plain FET.
I guess you could try to use it with the stock mcu still in place like comfy first did, but I don’t recommend it for longer use because the standby current of the original driver is quite high….

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

Another one, this time with the stock resistors still functional.

http://75.65.123.78/driverhacks/srk/Dsc07151.jpg

Remove the stock controller, optionally place it on the floor and smash it with a hammer for proper disposal.

http://75.65.123.78/driverhacks/srk/Dsc07152.jpg

These are the 3 pins that go to the 3 gate drivers that go to the 2 buck controllers that run the 3 FETs. What an elegant design! :Sp

http://75.65.123.78/driverhacks/srk/Dsc07153.jpg

OCD? What's that?

http://75.65.123.78/driverhacks/srk/Dsc07155.jpg

See? Now they're mounted properly.

http://75.65.123.78/driverhacks/srk/Dsc07156.jpg

http://75.65.123.78/driverhacks/srk/Dsc07157.jpg

http://75.65.123.78/driverhacks/srk/Dsc07158.jpg

While still hot, smoosh the heatshrink down flat. Holds the wires in place tight enough that no epoxy is needed.

http://75.65.123.78/driverhacks/srk/Dsc07159.jpg

Power for the brain is picked up from the inboard tab on the big yellow capacitor (the cap's outboard tab goes to ground). The brain's ground comes via the copper mounting frame. The single black wire connected to the big driver's three PWM pins goes to any of the 105c pads that used to control the 7135s.

http://75.65.123.78/driverhacks/srk/Dsc07166.jpg

The only thing left to do is attach two pins to the back of the switch PCB, and corresponding female connectors to the ends of the switch cable. Makes disassembly so much nicer when you don't have to futz around with that stupid switch bezel just to remove the driver.

http://75.65.123.78/driverhacks/srk/Dsc07169.jpg

I measured L1=2.48A, L2=2.47A, L3=2.35A. All 3 channels have different resistor combos because of the vastly different PCB traces, but odd that the low one only has a single R010 resistor, while L1 has a R010 & R110, and L2 has a R010 & R068. Every one I've seen of this style has those same resistor values in the same locations, but I guess that's pretty close for a $5 driver.

 

 

 

 

reliant_turbo
Offline
Last seen: 1 month 2 weeks ago
Joined: 02/16/2012 - 16:01
Posts: 165
Location: Warsaw, NY
Werner wrote:
Yes I have used this on my M6 that’s how I came to the idea of using a nanjg as mothership. I have stripped the original mcu and there was a special mode order necessary because the 7136 behave a bit different than a plain FET. I guess you could try to use it with the stock mcu still in place like comfy first did, but I don’t recommend it for longer use because the standby current of the original driver is quite high….

yeah i dont plan on leaving the original MCU there. ill be removing it and smashing it lol.

i need to get a soic clip yet so when i do, ill be giving this a shot with my SRK and M6.

im excited. Smile

Brian

comfychair
comfychair's picture
Offline
Last seen: 5 years 7 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198
Left: red 'JB' single FET + toroid, PWM=3
Center: 3x XPG2, Nlite, 12x 7135, 'moonlight' mode
Right: 3-toroid SRK driver, PWM=3

http://75.65.123.78/driverhacks/Dsc07172.jpg

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

Pretty snazzy!  Any idea how many uH those toroids are?

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

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

The uH rating is less important than the current capacity, since everything that goes to the LEDs has to go through the toroid. Which of these would be least happy having 15 amps shoved through it?

http://75.65.123.78/driverhacks/Dsc07177.jpg

I have not yet tried the little red one. Ones with fewer turns (less total length) or multiple or fatter conductors can carry more current with less resistance than ones with more turns or smaller/fewer conductors. As we know from selecting 'good' FETs, a few milliohms can make a big difference when the input voltage is so close to the LED's Vf.

The thing that has me stumped is, I haven't found any listings that allow sorting by number of conductors, and just looking through thousands of pictures on Digikey isn't really getting anywhere - everything I find that might be suitable is non-stocked. Sad

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

You're right, they are all listed by uH (inductance) and amp rating.  There are lots of stocked models on Mouser.  The uH rating has got to matter, right?  Isn't that the whole reason for using the toroid?  Otherwise we could just stack a resistor with the same resistance as the toroid, but we know that the inductance is what's making the difference here.  

Problem is that without an oscilloscope I have no idea how to measure the inductance.  

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

Pages