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

It works! Replaced the 10 ohm at R13 with a 68 ohm, no other changes. I don't know if that's too high to fully drive the gate, or if it'll stop working again later when I replace the original FET with one capable of some real current, but I'll burn that bridge when I come to it.

Standby current with the stock driver was 1.32mA, with the hybrid thing it's down to .77mA.

you could put a potentiometer into the circuit rather than the 68ohm resistor and adjust it to find out the resistance that limits current enough for the attiny to function and allows enough current to flow to fully charge the FET.

if you probe the output pin of the attiny and decrease resistance, at some point the voltage will drop as the gate current gets too high for it to source.

there is a way to calculate all of this to get the exact resistance value but the last time i did that was 7 years ago and it was for a op amp being used as a comparator, driving a BPJ transistor so im super rusty.

looks like i need a refresher. ill get out the books again and my 2 FET SRK clone driver and play. :slight_smile:

Brian

Think more resistance will be the solution for the 3-channel SRK driver too? It still has the original resistors in the line, one for each channel.

SRK mouseover for anybody else who wants to play along...

That are very good news. :slight_smile:

Yes gate pulldown is not needed in theory because the pulldown is already build in the tiny. I had once problems so I made space for a gate pulldown and a resistor between controller and gate on my custom PCBs.
I read that without the other inline resistor the gate trace could work as an antenna and do some fancy emv crap….
In the 15mm driver thread some said that I only had need for bigger capacitors because I had no voltage protection diode, I guess this is what you meant with that the nanjg had all parts, but it isn’t totally confirmed yet(maybe we should call the myth busters). I had two boards one with the FET and one with the controller if I connected them via breadboard it worked if I soldered them together with jumper wire it worked, but assembled on the same PCB it didn’t work. The bigger cap solved the problem.
——
My tests showed that it can work without the inline resistor so I just bridged the pads, maybe you found now a case where it is necessary. I also read that the size should be around 100 ohm for the inline and 10kohm for the pulldown.

If the inline resistor is too big it could happen that the FET isn’t switched fast enough(RC circuit needs to long to charge)so it stays longer in linear mode where the FET has higher resistance. I also read that the FET will get very hot in this case and will die…
If the gate capacity is too big the tiny isn’t able too give the needed chargecurrent and this could also make weird things. Maybe this happened here…
——-
Thanks for the current measuring. As I had wrote I have now added sleep modes to the firmware which brings it down in the uA range. The voltage divider is the biggest power eater.
——-
Sadly my soic clip is still on strike, I will resolder all wires and clean contacts tomorow. I hope this will bring him back to life.
I don’t want to send you the new firmware without testing it myself before.
I added 3 stage battmon if voltage falls below a declared value (I choosed 3.2Volt or so)it goes to mode 3(low) if voltage sinks further it goes to mode2(moon) and if it reaches the next voltage it switches off. This should give light for a long time and a defined switch off(which I miss often in the other firmwares which will suck the battery till death).
——
Reliant turbo I believe I have found what you meant:
This is the formula for the current which is needed to charge the gate capacitor:
I=C*du/dt

We want the Resistance so we use ohms law R=U/I, the du(which is U in this case because we switch from 0 to VCC) falls away and the others are inverted.
R=dt/C
R is the maximum resistor which will allow the gate to get charged fast enough
If you choose dt=100nS( seems to be a good value) and C=800pF(value from 35n03 datasheet)
(100×10)÷(800×10(–12))=125ohm

Wow, something written in normal human English that I can nearly halfway understand! "How P-Channel MOSFETs Can Simplify Your Circuit" - http://www.irf.com/technical-info/appnotes/an-940.pdf

I have read the PDF but don’t see how this helps…?
Now we know that Pfets need more material and are more expensive but there are applications where they could come in handy…but nothing which is suitable for this situation…
What have I missed?

I can’t follow this thread any longer. I don’t know what language is being spoken, and it is giving me headaches. I’m happy that there are a few of you who are on the same page…

best wishes….

