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

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

To clean the driver just put it on a hot plate like reflowing LEDs just backwards. if hot remove the parts…
We need to think more ecological, recycling is fun :bigsmile:
——-
I dont See the Need for tempmonitoring…? I have a tempsensor Build in my hand Wink
I also see no need for more program space, what do you want to add?
My eswitch firmware is 700bytes and luxdrv is also around this size, so I don’t see need for more space.
I don’t need user configurable garbage that confuses me, I just want some defined modes. The only thing what I always miss is off time checking, and I guess it will be only few bytes needed for it.
Tiny85 is pincompatibel, just the Registers for PWM and ADC need to be adjusted. But this is a budget driver no super all in one 20$ thing with lots of features nobody needs.
If you had tried my eswitch firmware you would have seen that less is sometimes more…

Tom E
Tom E's picture
Offline
Last seen: 3 hours 47 min ago
Joined: 08/19/2012 - 08:23
Posts: 14908
Location: LI NY

Werner wrote:
To clean the driver just put it on a hot plate like reflowing LEDs just backwards. if hot remove the parts... We need to think more ecological, recycling is fun :bigsmile: ----- I dont See the Need for tempmonitoring...? I have a tempsensor Build in my hand Wink I also see no need for more program space, what do you want to add? My eswitch firmware is 700bytes and luxdrv is also around this size, so I don't see need for more space. I don't need user configurable garbage that confuses me, I just want some defined modes. The only thing what I always miss is off time checking, and I guess it will be only few bytes needed for it. Tiny85 is pincompatibel, just the Registers for PWM and ADC need to be adjusted. But this is a budget driver no super all in one 20$ thing with lots of features nobody needs. If you had tried my eswitch firmware you would have seen that less is sometimes more...

Oh boy, yes I tried it and like the UI very much. Just that it's locked into levels only applicable to a M6, like you said.

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

comfychair wrote:

The K4212 runs awesome straight from the attiny, no resistor inline, no pulldown resistor. I gotta order a batch of those things, they RAWK!

So, do you end up needing the capacitor with the K4212?  I see that you still have it on your boards.  What size/specs is it?

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

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

It seems that my Firmware Needs a capacitor for the tiny to work optimal, I used a 10uF SmD capacitor on top of the standard nanjg smd cap, after finding out that a bigger one worked. Comfy used a random one from electronic junk…
Does anyone know which cap the standard nanjgs have on board?

Oh modes are not locked, I have made it easy changeable like in luxdrv….I send you the latest version with standard mode spacing in a moment…

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

Werner, is your firmware "open source" or something you would like to play a little closer to the vest?  

The capacitor I'm talking about is the relatively large on soldered to the C1 pads on the JB1 driver.

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

Tom E
Tom E's picture
Offline
Last seen: 3 hours 47 min ago
Joined: 08/19/2012 - 08:23
Posts: 14908
Location: LI NY

Nanjg cap here? http://budgetlightforum.com/node/19535#comment-409143. It's post #62, from texaspyro

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

Interesting but maybe it’s to small on 4V if it’s a 6v type, I used a 10V type and added it on the nanjg. On my15mm driver I solved the problems after replacing a 100nF with one of my10uF ones too…
Yes the bulky cap is just one comfy had on hand, probably with huge capacitance.

I have the plan on releasing it, if you want I can send you the compiled testversion. Once it’s finally done I will probably release the source too…
I also will share the PCB file(which is fairly easy on oshpark) if it works.

I want to clean the initializing of PWM and ADC as long with some other things which are currently hard coded. I have read a lot tutorials and documentations how things should be made and so I will try to do this too as good as I can.

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

Tom E wrote:

Wow -Werner this sounds awesome. I have all the parts on order for a small run of Tivo’s boards. Wish you could go with a Tiny85 though – much more program space, temp monitor, etc. Dunno – how compatible it is though to the 13A.


I think TP said that the Tiny85 was pin compatible but that the footprint was slightly wider so longer pads are needed.

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

Scott

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

So all we need is a small additional capacitor added somewhere on either one of the boards? 

