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

I need a 'gate driver', right? (whatever that is...) Mainly for the old-style SRK drivers (since it works driving only one channel, but gives up when trying to drive all 3). The single-FET drivers can probably work as-is, with the right FET (which I don't have and don't know how to tell the ones that'll work from the ones that won't).

Not only do the FETs from the junk box work off the board and not work on it, they stop working when the wires are soldered to the pins instead of using alligator clip leads. What does that mean? Does the ATTiny require some resistance in the circuit? Are low resistance connections overloading the MCU, causing it to shut down/lock up?

I'm trying to search and find stuff that might be relevant, but that's probably not a good idea since I don't understand nearly all of it... :~

If you have a multimeter at hand, can you measure any voltate at the L- pad?
For the fun of it, you could disconnect the gate from the Attiny and turn the FET on directly by connecting the gate to a battery or something.
If it doesn’t turn on the LED then, there can’t be to much reasons why.

(Resistance in the gate path is usually there to limit the gate charge/discharge current, manipulate turn on/off time or suppress ringing at faster switching speeds. But it shouldn’t be important for this problem )

I thought that when I returned from work you would have this working by now! Sorry you’re still having probs :frowning:

The resistor R13 is to stop the gate sucking more current than the mcu can deliver. Maybe the croc clips are providing just enough resistance for it to work?

Im not an electronics expert though!

Oh, yeah, it works when jumped, either gate to BAT+ or LED- to GND. The FET part itself is reliable, just not when it's being driven directly by the ATTiny. When it stops responding there's still power to the ATTiny (it's hardwired, after all) and there's nothing present at the gate/105c's output, appears to be exactly the same as when the 105c is switched off (it doesn't really have an 'off', just a mode that's 0%).

Sometimes it locks up and no number of button presses will make it do anything at all, while the LED is stuck on at whatever level it was when it froze. Sometimes it shuts off right after changing modes and never comes back until after a hard reset (I have a clicky switch on the side of my battery box).

That same 105c when piggybacked onto only one of the 3 channels on the old SRK driver works perfectly - never locks up, modes always change, it turns on/off every time like it should. But connect the 105c's PWM-out to two or more channels, and it does nothing, ever. And it works on any of the 3 channels, but just one at a time.

I even added that resistor back, didn't change it. Tried with all combinations of both resistors, too (the other one, 10K, over at the right going from gate to GND, but I don't think that one's needed, the ATTiny has an internal drain to take care of any leftovers on the gate when the output's switched off).

But like I said, I'm pretty sure the single-FET drivers will work fine, if I can nail down which FET will work with this combo.

Curious. Have you tried removing the 10k R14? If not, maybe you can try that, or at least change to something higher e.g 50k or so. Seems like the board itself is sinking some of the signal current.

Yup, tried with & without both resistors, the one inline with the gate and the one from gate to ground. Haven't tried a different value resistor at R13 yet and I'm pretty sure R14 isn't needed.

How many amps do you need? And how many outputs? 1 output or 3 separately controlled outputs?

As noted, why not use a 7135 or something else, don’t you have those tiny mosfets to use as gate drivers for this big beast?

What about the inline resistor to the gate?

The original driver has some different kinds of security aspects.
gate pulldown
Controller to gate resistor
Capacitor between GND and VCC
Diode between VCC and controllerVCC
Resistor between VCC and controllerVCC
Capacitor against GND on Controller VCC

I know it’s too late but maybe you should have just removed the Stock controller and wire the tiny 13 on its place with all the features the stock driver came with…

Try some bigger cap between GND and VCC first, I had this issue before on my 15mm driver.

Doesn't the 105c host board have all the parts the attiny needs?

I think I read somewhere that it doesn't need a pulldown resistor on the gate, 'cause the attiny handles that internally - could be totally wrong though. Either way with resistor/without resistor it still didn't work.

What's weird is that the setup that did work with the FET not mounted, was just the PWM wire from the 105c soldered to the gate pin, BAT+ to the 105c & LED+, GND to 105c & FET's source (with an alligator clip), and LED- to FET's drain (again with alligator clip). No resistors anywhere. But solder the FET to the board, and solder the GND & LED- connections, and it goes back to being erratic and locking up/shutting down. There's no other components on the original board, and I've verified none of the PCB traces is funky. Everything's isolated like it should be.

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.