I don’t know much about these and not enough to really help but I can tell you a little bit of the work I did with the same driver. I tried two different FET’s. The first was off of a ZY-T08 and it acted goofy like the one you are talking about. No second driver hooked up but what it did was it had a low and high but both were very dim, I’m talking about dim enough to look at. If I held down the switch for a period of time it would give me a very bright blinky mode. That was it. I then put a DTU FET similar to the one of the black SRK driver on and The output was amazing but still once in a while it wouldn’t turn off correctly.

I have a couple different FET’s on the way so I’ll post my results here (if you don’t mind) when I try them out, with this driver. On of them on the way is the one that was mentioned for modding the DRY driver.

The DTU FET output had to have been very close to full direct drive.

The one I have yet to get to is the red 'JB' driver in the Securitying SRK clones. FET is a K4212 and does, best I can estimate, 14-15 amps from 4 20Rs into 3 XML2s on copper. If the attiny is happy driving it I think that FET will be the one I stick with... it's available on aliexpress for sure, maybe on ebay, I don't remember. But it's out there and works well. I'd also like to test it with a single cell & single LED, see if it still puts out good numbers.

----------

Couldn't this attiny/105c trick be used with just about any other momentary switch driver? Specifically thinking about the S1100/S2200, the output part of the driver is fine but it's sorely lacking anything like a useful UI. It'd need a zener regulator or a 7805 to drop the voltage for the attiny, but the output should still be able to control the rest of the driver just the same. There's plenty of space inside for extra components.

Maybe toggle switch? Push Button ON-OFF Soft Latch Circuits, Battery Powered Touch Toggle ON OFF Switch, Momentary Button MOSFET Power Switch for Microcontrollers

I made it for my SRK.

Momentary switch ON and OFF the attiny, so it working the same like in flashlight with normal clicky switch.

Working video http://www.youtube.com/watch?v=Foc9R0dC2iI

I tested both circuits, and in my opinion the first one is better, no oscillating and after power connection is still OFF.

This trick could be done for a lot drivers to get any modes we want. Sounds good, heh?
Not only eswitch drivers, we could also wire a standard nanjg firmware in a light with a normal switch driver. I always wanted to try the 3T6 driver…
But anyway to get a direct drive driver we could also just make a driver board which hosts one big FET and a Tiny13, this could be put in every light we want.

But I like the idea of eswitch lights because they don’t need a crappy switch which will steal voltage and the srk lights are very good, small, bright and long battery life. Just the modes always fucked me up.
——
I tried 3 parallel irlml2502 with one samsung20r and 3 xml2 parallel and got over 10A which killed the FETs in small time. These sot23 are only good for 3A. So I made 4 footprints on the 20mm board. The last time was the 15mm driver with space for two but I doublestacked one. The good thing on the sot23 FETs is they have almost all the same footprint and especially the 2502 is available everywhere for cheap. For single XML, 3 or four would be enough.
—-
@Macie
the good thing on an electronic switch with a microcontroller is the ability of any modes we want.

Bigger package, but it'll fit. Anybody who understands Datasheet Klingon want to take a look at the specs and see if it's worth a try? - http://www.st.com/web/catalog/sense_power/FM100/CL824/SC1164/PF64496

It has a low GS threshold so it will have low resistance on the few volts we are using.
Rdson seems low 20mOhm
Input capacitance 1265pF

Give it a try :slight_smile:


Please also try a capacitor between VCC and GND!


I have given up on my soic clip RIP, sadly I wasted hours on getting it to work again.
I have soldered cables on a nanjg and tried it which also frustrated me because it was fiddly…

I now measure 250uA on 5V and 120uA at 2.5V on a fully stacked nanjg.

I have a capacitor on Vcc! On the 105c. It's moved to the topside of the board though, sits between the bottom pad of R1 & GND, see the first pic at the top of the page.

Please try a bigger, spare, additional one.

But if it works now, and still works after adding another cap, what will that tell us? :~

Please report what works.
I thought you still had problems…

The blue single-FET driver works now with a 68 ohm resistor inline with the gate, it didn't work before with either the original 10 ohm resistor or wired direct to the gate with no resistor.

The 3 channel SRK driver I haven't messed with again, that one works but driving one channel at a time only.

I just tried the 3T6 driver and it works also. Yippieh!

Just cut the trace of the original PWM signal and soldered the new signal on, all modes work perfect. I tested it with a single xml2 and 4.8V.