Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
spindle-mosfet-control [2017/01/25 19:13]
arthur
spindle-mosfet-control [2020/09/18 19:42] (current)
mrscott [Diode] reference first section.
Line 1: Line 1:
 == Spindle control with a Mosfet == Spindle control with a Mosfet
  
-If you are not using a VFD, and your spindle ​has low enough power, you can control it directly using the mosfets ​on the Smoothieboard.+If you are not using a VFD, and your spindle ​motor is a DC motor of low enough power (voltage and current, **including** any current extremes when stalled), you can control it directly using the MOSFETs ​on the Smoothieboard.
  
-Mosfets ​are present on-board, but have limited current capacity ( up to 12A ) and need to be protected by a diode when controlling a motor.+MOSFETs ​are present on-board, but have limited current capacity ( up to 12A ) and need to be protected by a diode when controlling a motor. ​ 
  
-[http://​smoothieware.org/​general-appendixes#​solidstaterelay Solid state relays] are controlled via a GPIO pin, and can control higher loads, but are on/off only ( no control of the exact amount of power sent via PWM ). For more information about SSRs, [[http://​smoothieware.org/​general-appendixes#​solidstaterelay|see this appendix]].+Motors have the property of inductance, which is the electrical equivalent of inertia. ​ The motor current will continue to flow after the MOSFET is switched off, decreasing as the energy stored by current flowing in the inductance is dissipated. ​ This current flow results in the voltage across the motor reversing and increasing (or "​spiking"​) until the current finds a path to flow.   
 + 
 +An appropriately connected diode with sufficient voltage and current ratings will provide a safe, intended path for the motor current. ​  
 + 
 +Without a diode, when the MOSFET turns off the motor voltage will spike until the current finds an **unintended** path.  Typically this degrades or immediately destroys the MOSFET, and perhaps other circuitry such as that driving the MOSFET gate. 
 + 
 +The diode must be connected in reverse across the motor (when the MOSFET is on, it must **NOT** cause power to flow through the diode). ​ Connect the anode ('​arrow'​) to the MOSFET Drain terminal and the cathode ('​bar'​ or line on the package) to the motor power supply. ​ The diode rating should be rated with Voltage exceeding the maximum expected supply voltage, and (conservatively) Current at least equal to half the motor current (the current through the diode will not be continuous). ​ An example part number is 6A4-T, rated 6A and 400V, under $1 USD. 
 + 
 +The same considerations apply to other inductive loads such as solenoid valves and relay coils. 
 + 
 +[http://​smoothieware.org/​general-appendixes#​solidstaterelay Solid state relays] are controlled via a GPIO pin, and can control higher loads, but are on/off only ( no control of the exact amount of power sent via PWM ). For more information about SSRs, [[http://​smoothieware.org/​general-appendixes#​solidstaterelay|see this appendix]]. ​ 
  
 <callout type="​warning"​ icon="​true"​ title="​ Diodes">​ <callout type="​warning"​ icon="​true"​ title="​ Diodes">​
  
-It is critical that you add a diode across your motor if you are going to control it with a Smoothieboard. If you do not do this, you are absolutely guaranteed to destroy the mosfet, and possibly the Smoothieboard.+It is critical that you add a diode across your motor if you are going to control it with a Smoothieboard. If you do not do this, you are absolutely guaranteed to destroy the MOSFET, and possibly the Smoothieboard.
  
 </​callout>​ </​callout>​
Line 79: Line 89:
 === Diode === Diode
  
-Because the spindle can feed power back into the MOSFET and damage the MOSFET, you also need to wire a diode of sufficient size across the output.+Because the spindle can feed power back into the MOSFET and damage the MOSFET, you also need to wire a diode of sufficient size across the output.  See notes in the first section above.
  
 ==  PID loopback spindle control ==  PID loopback spindle control