23
submitted 1 day ago* (last edited 1 day ago) by Machinist@lemmy.world to c/askelectronics@discuss.tchncs.de

I'm tinkering with the ATtiny 2 series (ATtiny 3224). I'm also starting to teach myself about switch mode power and surface mount design. I'm planning to drive two Toshiba SSM6K804R MOSFETs. They are logic level MOSFETs with a 4.5V drive. They have a gate capacitance of 1110pF (1nF).

Even though these are logic level MOSFETs, I think I still need an external gate drive for them for crisp switching above a few kHz. I don't need to try and charge the gate directly with the ATtiny as I would need a 2-300ohm resistor in series to protect the microcontroller and that will slow everything down. Also need a pulldown for the gate.

Can someone please recommend a simple IC or maybe a packaged transistor pair that I can slam the gates with?

Questions/comments/advice greatly appreciated!!

top 13 comments
sorted by: hot top new old
[-] xthexder@l.sw0.com 4 points 1 day ago* (last edited 1 day ago)

The ATtiny datasheet has a lot of useful information about power dissipation for its IO pins. The input capacitance of your MOSFET gate seems to negligibly effect the power usage compared to the 30 Ohm gate resistance. At 5.5V that's 183mA and above the 100mA supply limit, so you'd only actually need a minimum of a 25 Ohm resistor (+30Ohm gate) in series to lower it under 100mA (plus maybe add a heatsink depending on your duty cycle).

If you can handle supplying 100mA, then you'd get roughly a 60ns rise time based on the 1nF capacitance, which should be plenty fast for switching anything under 100kHz. This scales linearly, so selecting a resistance to target 10mA would give you a 600ns rise time (thus lowering the switching frequency you can hit before overheating the MOSFET).

[-] Machinist@lemmy.world 1 points 1 day ago

I'm bumping against the edges of my ignorance here. I haven't done any calculations yet. I've been reading the DC/DC Book of Knowledge by Steve Roberts.

I've got a working 5V switch mode supply using a driver ic for the ATtiny. Plan is to use that supply and the ATtiny to variably control a larger inductor/MOSFETs. This will power a resistive load around 25w max, 14.5w typical, 1.6ohm so roughly 4V/3A typical.

The data sheet gives an absolute maximum of 40mA for output on a pin with 5-10mA being ideal. My understanding of the chart above is that the voltage will also sag below the 4.5V gate actiivation. I'm assuming trying to switch the MOSFETs with just the ATtiny either leads to a blown output or an overheated MOSFET.

I guess I need to figure out my target frequency and work backwards from there. I've got a working reference circut, but all the ICs and MOSFETs have been laser obufuscated. Inductor is 1.5uH and 27A.

So I'm assuming I need a higher frequency than what I can push with the ATtiny but I don't know that.

Sorry for the novel. Writing this down helps me work the problem. Do you see anyrhing wrong in my assumptions/reasoning?

[-] xthexder@l.sw0.com 1 points 14 hours ago

Ah okay, I read a stat for max total current on a pin group, but I guess the single pin current is lower.

If you have a capacitor on your supply pin, it should reduce fluctuations due to changing outputs, but I found the stat you're talking about: At 5.0V supply a 15mA load only guarantees 4.0V.

So for it to be reliable you'll need to use another driver in-between. A single smaller transistor with a fast switching time and low voltage drop when saturated/on would be able to multiply that 5-10mA up to the 100mA you might want, and stay above the 4.5V threshold. You can probably find something within 0.4V.

In terms of switching time, I think the main thing is just picking a frequency outside the audible range, so something like 30kHz or above would work. You can probably figure out your own tradeoffs going to a higher frequency. I think the main benefit is you can use smaller capacitors and get less ripple on the output, but it makes the switching control harder to get right.

[-] jeinzi@discuss.tchncs.de 4 points 1 day ago

I don't know how serious your project is and how much reliability and predictability you need; but regarding

I would need a 2-300ohm resistor in series to protect the microcontroller

I will just say: I have yet to kill an AVR.

I haven't used any gate drivers yet, but I remember an introductory video about MOSFET control that helped me a lot, and at about 7:40 he shows his go-to setup.

And again, I don't know your requirements, but my default logic level MOSFET is the SI2302. It's available from a bunch of different manufacturers, has a threshold voltage less than 1V and can conduct several amps continuously.

[-] Machinist@lemmy.world 2 points 1 day ago

I'm hoping to end up with a pcb that has the features of an obsolete ecig that my spouse and I prefer. I've probably purchased a dozen of them over the years. The switches always fail.

Given the politcal climate towards ecigs (What about the children?!!!!?), my particular harm reduction method continues to become more difficult to source. So, I'm just going to future proof things and build my own. I doubt the design will be worth any money so I'll probably open source it if it works.

So pretty serious about durablility, it would be a tool for daily use. I plan for switches to be on a daughter board so I can just change them out.

I'll be checking out the video this evening.

Thanks!

