Pages: [1] 2   Go Down
Author Topic: 100 milliamp coil current...transistor or MOSFET?  (Read 1790 times)
0 Members and 1 Guest are viewing this topic.
British Columbia
Offline Offline
Newbie
*
Karma: 1
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey I have read that if your coil current is 100 milliamps or above one should use a mosfet instead of a transistor.
 
coil resistance = 50 ohms
5vdc coil

My problem is that I have not yet found a definitive answer.

When using the mosfet (if it is needed) do I remove the 10K ohm resistor to the arduino pin?

Thanks for the help!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, a mosfet is a type of transistor.
For 100mA, a simple 2N2222A transistor will do. That is not much current, but it is more than an Arduino pin can handle.
You will need a resistor between arduino pin and transistor base pin, say 270 ohm to limit arduino current to ~15mA.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

British Columbia
Offline Offline
Newbie
*
Karma: 1
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I have it set up with a 10K resistor between the arduino pin and base of the transistor, I found this setup in a "spark fun" book.

Is that too big then?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

10K is too high for reliable operation if you are switching 100mA. Use a value in the range 220 ohms to 1K.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5744
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey I have read that if your coil current is 100 milliamps or above one should use a mosfet instead of a transistor.

FIrst of all, a MOSFET is a transistor... maybe you mean a BJT.

Most BJTs can do way more than 100ma, even the small ones. They also make big ones with heatsinks for bigger jobs, although if you want to switch 10 amps a MOSFET is probably less trouble.

MOSFETs and old-fashioned BJT transistors have different characteristics. You should choose a type based on what you're actually doing.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1405
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike

Have you been at the Christmas tipple ?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34725
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes.  smiley-cool

OK to actually answer the question, I would say the dividing line is about 400 to 500mA when switching over to a FET, but it isnot hard and fast.
« Last Edit: December 20, 2012, 05:16:34 am by Grumpy_Mike » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK to actually answer the question, I would say the dividing line is about 400 to 500mA when switching over to a FET, but it isnot hard and fast.

That's also the figure I use, when using breadboard or stripboard. For PCB designs I use mosfets below 400mA too - there are lots of inexpensive medium-current mosfets that are only available in SMD packages.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
transistor or MOSFET?

You can make either work, at any current levels, but particularly yours.
Logged

British Columbia
Offline Offline
Newbie
*
Karma: 1
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thank you for the input.

I should have stated a small transistor (2pn2222) vs. mosfet.

The relays can handle up to 10amps but I am only going to draw <1 amp.

So I will use the small transistor and use a smaller resistor between the middle pin and the arduino pin lets say 300 Ohms?

Thanks again !

Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 569
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll probably want to also remember to add a diode to protect against induced voltage in the relay coil when the field collapses at switch off.
Logged

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 819
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey I have read that if your coil current is 100 milliamps or above one should use a mosfet instead of a transistor.
 
coil resistance = 50 ohms
5vdc coil

My problem is that I have not yet found a definitive answer.

When using the mosfet (if it is needed) do I remove the 10K ohm resistor to the arduino pin?

Thanks for the help!

MOSFET. No resistor between the gate and the Arduino pin. A snubber diode across the relay coil (hefty one like a 1N4001).
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 819
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thank you for the input.

I should have stated a small transistor (2pn2222) vs. mosfet.

The relays can handle up to 10amps but I am only going to draw <1 amp.

So I will use the small transistor and use a smaller resistor between the middle pin and the arduino pin lets say 300 Ohms?

Thanks again !



IF you are going to use  a BJT, you size the resistor to (a) limit the current supplied by the Arduino pin and (2) make the current high enough to saturate the transistor.

So, pick a value like 20 milliamps. Safe for the Arduino, and the relay draws 100 milliamps, you need a current gain (beta) of 100/20 or 5.

The 2N2222 current gain is shown as a minimum of 100 at 150 mA Ic, so now we see that 20 milliamps is way more than enough... let's drop Ib down to 10 mA.

So, 5 volts - 0.7 for the base-emitter drop is 4.3 volts. R = 4.3 / 0.010 = 430 ohms. Either 390 or 470 are close, standard values and either one will work.

This is how you figure out the proper base resistor... "dartboard engineering" - saying "well about xxx ohms" is not the way to do it!  smiley

Remember, if you use a DARLINGTON BJT, then you have two base-emitter drops, so you calculate with 5 - 1.4, not 5 - 0.7
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Disagree about not having a gate resistor.
MOSFETs can have fairly significant input capacitance.
When arduino pin changes state, the capacitance looks like a dead short.
The resistance limits the arduino current until the cap changes state.
5V/35mA = 143 ohm, so 150 ohm resistor would be good choice to use.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 3
Posts: 263
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why dose every one think that a Atmega 328p can source and sink 40 mA the datasheet said that's not going to happen the chips VCC and Gnd pins can only source and sink 200 mA now there 23 I/O on that chip do the math 23 times 40

That's almost a 1Amp   Now you can sink or source 40 mA on 4 pins max if you go over that your over the max spec for that chip. One pin may even handle 80mA for a short time depending on how big the power bus is in the chip but I wouldn't use that chip for anything that you want to work day to day.

If you want to drive a 2n2222 or a 2n7000 use a resistor  that limits the pin output to 10mA.

Why it's 40mA a pin if that was true the VCC would need more pins and so would the gnd and the max would not be
Quote
DC Current VCC and GND Pins................................ 200.0 mA
And the first time you drive 320mA out a port see how long you chip can handle that before it shuts down.

This is the Absolute Maximum on a pin that's doesn't mean all 23 can be at that level and is a bad idea to get to thinking you can
Quote
DC Current per I/O Pin ............................................... 40.0 mA

There even internal resistance that would limit the output of the pin but to use this is not a good idea for any one that just got started using the Arduino.
But that a whole new story. 
« Last Edit: December 20, 2012, 11:07:30 pm by be80be » Logged

Pages: [1] 2   Go Up
Jump to: