Looking for a MOSFET to use with ATTiny running on 3V (2xAAA)

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hi everyone,

I am looking for a MOSFET transistor to use in my circuit and after much experimentation and failure I thought I would ask here.

I am using an ATTiny85 (with a max output from its signal pins of 40mA) powered with 2xAAA batteries to change the speed of a motor using PWM, so the max power to the MOSFET will be 3V from my 2xAAA batteries. The motors I am powering are rated at 1.5 - 3V with a max of 250 - 460mA @ 3V. There is a 0.1uF capacitor across the motor terminals and also at the power source.

I tried using a 2N7000 - however, it seemed to act quite erratically (it seemed like the ATTiny kept resetting) and when working, the motor was very very weak and kept stalling.
I also tried using a 7030BL which was more stable and gave a slightly higher power to the motor than the 2N7000, but was still not close to the strength the motor can get to when you just apply the 3V from the batteries directly.

So I was wondering if anyone would be able to suggest some more transistors to try. I am looking if possible for a TO-92 package, or if this fails a SMD option. The main thing is that the motor is as efficient and strong as possible, without draining too much current from the ATTiny (I believe that this might have been the issue I describe above but not sure)

I believe I want a MOSFET where the Rds(on) is rated at a Vgs of 3V or less, but beyond this I am really struggling with all of the variables of the MOSFET when I look at data sheets.. any explanation or further links would be really useful, I am trying but still struggling!

Thanks so much

A
 
Hello,

Posting a schematic will always be a good plus in order to help you. If you're using PWM, what was your duty cycle when trying with the 2N7000?

EDIT:

Be aware that 2N7000 is rated at 200mA max, while your motor is 250-460mA max.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hello,

Posting a schematic will always be a good plus in order to help you. If you're using PWM, what was your duty cycle when trying with the 2N7000?

EDIT:

Be aware that 2N7000 is rated at 200mA max, while your motor is 250-460mA max.
Thank you. Here's a small fritzing to give an idea (for both the MOSFETS I tried, as the G/D/S is reversed on the smaller FET). I tried it with a 50% and 100% duty cycle (so analogWrite 127 and 255) - I could tell a difference between the motor strength, but as I said it was maybe 1/2 weaker overall than what I expected.

Do you think it is possible to find what I need in a through-hole package?
Thankyou!
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
The datasheet for a 2N7000 shows that some of them conduct only 1mA when your 3V batteries are brand new. Your 3V batteries will drop to 2V then no 2N7000 will do anything. Use a Mosfet that works from 2V instead.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
I can potentially see two points in your schematics:

1- You have source and drain pins reversed. (in the 2N7000 one)
2- You lack a freewheeling diode (both schematics)

Look at the attachment
In the 2N7000, I checked the datasheet and it suggests that the order is 1. drain 2. gate and 3. source - the other MOSFET was GDS which is what I am used to -- or am I reading the datasheet wrong?! I did think it was a bit odd...

Will try the diode, and see if it helps at all. Just interested, what will the diode do exactly?

Thank you
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hello,

Posting a schematic will always be a good plus in order to help you. If you're using PWM, what was your duty cycle when trying with the 2N7000?

EDIT:

Be aware that 2N7000 is rated at 200mA max, while your motor is 250-460mA max.
I've just found a BS170 which is the same as 2N7000 but can switch 500 mA and it has the same issue as the 2N7000!
 
In the 2N7000, I checked the datasheet and it suggests that the order is 1. drain 2. gate and 3. source - the other MOSFET was GDS which is what I am used to -- or am I reading the datasheet wrong?! I did think it was a bit odd...

Will try the diode, and see if it helps at all. Just interested, what will the diode do exactly?

Thank you


The flyback diode will safely deal with the inductive kickback. You motor is an inductive load.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
The flyback diode will safely deal with the inductive kickback. You motor is an inductive load.
I am going to try with the BS170 I have as it is rated at 500mA as opposed to 200mA and strangely the order is reversed, which means my original diagram is correct I think, but will try with the diode shortly. Thanks
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
You did not read the datasheets!
Both the 2N7000 and the BS170 need a gate-source voltage of 10V to fully turn on. Some of them conduct only 1mA when the battery is brand new at 3V and conduct nothing when the battery is used a little.
You need a Mosfet that conducts a minimum of all the motor current when the gate-source voltage is only 2V from a low battery voltage.
 

ebp

Joined Feb 8, 2018
2,332
If you need through-hole, you may have little choice but to use a FET with much higher rating than you require. There aren't many choices in the TO-92 package. The next most-popular package is the TO-220, which is much larger (and you need to twist each pin a quarter of a turn so it will plug into a breadboard easily). What you will find are many that will be adequately turned on for a few amperes of drain current with 3 volts gate to source. There are some in 4-pin DIP packages and the TO-251AA, which is not too big, but they are mostly quite old designs that are kind of marginal for what you need. Unfortunately, the newer parts with really desirable spec's, like those Bertus recommended, are invariably in surface mount packages only, until you get up to quite high power rating.

Another drawback to the larger FETs is that the total gate charge for "full" turn-on is usually much higher, which means slower switching transitions with limited gate drive, but at low switching frequency this isn't a big problem in most cases.

The diode, which is often called a "freewheeling" diode is there to discharge the energy stored in the inductance of the motor when the FET turns off. Without the diode, that stored energy can raise the voltage at the drain of the FET to many tens and even to hundreds of volts, depending on how fast the FET turns off and various capacitances in the circuit. If there is enough energy involved it can destroy the FET. There are other ways to deal with that stored energy, but putting the diode across the motor actually allows that stored energy to be used by the motor whereas most of the other methods just waste the energy. A 1N4148 or similar diode is OK for motor current up to about half an ampere. Above that, a UF4001 (or other from that series) is a good choice. You can use a 1N4001, but it will allow a current spike though itself each time the FET turns on. Again, at low frequency this isn't a big deal, though it does contribute to radio frequency interference (RFI).