[-] sobchak@programming.dev 3 points 1 day ago

Not a electrical engineer, so dunno the answer.

Can always just try that test circuit and investigate with a scope? Or play around with SPICE? I imagine any low capacitance mosfet would work as a driver?

[-] Machinist@lemmy.world 1 points 1 day ago

I was thinking bjt or opamp to drive the mosfets, but I'm not sure.

And yeah, I'll be scoping it as I start testing. I'm just still wrapping my head around the synchronus inverting buckboost I think I want to use.

[-] litchralee@sh.itjust.works 1 points 1 day ago

A push-pull BJT configuration seems like it could be appropriate, if your application will be unbothered by limiting the Vgs to a max of 5.5v (the 3224's max supply voltage). The MOSFET in question seems to be good for Rds(on) below 20 mOhm at that voltage, so it seems fine for at least a handful of amps.

If you are doing higher frequency switching than a few kHz, then you probably want to use a driver IC. And especially so if you have a higher voltage bus than the 5v needed by the ATTiny.

[-] Machinist@lemmy.world 1 points 1 day ago

I'll be reading up on push-pull. Thank you!

Main power source is a single cell lithium, so 3.7ish volts. Supply for the ATtiny is a 5V driver IC (I've already got it working).

The convertor I want to build will be inverting as the load is basically a pure constant resistance. (14.5w 1.6 ohm typical). I think that means I sidestep all the problems with a voltage higher than my control.

I'm hoping to use the window mode of the ADC and the programmable logic (CLC) to actually control the convertor mostly independent of the CPU.

[-] litchralee@sh.itjust.works 2 points 1 day ago

I suppose it's worth mentioning that the 3224 datasheet suggests that it's perfectly capable of running at 3.7 volts directly, since it has a wide voltage range from 1.8v to 5.5v absolute. But I imagine you have other ICs that need the 5v supply.

I'm not entirely familiar with what you mean by a "convertor", but I presume it's some sort DC to AC function. Given the output loading, 3 amps through that Toshiba MOSFET seems reasonable enough, with the power dissipation being something like 0.3-0.5 W max, depending on switching speed.

[-] Machinist@lemmy.world 1 points 1 day ago

Plan is for the ATtiny to actually mostly be asleep on the battery voltage. The 5V driver IC has an enable pin and goes into bypass mode when it's not enabled. Only when it wakes up will it turn on the 5V.

I want the 5V for the 4.5V gates on my MOSFETs, the OLED display (IIRC, it will also run on 3.3V), and the 20mhz for PWM and ADC.

DC/DC convertor. I'm hoping I can make a synchronus inverting buckboost supply in the neighborhood of 25w/6V max.

[-] xthexder@l.sw0.com 1 points 6 hours ago* (last edited 6 hours ago)

After a little more thinking about the problem you're trying to solve, an op-amp voltage buffer with an off the shelf DC-DC converter for the high voltage rail might be the simplest overall circuit. Unfortunately the ATtiny you're using doesn't have a digital to analog (DAC) output, so it's hard to set the voltage reference with that setup. You could probably rig up something with a PWM channel and a capacitor on the output, and adjust the gain on the op-amp feedback so you can reach the max output voltage you want (6V ?)

Unless of course the goal is actually to learn how to build your own variable output buck-boost converter, in which case, all the power to you!

Edit: I just realized 25W/6V means you'd be delivering over 4 amps... Those would not be very cheap op-amps. Have you measured the actual load you're driving? This could end up very similar to a 25w class D audio amplifier circuit depending on your load impedance.

[-] Machinist@lemmy.world 1 points 2 hours ago

I'm looking at the FAN3224, a gate driver capable of several amps at 5V to run my MOSFETs. I'll probably play with direct driving them with the ATtiny at first just to familliarize myself.

The original circuit is running some sort of bridge configuration. I've used a 1.6ohm load for years, with wattage set to 14.5 or 14.8. However, the orignal is capable 25w in the lowest output version. I'm not sure what resistance range it's capable of pushing that 25w.

And, yes, the goal is to build a variable DC supply. I'm finding it really interesting. I'm looking at the synchronus inverting buckboost. I think my final version would use half the components of the original.

If I understand this stuff correctly, (real big if), with the convertor pushing negative voltage, I sidestep high side drive problems. My load is dumb resistance so it doesn't matter how noisy or negative its power is.

So the ATtiny has an ADC capabale of running in windowed mode. A lot of the peripherals are able to run independently of the CPU, you can link them up with onboard programable logic called CLC. So, using logic I can tie the ADC to my PWM at pretty fast speeds. It also has a selection of internal voltage references. I'm planning to use some sort of voltage divider for feedback to the ADC, using the logic to vary my duty cycle when the voltage goes out of bounds.

Before I get that far out in the weeds, I need to play with mosfets, pwm, an inductor, and my new scope.

this post was submitted on 10 Jul 2026
23 points (100.0% liked)

Ask Electronics

4191 readers
45 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 3 years ago
MODERATORS