Need help using MOSFET as switch for 12V application.

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
As a preface I would like to state that my understanding of MOSFETs (electronics in general) is limited but has grown exponentially over the past week of reading. I would like to incorporate one as a switch to allow for a feature that I will describe below.

What I'm trying to achieve is for a circuit to drive and control tail/brake/turn signal function for some brake lights.

The challenge is to be able to override brake input signal (while braking) so that the turn signal input can flash bright/dim and then brake input can come back again once the turn signal is cancelled.

What I have worked out is to add a mosfet nch depletion mode tranistor in line with the brake input. The brake input is to a on/off pin of a PWM'ed voltage regulator so it can always come on when it is the only input.

When the turn signal input is activated the turn signal input would act on the transistor to cut out the brake signal and allow flashing as a turn signal should do.

My challenge is trying to figure out if I can have the transistor in open state even while the turn signal input is cycling on/off from the turn signal relay. I was hoping to use a RC circuit to continue feeding the gate of the MOSFET with voltage to keep it in the open state until the turn signal input is cancelled.

I added a zener diode and was thinking that it could provide a steady voltage to the gate in full saturation mode until such time that the zener voltage is too high thus avoiding the active region of the gate/mosfet.

Can anyone please provide insight into
1) Will the lower zener voltage (~6V?) be adequate to switch the mosfet as I have it set up?
2) Do I need a resistor on either the drain or source side of the mosfet and what ohm?
3) Is my RC circuit set up with the capacitor/resistors properly? and what values of the resistors/capacitor would I need to achieve roughly 0.5sec before the mosfet is closed (on) again. (I'm guessing the cap would not need to be very large since the gate really doesn't consume any current...)
4) Is the mosfet I have chosen suitable or any better recommendation?

Thanks for having a look!

 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
17,496
1) Will the lower zener voltage (~6V?) be adequate to switch the mosfet as I have it set up?
That MOSFET appears to switch from full-on to full-off over a Gate-to-source voltage range of 6V. However it's not clear to me what your Source voltage is, so it's hard to guess what the Vgs range is.
2) Do I need a resistor on either the drain or source side of the mosfet and what ohm?
That depends on the load. I would assume the load has its own current control, so I wold not bother with a resistor if that's the case.
3) Is my RC circuit set up with the capacitor/resistors properly? and what values of the resistors/capacitor would I need to achieve roughly 0.5sec before the mosfet is closed (on) again. (I'm guessing the cap would not need to be very large since the gate really doesn't consume any current...)
Nope, that won't work. The gate will immediately discharge through the diode return to ground. Your capacitor only serves to hold the voltage at the zener voltage, since it quits discharging through the zener when the voltage hits the zener voltage.
4) Is the mosfet I have chosen suitable or any better recommendation?
It's too complicated for my way of thinking. I'd just use a "normal" MOSFET.
 

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
Hi wayneh, thanks for the reply.

