MOSFET help without microcontroller

Without creating too much distraction, I want to briefly explain my goal with a circuit.

I want to DIY a basic circuit for my motorcycle using only basic components and the on-board power and switches. Currently my front turn signals run as parking lights and they have three wires each. One for negative, one for the parking light and one for the turn signal. What I want to achieve is that the parking light remains off for the duration of the turn signal pulse. Currently the parking lights remain on as the turn signal flashes brighter.

I’ve consulted ChatGPT to help my figure out the best way to create an in-between-circuit that I can add and remove from the existing setup. I want to create a small module that I can plug in and plug out, which contains the new feature of disabling the entire parking light signal for as long as the turn signal switch is in the left or right position until it’s released, using a condensor to absorb the pulse. ChattyGPT came up with either a MOSFET circuit or a relay circuit, but both got more complicated over time, losing it’s purpose and Chatty made me feel smarter and dumber at the same time.

Now, I’m for guidance on how to create a relatively simple setup that allows me to achieve my goal. Any feedback or questions are welcome.

Thanks!
Tim

Ideally it ends up like this:

3 wires in → [ components in some sort of box ] → 3 wires out

I just can’t get a grip on how to connect the components and which ones I actually need.
The entire system runs on 12V (+/-2V)

Hi Tim
Welcome
What are the wattages of the parking light and turn signal globes please.
Cheers Bob
And what style of base.

The base is a BAY15D which takes bulbs of 5W/21W.
Currently I have replaced them with LED substitutes which draw around 0.8W/3W respectively (somewhere in that neighbourhood).

Ideally both types of bulb can run on the new circuit.

Hi Tim
You could try this.


You will need a P channel Mosfet as a high side switch.

The gate connection to Gnd via R (about ay 2k or so) will hold the Mosfet ON until turn voltage is applied. This voltage on the Gate will turn the Mosfet OFF thus extinguishing the park lamp.
A good idea might be a 10V zener diode from gate to source to prevent Gate over voltage. Some Mosfets can handle 20V gate voltage but the zener is good insurance.

You will have to try this out, should work. R is not critical ut should be chosen to keep zener power dissipation to about half what a spec sheet says.
Cheers Bob

1 Like

Thanks for your solution Bob!

This actually looks close to what Chatty GPT and I figured out, until I recognized that this solution seems to cut off the park signal only when the turn signal is engaged, so only on the turn blink pulse and not in between. That’s why a capacitor was introduced. Can you confirm this?

I do have to mention that that was with an N-channel Mosfet so I guess the P works differently.

Hi Tim

That is correct. If you want to turn it off between turn pulses that probably can be done but it gets progressively messy.

Yes it does. like a NPN and PNP transistor, the voltages are effectively reversed.
An N Mosfet would have to be a low side switch. The lamps seem to share the same earth so I am assuming they will share the same bit of metal to plug into. To use low side switching you would have to separate the earths. To use an N Mosfet as a high side switch gets VERY messy involving charge pumps and all sorts of things. Forget that.

To think about what you want you would have to know the time between pulses or the repetition time of the turn indicator. The other alternative is to find another set of contacts in the turn switch. This might involve a 555 timer. I don’t think just using a magic capacitor will work.
Cheers Bob

As a matter of interest just why do you want to do this. My or anyone else’s car does not worry about it. There is quite a marked difference in illumination between the 2 lamps.

2 Likes

That is correct. If you want to turn it off between turn pulses that probably can be done but it gets progressively messy.

That is my conclusion too, using a mosfet.

To think about what you want you would have to know the time between pulses or the repetition time of the turn indicator. The other alternative is to find another set of contacts in the turn switch. This might involve a 555 timer. I don’t think just using a magic capacitor will work.
Cheers Bob

I’ve seen it done with just a capacitor, a diode and an SPDT relay. But yes, that is a relay instead of a mosfet. Primarily I was avoiding the relay for dimensional reasons and space to tuck away the new module. In the example I found the capacitor actually does a good job delaying the parking light signal in between pulses and after about a second after disengaging the turn signal switch the parking lights (DRL in the example video) turned on again.
At this point I may have to reconsider the relay because that is a circuit that I know can work with less understanding and less components.

As a matter of interest just why do you want to do this. My or anyone else’s car does not worry about it. There is quite a marked difference in illumination between the 2 lamps.

Well, because I want to. That’s the short story.
The long story is that in my country having parking lights in the turn signal housing is not a standard setup. They are usually in their own housing or they are little wedge bulbs that are placed somewhere in the reflector of the low beam or high beam.
Since I’ve replaced my broken headlight (both low and high beam function in one H4 housing) for a new one that’s not OEM but much better than the old one. Without a place to but the parking light in, I wasn’t going to drill straight through the reflector of a costly new headlight so instead I searched for dual filament fittings for the turn signal housings.

Seemed simple enough and indeed it works fine as is. But for visibility reasons and helping other traffic know what my intentions on the road are (therefore helping myself), I wanted there to be a clear on-off pattern as almost all other turn signals show. There is also a road-legal-vehicle type of reason at play.

I do want to thank you for thinking along and creating your schematic earlier, really.

1 Like

Hi Tim
Fair enough. I did not realise that you might not be in Australia and the rules might be different.

If you go back to my circuit. In theory a capacitor and diode should work.Placed across R between gate and ground. A diode between gate and turn signal to prevent the cap discharging back through the turn lamp when off. Cap discharges via R.

But, the time constant would be quite long which means the cap would be large and R would be fairly high to keep the Mosfet off between turn signals.
My concern here would be the Mosfet switching time. The OFF time would be fairly quick as the cap in charged directly from 12V via the diode. That is if the fuse did not fail with the charging current but fuses are pretty slow. The Mosfet switching ON is another matter. For quite a bit of the time constant the Mosfet would be just an amplifier with a slow build up of current as it starts to conduct. If you were using incandescent lamps this current could be quite high as the cold resistance of the lamp is very low until it heats and rises as it comes on. This will cause the Mosfet temperature to rise and could get to a dangerous level if operating for some time as having the turn indicator on while waiting for traffic lights or some other reason. LED lamps would be better for this reason but they will glow with quite a small current so you might see them ON a bit between turn signals.
These are a couple of reasons I suggest that a capacitor to delay the Mosfet might not be a practical solution. I think there would be a 555 timer solution to switch a Mosfet but I would have to think about it.
Cheers Bob

1 Like

Bob,

A question about the MOSFET switch ON and the current/heat while it is amplifier mode. As I understand the solution, the capacitor and resistor are chosen so that the MOSFET stays in switched off mode until (a period) after the last pulse from the turn signal. In other words the time constant is sufficiently long that the cap does not discharge down to the MOSFET threshold for starting to turn on before the next flash. So the current/heat is no worse when waiting at traffic lights with indicators on than it is with a single flash of an indicator. Is that right or e.g. is my time constant going to be way too long and keep the parking light off for too long after the last flash?

Re the 555 idea - I am thinking of a one-shot (e.g. 555) that has a pulse length equal to the length of a one flash-off period plus a part of one flash-on period, is triggered by the falling edge of each flash and is wired so that the MOSFET stays off so long as either the one-shot pulse is active or the flash pulse is active. After the last flash the parking light would come back on after a time which is the length of the one-shot pulse i.e. a bit more than one flash-off period. Does that align with what you were thinking?

Regards,
-Tim.

Tim,

I wouldn’t quickly discount a relay rather than a MOSFET in this application. There are lots of small 12V relays available, both magnetic and solid state, with defined on-above and off-below input voltages. Using the normally closed contacts of a magnetic relay in series with the parking lights means that the coil is only drawing current when the indicators are on. The C/R time constant can be chosen to keep the capacitor voltage just above the relay’s on-above voltage during the period between flashes so that after the last flash the parking lights come back on in just over a flash-off period. A relay doesn’t have the current/heat problem with amplification (partly on) mode that Bob pointed out because it is always either on or off. Whilst physically larger than a MOSFET, a relay is physically and electrically more robust. You could probably get away with soldering the components and the connection wires to the pins of a relay and wrapping the whole thing in electrical tape, which wouldn’t be the case with a MOSFET!

Regards,
-Tim (2).

1 Like

Hi Tim (Both)
I had a quick look at the 555 solution and I think that what is needed is a 556 as 2 timers would be required and you still have to use the output to switch a Mosfet or relay.

The capacitor across a relay coil would be worth trying. As you say Tim2 the time constant would have to be arranged to keep the relay on by keeping the voltage above the “must remain on” point. The “R” part of the R/C time constant would be the relay coil DC resistance.

The only down side of this would be the capacitor which could work out to be quite large. This would be a short circuit at switch on and might cause problems by the fuse failing with the inrush current.. As the voltage across the relay/capacitor drops in an exponential manner the time constant of this combination would have to be 3 or 4 times the “OFF” time. The voltage will drop by about 62% during the first time constant. So selecting a relay with the lowest “hold” voltage would be an advantage.

While on the subject of relays you mention a solid state relay. Most of these commonly available are AC load only as they switch at the zero volts crossing. As the DC never gets to zero they will not switch. There are types that will switch “any time” but not common and would be a bit scarce at the normal hobbyist outlet. You would have to go to someone like Element 14 or RS Components to find them easily. Also they are SPST switching and have no “normally closed” contact. You might find one that has this change over function but I personally have not seen this and to be honest I have never looked.
Cheers Bob

Bob,

Good points re solid state relays - not suitable for this application.

The only SSR I have used with DC was very low power (maybe just enough power to control a magnetic relay :slight_smile: I think it was essentially an opto-coupler with a pair of photo-mosfets (for bi-directional switching) instead of the usual photo-transistor on the output side.

Regards,
-Tim.

Hi Tims (2)
Sorry guys, must have had another brain snap.

Refer the relay/capacitor combination above.

This combination will have to be switched from the turn signal via a diode with enough current capability to operate the relay and charge the cap. Preferably a schotky for its lower forward voltage drop.
Reason: To prevent the capacitor discharging quickly via the lamp filament / LEDs.
Cheers Bob

Hi Tim(2)

Plus the rest of paragraph.

You are correct of course. I had overlooked the fact that the cap should be recharged at every turn signal switch on and the turn off sequence should only happen once when the turn signal is used. As most Mosfets are physically fairly large (TO220 or similar) they should handle this once only heat build up OK.
Cheers Bob
PS: I seem to be getting a bit slack in old age. Please forgive.

Hi Bob,

This combination will have to be switched from the turn signal via a diode with enough current

You are correct about the diode, as multiple examples I’ve found have all wired both the capacitor and the diode parallel to the relay’s coil. I beleve they were connected in polar opposites but I’ll have to recheck that.
I think that the relay is just the way to go, as the type of relay I plan to use is built for automotive applications and can surely handle some amps even though I won’t give it any with the LED bulbs.

Now it’s just selecting the parts. What does your instinct tell you? Am I in the ball park?

  • 1N4007 diode
  • 25V 4700µF capacitor
  • automotive relay (one pin remains unused) T.B.D.

Also, if you can provide me with some formulas on how I should calculate the (dis)charge time of the capacitor to slightly exceed the turn signal pulse I would be grateful.

Greets, Tim(1)

Bob,

Hmmm, yes, I am reconsidering relay over MOSFET. The latter has the endearing feature of high input impedance so does not affect the cap charge or discharge, whereas a relay coil is the opposite extreme.

Regards,
Tim(2)

Hi Tim

The diode in parallel with the relay coil is a flyback diode used to suppress the reverse polarity of the voltage spike generated at switch off with the collapsing field. This could be quite large at a few times the applied voltage and will damage connected electronics. Sometimes this diode is built into the relay and you have to be careful here as the relay becomes polarised and the + and - connections have to be correct. This diode MUST be used if a Mosfet or other electronics is used to switch a relay. It also has to handle a current which could be more than the relay operating current.

The series diode to prevent cap discharge back via a lamp filament or the like has nothing to do with the flywheel diode.

t (seconds) = R (Megohms) X C (Microfarads)
If discharging a cap via R the cap will lose about 62% of its charge voltage in this time. This is called 1 “time constant”

This link will explain it all and show a graph of discharge rates.
https://www.electronics-tutorials.ws/rc/rc_2.html

To have any use you will have to know the time involved and relay details to get the coil DC resistance and must hold voltage. This info is unknown on this side of things as yet.

1N4007 diode: A schottky might be a bit better to take advantage of the lower forward voltage drop also this one is only good for 1A. Any of the 1N400X variety would be OK if the relay/cap initial or inrush current is about 0.5A which I doubt. This current could be several Amps if a high value cap has to be used and if this is the case I personally would use a MBR20100CT or at least MBR735 Schottky here. Both T0-220 package.

25V 4700µF cap: Depends entirely on relay characteristics and timing. Like how long the “time constant” will need to be to keep the charge above X volts for Y time. Like a chicken and egg isn’t it. Fun with a capital F.
Cheers Bob

Hi Tim 2

True but the possible down side here is that the Mosfet would be ON for most of the time, only turning OFF when using the turn signal. This of course might not be a problem, especially if you overcook the Mosfet and use a big hefty one. The current for a 21W lamp would be about 1.75A which should be handled with ease with a 30 or 50A device. 12V should make sure it is switched hard on which should have minimal heating problem. Switch would have to be high side P channel device though or for low side you would need isolated grounds which you don’t have
Cheers Bob

Bob,

How about an n-channel MOSFET driving a normally closed relay? MOSFET is only on when indicators are on, ditto relay. C/R timing is tuned independent of (low resistance) relay coil.

Regards,
Tim(2)