3
\$\begingroup\$

Attempting to add some lights to a car's "intelligent" lighting system. Want to make sure I understand how my n-channel mosfets will react to losing their ground, while their gates are still connected.

schematic

simulate this circuit – Schematic created using CircuitLab

My circuit is a load on a n-fet, with either their gate pulled to ground, or logic level GPIO (I will be using logic level mosfets, probably not 2n7000s). The lighting system either has a mechanical relay, or most likely a n-fet itself. The n-fet would likely be controlled by PWM.

In this scenario, how will M1 and M2 react to their sources floating? Will they be damaged, will my micro controller be affected somehow? Would they react differently if the gate is pulled high or pulled low? Secondly, would NPN transistors work any better?

\$\endgroup\$
  • \$\begingroup\$ Some FETs will survive (those with large gate-bulk ratings. Some FETs will break down their gates. \$\endgroup\$ – analogsystemsrf Nov 23 '18 at 6:51
  • \$\begingroup\$ @analogsystemsrf that's not reassuring. Care to expand and answer? \$\endgroup\$ – Passerby Nov 23 '18 at 6:54
  • \$\begingroup\$ @analogsystemsrf what about NPN transistors? \$\endgroup\$ – Passerby Nov 23 '18 at 7:06
  • \$\begingroup\$ Its the source that is connected to ground, not the drain. \$\endgroup\$ – Linkyyy Nov 23 '18 at 7:48
  • \$\begingroup\$ @link fixed. Turkey and typing don't work good. \$\endgroup\$ – Passerby Nov 23 '18 at 8:05
0
\$\begingroup\$

A N-Channel MOSFET is switched ON by a positive charge on its gate relative to its source. As long as the gate-source voltage is higher than Vth, the MOSFET is "on". (Of course there are partially-conducting ranges but I assume your intention is to saturate it, i.e. switch on "hard".)

In your circuit, it is unclear what the source voltage will be relative to the gate when the lower circuit is not pulling the source to ground, mostly because it is an "unknown design". Furthermore, I am not sure what you are trying to accomplish with your N-Channel MOSFETs. When they are switched on, all of the lamp current still flows into your lower circuit. In other words, they are not enhancing the driving current of the lower circuit in any way; you could just connect your lamps directly to the lower circuit and dispense with the MOSFETs.

I would consider two different approaches:

  1. Use P-Channel MOSFETs in the upper circuit, and switch the positive side of the lamps. The gates can be driven by the lower circuit. Choose MOSFETs with a wide enough gate voltage range (e.g. > ±15V) and protect the gates with a series resistor and a zener from gate to source.

  2. Use a voltage divider and logic inverter on the output of the lower circuit, and drive your N-Channel MOSFETs with that inverted signal. Keep the MOSFET source terminals permanently tied to ground.

  3. Combine your microcontroller's outputs with the lower circuit's state using NOR gates:

schematic

R1 and R2 form a voltage divider suitable for converting 12V vehicle signals to 5V logic signals. D1 is to protect the logic inputs from possible voltage spikes.

The voltage divider presents less than 1 mA of load, but you may find it weakly "turning on" the vehicle's original lighting. Be sure to take a look in the dark, and measure current into this input with a multimeter with all lights and vehicle off, to be sure it doesn't put a small but ongoing drain on the vehicle's battery. If any of this turns out to be the case, there are other ways of buffering the input to prevent it.

\$\endgroup\$
  • \$\begingroup\$ The purpose is to add leds I can selectively turn on and off when needed via a microcontroller. It's not to increase the drive current or anything. If I were just adding the lights to act exactly like the existing ones do, then of course I wouldn't need the mosfets. As far as I can tell, both of your solutions would prevent controlling the lights independent of the car's lighting control, which includes dimming, fading, and timer functions for battery saving. \$\endgroup\$ – Passerby Nov 23 '18 at 17:45
  • \$\begingroup\$ Where is the input from your microcontroller in your schematic? Is it the 3V battery? \$\endgroup\$ – Kevin H. Patterson Nov 23 '18 at 19:37
  • \$\begingroup\$ If you are using a microcontroller to control your new lights anyway, why not monitor the output of the lower circuit, by using a voltage divider to drop it down to logic levels and connecting it to an input of your microcontroller? Then you can implement whatever you want in software. \$\endgroup\$ – Kevin H. Patterson Nov 23 '18 at 19:39
  • \$\begingroup\$ Yes the 3v to the first mosfet gate and the ground to the second gate represent the two states of the microcontroller gpio. \$\endgroup\$ – Passerby Nov 23 '18 at 19:40
  • \$\begingroup\$ Alternatively, you could use my suggested solution #2, but instead of using a logic inverter, use a NOR gate to combine the output of your microcontroller with the divided-down output of the lower circuit, and drive the gates with that. Either one could turn off or dim the lights as you wish. (But simply monitoring the lower circuit with your microcontroller would give you far greater flexibility, via software.) \$\endgroup\$ – Kevin H. Patterson Nov 23 '18 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.