Opto-isolator... do I need one... and what if both sides share a common ground?

Question on opto-isolators...

I would like to control 12V, 1A - 1.5A solenoids by switching a MOSFET with a 3.3V Arduino. I can use a IRLZ44N and do this directly since it is a logic level MOSFET.

However, I commonly see this type of circuit isolated with optocoupler/optoisolator. Is this unnecessary for my application? Attached to my Arduino I also have a GPS module and RF transceiver. Am I risking some kind of interference or noise by not using an opto-isolator on this circuit? Or is it more about risking a potential short circuit and avoiding a melt down?

Lastly, this project board will be going into a vehicle so both the 3.3V circuit and 12V circuit will share a common ground anyways. Does this defeat the purpose of the opto-isolator?

Thank you!

You are correct. You can do this without the opto.

But anything in a vehicle with an alternator should be protected against spikes and mistakes. The main power in the car can (briefly) go to 28V or even -12V if someone tries to jump-start it with a battery hooked up backwards. Make sure every component that receives power from the car can withstand at least this voltage range.

Think about every wire leaving your box. What happens if it accidentally touches a live 12V wire? You say you aren’t going to do that but the process of installing your box will have exposed wires and you’re going to make a mistake at some point.

But 3.3V totally contained within your box doesn’t need much protection against mistakes. So you don’t need the opto.

Thanks Morgan,

The Arduino, GPS, etc. will obviously receive regulated power and be protected from voltage spikes in that manner.

If, in the scenario you presented, a stray wire touches a 12V source then I would have to check the components to see what would happen to them.

I have minimal experience with MOSFETS but is it possible that some condition could cause the voltage across the drain/source could run backwards through the gate right to the Arduino? Is that reason enough for people to use an opto isolator?

The gate is insulated. You would have no problem with that back-feeding the Arduino.

Automotive power is extremely "dirty". Two items you should be aware of are:

  • The "+12" power can periodically increase to 50V (80V on older vehicles) for up to 80 -100 ms. This is due to the alternator response to a very large decrease in power draw (i.e. the rear window heater going off)
  • The "ground" in different parts of the vehicle can be up to 1 volt different (either polarity). Vehicle spec is 2.5 Volts but I think this would have to be an extreme situation
    .

Great, thank you!

While we’re on the topic of MOSFETS…

As I mentioned, I will be using them to turn on/off mechanical solenoids (12V). The vehicle voltage can vary but I don’t see how it will negatively affect the solenoid if I applied it right across those terminals.

So is there a need to regulate this voltage across the drain / source of the MOSFET? Or is this strictly for protecting the MOSFET from the aforementioned voltage spikes / reverse battery hook up?

Thanks again everyone.

So rather than using something like an opto-isolator it sounds like automotive applications would benefit more from carefully regulating voltage spikes.

All components in my project will be grounded in the same location so I should not have any concerns with different reference voltage (if thats the right term).

Is there a common strategy for going from 12V unregulated to 12V regulated, then 5V regulated, then 3.3V regulated? Does this sound like a "cascading power supply?" If this isn't the best way to go about this, what would be suggested?

Sorry for all of the questions!

You need to work out the power consumption on each of those regulated voltages. The Arduino 5V and 3.3V regulators are usually fine but they can't run large LEDs or even some LCDs.

Most of my Arduino projects use a Pololu regulator to go to 5V from the raw supply. Then I try to run most things off that.

Yes, the Arduino/LCD/GPS should be fine to calculate their current draw and spec appropriate linear regulators. I would have dedicated regulators to drop down from unregulated 12V to the regulated 5V and then regulated 3.3V for these components.

I guess the question is though, for the 12V mechanical solenoids being activated by the MOSFET... do you think there is any harm in putting unregulated 12V through the drain/source to turn them on/off, or should I invest in some kind of 12V regulator for those components?

Thank you

Many MOSFETS are limited to 20V. That would require protection.

You should also consider what happens if power is connected backwards. The MOSFET body diode will conduct and you can't turn it off.

Good thoughts, I am using IRLZ44N

https://www.mouser.com/catalog/specsheets/international%20rectifier_irlz44n.pdf

Looks like the drain source breakdown voltage is 55V … so a spike that high will essentially allow current to flow between drain and source if I interpret that correctly.

I can deal with a voltage drop of a common 1N4001 diode… I assume that putting this in series with my 12V source will take care of the reverse voltage.

That MOSFET needs a minimum of 4V gate drive according to the datasheet. At 3.3V it might
give issues (or not - individual device variation is quite large). A single NPN level shifter to 5V
might be one way to drive it reliably (opto isolation not needed for shared ground case).

Hi Mark,

When I look at the data sheet I see that it has a gate threshold of 1-2V and when looking at the graph of "drain to source current" vs "drain to source voltage", looking at the line for VGS = 3.0V with a drain to source voltage of 12V I should be able to source 10A ? I only need 1.5A maximum for very short periods of time.

Am I reading the data sheet incorrectly?

Threshold voltage is meaningless for most purposes. That's the voltage where it's just beginning to start to come on.

You are correct in using the charted line of VGS=3.0V But you need to consider the power dissipation in the MOSFET with that current. It may heat up very quickly so you can only run that level of current for less than one second. 1.5A is likely to be OK, but I would still do the calculations to check the temperature rise. It depends on what heatsink you have.

Thanks Morgan.

I tested my circuit with the IRLZ44N (it runs only 5 seconds at a time) and I can barely feel a temperature increase with a 1.5A load.

Required duty cycle is very low. I'll look into a heat sink and I'm going to run this circuit on and off once every few mins for hours on end and monitor the temperature.