The drain is fed 12-13V+, the source would be connected right to the on/off pin of the Vreg (but since there is no load between the mosfet and Vreg I'm assuming it would still be at 12-13V+, No?). I was gong to feed the gate from 12-13V+ as well but use the zener diode to bring it down to 6V and have that go to gate (is that adequate? that is -6V relative to the drain and source no?)

From the data sheet dn2530 it says the Vgs off is -1.5 to -3.5, so would being at 6V switch the transistor?

The on/off of the Vreg will use minimal current really (20uA from the data sheet), will that be adequate to consider it a load?

The reason that I placed a resistor to the left of the zener diode is so that the gate will eventually be drained. From what I read the gate will be left with a charge and will not dissipate, leaving the circuit open (kind of like a capacitor) unless it's allow to ground through a resistor. Is that wrong? So could I set up the RC before the zener diode ? This way I can vary the time that the zener sees voltage high enough for zener breakdown?

Thanks again.
 

SLK001

Joined Nov 29, 2011
1,549
I believe that you need to select an ENHANCEMENT MODE MOSFET, not DEPLETION MODE. That way, all of your inputs will be positive.
 

Tonyr1084

Joined Sep 24, 2015
7,853
I, too, am somewhat a novice to all this stuff. But what it looks like to me is that you have independent brake lights and turn signals. My Tacoma has that arrangement. Yet, I tow a trailer that has integrated brake and turn signal lights. To get them to work properly I had to buy a module designed to convert the independent signals into a combined signal. That was a few years ago and I don't remember the exact unit I got but it's one like this:

http://www.walmart.com/ip/Reese-Towpower-Tail-Light-Converter/24357025

I'm also not certain, but it sounds to me like you want to DIM the lights during the blinking process. Word of warning: in bright daylight situations dimming the lights may not be as effective as completely blinking them on and off. AND if this is for use on the roads then DOT won't allow them. You could get a ticket and be made to remove the system.

Biscuits to ponder.
 

wayneh

Joined Sep 9, 2010
17,496
From what I read the gate will be left with a charge and will not dissipate, leaving the circuit open (kind of like a capacitor) unless it's allow to ground through a resistor. Is that wrong?
No, that's correct, the gate is like a tiny capacitor. It cannot be left "open", because then the charge of that capacitor becomes undefined and it can float around and cause all sorts of trouble. Best to pull it high or pull it low and not let it spend much time in between.

Did you see shortbus's question? It feels like you're reinventing a wheel here, and making it more complicated than it needs to be.
 

Tonyr1084

Joined Sep 24, 2015
7,853
Just occurred to me, they're probably doing it with Exclusive OR gates (XOR). You only need add one more line for parking lights.

Brake Lights.png
 

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
Shortbus, it's for a motorcycle so I dont have much space to play with the switches. I was hoping to add a few small components to the circuit and have it all plug and play instead of tearing into a harness and switches. Self cancelling is not my problem in this application that I was looking to solve.


Tony1084, thanks for the input. I'm looking into the logic gates, first I need to understand them lol. Its for a motorcycle so I thought it best to try and make it plug and play with a few small components in the circuit if I can get it right.
 

Tonyr1084

Joined Sep 24, 2015
7,853
A regular OR gate (however many inputs) only requires any one of them to be high (logic level 1) in order to have an output (logic level 1) An "Exclusive OR gate" (designated as XOR) operates pretty much the same way with one MAJOR exception: Either input will produce an output. But (and here's the big deal) if BOTH inputs (of a 2 input XOR) are high (logic level 1) then the output goes LOW (logic level 0)

What happens is that if you step on the brakes both red lights light up. But if you turn on a blinker, at the moment that both the blinker and the brake light are on - the slave (the single light) would blink off. If you take your foot off the brake the light would blink as normal. With your foot on the brake the brake light / turn signal light will blink.

The only thing my circuit didn't show was the parking / running light(s).

You're doing this on a motor cycle, I'm not sure of the brake and blinker light arrangement you have so I'm not sure this will help you. OR you could buy one of those modules I linked in that converts a four light (two brake / two signal) into a two light (break and blinker) system.

I'm not good with explaining things, if you have any questions - post them and I'll respond.
 

eetech00

Joined Jun 8, 2013
3,859
As a preface I would like to state that my understanding of MOSFETs (electronics in general) is limited but has grown exponentially over the past week of reading. I would like to incorporate one as a switch to allow for a feature that I will describe below.

What I'm trying to achieve is for a circuit to drive and control tail/brake/turn signal function for some brake lights.

The challenge is to be able to override brake input signal (while braking) so that the turn signal input can flash bright/dim and then brake input can come back again once the turn signal is cancelled.

What I have worked out is to add a mosfet nch depletion mode tranistor in line with the brake input. The brake input is to a on/off pin of a PWM'ed voltage regulator so it can always come on when it is the only input.

When the turn signal input is activated the turn signal input would act on the transistor to cut out the brake signal and allow flashing as a turn signal should do.

My challenge is trying to figure out if I can have the transistor in open state even while the turn signal input is cycling on/off from the turn signal relay. I was hoping to use a RC circuit to continue feeding the gate of the MOSFET with voltage to keep it in the open state until the turn signal input is cancelled.

I added a zener diode and was thinking that it could provide a steady voltage to the gate in full saturation mode until such time that the zener voltage is too high thus avoiding the active region of the gate/mosfet.

Can anyone please provide insight into
1) Will the lower zener voltage (~6V?) be adequate to switch the mosfet as I have it set up?
2) Do I need a resistor on either the drain or source side of the mosfet and what ohm?
3) Is my RC circuit set up with the capacitor/resistors properly? and what values of the resistors/capacitor would I need to achieve roughly 0.5sec before the mosfet is closed (on) again. (I'm guessing the cap would not need to be very large since the gate really doesn't consume any current...)
4) Is the mosfet I have chosen suitable or any better recommendation?

