Electronics repairs made for people on craigslist, as well as myself and friends and family.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

811 lines
66 KiB

6 years ago
  1. <html>
  2. <head>
  3. <link rel="canonical" href="https://www.EmbeddedRelated.com/showarticle/98.php"/>
  4. <link rel="shortcut icon" href="https://www.embeddedrelated.com/new2/favicon.ico" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Which MOSFET topology? - Jason Sachs</title>
  7. <meta name="description" content="A recent electronics.StackExchange question brings up a good topic for discussion. Let's say you have a power supply and a 2-wire load you want to be able to switch on and off from the power supply using a MOSFET. How do you choose which circuit...">
  8. <meta name="twitter:card" content="summary" />
  9. <meta name="twitter:site" content="@EmbeddedRelated" />
  10. <meta name="twitter:creator" content="@jms_embedded" />
  11. <link href='https://fonts.googleapis.com/css?family=Roboto:400,300italic,700,400italic,500,500italic,700italic,900' rel='stylesheet' type='text/css'>
  12. <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400' rel='stylesheet' type='text/css'>
  13. <link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700' rel='stylesheet' type='text/css'>
  14. <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700' rel='stylesheet' type='text/css'>
  15. <!--<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">-->
  16. <link rel="StyleSheet" type="text/css" href="/new2/css/style.php5">
  17. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  18. <script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
  19. <script src="https://www.embeddedrelated.com/new2/js/jquery.placeholder.min.js"></script>
  20. <script src="https://use.fontawesome.com/b6039e963b.js"></script>
  21. <!-- http://mycodde.blogspot.ca/2014/12/multiple-recaptcha-demo-same-page.html -->
  22. <script src="https://www.google.com/recaptcha/api.js?onload=myCallBack&render=explicit" async defer></script>
  23. <script>
  24. var recaptcha1;
  25. var recaptcha2;
  26. // do your stuff
  27. var myCallBack = function() {
  28. //Render the recaptcha1 on the element with ID "recaptcha1"
  29. if ($('#recaptcha1').length) {
  30. recaptcha1 = grecaptcha.render('recaptcha1', {
  31. 'sitekey' : '6LcoKR4TAAAAABOTOWiDACvcvs270jKtYqjcMcdr', //Replace this with your Site key
  32. 'theme' : 'light'
  33. });
  34. }
  35. //Render the recaptcha2 on the element with ID "recaptcha2"
  36. if ($('#recaptcha2').length) {
  37. recaptcha2 = grecaptcha.render('recaptcha2', {
  38. 'sitekey' : '6LcoKR4TAAAAABOTOWiDACvcvs270jKtYqjcMcdr', //Replace this with your Site key
  39. 'theme' : 'light'
  40. });
  41. }
  42. };
  43. </script><link rel="StyleSheet" type="text/css" href="https://www.embeddedrelated.com/new2/css/modal_login.css">
  44. <script type="text/javascript" src="https://www.embeddedrelated.com/new2/js/jquery.leanModal.min.js"></script>
  45. <link rel="stylesheet" href="https://www.embeddedrelated.com/new2/css/highlight/github.css">
  46. <script src="https://www.embeddedrelated.com/new2/js/highlight_9_4.pack.js"></script>
  47. <script>
  48. $(document).ready(function() {
  49. $('pre').each(function(i, block) {
  50. hljs.highlightBlock(block);
  51. });
  52. });
  53. </script>
  54. <script type="text/x-mathjax-config">
  55. MathJax.Hub.Config({
  56. tex2jax: {
  57. inlineMath: [ ['$','$'], ["\\(","\\)"] ],
  58. processEscapes: true
  59. },
  60. });
  61. </script>
  62. <script type="text/javascript"
  63. src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML">
  64. </script>
  65. <!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>-->
  66. <script type="text/javascript" src="/new2/Commax/assets/js/commax_engine.js"></script>
  67. <link rel="stylesheet" type="text/css" href="https://www.embeddedrelated.com/new2/Commax/assets/css/skin1.css" />
  68. <script src="https://www.embeddedrelated.com/new2/js/deleteblog.js" type="text/javascript"></script>
  69. <script src="https://www.embeddedrelated.com/new2/js/rewards.js"></script>
  70. <script src="https://www.embeddedrelated.com/new2/js/sweetalert.min.js"></script>
  71. <link rel="stylesheet" type="text/css" href="https://www.embeddedrelated.com/new2/css/sweetalert.css">
  72. <link rel="StyleSheet" type="text/css" href="https://www.embeddedrelated.com/new2/css/modal_login.css">
  73. <script type="text/javascript" src="https://www.embeddedrelated.com/new2/js/jquery.leanModal.min.js"></script>
  74. <script src="https://www.embeddedrelated.com/new2/js/comments.js"></script>
  75. <script src="https://www.embeddedrelated.com/new2/js/jquery.easytabs.min.js" type="text/javascript"></script>
  76. <script type="text/javascript">
  77. $(document).ready( function() {
  78. $('#tab-container').easytabs();
  79. });
  80. </script>
  81. <link rel="stylesheet" href="https://www.embeddedrelated.com/new2/js/redactor/redactor.css">
  82. <script src="https://www.embeddedrelated.com/new2/js/redactor/table.js"></script>
  83. <script src="https://www.embeddedrelated.com/new2/js/redactor/redactor.js"></script>
  84. <!--<script language="JavaScript" type="text/JavaScript">
  85. document.write('<iframe src="/new2/loghits_blogs.php?section=blogs&id=278&ip=212.24.106.241&bloggerid=88624" style="visibility:hidden" width="1" height="1" frameborder="0"></iframe>');
  86. </script>-->
  87. </head>
  88. <body>
  89. <script>
  90. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  91. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  92. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  93. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  94. ga('create', 'UA-1774944-2', 'auto');
  95. ga('send', 'pageview');
  96. </script>
  97. <div id="menutabs" class="container">
  98. <a href="//www.embeddedrelated.com"><img class="bigtab" src="https://d23s79tivgl8me.cloudfront.net/new2/images/EmbeddedRelated_bigtab.png" border="0" alt=""></a>
  99. <a href="//www.fpgarelated.com"><img class="smalltab" src="https://d23s79tivgl8me.cloudfront.net/new2/images/FPGARelated_smalltab.png" border="0" alt=""></a>
  100. <a href="//www.dsprelated.com"><img class="smalltab" src="https://d23s79tivgl8me.cloudfront.net/new2/images/DSPRelated_smalltab.png" border="0" alt=""></a>
  101. <a href="//www.electronics-related.com"><img class="smalltab" src="https://d23s79tivgl8me.cloudfront.net/new2/images/Electronics-Related_smalltab.png" border="0" alt=""></a><!--<img src="//www.embeddedrelated.com/new2/images/forengineers.png" alt="" style="margin-left: 40px;">-->
  102. </div>
  103. <div id="horizontalmenu2"><div class="container">
  104. <ul>
  105. <li ><a href="/" title="EmbeddedRelated.com | Embedded Systems" >Home</a></li><li class="active"><a href="/blogs.php" title="Embedded Systems Blogs" class="active">Blogs</a><ul>
  106. <li><a href="/blogs.php#tabs1-site">From the Editor</a></li>
  107. <li><a href="/blogs.php">Recent Posts</a></li>
  108. <li><a href="/blogs.php#tabs1-popular">Popular (this month)</a></li>
  109. <li><a href="/blogs.php#tabs1-popularat">Popular (all time)</a></li>
  110. </ul></li><li ><a href="/tweets.php" title="Embedded Systems Tweets" ><i class="fa fa-twitter fa-lg"></i> Tweets</a><ul>
  111. <li><a href="/tweets.php">All Popular Tweets</a></li>
  112. <li><a href="/tweets.php#tabs1-vendors">Vendors Only</a></li>
  113. <li><a href="/tweets.php#tabs1-iot">#IoT</a></li>
  114. </ul></li><li ><a href="/forums" title="Embedded Systems Forums and Discussions" >Forums</a></li><li ><a href="/jobs" title="Embedded Systems Jobs" >Jobs</a></li><li ><a href="/Internet-of-Things.php" title="Internet of Things" >#IoT</a></li><li ><a href="/tutorials.php" title="Embedded Systems Tutorials" >Tutorials</a></li><li ><a href="/books.php" title="Embedded Systems Books" >Books</a></li><li ><a href="/documents.php" title="Embedded Systems Free PDFs" >Free PDFs</a></li><li ><a href="/vendors" title="Embedded Systems Vendors" >Vendors</a></li><li ><a href="/code.php" title="Embedded Systems Code Snippets" >Code Snippets</a></li></ul>
  115. <div class="socialbox floatright"><a href="https://www.linkedin.com/groups/Embedded-Related-8572356/about"><i class="fa fa-linkedin fa-2x" style="line-height: 34px;"></i></a></div>
  116. <div class="socialbox floatright"><a href="https://www.facebook.com/embeddedrelated"><i class="fa fa-facebook fa-2x" style="line-height: 34px;"></i></a></div>
  117. <div class="socialbox floatright"><a href="https://twitter.com/embeddedrelated"><i class="fa fa-twitter fa-2x" style="line-height: 34px;"></i></a></div>
  118. <div class="socialbox floatright"><a href="https://www.youtube.com/channel/UCeQLo2DnGk59lYps-8qzy2g"><i class="fa fa-youtube fa-2x" style="line-height: 34px;"></i></a></div>
  119. <div class="socialbox floatright"><a href="/blogs_rss.php"><i class="fa fa-rss fa-2x" style="line-height: 34px;"></i></a></div>
  120. </div>
  121. </div><div class="container" data-sticky_parent>
  122. <div id="mainleft" data-sticky_column>
  123. <!--<img src="/new2/images/728x90.JPG" style="margin-bottom: 10px;">-->
  124. <div id="cookieconsent" style="position: relative; display: none; width: 680px; height: 160px; padding: 20px; border-style: solid; border-width: 1px;"><div id="hide" style="cursor: pointer; position:absolute; bottom: 0; right: 0; background-color: #cccccc; padding-left: 4px; padding-right: 4px; font-size: 0.8rem;">hide</div><h3 style="margin-top:0px; margin-bottom:0px;"><a href="" rel="nofollow" target="_blank">This website uses cookies</a></h3>
  125. <p style="margin-top:5px; margin-bottom:5px;">This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you acknowledge that you have read and understand our <a href="/cookies">Cookie Policy</a>, <a href="/privacy">Privacy Policy</a>, and our <a href="/terms">Terms of Service</a>. Your use of the Related Sites, including DSPRelated.com, FPGARelated.com, EmbeddedRelated.com and Electronics-Related.com, is subject to these policies and terms.</p><button id="consentbutton" class="pure-button button-more-small" style="float: right; margin: 10px 20px 10px 0;">I Understand! </button></div><div style="clear:both;"></div><script>
  126. function setCookie(name,value,days) {
  127. var expires = "";
  128. if (days) {
  129. var date = new Date();
  130. date.setTime(date.getTime() + (days*24*60*60*1000));
  131. expires = "; expires=" + date.toUTCString();
  132. }
  133. document.cookie = name + "=" + (value || "") + expires + "; path=/";
  134. }
  135. $( document ).ready(function() {
  136. $( "#cookieconsent" ).delay(500).slideDown( "slow", function() {
  137. // Animation complete.
  138. });
  139. });
  140. $("#hide").click(function(){
  141. $( "#cookieconsent" ).slideUp( "slow", function() {
  142. // Animation complete.
  143. });
  144. });
  145. $("#consentbutton").unbind("click").click(function(){
  146. setCookie("cookies_enabled", 1, 365);
  147. $( "#cookieconsent" ).slideUp( "slow", function() {
  148. // Animation complete.
  149. });
  150. $.ajax({
  151. type: "POST",
  152. dataType: "json",
  153. url: "/new2/ajax_cookieconsent.php",
  154. })
  155. .done(function( msg ) {
  156. /*alert ( "Thank you for consenting to cookies!" );*/
  157. });
  158. });
  159. </script> <div class="breadcrumbs bigbold"><a href="/"><i class="fa fa-home"></i></a>&nbsp; <i class="fa fa-angle-right fa-lg"></i> &nbsp;<a href="/blogs.php">Blogs</a> &nbsp;<i class="fa fa-angle-right fa-lg"></i>&nbsp; <a href="/blogs-1/nf/Jason_Sachs.php">Jason Sachs</a> &nbsp;<i class="fa fa-angle-right fa-lg"></i></div><h1 class="blogheader" style="margin-bottom: 5px;">Which MOSFET topology?</h1><div class="bloginfo"><a href="/blogs-1/nf/Jason_Sachs.php" class="author">Jason Sachs</a><span class="bullet">&#x25CF;</span><span class="blue">September 1, 2011</span><span class="bullet">&#x25CF;</span><a href="/showarticle/98.php#comments" class="commentscount">9 comments</a><span style="float:right"><a href="https://twitter.com/share" class="twitter-share-button" data-via="EmbeddedRelated" data-size="large">Tweet</a>
  160. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><button class="pure-button button-more-small beerbutton" data-messageid="278" data-username="jms_nh" data-section="blogs" style="float: left; font-size: 0.9rem; padding: 5 8 4 8; margin: 0px 10px 10px 0;"><i class="fa fa-beer"></i> <span class="beerscount278">1</span></button></span></div><div id="navkw"><ul><li><a href="/blogs-1/nf/all/Tutorials.php" class="name">Tutorials</a></li><li><a href="/blogs-1/nf/all/Circuit_Design.php" class="name">Circuit Design</a></li><li><a href="/blogs-1/nf/all/Power_Electronics.php" class="name">Power Electronics</a></li></ul></div><div style="clear:both"></div><div id="blogarticle"><p>A recent <a href="http://electronics.stackexchange.com/questions/18884/switching-dc-with-mosfet-p-channel-or-n-channel-low-side-load-or-high-side-load">electronics.StackExchange question</a> brings up a good topic for discussion. Let's say you have a power supply and a 2-wire load you want to be able to switch on and off from the power supply using a MOSFET. How do you choose which circuit topology to choose? You basically have four options, shown below:</p>
  161. <p><img src="//farm7.static.flickr.com/6185/6104306751_63213247ae.jpg" alt="" width="500" height="264" /></p>
  162. <p>From left to right, these are:</p>
  163. <ol>
  164. <li>High-side switch, N-channel MOSFET</li>
  165. <li>High-side switch, P-channel MOSFET</li>
  166. <li>Low-side switch, N-channel MOSFET</li>
  167. <li>Low-side switch, P-channel MOSFET</li>
  168. </ol>
  169. <p>Basically you can use an N-channel MOSFET or a P-channel MOSFET, and put the switch above the load or vice-versa.</p>
  170. <p>A quick reminder about using MOSFETs: A MOSFET has 3 terminals, gate, drain, and source. I've illustrated drain and source with D and S, respectively; the other terminal is the gate. The MOSFET is controlled by the relative voltage Vgs between its gate terminal and its source terminal.</p>
  171. <p>If Vgs = 0, the MOSFET is off and conducts essentially no current between its drain and source terminals (although there is parasitic leakage, usually specified as a maximum of 1-100uA). For an N-channel MOSFET, the current that flows between drain and source increases rapidly as Vgs increases above its gate-to-source threshold voltage Vgs(th); at some point the current that conducts is determined by the load resistance rather than the MOSFET, in which case the MOSFET behaves like a resistor between drain and source. The resistance depends on Vgs as well, and is specified in the data sheet for particular Vgs levels. Most MOSFETs are specified at either Vgs = 10V (for "regular" MOSFETS) or Vgs = 4.5V (for "logic-level" MOSFETS, so-called because they can be driven by a 5V logic power supply), although nowadays there are an increasing number of low-voltage MOSFETS that have resistance specified at 3.3, 2.5, or even 1.8Vgs.</p>
  172. <p>The voltage between drain and source on an N-channel MOSFET must be positive, otherwise a parasitic body diode between drain and source conducts to keep the drain from being more than a voltage drop below the source.</p>
  173. <p>There are other important parameters of MOSFETs that you need to be know about (parasitic gate-drain and gate-source capacitance), but let's forget those for now.</p>
  174. <p>(A quick recap: Vgs determines the current that can potentially flow from drain to source. If that current can't flow because the load resistance is too high, then the MOSFET acts like a resistor rather than a current sink. There's a body diode that conducts if the drain is pulled below the source terminal)</p>
  175. <p>For P-channel MOSFETs, the polarity is reversed. The source terminal is normally more positive than the drain, and the MOSFET is turned on by negative Vgs.</p>
  176. <p>So back to our four topologies. The most common configurations are probably in this order:</p>
  177. <p>&nbsp; 3. Low-side switch, N-channel MOSFET (easiest/cheapest)<br />&nbsp; 2. High-side switch, P-channel MOSFET<br />&nbsp; 1. High-side switch, N-channel MOSFET<br />&nbsp; 4. Low-side switch, P-channel MOSFET (you essentially never see this)</p>
  178. <p>Why?</p>
  179. <p>Well, let's think about it. MOSFETs are controlled by their gate voltage relative to the source terminal. Of the four topologies, the only one that is relative to circuit ground is the low-side N-channel switch. Driving this circuit is a piece of cake. You generate a voltage source of 0 volts to turn the MOSFET off, and 5 or 10V above ground to turn the MOSFET on. (See my earlier blog post, <a href="http://embeddedrelated.com/showarticle/77.php">Byte and Switch</a>, for some minor gotchas.)</p>
  180. <p>To understand why you would use either topology #2 (high-side P-channel) or #1 (high-side N-channel), there are two very important things to consider:</p>
  181. <h3>Circuit ground</h3>
  182. <p>The word "ground" is often misused in electronics. What it's supposed to mean is a low-resistance connection to a reference voltage. If you have appliances at home with a metal chassis and a 3-prong plug, the chassis is connected to the 3rd prong, and when you plug it into the AC mains, it's connected to a metal post in your home that is sunk into the earth. (In a car, there's not a good conductive path to the earth, but the metal frame of the car is "ground"; in this and other applications that do not have a protective earth connection, the word "ground" is misleading and "return" is a better term.) This is done for two reasons: safety and electromagnetic interference (EMI).</p>
  183. <p>The safety aspect is that the earth's ground potential is generally -- except in weird lightning storms -- a safe voltage, so you can touch a grounded metal chassis with your hand and stand on a floor and not worry about being electrocuted. Whereas if you stand on a floor and you touch an exposed piece of metal that is significantly different from earth ground, you are likely to get hurt. Different standards apply but the generally accepted threshold is in the 50-60V range.</p>
  184. <p>The EMI aspect is that ground is a stable voltage potential, and if an appliance is packaged in a conductive chassis, the chassis acts as a shield to block both outgoing and incoming electromagnetic radiation. If you attach the chassis to another potential that wiggles up and down relative to ground, it acts as an antenna, and can both emit and receive unwanted electromagnetic radiation.</p>
  185. <p>For both these reasons, there are many types of two-terminal electrical loads (pumps, fans, motors, heaters, etc.) where it works very well to connect one of the two terminals to circuit ground. If this is the case, we are forced to use a high-side switch, which rules out topologies #3 and #4.</p>
  186. <p>Otherwise, there is almost no reason not to use the low-side N-channel MOSFET.</p>
  187. <h3>N-channel and P-channel MOSFETs are not created equal</h3>
  188. <p>The general rule of thumb is that for the same price or for a given die area (and price is proportional to the amount of silicon used, so these are well-correlated), you will get worse performance in a P-channel MOSFET than in an N-channel MOSFET. (The charge mobility in N-channel devices is better than P-channel devices; if you want to know more, you should ask someone else who knows more than I do about device physics.) On-resistance is a lot higher in P-channel MOSFETS. Furthermore, manufacturers generally offer more choices in N-channel devices, especially at voltages above 100V.</p>
  189. <p>So, all other things being equal, you should use an N-channel MOSFET, because you have more device choices and higher performance for a given device cost.</p>
  190. <p>So to recap: some applications require high-side switches because one terminal of the load needs to be tied to ground for safety/EMI reasons. And N-channel MOSFETs are cheaper than P-channel MOSFETs for the same performance specs. Got it?</p>
  191. <p>If you need to use a high-side switch, you have a tradeoff to make: do you want the cheaper switch, or do you want the cheaper gate drive?</p>
  192. <p>If you pick topology #1 (high-side N-channel MOSFET), the gate drive circuitry is a little tricky. You need to control Vgs, but the source voltage will get yanked up and down as the switch turns on and off, and when it's on, the gate voltage has to be 5-10V above the supply voltage Vcc. You either need an isolated power supply, or what's called a bootstrap power supply where the switch turning on/off runs a charge pump to transfer charge to a capacitor that rides up and down with the MOSFET source terminal. There are many integrated circuit high-side MOSFET drivers available, and if you're switching on and off rapidly (pulse-width modulation), this can work quite well.</p>
  193. <p>If you pick topology #2 (high-side P-channel MOSFET), the gate drive circuitry is a little easier. To turn the MOSFET off, tie the gate to the supply voltage Vcc. To turn the MOSFET on, pull the gate 5-10V below the supply voltage Vcc. This is still harder to control than the low-side N-channel MOSFET, but it can be done. If the supply voltage is in the 5-15V range, then you can generally find a P-channel MOSFET so that you can just connect the gate voltage to either Vcc (MOSFET off) or circuit ground (MOSFET on).</p>
  194. <p>The last topology, #4 (low-side P-channel MOSFET), uses the lower performance P-channel device and requires a tricky gate drive to be relative to the MOSFET source which varies as the switch turns on and off. You will essentially never see this used in practice -- there's no reason you shouldn't be able to use a low-side N-channel MOSFET instead to get the cost and complexity down.</p>
  195. <p>So if the load doesn't need to be grounded, topology #3 (low-side N-channel) is the clear winner.</p>
  196. <p>Finally, a reminder that we've skipped over an important detail that is missing from all 4 topologies shown. All loads, even a short length of wire, have some amount of inductance. A so-called "resistive" load like a heating element with a few feet of cable can still have a few microhenries of inductance. If you turn off the MOSFET, and you do not provide a path for the inductive current to flow, it will find its own path, by generating enough voltage to bring the MOSFET into breakdown conduction, and dissipate this energy in the MOSFET. Unless the inductance is small, you should use a freewheeling diode in parallel with the load to handle this current:</p>
  197. <p><img src="//farm7.static.flickr.com/6061/6104996200_6c08c8aef4_m.jpg" alt="" width="121" height="240" /></p>
  198. <p>Happy switching!</p><hr><b>Previous post by Jason Sachs:</b><BR>&nbsp;&nbsp;<a href="/showarticle/91.php"><i class="fa fa-hand-o-left"></i> Thermistor signal conditioning: Dos and Don'ts, Tips and Tricks</a><br /><b>Next post by Jason Sachs:</b><BR>&nbsp;&nbsp;<a href="/showarticle/100.php"><i class="fa fa-hand-o-right"></i> Complexity in Consumer Electronics Considered Harmful</a><br /></div><hr>
  199. <div class="breadcrumbs biggerbold">You might also like... (promoted content)</div>
  200. <div style="width:720px; margin: 10px auto;">
  201. <div class="insight_container">
  202. <div class="insight_img"><a href="/showinsight/88/IoT_Invisible_Keys"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/insights/88_200.jpg" width="200" alt=""></a></div>
  203. <div class="insight_text"><a href="/showinsight/88/IoT_Invisible_Keys">Protecting the IoT with Invisible Keys</a></div>
  204. </div>
  205. <div class="insight_container">
  206. <div class="insight_img"><a href="/showinsight/92/MSP430_Launchpad"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/insights/92_200.jpg" width="200" alt=""></a></div>
  207. <div class="insight_text"><a href="/showinsight/92/MSP430_Launchpad">Meet the latest MSP430 LaunchPad development kit</a></div>
  208. </div>
  209. </div>
  210. <div style="clear:both;"></div><hr><!--<img src="/new2/images/728x90.JPG" style="margin-bottom: 10px;">-->
  211. <div id="cookieconsent" style="position: relative; display: none; width: 680px; height: 160px; padding: 20px; border-style: solid; border-width: 1px;"><div id="hide" style="cursor: pointer; position:absolute; bottom: 0; right: 0; background-color: #cccccc; padding-left: 4px; padding-right: 4px; font-size: 0.8rem;">hide</div><h3 style="margin-top:0px; margin-bottom:0px;"><a href="" rel="nofollow" target="_blank">This website uses cookies</a></h3>
  212. <p style="margin-top:5px; margin-bottom:5px;">This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you acknowledge that you have read and understand our <a href="/cookies">Cookie Policy</a>, <a href="/privacy">Privacy Policy</a>, and our <a href="/terms">Terms of Service</a>. Your use of the Related Sites, including DSPRelated.com, FPGARelated.com, EmbeddedRelated.com and Electronics-Related.com, is subject to these policies and terms.</p><button id="consentbutton" class="pure-button button-more-small" style="float: right; margin: 10px 20px 10px 0;">I Understand! </button></div><div style="clear:both;"></div><script>
  213. function setCookie(name,value,days) {
  214. var expires = "";
  215. if (days) {
  216. var date = new Date();
  217. date.setTime(date.getTime() + (days*24*60*60*1000));
  218. expires = "; expires=" + date.toUTCString();
  219. }
  220. document.cookie = name + "=" + (value || "") + expires + "; path=/";
  221. }
  222. $( document ).ready(function() {
  223. $( "#cookieconsent" ).delay(500).slideDown( "slow", function() {
  224. // Animation complete.
  225. });
  226. });
  227. $("#hide").click(function(){
  228. $( "#cookieconsent" ).slideUp( "slow", function() {
  229. // Animation complete.
  230. });
  231. });
  232. $("#consentbutton").unbind("click").click(function(){
  233. setCookie("cookies_enabled", 1, 365);
  234. $( "#cookieconsent" ).slideUp( "slow", function() {
  235. // Animation complete.
  236. });
  237. $.ajax({
  238. type: "POST",
  239. dataType: "json",
  240. url: "/new2/ajax_cookieconsent.php",
  241. })
  242. .done(function( msg ) {
  243. /*alert ( "Thank you for consenting to cookies!" );*/
  244. });
  245. });
  246. </script><h2>Comments:</h2><span class="txtCommentBlogTitle"><a name="comments"></a>
  247. <div id="tab-container" class="tab-container">
  248. <ul class="etabs">
  249. <li class="tab"><a href="#tabs1-comments">Comments</a></li><li class="tab"><a href="#tabs1-newcomment"><i class="fa fa-pencil-square-o"></i> Write a Comment</a></li> <span class="tabhelp"><i class="fa fa-arrow-left"></i> Select to add a comment</span>
  250. </ul>
  251. <div class="panel-container-topborder">
  252. <div id="tabs1-comments"><div id="posts"><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:0; cursor: pointer;" class="toggle toggle1277 " data-toggle="1277">[ - ]</div><div class="replyheader bigbold" style="margin-left: 45px;">Comment by <span class="author">Cross</span><span class="whitebullet">&#x25CF;</span>July 11, 2013</div>
  253. <div id="post1277" class="parent1277 "><div style="margin-left: 0px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1277" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1277">0</span></button></div><div></div></div>
  254. <div class="forumpost forumpost1277" style="margin-left: 65px; ">
  255. <div class="bodyhtml1277" style="display:inline-block; width:100%;">You have answered all my questions/concerns in a well written article. Thank you so much !
  256. </div>
  257. <div style="clear:both;"></div>
  258. <span class="buttons1277"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  259. <div style="clear:both;"></div>
  260. </div>
  261. </div>
  262. <div style="clear:both;"></div><div id="replyform1277" style="margin-left: 65px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:0; cursor: pointer;" class="toggle toggle1278 " data-toggle="1278">[ - ]</div><div class="replyheader bigbold" style="margin-left: 45px;">Comment by <span class="author">vinodkaruvat</span><span class="whitebullet">&#x25CF;</span>March 4, 2014</div>
  263. <div id="post1278" class="parent1278 "><div style="margin-left: 0px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1278" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1278">0</span></button></div><div></div></div>
  264. <div class="forumpost forumpost1278" style="margin-left: 65px; ">
  265. <div class="bodyhtml1278" style="display:inline-block; width:100%;">hello sir,<br />I am using the IRF9321 P channel MOSFET for controlling my BLDC motor. The MOSFET is driven via a transistor which in turn is run by a freescale controller(<a rel="nofollow" target="blank" href="http://3.3V">3.3V</a> pin). Now, when turning it on, it works fine. But, when turning it off its a disaster with the MOSFET taking almost 5ms to come to '0' Volts. I have been through the datasheet and it says turn off delay time is 180nSecs (approx .1uSecs).<br /><br />Am I missing something? Also Sir, i have got no load.Its just to observe if the voltage comes out fine or not&gt; I intend to connect a BLDC Motor to it. Will a load connected make it work better.<br /><br />vinod
  266. </div>
  267. <div style="clear:both;"></div>
  268. <span class="buttons1278"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  269. <div style="clear:both;"></div>
  270. </div>
  271. </div>
  272. <div style="clear:both;"></div><div id="replyform1278" style="margin-left: 65px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:0; cursor: pointer;" class="toggle toggle1279 " data-toggle="1279">[ - ]</div><div class="replyheader bigbold" style="margin-left: 45px;">Comment by <span class="author">Daniel90</span><span class="whitebullet">&#x25CF;</span>June 9, 2014</div>
  273. <div id="post1279" class="parent1279 "><div style="margin-left: 0px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1279" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1279">0</span></button></div><div></div></div>
  274. <div class="forumpost forumpost1279" style="margin-left: 65px; ">
  275. <div class="bodyhtml1279" style="display:inline-block; width:100%;">Hi Jason,<br /><br />I am a student. Can you explain what " more than a voltage drop " means in this paragraph : "The voltage between drain and source on an N-channel MOSFET must be positive, otherwise a parasitic body diode between drain and source conducts to keep the drain from being more than a voltage drop below the source."<br /><br />With other words, how would you say that? <br /><br />Sorry for my english.
  276. </div>
  277. <div style="clear:both;"></div>
  278. <span class="buttons1279"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  279. <div style="clear:both;"></div>
  280. </div>
  281. </div>
  282. <div style="clear:both;"></div><div id="replyform1279" style="margin-left: 65px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:20; cursor: pointer;" class="toggle toggle1280 toggle1279 " data-toggle="1280">[ - ]</div><div class="replyheader bigbold" style="margin-left: 65px;">Comment by <span class="author">jms_nh</span><span class="whitebullet">&#x25CF;</span>June 9, 2014</div>
  283. <div id="post1280" class="parent1280 parent1279 "><div style="margin-left: 20px; float: left;"><div><img src="https://d23s79tivgl8me.cloudfront.net/user/profilepictures/88624.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1280" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1280">0</span></button></div><div></div></div>
  284. <div class="forumpost forumpost1280" style="margin-left: 85px; ">
  285. <div class="bodyhtml1280" style="display:inline-block; width:100%;">Ah -- you found a typo. That should be "more than a diode drop". In other words if the drain is more than about <a rel="nofollow" target="blank" href="http://0.7-0.8V">0.7-0.8V</a> below the source, the diode will conduct and keep it from going any more negative.
  286. </div>
  287. <div style="clear:both;"></div>
  288. <span class="buttons1280"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  289. <div style="clear:both;"></div>
  290. </div>
  291. </div>
  292. <div style="clear:both;"></div><div id="replyform1280" style="margin-left: 85px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:0; cursor: pointer;" class="toggle toggle1281 " data-toggle="1281">[ - ]</div><div class="replyheader bigbold" style="margin-left: 45px;">Comment by <span class="author">ccp</span><span class="whitebullet">&#x25CF;</span>January 28, 2016</div>
  293. <div id="post1281" class="parent1281 "><div style="margin-left: 0px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1281" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1281">0</span></button></div><div></div></div>
  294. <div class="forumpost forumpost1281" style="margin-left: 65px; ">
  295. <div class="bodyhtml1281" style="display:inline-block; width:100%;">Thank you for a very well written article, I learnt a lot. The only question I have now is:<br />For the topology #1 (high-side N-channel MOSFET), I understand that the Source must be connected to the power supply, and the Drain to the load, so in that case the Source has a higher voltage than the Drain. If the body diode has a forward voltage threshold of 2 volts and you have a power supply of 20 volts, how do you switch off the MOSFET? Doesn't the current continue flowing through the diode?
  296. </div>
  297. <div style="clear:both;"></div>
  298. <span class="buttons1281"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  299. <div style="clear:both;"></div>
  300. </div>
  301. </div>
  302. <div style="clear:both;"></div><div id="replyform1281" style="margin-left: 65px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:20; cursor: pointer;" class="toggle toggle1282 toggle1281 " data-toggle="1282">[ - ]</div><div class="replyheader bigbold" style="margin-left: 65px;">Comment by <span class="author">visitor79</span><span class="whitebullet">&#x25CF;</span>March 2, 2016</div>
  303. <div id="post1282" class="parent1282 parent1281 "><div style="margin-left: 20px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1282" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1282">0</span></button></div><div></div></div>
  304. <div class="forumpost forumpost1282" style="margin-left: 85px; ">
  305. <div class="bodyhtml1282" style="display:inline-block; width:100%;">Actually, you’ve got it backwards. In topology #1 the drain is connected to the power supply and the source is connected to the load.
  306. </div>
  307. <div style="clear:both;"></div>
  308. <span class="buttons1282"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  309. <div style="clear:both;"></div>
  310. </div>
  311. </div>
  312. <div style="clear:both;"></div><div id="replyform1282" style="margin-left: 85px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:0; cursor: pointer;" class="toggle toggle1283 " data-toggle="1283">[ - ]</div><div class="replyheader bigbold" style="margin-left: 45px;">Comment by <span class="author">benk85</span><span class="whitebullet">&#x25CF;</span>April 30, 2016</div>
  313. <div id="post1283" class="parent1283 "><div style="margin-left: 0px; float: left;"><div><img src="https://www.embeddedrelated.com/new/images/defaultavatar.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1283" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1283">0</span></button></div><div></div></div>
  314. <div class="forumpost forumpost1283" style="margin-left: 65px; ">
  315. <div class="bodyhtml1283" style="display:inline-block; width:100%;">Low-side N-channel is usually the winner for some loads ( as per the article). However, if ground WAS important, then it seems that P-ch high side would be the better option, yes? I wish to use a MOSFET to turn on/off ( provide power) to an ADC and amplifier. The FET would be controlled by a GPIO of a microcontroller -- everything running from a <a rel="nofollow" target="blank" href="http://3.3VDC">3.3VDC</a> source.<br /><br />I am assuming that a P-ch high side configuration would be the better bet, yes?<br /><br />Thanks for any insight.<br />
  316. </div>
  317. <div style="clear:both;"></div>
  318. <span class="buttons1283"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  319. <div style="clear:both;"></div>
  320. </div>
  321. </div>
  322. <div style="clear:both;"></div><div id="replyform1283" style="margin-left: 65px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:20; cursor: pointer;" class="toggle toggle1284 toggle1283 " data-toggle="1284">[ - ]</div><div class="replyheader bigbold" style="margin-left: 65px;">Comment by <span class="author">jms_nh</span><span class="whitebullet">&#x25CF;</span>April 30, 2016</div>
  323. <div id="post1284" class="parent1284 parent1283 "><div style="margin-left: 20px; float: left;"><div><img src="https://d23s79tivgl8me.cloudfront.net/user/profilepictures/88624.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1284" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1284">0</span></button></div><div></div></div>
  324. <div class="forumpost forumpost1284" style="margin-left: 85px; ">
  325. <div class="bodyhtml1284" style="display:inline-block; width:100%;">You need a high-side MOSFET if it has to be grounded. P-channel high-side is simpler, and for low power stuff you're probably fine with a P-channel. (for high-power loads, where you need more silicon to carry the current, N-channel is cheaper, but you need a high-side gate driver)
  326. </div>
  327. <div style="clear:both;"></div>
  328. <span class="buttons1284"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  329. <div style="clear:both;"></div>
  330. </div>
  331. </div>
  332. <div style="clear:both;"></div><div id="replyform1284" style="margin-left: 85px; "></div><div style="clear:both;"></div><div style="float: left; line-height: 40px; font-size: 1.5rem; margin-left:20; cursor: pointer;" class="toggle toggle1285 toggle1283 " data-toggle="1285">[ - ]</div><div class="replyheader bigbold" style="margin-left: 65px;">Comment by <span class="author">jms_nh</span><span class="whitebullet">&#x25CF;</span>April 30, 2016</div>
  333. <div id="post1285" class="parent1285 parent1283 "><div style="margin-left: 20px; float: left;"><div><img src="https://d23s79tivgl8me.cloudfront.net/user/profilepictures/88624.jpg" class="user" alt=""></div><div><button class="pure-button button-more-small thumbsupbutton" data-thumbsup="1285" style="width: 59px; margin-top: 5px; padding-left: 8px; padding-right: 8px; font-size: 1rem;"><i class="fa fa-thumbs-up"></i> <span class="thumbsup1285">0</span></button></div><div></div></div>
  334. <div class="forumpost forumpost1285" style="margin-left: 85px; ">
  335. <div class="bodyhtml1285" style="display:inline-block; width:100%;">FDV302P and FDV304P are good cheap P-channel MOSFETs for low-power loads. Both are spec'd at <a rel="nofollow" target="blank" href="http://2.7V">2.7V</a> Vgs.
  336. </div>
  337. <div style="clear:both;"></div>
  338. <span class="buttons1285"><a class="modal_trigger" href="#modal"><button class="pure-button button-more-small" style="float: right; margin: 10px 40px 10px 0;">Reply <i class="fa fa-reply"></i></button></a></span>
  339. <div style="clear:both;"></div>
  340. </div>
  341. </div>
  342. <div style="clear:both;"></div><div id="replyform1285" style="margin-left: 85px; "></div><div style="clear:both;"></div></div><p>To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.</p></div>
  343. <div id="tabs1-newcomment"><script type="text/javascript">
  344. $(function() {
  345. // Get the form.
  346. // var form = $('#registerform');
  347. // var form = $('.ajaxform2');
  348. // Get the messages div.
  349. var formMessages = $('.form-messages');
  350. // Set up an event listener for the form.
  351. // $(form).submit(function(e) {
  352. $(document).delegate('#signup_signin form', 'submit', function(e) {
  353. // Stop the browser from submitting the form.
  354. e.preventDefault();
  355. //alert($(this).parent().attr('id'));
  356. var parent = $(this).parent().attr('id');
  357. // alert (parent);
  358. var form = $(this);
  359. // Serialize the form data.
  360. var formData = $(form).serialize();
  361. // Submit the form using AJAX.
  362. $.ajax({
  363. type: 'POST',
  364. url: $(form).attr('action'),
  365. data: formData
  366. })
  367. .done(function(response) {
  368. // Make sure that the formMessages div has the 'success' class.
  369. //$(formMessages).removeClass('error');
  370. //$(formMessages).addClass('success');
  371. // Set the message text.
  372. //$(formMessages).text(response);
  373. //$('#'+parent+' .form-messages').html(response);
  374. //$(registerform).html(response);
  375. //$('#'+parent).html(response);
  376. location.reload();
  377. //window.location = window.location.pathname + window.location.hash;
  378. /* $('#signup_signin').hide();
  379. $('#signup_signin').html(response);
  380. // Clear the form.
  381. $('#name').val('');
  382. $('#email').val('');
  383. $('#message').val('');
  384. // $('#loginbox').hide();
  385. $('#loginbox').load("/new2/ajax_updateloginbox.php");
  386. $('#signup_signin').fadeIn(1600);
  387. // $('#loginbox').fadeIn(1600);
  388. //if (document.getElementById('postform'))
  389. if ($('#postform'))
  390. {
  391. $('#postform').load("/new2/ajax_showpostform.php?group=");
  392. }
  393. if ($('#you_form'))
  394. {
  395. $('#you_form').load("/new2/ajax_showyouform.php");
  396. }*/
  397. })
  398. .fail(function(data) {
  399. // Make sure that the formMessages div has the 'error' class.
  400. //$(formMessages).removeClass('success');
  401. //$(formMessages).addClass('error');
  402. // Set the message text.
  403. if (data.responseText !== '') {
  404. // $(formMessages).html(data.responseText);
  405. $('#'+parent+' .form-messages').html(data.responseText);
  406. } else {
  407. $('#'+parent+' .form-messages').text('Oops! An error occured and your message could not be sent.');
  408. }
  409. });
  410. });
  411. });
  412. </script>
  413. <div id="signup_signin">
  414. <P>Registering will allow you to participate to the forums on ALL the related sites and give you access to all pdf downloads.</P><div id="registerleft" class="floatleft" style="width: 350px; padding-right: 20px; border-right: 1px solid #ccc;"> <form id="registerform" class="pure-form pure-form-stacked pure-form-stacked-custom" style="display: inline-block;" action="/new2/ajax_process_registration.php" method="post">
  415. <fieldset>
  416. <legend>Sign up</legend>
  417. <div class="form-messages" style="display: inline-block; vertical-align: top; margin-bottom: 10px; color: red; width: 300px;"></div>
  418. <!--<label for="email">Email:</label>-->
  419. <!-- <i>Please note that there is currently an issue with <b>hotmail/outlook/msn/live</b> email adresses. If you enter an email address from one of these providers, you won't be able to confirm your email address and use the features of this website.</i>-->
  420. <input id="email" type="email" name=email size=30 maxlength=100 required value="" placeholder="your email">
  421. <!--<label for="username">Preferred Username:</label>-->
  422. <input id="username" type="text" name=username size=30 maxlength=50 required value="" placeholder="choose a username">
  423. <!--<label for="password">Password:</label>-->
  424. <input id="password" name=passwd maxlength=16 type="password" required pattern=".{4,}" title="4 characters minimum" placeholder="password">
  425. <!--<label for="password">Confirm Password:</label>-->
  426. <input id="password" name=passwd2 maxlength=16 type="password" required pattern=".{4,}" title="4 characters minimum" placeholder="confirm password">
  427. <BR><input type="checkbox" name="terms"> I agree with the <a href="/terms" target="_blank" style="text-decoration: underline;">terms of use</a> and <a href="/privacy" target="_blank" style="text-decoration: underline;">privacy policy</a>.<BR><br>
  428. <input type="checkbox" name="newsletter"> Subscribe to occasional newsletter. VERY easy to unsubscribe.<br>
  429. <!--<label for="useranswer">How much is 4+1 ?</label>-->
  430. <!--<input id="useranswer" type="text" name=useranswer size=10 required value="" placeholder="4+1 = ?">-->
  431. <!-- <label for="agree_pp">
  432. <input id="agree_pp" type="checkbox"> I agree with the <a href="/privacy">Privacy Policy</a>
  433. </label>-->
  434. <div id="recaptcha1" style="margin-top: 10px; margin-bottom: 10px; transform:scale(0.88);-webkit-transform:scale(0.88);transform-origin:0 0;-webkit-transform-origin:0 0;" ></div>
  435. <!-- <label for="remember" style="display: block;">
  436. <input id="remember" type="checkbox" name="remember" value="checked" checked style="padding: 10px;"> Remember me
  437. </label>-->
  438. <button type="submit" value="Submit" class="pure-button button-more">Join EmbeddedRelated.com</button>
  439. </fieldset>
  440. </form>
  441. </div><div id="loginright" class="floatright" style="width: 300px; padding-right: 30px;"> <form id="loginform" class="pure-form pure-form-stacked pure-form-stacked-custom" style="display: inline-block;" action="/new2/ajax_process_login.php" method="post">
  442. <fieldset>
  443. <legend>or Sign in</legend>
  444. <div class="form-messages" style="display: inline-block; vertical-align: top; margin-bottom: 10px; color: red; width: 300px;"></div>
  445. <!--<label for="username">Preferred Username:</label>-->
  446. <input id="username" type="text" name=username size=30 maxlength=100 required value="" placeholder="Username or Email">
  447. <!--<label for="password">Password:</label>-->
  448. <input id="password" name=password maxlength=16 type="password" required placeholder="Password">
  449. <label for="remember" style="display: block;">
  450. <input id="remember" type="checkbox" name="remember" value="checked" checked style="padding: 10px;"> Remember me
  451. </label>
  452. <button type="submit" value="Submit" class="pure-button button-more">Login</button>
  453. </fieldset>
  454. </form>
  455. </div></div>
  456. <div style="clear:both;"></div>
  457. </div>
  458. </div>
  459. </div> </div>
  460. <div id="sidebar" data-sticky_column>
  461. <div id="loginbox">
  462. <h2>Sign in</h2>
  463. <div class="sidebar_box">
  464. <form name="login" class="pure-form" action="/showarticle/98.php" method="post">
  465. <fieldset>
  466. <input name="usernameposted" type="text" class="pure-input-login" placeholder="Username" required>
  467. <input name="passwordposted" type="password" class="pure-input-login" placeholder="Password" required>
  468. <button type="submit" class="pure-button pure-button-green">Sign in</button>
  469. <label for="remember" style="display: block;">
  470. <input id="remember" type="checkbox" name="remember" value="checked" checked style="padding: 10px;"> Remember me
  471. </label>
  472. </fieldset>
  473. <span class="condensed"><a href="/forgot.php" class="green smallbold">Forgot username or password?</a> &nbsp;|&nbsp; <a href="/register.php" class="green smallbold">Create account</a></span>
  474. </form>
  475. </div></div><h2>You might also like...</h2><div class="sidebar_box"><a href="/showinsight/92/MSP430_Launchpad" target="_top" rel="nofollow"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/insights/92_300.jpg" class="insight_img_sidebar"><center><b><span class="bigfont">Meet the latest MSP430 LaunchPad development kit</span></b></center></a></div> <h2>Subscribe to this Blog</h2><div class="sidebar_box"><p>Receive a notification when <b>Jason Sachs</b> publishes a new article:</p><form name="subscribe" class="pure-form" action="/showarticle/98.php" method="post">
  476. <fieldset>
  477. <input name="youremail" type="text" class="pure-input-subscribe" placeholder="Your Email">
  478. <button type="submit" class="pure-button pure-button-green">Subscribe</button>
  479. </fieldset>
  480. <input type="hidden" name="articleid" value="98">
  481. </form></div> <h2>About Jason Sachs</h2>
  482. <div class="sidebar_box">
  483. <img src="https://d23s79tivgl8me.cloudfront.net/user/profilepictures/88624.jpg" width="59" height="54" align="left" class="imageleft user" />
  484. <p>Jason has 21 years of experience in signal conditioning (both analog + digital) in motion control + medical applications. He likes making things spin.<BR><a href="https://twitter.com/jms_embedded"><i class="fa fa-twitter-square fa-2x"></i></a> <a href="/contact.php?contactid=88624"><i class="fa fa-envelope-square fa-2x"></i></a> <a href="https://www.embeddedrelated.com/blogs_rss.php?bloggerid=88624"><i class="fa fa-rss-square fa-2x"></i></a></p>
  485. </div>
  486. <div style="clear:both;"></div> <h2 >Popular Posts by Jason Sachs</h2><div class="sidebar_box iconnav"><ul>
  487. <li><a href="/showarticle/532.php">Understanding and Preventing Overflow (I Had Too Much to Add Last Night)</a></li>
  488. <li><a href="/showarticle/809.php">How to Read a Power MOSFET Datasheet</a></li>
  489. <li><a href="/showarticle/197.php">Adventures in Signal Processing with Python</a></li>
  490. <li><a href="/showarticle/779.php">Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter</a></li>
  491. <li><a href="/showarticle/1200.php">The Least Interesting Circuit in the World</a></li></ul>
  492. </div> <h2>Blogs - Hall of Fame</h2>
  493. <div class="sidebar_box">
  494. <div class="halloffame">
  495. <a href="https://www.embeddedrelated.com/showarticle/1187.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/1187.jpg" width="100" height="70" align="left" class="imageleft document" />
  496. <p><span class="highlight">Sensors Expo 2018</span> Trip Report</a><BR><span class="author">Stephane Boucher</span></p>
  497. <div style="clear:both;"></div>
  498. </div>
  499. <div class="halloffame">
  500. <a href="https://www.embeddedrelated.com/showarticle/453.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/453.png" width="100" height="92" align="left" class="imageleft document" />
  501. <p>Introduction to <span class="highlight">Microcontrollers</span></a><BR><span class="author">Mike Silva</span></p>
  502. <div style="clear:both;"></div>
  503. </div>
  504. <div class="halloffame">
  505. <a href="https://www.embeddedrelated.com/showarticle/629.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/629.png" width="100" height="78" align="left" class="imageleft document" />
  506. <p>Important <span class="highlight">Programming</span> Concepts (Even on Embedded Systems)</a><BR><span class="author">Jason Sachs</span></p>
  507. <div style="clear:both;"></div>
  508. </div>
  509. <div class="halloffame">
  510. <a href="https://www.embeddedrelated.com/showarticle/195.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/357.png" width="100" height="88" align="left" class="imageleft document" />
  511. <p>How <span class="highlight">FPGAs</span> Work and Why You'll Buy One</a><BR><span class="author">Yossi Krenin</span></p>
  512. <div style="clear:both;"></div>
  513. </div>
  514. <div class="halloffame">
  515. <a href="https://www.embeddedrelated.com/showarticle/179.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/179.png" width="100" height="121" align="left" class="imageleft document" />
  516. <p><span class="highlight">MSP430</span> Launchpad Tutorial</a><BR><span class="author">Enrico Garante</span></p>
  517. <div style="clear:both;"></div>
  518. </div>
  519. <div class="halloffame">
  520. <a href="https://www.embeddedrelated.com/showarticle/498.php"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/blogs/498.png" width="100" height="97" align="left" class="imageleft document" />
  521. <p><span class="highlight">Arduino</span> Robotics</a><BR><span class="author">Lonnie Honeycutt</span></p>
  522. <div style="clear:both;"></div>
  523. </div>
  524. </div> <h2>Free PDF Downloads</h2>
  525. <div class="sidebar_box">
  526. <div class="imageleft" style="position: relative; width: 70px; float: left; margin: 0 10px 10px 0;">
  527. <a href="/showabstract/221.php"><img src="/new2/Documents_Covers/221.70.jpg" width="70" align="left" style="position: relative;" class="imageleft document" /></a>
  528. </div>
  529. <span class="smallbold"><a href="/showabstract/221.php"><i class="fa fa-cloud-download"></i> Open Source in Embedded System Development</a></span>
  530. <div style="clear:both"></div><div class="imageleft" style="position: relative; width: 70px; float: left; margin: 0 10px 10px 0;">
  531. <a href="/showabstract/180.php"><img src="/new2/Documents_Covers/180.70.jpg" width="70" align="left" style="position: relative;" class="imageleft document" /></a>
  532. </div>
  533. <span class="smallbold"><a href="/showabstract/180.php"><i class="fa fa-cloud-download"></i> C++ Tutorial</a></span>
  534. <div style="clear:both"></div><div class="imageleft" style="position: relative; width: 70px; float: left; margin: 0 10px 10px 0;">
  535. <a href="/showabstract/210.php"><img src="/new2/Documents_Covers/210.70.jpg" width="70" align="left" style="position: relative;" class="imageleft document" /></a>
  536. </div>
  537. <span class="smallbold"><a href="/showabstract/210.php"><i class="fa fa-cloud-download"></i> Getting Started with C Programming for the ATMEL AVR Microcontrollers</a></span>
  538. <div style="clear:both"></div><a href="/documents.php"><button class="pure-button button-more-small" style="float: right; margin: 10px 0px 10px 0;">All FREE PDF Downloads <i class="fa fa-arrow-circle-o-down fa-lg"></i> </button></a> <div style="clear:both"></div>
  539. </div>
  540. </div>
  541. <div style="clear: both;"></div>
  542. </div>
  543. <div id="footer">
  544. <div class="container">
  545. <div class="footerbox">
  546. <h2 class="smallfont">Quick Links</h2>
  547. <ul>
  548. <li><a href="/">Home</a></li><li><a href="/blogs.php">Blogs</a></li><li><a href="/tweets.php"><i class="fa fa-twitter fa-lg"></i> Tweets</a></li><li><a href="/forums">Forums</a></li><li><a href="/jobs">Jobs</a></li><li><a href="/Internet-of-Things.php">#IoT</a></li><li><a href="/tutorials.php">Tutorials</a></li><li><a href="/books.php">Books</a></li><li><a href="/documents.php">Free PDFs</a></li><li><a href="/vendors">Vendors</a></li><li><a href="/code.php">Code Snippets</a></li><li><a href="https://www.embeddedrelated.com/groups/comp.arch.embedded/1.php">comp.arch.embedded</a></li> </ul>
  549. </div>
  550. <div class="footerbox">
  551. <h2>About EmbeddedRelated.com</h2>
  552. <ul><li><a href="/showarticle/770/advertising-on-the-related-sites">Advertise</a></li><li><a href="/contact.php">Contact</a></li><li><a href="/privacy">Privacy Policy</a></li><li><a href="/terms">Terms of Service</a></li><li><a href="/cookies">Cookies Policy</a></li></ul>
  553. </div>
  554. <div class="footerbox">
  555. <h2>Social Networks</h2>
  556. <div class="socialbox floatleft"><a href="https://www.facebook.com/embeddedrelated"><i class="fa fa-facebook fa-2x darkblue" style="line-height: 30px;"></i></a></div>
  557. <div class="socialbox floatleft"><a href="https://twitter.com/embeddedrelated"><i class="fa fa-twitter fa-2x darkblue" style="line-height: 30px;"></i></a></div>
  558. <div class="socialbox floatleft"><a href="https://plus.google.com/+Embeddedrelated/posts"><i class="fa fa-google-plus fa-2x darkblue" style="line-height: 30px;"></i></a></div>
  559. </div>
  560. <div class="footerbox">
  561. <a href="//www.embeddedrelated.com"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/EmbeddedRelated_logo.svg" width="260px" style="margin: 0; padding: 0; vertical-align: top;"></a>
  562. <a href="//www.dsprelated.com"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/DSPRelated_logo.svg" width="260px" style="margin: 0; padding: 0; vertical-align: top;"></a>
  563. <a href="//www.electronics-related.com"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/Electronics-Related_logo.svg" width="260px" style="margin: 0; padding: 0; vertical-align: top;"></a>
  564. <a href="//www.fpgarelated.com"><img src="https://d23s79tivgl8me.cloudfront.net/new2/images/FPGARelated_logo.svg" width="260px" style="margin: 0; padding: 0; vertical-align: top;"></a>
  565. </div>
  566. </div>
  567. </div>
  568. <script type="text/javascript">
  569. $(".modal_trigger").leanModal({top : 50, overlay : 0.6, closeButton: ".modal_close" });
  570. $(function () {
  571. // Calling Login Form
  572. $("#login_form").click(function () {
  573. $(".social_login").hide();
  574. $(".user_login").show();
  575. return false;
  576. });
  577. // Calling Register Form
  578. $(".register_form").click(function () {
  579. $(".user_login").hide();
  580. $(".social_login").hide();
  581. $(".user_register").show();
  582. $(".header_title").text('Register');
  583. return false;
  584. });
  585. // Going back to Social Forms
  586. $(".back_btn").click(function () {
  587. $(".user_login").show();
  588. $(".user_register").hide();
  589. $(".header_title").text('Login');
  590. return false;
  591. });
  592. })
  593. </script>
  594. <script type="text/javascript">
  595. $(function() {
  596. // Get the form.
  597. // var form = $('#registerform');
  598. // var form = $('.ajaxform2');
  599. // Get the messages div.
  600. var formMessages = $('.form-messages');
  601. // Set up an event listener for the form.
  602. // $(form).submit(function(e) {
  603. $(document).delegate('#registerform', 'submit', function(e) {
  604. // Stop the browser from submitting the form.
  605. e.preventDefault();
  606. //alert($(this).parent().attr('id'));
  607. var parent = $(this).parent().attr('id');
  608. // alert (parent);
  609. var form = $(this);
  610. // Serialize the form data.
  611. var formData = $(form).serialize();
  612. // Submit the form using AJAX.
  613. $.ajax({
  614. type: 'POST',
  615. url: $(form).attr('action'),
  616. data: formData
  617. })
  618. .done(function(response) {
  619. // Make sure that the formMessages div has the 'success' class.
  620. //$(formMessages).removeClass('error');
  621. //$(formMessages).addClass('success');
  622. // Set the message text.
  623. //$(formMessages).text(response);
  624. //$('#'+parent+' .form-messages').html(response);
  625. //$(registerform).html(response);
  626. //$('#'+parent).html(response);
  627. $('.user_register').hide();
  628. $('.user_register').html(response);
  629. $('#loginbox').load("/new2/ajax_updateloginbox.php");
  630. $('.user_register').append('<input type="button" value="Close" class="btn btn_green" onClick="window.location.reload()">');
  631. $('.modal_close').hide();
  632. // location.reload();
  633. // alert('test');
  634. $('.user_register').fadeIn(1600);
  635. })
  636. .fail(function(data) {
  637. // Make sure that the formMessages div has the 'error' class.
  638. //$(formMessages).removeClass('success');
  639. //$(formMessages).addClass('error');
  640. // Set the message text.
  641. if (data.responseText !== '') {
  642. // $(formMessages).html(data.responseText);
  643. $('.form-messages').html(data.responseText);
  644. } else {
  645. $('.form-messages').text('Oops! An error occured and your message could not be sent.');
  646. }
  647. });
  648. });
  649. });
  650. </script>
  651. <div id="modal" class="popupContainer" style="display:none;">
  652. <header class="popupHeader">
  653. <span class="header_title">Login</span>
  654. <span class="modal_close"><i class="fa fa-times"></i></span>
  655. </header>
  656. <section class="popupBody">
  657. <! -- Here Goes all the Login and signup Forms -->
  658. <div class="user_login">
  659. <p style="margin-top: 0px; padding-top: 0px;"></p>
  660. <form name="login" action="/showarticle/98.php" method="post">
  661. <label>Email / Username</label> <input type="text" name="usernameposted"><br>
  662. <label>Password</label> <input type="password" name="passwordposted"><br>
  663. <div class="action_btns">
  664. <div class="one_half first">
  665. <button type="submit" class="btn btn_green">Login</button>
  666. </div>
  667. </div>
  668. </form>
  669. <div class="forgot_password">
  670. <a href="#" class="register_form" name="register_form">Create free account</a> | <a href="/new2/forgot.php">Forgot password?</a>
  671. </div>
  672. </div>
  673. <div class="user_register">
  674. <div class="form-messages" style="display: inline-block; vertical-align: top; margin-bottom: 10px; color: red;"> <!--<p><i>Please note that there is currently an issue with <b>hotmail/outlook/msn</b> email adresses. If you enter an email address from one of these providers, you won't be able to confirm your email address and use the features of this website.</i></p>--> </div>
  675. <form id="registerform" action="/new2/ajax_process_registration.php" method="post">
  676. <label>Email Address</label> <input type="email" name="email"><br>
  677. <label>Username</label> <input type="text" name="username" maxlength="16"><br>
  678. <label>Password</label> <input type="password" name="passwd"><br>
  679. <label>Confirm Password</label> <input type="password" name="passwd2"><br>
  680. <input type="checkbox" name="terms"> I agree with the <a href="/terms" target="_blank">terms of use</a> and <a href="/privacy" target="_blank">privacy policy</a>.<BR><br>
  681. <input type="checkbox" name="newsletter"> Yes, I want to subscribe to your world famous newsletter and see for myself how great it is. I also understand that I can unsubscribe VERY easily!<br>
  682. <div id="recaptcha1" style="margin-top: 10px; margin-bottom: 10px; transform:scale(0.88);-webkit-transform:scale(0.88);transform-origin:0 0;-webkit-transform-origin:0 0;"></div>
  683. <!-- <div class="checkbox">
  684. <input id="send_updates" type="checkbox" name="newsletter" checked> <label for=
  685. "send_updates">Send me occasional email updates</label>
  686. </div>-->
  687. <div class="action_btns">
  688. <div class="one_half">
  689. <a class="btn back_btn" href="#">Back</a>
  690. </div>
  691. <div class="one_half last">
  692. <button type="submit" class="btn btn_green">Register</button>
  693. </div>
  694. </div>
  695. </form>
  696. </div>
  697. </section>
  698. </div>
  699. <!--<script src="https://www.embeddedrelated.com/new2/js/jquery.sticky-kit.js"></script>
  700. <script src="https://www.embeddedrelated.com/new2/js/sticky_test.js"></script>-->
  701. </body>
  702. </html>