MOSFET vs Optocoupler: Which is Best for My needs?

  • Thread starter Wetmelon
  • Start date
  • Tags
    Mosfet
In summary, the conversation discussed different components that could be used to drive two solenoids with a 12V supply based on a 5V signal from a microcontroller. It was determined that a MOSFET or a relay/optocoupler could be used, with a MOSFET being easier to use. The conversation also touched on using a PWM signal for controlling solenoids and the potential need for an optocoupler in this scenario. The conversation also included a discussion on using BJT's to control solenoids and the importance of using a resistor to limit the base current. It was also mentioned that using a MOSFET would require a higher gate voltage if the load is placed on the source side. Finally
  • #1
Wetmelon
154
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
  • #2
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:
  • #3
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.
 
  • #4
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.
 
  • #5
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:
  • #6
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:
  • #7
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?
 
  • #8
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.
 
  • #9
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 :)
 

1. What is the main difference between a MOSFET and an optocoupler?

The main difference between a MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) and an optocoupler is the way they function. A MOSFET is an electronic switch that controls the flow of current based on an input voltage, while an optocoupler is an electrical component that transfers signals between two isolated circuits using light.

2. Which one is better for switching high voltage loads?

In general, MOSFETs are better for switching high voltage loads due to their low on-resistance and high current handling capabilities. However, optocouplers can also be used for switching high voltage loads by using multiple optocouplers in series or parallel to handle the voltage and current requirements.

3. What are the advantages and disadvantages of using a MOSFET?

The main advantage of using a MOSFET is its fast switching speed and low on-resistance, which allows for efficient and precise control of current flow. Additionally, MOSFETs have a high input impedance, making them easy to drive with low power signals. However, MOSFETs can be more expensive and require more complex circuitry for proper operation.

4. What are the advantages and disadvantages of using an optocoupler?

An optocoupler's main advantage is its ability to provide electrical isolation between two circuits, which can be beneficial in applications where safety is a concern. Optocouplers also have a high voltage isolation capability and can handle high voltage spikes. However, optocouplers have a slower switching speed compared to MOSFETs and are more susceptible to temperature and aging effects.

5. Which one should I choose for my specific needs?

The choice between a MOSFET and an optocoupler depends on your specific needs and the requirements of your application. If you need fast switching speed and efficient current control, a MOSFET may be the better option. However, if you need electrical isolation and high voltage handling capabilities, an optocoupler may be more suitable. It is important to carefully consider the specifications and limitations of both components before making a decision.

Similar threads

  • Electrical Engineering
Replies
1
Views
813
Replies
42
Views
2K
  • Electrical Engineering
Replies
21
Views
5K
  • Electrical Engineering
Replies
28
Views
3K
  • Electrical Engineering
Replies
33
Views
5K
Replies
25
Views
4K
Replies
8
Views
867
  • Electrical Engineering
Replies
14
Views
2K
Replies
2
Views
1K
  • Electrical Engineering
Replies
12
Views
2K
Back
Top