<div dir="ltr">Craig,<div><br></div><div>As long as you use a snubber diode across the motor's power terminals and a cap near your microcontroller power pins, you should not need an opto-isolator. As long as you match the N-FET's gate voltage sensitivity with your logic voltage, you should be able to drive the FET's gate directly via resistor (1k?) connected to a logic output. Drive the logic output low during the low periods to turn the FET off rather than let the gate float during the OFF period (float would turn-off a BJT but not a FET). You could just add a large value (50k?) pull-down to the FET gate but this would give you an asymmetry in the turn-on and turn-off times that could make it hard to effectively use the full range of your PWM output.<div><br></div><div>Shane</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 8, 2017 at 11:11 AM Carl Nobile via TriEmbed <<a href="mailto:triembed@triembed.org">triembed@triembed.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Yes, you will need something like a MOSFET to handle the higher current that the motor will draw and a different power souce that what is being used for the CHIP, but that won't isolate the motor from the electronics. You will still need an opto isolator.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">~Carl</div><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Sun, Jan 8, 2017 at 8:34 AM, Craig Cook <span dir="ltr" class="gmail_msg"><<a href="mailto:cncook001@yahoo.com" class="gmail_msg" target="_blank">cncook001@yahoo.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px" class="gmail_msg"><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566720" class="gmail_msg">Ah, that probably explains another project I saw.  It had a CHIP, motor and IRF510N MOSFET.</div><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566700" class="gmail_msg"><br class="gmail_msg"></div><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566644" dir="ltr" class="gmail_msg">I have some MOSFET's on order.  I'll wait for them and then try to drive my motor.</div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566685" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566781" class="gmail_msg">Oh, exactly what Pete just said.<br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566880" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566881" class="gmail_msg">Thanks</div><span class="m_-1690792259300176905HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566883" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566889" class="gmail_msg">Craig<br class="gmail_msg"></div></font></span><div class="m_-1690792259300176905hm m_-1690792259300176905HOEnZb gmail_msg"><div class="m_-1690792259300176905m_-660151004509666952qtdSeparateBR gmail_msg" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566579"><br class="gmail_msg"></div></div><div class="m_-1690792259300176905m_-660151004509666952yahoo_quoted gmail_msg" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566583" style="display:block"><div class="m_-1690792259300176905hm m_-1690792259300176905HOEnZb gmail_msg">  </div><div style="font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566582" class="gmail_msg"><div class="m_-1690792259300176905hm m_-1690792259300176905HOEnZb gmail_msg"> </div><div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566581" class="gmail_msg"><div class="m_-1690792259300176905hm m_-1690792259300176905HOEnZb gmail_msg"> <div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566580" class="gmail_msg"> <font id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566585" size="2" face="Arial" class="gmail_msg"> <hr id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566638" size="1" class="gmail_msg"> <b class="gmail_msg"><span style="font-weight:bold" class="gmail_msg">From:</span></b> Carl Nobile <<a href="mailto:carl.nobile@gmail.com" class="gmail_msg" target="_blank">carl.nobile@gmail.com</a>><br class="gmail_msg"> <b class="gmail_msg"><span style="font-weight:bold" class="gmail_msg">To:</span></b> Craig Cook <<a href="mailto:cncook001@yahoo.com" class="gmail_msg" target="_blank">cncook001@yahoo.com</a>> <br class="gmail_msg"><b class="gmail_msg"><span style="font-weight:bold" class="gmail_msg">Cc:</span></b> TriEmbed <<a href="mailto:triembed@triembed.org" class="gmail_msg" target="_blank">triembed@triembed.org</a>><br class="gmail_msg"> <b class="gmail_msg"><span style="font-weight:bold" class="gmail_msg">Sent:</span></b> Saturday, January 7, 2017 10:35 PM<br class="gmail_msg"> <b class="gmail_msg"><span style="font-weight:bold" class="gmail_msg">Subject:</span></b> Re: [TriEmbed] Pinewood derby help<br class="gmail_msg"> </font> </div></div><div class="gmail_msg"><div class="m_-1690792259300176905h5 gmail_msg"> <div class="m_-1690792259300176905m_-660151004509666952y_msg_container gmail_msg" id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566651"><br class="gmail_msg"><div id="m_-1690792259300176905m_-660151004509666952yiv4740099916" class="gmail_msg"><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566653" class="gmail_msg">Craig,<div class="gmail_msg"><br class="gmail_msg"></div><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566652" class="gmail_msg">You'll need some sort of optical isolator between the motor and any electronics or the reverse EMF from the motor will fry the electronics.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It's late as I send this, so I won't go into detail. Google it.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Carl</div><div class="gmail_msg"><br class="gmail_msg"></div><div id="m_-1690792259300176905m_-660151004509666952yui_3_16_0_ym19_1_1483239526576_566669" class="gmail_msg"><br class="gmail_msg"></div></div><div class="m_-1690792259300176905m_-660151004509666952yiv4740099916gmail_extra gmail_msg"><br class="gmail_msg"><div class="m_-1690792259300176905m_-660151004509666952yiv4740099916gmail_quote gmail_msg">On Jan 7, 2017 9:38 PM, "Craig Cook via TriEmbed" <<a rel="nofollow" href="mailto:triembed@triembed.org" class="gmail_msg" target="_blank">triembed@triembed.org</a>> wrote:<br class="gmail_msg"><blockquote class="m_-1690792259300176905m_-660151004509666952yiv4740099916quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px" class="gmail_msg"><div id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_552932" class="gmail_msg">At my cub pack we have a "Dad's race" the night before the boys race.  Dads don't have to comply to the same rules the boys do.  i.e. if we can get a motor on the car and it weighs more than 5oz, thats fine.  Purely for engineering fun.</div><div id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553058" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553056" class="gmail_msg">I have a donor RC dump truck I am going to take the motor and axel out of.  I have a NTC CHIP I was going to strap on to control the motor.</div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553063" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553126" class="gmail_msg">I've got the kernel upgraded to 4.4 and PWM working.</div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553132" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553134" class="gmail_msg">Am I correct in thinking if I can hook up the motor to the CHIP board I could use PWM to "slow" it down? i.e. if I let the motor spin at full speed the derby car wheels may just sit and spin.  If I can send the right amount of pulses I should be able to control the motor speed.<br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553168" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553170" class="gmail_msg">The dump truck was powered by 3 x AA batteries, which makes me believe the motor accepts 5V or less, so using the CHIP should not fry it.  The motor has a 1 ohm resistor attached and a capacitor with 104 written on it.</div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553295" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553305" class="gmail_msg">I'm ready to attach the motor to the CHIP, any reason I shouldn't and see what happens?<br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553230" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553229" class="gmail_msg">Thanks</div><font color="#888888" class="gmail_msg"><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553238" class="gmail_msg"><br class="gmail_msg"></div><div dir="ltr" id="m_-1690792259300176905m_-660151004509666952yiv4740099916m_1232478157027292810yui_3_16_0_ym19_1_1483239526576_553239" class="gmail_msg">Craig<br class="gmail_msg"></div></font></div></div><br class="gmail_msg">______________________________ _________________<br class="gmail_msg">
Triangle, NC Embedded Computing mailing list<br class="gmail_msg">
<a rel="nofollow" href="mailto:TriEmbed@triembed.org" class="gmail_msg" target="_blank">TriEmbed@triembed.org</a><br class="gmail_msg">
<a rel="nofollow" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" class="gmail_msg" target="_blank">http://mail.triembed.org/ mailman/listinfo/triembed_ triembed.org</a><br class="gmail_msg">
TriEmbed web site: <a rel="nofollow" href="http://triembed.org/" class="gmail_msg" target="_blank">http://TriEmbed.org</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div></div><br class="gmail_msg"><br class="gmail_msg"></div> </div></div></div> </div>  </div></div></div></blockquote></div><br class="gmail_msg"><br clear="all" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg">-- <br class="gmail_msg"><div class="m_-1690792259300176905gmail_signature gmail_msg" data-smartmail="gmail_signature">-------------------------------------------------------------------------------<br class="gmail_msg">Carl J. Nobile (Software Engineer)<br class="gmail_msg"><a href="mailto:carl.nobile@gmail.com" class="gmail_msg" target="_blank">carl.nobile@gmail.com</a><br class="gmail_msg">-------------------------------------------------------------------------------</div>
</div>
_______________________________________________<br class="gmail_msg">
Triangle, NC Embedded Computing mailing list<br class="gmail_msg">
<a href="mailto:TriEmbed@triembed.org" class="gmail_msg" target="_blank">TriEmbed@triembed.org</a><br class="gmail_msg">
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br class="gmail_msg">
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" class="gmail_msg" target="_blank">http://TriEmbed.org</a><br class="gmail_msg">
</blockquote></div>