Thanks for having a look!


Hi

I'm trying to make sense of your diagram.
Is the rest of this circuit already installed and working, and your just trying to add the mosfet?
Or is the whole circuit new?
 

shortbus

Joined Sep 30, 2009
10,045
Shortbus, it's for a motorcycle so I dont have much space to play with the switches. I was hoping to add a few small components to the circuit and have it all plug and play instead of tearing into a harness and switches. Self cancelling is not my problem in this application that I was looking to solve.
I'd start by studying the way the automotive switch works, and draw out the circuit that way. Then you can convert it to work with logic gates and mosfets. Though most bikes I'm familiar with (older model Harley's) use separate brake and turn signal lights. And usually when "customizing" a bike, the turn signals are one of the first things taken off, and the old school "hand signal" is used by the rider.
 

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
tonyr1084, that it's exactly The function I need. Tha!

eetech00. The rest of the circuit is functional. I just needed to know how to have the in puts one or the other but not both.
 

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
Just a question about the XOR logic gate.

The voltage regulator that I'm trying to turn on/0ff needs >=2V/<=0.8V respectively for those functions. If the XOR has high/low ranges that don't correspond can I simply use a resistor or zener diode to bring the signal into range for operating the on/off of the voltage regulator?

Since I'm also working with a 12-13.7V source can I also drop the voltage to appropriate supply range for the XOR with a resistoror zener diode?

Thanks.
 

crutschow

Joined Mar 14, 2008
34,285
Just a question about the XOR logic gate.

The voltage regulator that I'm trying to turn on/0ff needs >=2V/<=0.8V respectively for those functions. If the XOR has high/low ranges that don't correspond can I simply use a resistor or zener diode to bring the signal into range for operating the on/off of the voltage regulator?

Since I'm also working with a 12-13.7V source can I also drop the voltage to appropriate supply range for the XOR with a resistoror zener diode?
A CMOS CD4070 XOR gate will operate up to 18V so you don't need to reduce the voltage. But add a 10Ω resistor in series with the battery voltage along with a ≥100μF capacitor to ground near the XOR power pins, to minimize the effects of any voltage spikes.
Its no load output logic output levels are equal to Gnd and the supply voltage so that should be fine for turning the voltage regulator on/off.
 

Thread Starter

20_rc51_00

Joined Oct 30, 2014
14
I got some CD4070s and all the prototyping worked out well. I had to use a 20 V powersource (my dewalt battery on the bench top, not what will be used in the final circut) so I ran it all from a 6.8V zener as a v-reg. Now this was all just for testing the function and it all worked great.

I placed 10Kohm 1/4W resistors to ground on all input pins that were used so that they would be pulled to ground when there was no input. I connected all unused inputs to ground.

Can I use the source voltage from the motorcycle brake and turn signals straight to the input pins without any voltage regulation and a 10Kohm 1/4W resistor to ground?
 
Top