<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I would suggest using logic level MOSFET with flyback diode on the motor. Most power MOSFETs come with built in transient protection, so you should be fine. <br><br><div><br></div><div>iPhone OS = OS X on Diet Code</div></div><div><br>On Jun 15, 2015, at 6:25 PM, John Vaughters via TriEmbed <<a href="mailto:triembed@triembed.org">triembed@triembed.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px"><div id="yui_3_16_0_1_1434406642906_9553">I will second what Carl said and make a suggestion. Buy some opto-isolators with open collectors, then you can use whatever voltage you like within the limits of the transistors. Plus you can use 3.3 or 5v to drive whatever you like. This is my preferred method for any heavy loads. <br></div><div id="yui_3_16_0_1_1434406642906_9552"> John Vaughters<br></div><div id="yui_3_16_0_1_1434406642906_9551"><span></span></div>  <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, June 15, 2015 5:58 PM, Carl Nobile via TriEmbed <<a href="mailto:triembed@triembed.org">triembed@triembed.org</a>> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv7580646628"><div><div dir="ltr">Brian,<div><br clear="none"></div><div>The max collector current on the 2N3904 is 200 ma, so to be safe you would need to keep the current real low. If you motors can peak higher than 200 ma you may eventually burn out the transistor, so you will also need to put a 0.1 uf cap from each lead of the motor to ground (assuming that neither of the leads are ground).</div><div><br clear="none"></div><div>This is not the best solution for a motor, because motors are inductive and will cause reverse pulses and do a lot of spiking. In a pinch it may work however, but don't design this into a permanent project. If you hook this up to a microcontroller or your RPi think about having extra cash around to buy a new one when the motor sends a big spike back through the circuit.</div><div><br clear="none"></div><div>In other words without seeing the motor and it's specs. it's hard to guess what would happen.</div><div><br clear="none"></div><div>Carl</div><div><br clear="none"></div><div><br clear="none"></div></div><div class="yiv7580646628gmail_extra"><br clear="none"><div class="yiv7580646628yqt6432878323" id="yiv7580646628yqt30444"><div class="yiv7580646628gmail_quote">On Mon, Jun 15, 2015 at 5:37 PM, Grawburg via TriEmbed <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:triembed@triembed.org" target="_blank" href="mailto:triembed@triembed.org">triembed@triembed.org</a>></span> wrote:<br clear="none"><blockquote class="yiv7580646628gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Shouldn't a 2N3904 transistor be able to switch a 5VDC motor?<br clear="none">
My circuit is correct since I tested it first with an LED, then replaced the LED with a cheap little DC motor. (I did use a diode to protect the circuit).  I'm using the Pi for the necessary voltage on the transistor base.  Yes, I did check to see if the motor worked with 5V.<br clear="none">
<br clear="none">
<br clear="none">
Brian Grawburg<br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
_______________________________________________<br clear="none">
Triangle, NC Embedded Computing mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:TriEmbed@triembed.org" target="_blank" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br clear="none">
TriEmbed web site: <a rel="nofollow" shape="rect" target="_blank" href="http://triembed.org/">http://TriEmbed.org</a><br clear="none">
</blockquote></div></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv7580646628gmail_signature">-------------------------------------------------------------------------------<br clear="none">Carl J. Nobile (Software Engineer)<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:carl.nobile@gmail.com" target="_blank" href="mailto:carl.nobile@gmail.com">carl.nobile@gmail.com</a><br clear="none">-------------------------------------------------------------------------------</div>
</div></div></div><br><div class="yqt6432878323" id="yqt71614">_______________________________________________<br clear="none">Triangle, NC Embedded Computing mailing list<br clear="none"><a shape="rect" ymailto="mailto:TriEmbed@triembed.org" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br clear="none"><a shape="rect" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br clear="none">TriEmbed web site: <a shape="rect" href="http://triembed.org/" target="_blank">http://TriEmbed.org</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Triangle, NC Embedded Computing mailing list</span><br><span><a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a></span><br><span><a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a></span><br><span>TriEmbed web site: <a href="http://TriEmbed.org">http://TriEmbed.org</a></span><br></div></blockquote></body></html>