Difference between revisions of "Talk:Relays"

From OpenCircuits
Jump to navigation Jump to search
(Reverted to Revision as of 17:05, 24 September 2007 by DavidCary)
Line 1: Line 1:
I really find this site very interesting, and it gives people a pleasure time!
+
== that resistor shouldn't be 10k ==
I really appreciate the creators of this website!
 
  
[http://index82both.edublogs.org/ granny tgp free] |
+
my argument:
[http://www.guestbook.at/gb/gast/index.php?buchid=slowed6 exploited asians thumbs] |
 
[http://www.guestbook.at/gb/gast/index.php?buchid=shills09 asian american girls nude] |
 
[http://invaluableb.www2.prexon.nl/ amature granny]
 
  
IzV2Sf0 <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/live-sex-web-camcom.html">live sex web camcom</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/live-sex-web-camcom.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/live-web-cam-now.html">live web cam now</a> http://www.ymcaqyp.org/media/.xml.php?30/live-web-cam-now.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/live-sex-cam-list.html">live sex cam list</a>  http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/live-sex-cam-list.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/porn-cam.html">porn cam</a>  http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/porn-cam.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/free-web-cam-girl.html">free web cam girl</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/free-web-cam-girl.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/sex-cam-girls.html">sex cam girls</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/sex-cam-girls.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/women-web-cam.html">women web cam</a> http://www.ymcaqyp.org/media/.xml.php?30/women-web-cam.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/sex-cam-live-feeds.html">sex cam live feeds</a>  http://www.ymcaqyp.org/media/.xml.php?30/sex-cam-live-feeds.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/spy-beach-cam.html">spy beach cam</a> http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/spy-beach-cam.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/pussy-cams.html">pussy cams</a>  http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/pussy-cams.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/nude-live-sex-cam.html">nude live sex cam</a> http://www.ymcaqyp.org/media/.xml.php?30/nude-live-sex-cam.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/cam-chat-live-sexy-web.html">cam chat live sexy web</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/cam-chat-live-sexy-web.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/college-dorm-web-cam.html">college dorm web cam</a>  http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/college-dorm-web-cam.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/live-sexy-web-cam.html">live sexy web cam</a> http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/live-sexy-web-cam.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/cam-live-sex-tv.html">cam live sex tv</a>  http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/cam-live-sex-tv.html <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/beach-web-cams.html">beach web cams</a> http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/beach-web-cams.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/free-live-sex-cam-chat.html">free live sex cam chat</a> http://www.ymcaqyp.org/media/.xml.php?30/free-live-sex-cam-chat.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/free-live-gay-sex-cams.html">free live gay sex cams</a> http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/free-live-gay-sex-cams.html <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/nude-web-cam-chat.html">nude web cam chat</a>  http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/nude-web-cam-chat.html  <a href="http://www.ymcaqyp.org/media/.xml.php?30/webcam-live-free-sex-cam.html">webcam live free sex cam</a> http://www.ymcaqyp.org/media/.xml.php?30/webcam-live-free-sex-cam.html  <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/free-sex-live-webcams.html">free sex live webcams</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/free-sex-live-webcams.html <a href="http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/adult-cam-live-sex.html">adult cam live sex</a> http://www.sscnet.ucla.edu/nrotc/pictures/tmp/?30/adult-cam-live-sex.html <a href="http://www.ymcaqyp.org/media/.xml.php?30/amateur-sex-cam.html">amateur sex cam</a>  http://www.ymcaqyp.org/media/.xml.php?30/amateur-sex-cam.html  <a href="http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/asian-cam-live-sex-web.html">asian cam live sex web</a>  http://geekz.co.uk/blog/wp-content/uploads/2007/02/?30/asian-cam-live-sex-web.html
+
Um, assuming that somebody just threw in 10k and didn't bother to calculate what the value should be, then it's misleading at best (ie, always use 10k) and won't work at worst (I realize that 10k might be the correct value for some choices of transistor, relay and microcontroller)This isn't just a pull-up or pull-down resistorIt matters what current is going through it, because the same current ends up going through the base of the transistor.
 +
 
 +
the fix:
 +
 
 +
It'd be great if the original author of the jpeg would modify it to just say R and then we could put the formula for figuring out what it should be in there.
 +
 
 +
And then we could add the following text, although it sort of belongs in a transistor section or page:
 +
 
 +
----
 +
 
 +
If you have a microcontroller and you want to have it control an NPN transistor, you need to have a resistor in series with the base of the transistor.
 +
This is to get the voltage from the microcontroller's output level down to what the transistor wants (about 0.6V).
 +
Another way of thinking of it is to get the current through the resistor (and hence through the base) correct.
 +
 
 +
In the following description, <math>V_{microcontroller}</math> is the driving voltage from your microcontroller's output (for example, 3.3V), <math>V_{base}</math> is the voltage the transistor wants across the base-emitter (usually about 0.6V), <math>I_{relay}</math> is the current the relay needs running through it to be turned on (for example, 100mA), and <math>h_{fe}</math> is the current gain of the transistor (usually about a factor of 100, so if you have 1mA going through the base of the transistor, you can get up to 100 times that, or 100mA through the emitter/collector).
 +
 
 +
You need to drop a voltage <math>(V_{microcontroller}-V_{base})</math> across the resistor, and if your relay needs a current <math>I_{relay}</math> to switch, then your base-emitter current <math>I_{base}</math> should be <math>I_{base} = {{2I_{relay}}\over{h_{fe}}}</math> (with the factor of 2 as a safety margin, remember the emitter-collector current can only be up to <math>h_{fe}</math> times the base-emitter current and we don't want to design it to be on the edge of just barely working).
 +
We have a voltage and a current, so we use Ohm's law to get the resistance:  <math>V_{resistor}=I_{resistor}R</math>, which we rewrite as <math>R={{V_{resistor}}\over{I_{resistor}}}</math> and then get <math>R={{h_{fe}(V_{microcontroller}-V_{base})}\over{2I_{relay}}}</math>.
 +
So, punch your components' values in to that formula and you'll get the resistor value to use.
 +
 
 +
Example: Using the common values stated earlier, we get <math>R={{100(3.3V-0.6V)}\over{2(100mA)}}=1350\Omega</math>.
 +
 
 +
----
 +
 
 +
well, the <math> latex markup syntax seems not to to be working for me...  Could someone enable that featureThe same markup works at my wikipedia sandbox:  http://en.wikipedia.org/wiki/User:Mzandrew/Sandbox
 +
 
 +
Using 10k makes the current too small, so the relay might not be driven or not driven reliably.
 +
 
 +
The diode is a nice touch though.
 +
 
 +
[[User:Mzandrew|Mzandrew]] 14:05, 2 September 2007 (PDT)

Revision as of 14:31, 29 December 2007

that resistor shouldn't be 10k

my argument:

Um, assuming that somebody just threw in 10k and didn't bother to calculate what the value should be, then it's misleading at best (ie, always use 10k) and won't work at worst (I realize that 10k might be the correct value for some choices of transistor, relay and microcontroller). This isn't just a pull-up or pull-down resistor. It matters what current is going through it, because the same current ends up going through the base of the transistor.

the fix:

It'd be great if the original author of the jpeg would modify it to just say R and then we could put the formula for figuring out what it should be in there.

And then we could add the following text, although it sort of belongs in a transistor section or page:


If you have a microcontroller and you want to have it control an NPN transistor, you need to have a resistor in series with the base of the transistor. This is to get the voltage from the microcontroller's output level down to what the transistor wants (about 0.6V). Another way of thinking of it is to get the current through the resistor (and hence through the base) correct.

In the following description, <math>V_{microcontroller}</math> is the driving voltage from your microcontroller's output (for example, 3.3V), <math>V_{base}</math> is the voltage the transistor wants across the base-emitter (usually about 0.6V), <math>I_{relay}</math> is the current the relay needs running through it to be turned on (for example, 100mA), and <math>h_{fe}</math> is the current gain of the transistor (usually about a factor of 100, so if you have 1mA going through the base of the transistor, you can get up to 100 times that, or 100mA through the emitter/collector).

You need to drop a voltage <math>(V_{microcontroller}-V_{base})</math> across the resistor, and if your relay needs a current <math>I_{relay}</math> to switch, then your base-emitter current <math>I_{base}</math> should be <math>I_{base} = {{2I_{relay}}\over{h_{fe}}}</math> (with the factor of 2 as a safety margin, remember the emitter-collector current can only be up to <math>h_{fe}</math> times the base-emitter current and we don't want to design it to be on the edge of just barely working). We have a voltage and a current, so we use Ohm's law to get the resistance: <math>V_{resistor}=I_{resistor}R</math>, which we rewrite as <math>R={{V_{resistor}}\over{I_{resistor}}}</math> and then get <math>R={{h_{fe}(V_{microcontroller}-V_{base})}\over{2I_{relay}}}</math>. So, punch your components' values in to that formula and you'll get the resistor value to use.

Example: Using the common values stated earlier, we get <math>R={{100(3.3V-0.6V)}\over{2(100mA)}}=1350\Omega</math>.


well, the <math> latex markup syntax seems not to to be working for me... Could someone enable that feature? The same markup works at my wikipedia sandbox: http://en.wikipedia.org/wiki/User:Mzandrew/Sandbox

Using 10k makes the current too small, so the relay might not be driven or not driven reliably.

The diode is a nice touch though.

Mzandrew 14:05, 2 September 2007 (PDT)