If the connections to the motor are long, twist the wires together to minimize "loop area" which helps with RFI and reduces unwanted inductance.
 
Last edited:

Thread Starter

awwwt

Joined Aug 24, 2015
60
You did not read the datasheets!
Both the 2N7000 and the BS170 need a gate-source voltage of 10V to fully turn on. Some of them conduct only 1mA when the battery is brand new at 3V and conduct nothing when the battery is used a little.
You need a Mosfet that conducts a minimum of all the motor current when the gate-source voltage is only 2V from a low battery voltage.
Honestly I've tried to read the datasheet but am still really uncertain on what the variables actually mean, or if they are correct for my purpose. But thankyou for your advice :) this is very useful! When you say a MOSFET that conducts a min of all the motor current when the gate-source voltage is 2V, how is this reflected in a datasheet?

If I check DigiKey for example what are the filters I need to be looking at to ensure I make the right pick?

Thankyou
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
If you need through-hole, you may have little choice but to use a FET with much higher rating than you require. There aren't many choices in the TO-92 package. The next most-popular package is the TO-220, which is much larger (and you need to twist each pin a quarter of a turn so it will plug into a breadboard easily). What you will find are many that will be adequately turned on for a few amperes of drain current with 3 volts gate to source. There are some in 4-pin DIP packages and the TO-251AA, which is not too big, but they are mostly quite old designs that are kind of marginal for what you need. Unfortunately, the newer parts with really desirable spec's, like those Bertus recommended, are invariably in surface mount packages only until you get up to quite high power rating.

Another drawback to the larger FETs is that the total gate charge for "full" turn-on is usually much higher, which means slower switching transitions with limited gate drive, but a low switching frequency this isn't a big problem in most cases.

The diode, which is often called a "freewheeling" diode is there to discharge the energy stored in the inductance of the motor when the FET turns off. Without the diode, that stored energy can raise the voltage at the drain of the FET to many tens and even to hundreds of volts, depending on how fast the FET turns off and various capacitances in the circuit. If there is enough energy involved it can destroy the FET. There are other ways to deal with that stored energy, but putting the diode across the motor actually allows that stored energy to be used by the motor whereas most of the other methods just waste the energy. A 1N4148 or similar diode is OK for motor current up to about half an ampere. Above that, a UF4001 (or other from that series) is a good choice. You can use a 1N4001, but it will allow a current spike though itself each time the FET turns on. Again, at low frequency this isn't a big deal, though it does contribute to radio frequency interference (RFI).

If the connections to the motor are long, twist the wires together to minimize "loop area" which helps with RFI and reduces unwanted inductance.
Thankyou SO much for this answer. It is so concise and insightful and makes me feel excited to keep going with the project. Much appreciated!
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
You did not read the datasheets!
Both the 2N7000 and the BS170 need a gate-source voltage of 10V to fully turn on. Some of them conduct only 1mA when the battery is brand new at 3V and conduct nothing when the battery is used a little.
You need a Mosfet that conducts a minimum of all the motor current when the gate-source voltage is only 2V from a low battery voltage.
Also I was wondering, why do so many online tutorials and sources suggest the 2N7000 transistor for use with an Arduino which can only output up to 5 volts when it needs 10? Very strange...
 

ebp

Joined Feb 8, 2018
2,332
Power MOSFETs are pretty complex critters and it does take some time to get your mind around all the spec's in datasheets. If you look around the web you will find some good introductions. Check ap notes from companies like ON Semiconductor, NXP and Infineon.

Have a look at the thread in the link. I explain a bit about gate threshold voltage and transconductance and ebeowulf17 filled in some things I forgot to mention.
https://forum.allaboutcircuits.com/posts/1303351/
The main parameters of interest are voltage rating, current rating or ON resistance, and gate theshold voltage. As I explain in the linked thread the gate threshold voltage is what is required to just barely begin to turn the FET on, so it really doesn't tell the whole story, but you definitely need something well under 3 volts.

As for the 2N7000, it's a pretty ancient design, as power MOSFETs go. It is quite cheap and easy to get and is in a convenient package for breadboarding. It is well suited for some things, but pretty limited. With 5 volts gate to source it is typically (not guaranteed) adequately driven for its maximum rated continuous current of 200 mA. If you want to use it at higher current, which is allowable with proper restrictions (ON time and duty cycle) you need high Vgs. See figures 1 and 2 of the ON datasheet https://www.onsemi.com/pub/Collateral/2N7000-D.PDF
I suspect it just keeps getting suggested because people look at what others have used and go with that. I see the IRF540 suggested for all sorts of things. It's not terrible, but kind of a study in mediocrity by today's standards. I have no idea how it became so popular.
 

Audioguru

Joined Dec 20, 2007
11,248
The Gate Threshold Voltage is the minimum Vgs that causes the Mosfet to turn on and conduct only 0.25mA or 1mA. For the 2N7000 it is a maximum of 3V for 1mA. You want a very low threshold voltage so that the Mosfet conducts hundreds of mA into your motor when the battery voltage is low.
The Static Drain-Source On-Resistance is the maximum resistance at a standard Vgs of 4.5V or 10V. Most Mosfets are spec'd with a Vgs of 10V and "Logic Level" Mosfets are spec'd at a Vgs of 4.5V.
Maybe nobody makes a Mosfet with low Vgs spec's like you want.
 
Top