Werner:  A compiled test version would be awesome!  I just finished building my "Securitying" (what a funny name!) light last night and now it needs some lower mode levels!!!

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

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

OK, clarification: I hate the idea of stripping down a functioning driver just to get a blank contact board. I like to re-use leftover stuff when possible.

-----

The capacitor can be smaller if it's placed closer to the attiny, that's what I did on the latest version of the red 'JB' driver. It can go anywhere that's electrically the same as stock, between MCU pin8 and GND (the red Vcc trace).

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

It can go on the reverse side in parallel with the original, off the bottom of the diode to GND, off the bottom of R1 to GND (I relocated the original cap to this spot, so I can coat the backside with JB Weld and not have any components inaccessible), or straight onto the Vcc pin on the attiny (though, this can block access for the programming clip).

The attiny will drive the 2SK4212 FET directly with no resistors added anywhere - other FETs give different results. The red 'JB' driver works as-is.

-----

I've used the 095b version of the FW on several lights, and even on a 105C still using the original 7135s (in a little UF-T50; tested, but not assembled yet), and the mode spacing has been good on all of them. The big single FET drivers still look 'right' when used with a single cell & single LED, so it should be good for a East092-style driver as well.

Comparative, not absolute  (it's not dark, ambient light not subtracted), ceiling bounce lux numbers for some different lights...

6x XML2, direct drive JB driver, Werner's 095b FW
7.8
17.9
32.3
61.2
101.2

3x XML2, direct drive JB driver, Werner's 095b FW
8.6
18.9
33.0
59.2
94.4

3x XML2, direct drive JB driver, stock 3-level FW
22.3
54.6
84.2

3x XML, stock 3-toroid SRK driver, stock hi-low FW
10.9
53.5

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

Wow!  Looks like you picked up some more juice just by swapping in the 105C.  The stock MCU must not be giving 100%.

Another question:  If it isn't needed, why do you still have the huge capacitor on the "JB" board?  

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

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

It's big compared to the stock ceramic thing, but it's smaller than the others. It could be probably much MUCH smaller and still work, but I use what I have...

The total output numbers don't mean anything - all the lights are using different cells (20Rs, 28As, NCR 2900s, etc.), some were charged yesterday and not been used since, others have been used for a few days. It's just to give an idea of the mode spacing. Also the 6x is cool white, the 3x'ers are 3Bs in one and 4Cs in another, all kinds of variables not accounted for.

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

This is what ended up in the 6x light, with the cap on the 105C instead of the big lower board.

http://75.65.123.78/6XL2/Dsc07018.jpg

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

OK, which of these is the right version? http://www.aliexpress.com/store/718163/search?SearchText=attiny13

And what diodes are compatible with what comes stock on the 105C? What do I search for?

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

Would a Zener moded board work with this Fet to give a turbo MT-G2?
It sounded that way but went by fast and in Greek. Or maybe Werners board is set up for a Zener mod already? Is there any advantage to running both kinds of chips?

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

Scott

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

I don't see why not. I'd select the zener to get the highest safe voltage though, more signal to drive the FET's gate will, I think, always be better. Over 5v but less than 6 is where I'd start, the low voltage detection is going to be skewed anyway so as long as the attiny doesn't burn up it should be fine.

K4212 datasheet: http://documentation.renesas.com/doc/DocumentServer/D19564EJ1V0DS00.pdf

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

The ssu is the right version we need 8S1 type that is the smaller one, which is on a nanjg. The SU is the wider 8S2 version(like the tiny85 someone mentioned).

Zener mod should work, on the mentioned PCB I have a spot for one of these big Diodes(minimelf?), I ordered some 5.1V types from eBay.

—-
Rufus which type differents do you mean?
The tiny13 tiny85 thing?
If someone needs more space he could also hand solder another small tiny in there, gmarsh used a tiny85 on a nanjg ,in his tv bgone driver, without problems.

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

Both kinds of chips= 7135 and k4212. Or do the fets need all of the Attiny pwm output to charge the gates?

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

Scott

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

FET & 7135s would have to be run from two separate output pins from the attiny, the only reason to do that is to get a lower low than you can get with just the direct drive FET.

With the FET+attiny only, a PWM value of '5' is pretty damn low, though it's higher than what you could call a moonlight. I used 0,5,20,60,130,255 in DrJones' minimo FW, in the direct drive/3x light, and the low is nearly identical on the lux meter as the standard low (not moonlight) in nlite with a single XML2 P60.

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

Can anyone send me a 7135 library for eagle?

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

comfychair wrote:

FET & 7135s would have to be run from two separate output pins from the attiny, the only reason to do that is to get a lower low than you can get with just the direct drive FET.

With the FET+attiny only, a PWM value of ‘5’ is pretty damn low, though it’s higher than what you could call a moonlight. I used 0,5,20,60,130,255 in DrJones’ minimo FW, in the direct drive/3x light, and the low is nearly identical on the lux meter as the standard low (not moonlight) in nlite with a single XML2 P60.


I thought that might be the case. If the 13A struggled to control the gates at high frequency and low on time the 7135’s would be used for LMH and Turbo was only the fet only at 100%. But you have completely replaced the 7135’s. Nice work here. I don’t understand it all but been following anyway.

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

Scott

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

Well it runs fine at a PWM value of 5, or this FET does anyway. It might be different with different drivers (like, multi-channel drivers with more than 1 FET) or a different single FET. I think 5 is the minimum with whatever CPU clock DrJ used, I know less than nothing about the code.

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

http://75.65.123.78/pwm.gif

That's a normal 105C still using the 8x7135s, it may be different running the FET. As a test I gave it modes of 0,1,2,3,4,5,100,255 just to see what happens (DrJ has a comment in the source that 5 is the minimum, but I think most folks know by now about me and following instructions...). It makes no light at all in the 1/2/3 value modes - it might behave different in a triple, with LEDs in parallel (lower Vf threshold).

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

comfychair wrote:
It makes no light at all in the 1/2/3 value modes - it might behave different in a triple, with LEDs in parallel (lower Vf threshold).

HA HA! 

uint8_t modes[]={0,1,2,3,4,5,20,100,255};          //PWM values, 5..255 - LEAVE THE "0" THERE

It makes light on ALL modes with those settings, on the 105C piggybacked onto the JB/K4212 driver. Stupidly low output on the lowest mode. lol Big Smile

edit: Mode spacing looks better using 0,1,3,8,20,50,120,255; the first attempt was 0,1,4,9,20,70,140,255.

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

Ever seen a SRK do this?

http://75.65.123.78/Dsc07035.jpg

:bigsmile:

though, I think I like Werner's UI better, just don't tell anybody I said that :8)

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

