Simple Mosfet circuit

Thread Starter

liteace

Joined Mar 7, 2012
171
Hi All, again need a little help, would this work for motor speed control + I understand I might need a diode in there somewhere but not 100% sure where?


moss1.PNG


Thanks
 

ElectricSpidey

Joined Dec 2, 2017
2,758
I didn't look up the IC but I guess it would be ok if it is a logic level MOSFET.

The diode belongs across the motor windings in reverse polarity, as to protect the MOSFET.
 

smooth_jamie

Joined Jan 4, 2017
107
In theory this will work, but needless to say your schematic is very very lacking.

A quick Google search yields RFP30N06LE from Fairchild semicon. I'm guessing you're using a microcontroller of some sort to pulse the gate to control the motor's speed. You will need a pull-down resistor to keep the gate voltage low until it is pulsed to avoid nuisance triggering of the MOSFET. Also if you are using a uC then it might be a good idea to consider isolation (opto-couplers). to stop any back EMF destroying your GPIO pins.

EDIT:
Forgot to comment on the diode. You will need a flywheel/quenching diode between the contacts of your motor. You need to also consider how much power is going to go through that MOSFET and if so will it need a heat sink. There's alot left to think about.
 
Last edited:

Thread Starter

liteace

Joined Mar 7, 2012
171
Thanks for the info, the pull-down resistor, would that go between G and S on the mosfet, what value resistor would I need?


Thanks again
 

smooth_jamie

Joined Jan 4, 2017
107
Thanks for the info, the pull-down resistor, would that go between G and S on the mosfet, what value resistor would I need?
10K Ohm resistor is more than likely OK. I've attached a basic working/tested schematic for the RFP12N10L (similar MOSFET to yours) to illustrate.

Again, I am assuming you are using a micro-controller to pulse the FET. You need to be careful selecting the correct value and make sure you don't choose a resistor that will sink more current than is available from your source (in the case of Raspberry Pi or Arduino I think this is around 20mA). Always read the datasheets and do your maths before you switch anything on.
 

Attachments

Thread Starter

liteace

Joined Mar 7, 2012
171
I have a couple of 1N5402 diodes, would they be OK for mosfet protection.
The microcontroller, the data sheet says:

"The trigger pulse
output is limited to 0.15 amperes maximum"

Is that OK?
 

Thread Starter

liteace

Joined Mar 7, 2012
171
I've picked up a couple of opto couplers ET1103, will they be OK for the task.
Need a little help, does the pull-down resistor go on the OC side (1) or the mosfet side (2) also pin 3 of the OC, I assume that needs power, all this is going to be powered with between 12 - 15 volts will I need a 5v regulator.

If someone would be so kind and check my drawing and please correct where I've made a mistake

Thanks 1516999005511238252475.jpg

Sorry its upside down, I've no idea why
 

crutschow

Joined Mar 14, 2008
34,282
You need a resistor in series with the input to limit the current through the LED.
Resistor 1 is in parallel with ground so it does nothing.
The OC can tolerate 70V on the output so you can operate it from your 12-15V supply.
What is the frequency of the PWM?
 

Thread Starter

liteace

Joined Mar 7, 2012
171
Thanks what value resistor will be needed, I can drop the pwm output voltage down, it's adjustable from 1 volt to 15 volts

The pwm will be, depending on what's connected 0 to 100%.

I'm I right in thinking if 12-14 volts in going in the OC on pin 3 then I'll have the same out on pin 4 that's connected to the gate on the mosfet, will I need a resistor between OC out 4 and gate?

Thanks again
 

smooth_jamie

Joined Jan 4, 2017
107
Pin 1 and 2 are sharing the same ground rail? They shoukd be seperate (arduino side and motor side).

Pin 3 of the opto goes to VDD. You have a short circuit to ground on pin 2 (remove this), the resistor on pin 2 is to limit the LED current in the 5v side.

Look up the datasheet and find the LED current in the opto to select the correct resistor size for R1. I believe we already discussed R2.

Not sure what current or voltage the motor should use but just check if you need more limitation here.

Otherwise this circuit looks right.
 

Thread Starter

liteace

Joined Mar 7, 2012
171
I've found data sheet for OC, if I'm reading it correct, input voltage for led is 1.25 volts with a maximum of 1.6 volts? Screenshot_20180126-231419.png
 

ebeowulf17

Joined Aug 12, 2014
3,307
I've found data sheet for OC, if I'm reading it correct, input voltage for led is 1.25 volts with a maximum of 1.6 volts? View attachment 144471
Not quite that simple. The voltage you found is the forward voltage (Vf,) or how much voltage will be dropped across the input. The remaining voltage must be dropped across the resistor, and you'll use this amount, along with the desired current through the input, to choose your resistor value. There should be a spec in the datasheet regarding forward current on the input - maybe a few, like max and nominal values.

Once you know what current you want, calculate the resistor as follows:
R = (V-supply - Vf) / I

As an example, if you wanted 20mA (0.02A) of current, and you stick with 5V for the PWM, it would look like this:

R = (5 - 1.25) / 0.02
R = 3.75 / 0.02
R = 187.5

In theory, you recalculate for both extremes of forward voltage, as well as considering resistor tolerances. In practice, opto inputs are pretty forgiving and you can probably skip that.

Finally, resistors come in standard values and the math rarely hits them exactly. When calculating resistors for LEDs and opto inputs, it's generally a good idea to round UP to the next highest value. So, in my 187.5 ohm example above, you'd choose 220 ohms, which is probably close enough (17mA at 1.25Vf, 15.5mA at 1.6Vf.)
 

Thread Starter

liteace

Joined Mar 7, 2012
171
I'm real sorry for all the questions and the rubbish drawings, all I've got to work with at mo is pen, paper and mobile phone.

This will be put together on a through hole strip board, another drawing, does it look correct, for the pwm controller and the motor the supply will be the same 12 volts can the diode sit there?

Thanks in advance Screenshot_20180127-001855.png
 
Last edited:

Thread Starter

liteace

Joined Mar 7, 2012
171
Yes, i will drill off the track under R2 didn't / couldn't put it on my poor drawing.

Frequency is variable, but I'm sure I'll keep around 20Khz ish

Thanks
 
Last edited:
Top