MOSFET vs Optocoupler: Which is Best for My needs?

  • Thread starter Thread starter Wetmelon
  • Start date Start date
  • Tags Tags
    Mosfet
Click For Summary

Discussion Overview

The discussion revolves around the selection of components for driving solenoids based on a microcontroller (uC) signal, specifically comparing MOSFETs and optocouplers. Participants explore the suitability of these components for a 12V solenoid control circuit driven by a 5V signal, as well as considerations for a PWM signal in a noisy environment.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant questions whether a MOSFET can be driven with a 5V signal to control a 12V solenoid, expressing uncertainty about the need for a relay or optocoupler.
  • Another participant suggests using a BJT configuration to drive the solenoid, proposing a two-stage amplifier approach.
  • Clarifications are sought regarding the voltages in a BJT circuit, indicating a need for understanding the relationship between collector, emitter, and base voltages.
  • Discussion includes the potential for using a power MOSFET, with one participant noting that some MOSFETs may require higher input voltages to switch effectively.
  • Concerns are raised about the implications of connecting a 5V signal to a computer, particularly regarding the risk of damage when the computer is powered off.
  • Participants discuss the placement of the load in relation to the MOSFET, with one asserting that it should be on the drain side to avoid complications with drive voltage requirements.
  • There is a query about the relationship between gate and source voltages when the load is placed on the source side, indicating a lack of clarity on this aspect.
  • One participant expresses understanding after receiving clarification on the necessity of having a higher gate voltage relative to the source voltage.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to drive the solenoids, with some advocating for MOSFETs and others for BJTs. There is no consensus on the optimal component choice, and several technical details remain contested or unclear.

Contextual Notes

Participants highlight various assumptions regarding voltage requirements and component behavior, particularly concerning the drive voltage for MOSFETs and BJTs. The discussion reflects uncertainty about the implications of circuit design choices and the specific characteristics of components.

Wetmelon
Messages
154
Reaction score
1
Hi all, I have a couple scenarios, and need to decide on which component best suits my need:

I have two solenoids that I need to drive with 12V, based on a 5V uC signal. Simple on/off switch. I'm very new to using MOSFETs, so I'm not sure if you can drive 12V with a 5V signal (which would have a Vbe ~ 6.5V in a BJT, and would blow it up). Do I need a relay/optocoupler here, or will a Power MOSFET be able to handle it? max 1A, 12V.

Also, I have a PWM signal that is potentially noisy, anywhere between 15-250Hz. I'm pretty sure an optocoupler would be most appropriate here? How would a MOSFET compare?
 
Engineering news on Phys.org
You can develop base current from 5 volts (by putting a suitable resistor in series) and this will be able to turn on a transistor which can then switch your solenoid.

If drive current was limited, you could use a two stage amplifier like this:

[PLAIN]http://dl.dropbox.com/u/4222062/Solenoid%20control.JPG

What would you be using the PWM for? Solenoids need to be on or off, but not half way on or off.
 
Last edited by a moderator:
I'm not sure I entirely understand. What's the collector and emitter voltages on the NPN transistor, and the base voltage on the PNP?

The PWM signal is something separate from the solenoids. It's an RPM signal that I need to count pulses from, in a noisy car environment.
 
I have modified the diagram above to include the voltages. These are from a simulation.

The NPN transistor controls the base current of the PNP transistor.

This is so that the control current from the computer can be small.
 
Ok, I see. So you have a large voltage drop across the 470 ohm resistor (it's in series after all :P), which gives you a Vbe of only .6V, which is normal. The base current of the PNP is a function of the base current on the NPN, the gain, and the size of the resistor on the NPN collector/PNP Base, right?

So you've proven to me that a circuit can be relatively easily created with BJT's, but isn't it still easier to simply use a power MOSFET? Or would I have to use an optoisolator to isolate the 12V circuit from the 5V?

MOSFETSolenoid_001.png


Also, what do you use to make your circuit diagrams? I just did this one in paint, but it was a pain :/
 
Last edited:
It probably would be OK to drive a Mosfet from 5V from a computer although some Mosfets need more input voltage than that to switch. You could find one that did work OK.

I wouldn't feed 5 V to a computer like that diagram shows, though.

The problem comes when you turn the computer off and there is still 5 volts coming into it from outside via your 10 K resistor. It may be OK or it may blow up a computer chip.

The output of a computer chip should be 5 volts and this would be OK on its own. Just drive the Mosfet via a resistor. Maybe 1 K.

I use Paint too. Your diagram was fine, but you could enlarge the image and clean up some of the wires where they overhang each other. If you select the eraser tool and then push control-minus, you can make the eraser very small. This let's you get into small spaces.
If you use control + you can get it back to normal size or as big as the screen.

If you want to put writing on the screen, write it on a blank area somewhere and the position it with the dotted rectangle thing. This let's you position it more exactly.

The editor in LTSpice is easier to use and gives good diagrams fairly easily.
[PLAIN]http://dl.dropbox.com/u/4222062/solenoid%20driver.JPG
 
Last edited by a moderator:
Hmm. Ok. Well, thanks again for your help :)

Oh, one last question. With MOSFETs, does it matter much if you put the load on the Drain or Source side?
 
Yes it does matter. Put it in the drain.

If you put it in the source, the drive voltage needs to be nearly as high as the supply voltage.
 
If you put it in the source, the drive voltage needs to be nearly as high as the supply voltage.
Why is that, exactly? I haven't been able to find a simple explanation of how gate and drain voltages compare to source voltage.
 
  • #10
If most of the supply voltage is across a load between source and ground,

and the gate has to be 3 or 4 volts higher voltage than the source,

can you see that you need a LOT of voltage on the gate and this has to come from the drive circuit?
 
  • #11
and the gate has to be 3 or 4 volts higher voltage than the source,

Oooohhhh. So the ON voltage is relative to the source?! This makes more sense now! Thanks a ton :)
 

Similar threads

Replies
21
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
6K
  • · Replies 28 ·
Replies
28
Views
6K
  • · Replies 25 ·
Replies
25
Views
6K
  • · Replies 33 ·
2
Replies
33
Views
6K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
2
Views
2K
Replies
8
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K