Nice.
From my experience Xml2 are better for this glowing, in my m6 the xml2 glows until battery reaches 2.5V the XML1 is flickering a lot earlier.

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

I need the brain people again -

I found a source, in the U.S. even!, for a bunch of Vishay SUD70N02-03P (pdf: http://www.vishay.com/doc?72246)

I've gone a bit crosseyed trying to slog through datasheets, but this one looks to have half the Rds(on) as the K4212... .0042 ohms vs. .0085 ohms. Right? And it should work without changes in the same circuit as the K4212? Logic-level thingamajig and the rest?

Tired

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

I'm really digging Werner's UI.  Being able to start on high or low without cycling through is awesome!  Very responsive.  Just need a lower low (moonlight) and I'll be happy with this setup.

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

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

How low it can go and still make light will be highly dependent on the hardware. If he releases the source when it's ready so everybody can plug in their own levels... Love

And yeah, who needs memory when you can make it do whatever you want? I can never remember what the last mode was, so it's not much help if the light remembers it.

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

DrJones' MiniMo FW, 7 modes (PWM values of 1,3,8,20,50,120,255), input pin switched from star #4 to #3 to be compatible with the same wiring used with Werner's FW. Both .hex & .txt in here: http://75.65.123.78/fw/

The lowest mode with a PWM value of '1' gives 0.3 lux in the ceiling bounce test. Not quite moonlight... but on the same meter, a stock 2-mode SRK driver's low mode did 10.9. Big Smile

Pages