Circuit advice for fan/led control

Hello folks.

The attached image is a Fritzing circuit drawing for turning off/on a dozen LEDs and 3 fans. This is the first time I have used the program. And the first time in 20+ years I've "designed" a circuit. So, feel free to laugh. I don't think I did too bad though.

All of the components I have on hand. That's really the only reason for using these specific components.

The optocouplers are LiteOn LTv-817B I scavenged from an older board. The mosfets are FQP30N06L N Channel Mosfets that I ordered a while back. The blue LEDs are LiteOn LTL17KCBH5D-002A. And the red one I have no clue about. Just know it works with the 1K resistor without getting hot.

This is basically 2 circuits in one so as to use the same 12v source. The LEDs and the fans will not be ran at the same time. The 12v supply is rated at 1.5A. All the resistors I had on hand or scavenged the closest I could find to what was needed.

All that said, anyone see any glaring issues with this? I'm sure there are probably better ways of accomplishing the end goal. But I'm learning and that's what matters in the end.

Thanks for taking a look.

There are several items that need addressed with this circuit.
1-mosfets are backwards. The body-diode is forward biased
2-R4/R11 will always conduct around the mosfet. They need to be eliminated
3-The mosfet gates are floating. You need R4/R11 to be moved to gate-to-ground.
4-each fan needs a diode.
5-R3/R12 ?

There are other mistakes here as well, which others will chime in on.

Hi,
OPs circuit.


Tom.. :slight_smile:

Hi,
If you are a first timer at Fritzy, congratulations.
A very good effort, I like your attempt to keep everything open and clear.

I have done a quick redraw just to show how your layout can be improved along with the suggestions from @tinman13kup.


Keeping positive wires across the top of each section, so current (conventional current) flows down to the gnd.

Tom... :slight_smile:
Might I suggest you try ExpressPCB as your CAD program, google ExpressPCB download.

tinman13kup:
There are several items that need addressed with this circuit.
1-mosfets are backwards. The body-diode is forward biased
2-R4/R11 will always conduct around the mosfet. They need to be eliminated
3-The mosfet gates are floating. You need R4/R11 to be moved to gate-to-ground.
4-each fan needs a diode.
5-R3/R12 ?

There are other mistakes here as well, which others will chime in on.

I really appreciate the comments. Brings up a question or two though.

1 - Oops! Yeah, that should have been obvious even to me.

2 - This has me confused. And the reason is, somewhere in my research of mosfets (wish I would have kept that link) I read that one should place a resistor across the 2 of the pins on the mosfet. If my memory (which isn't all that good these days) serves, I believe the article(s) said it was from the gate to the source to basically "turn off" the mosfet when the gate was not charged. Hope I'm wording that well enough for someone else to understand. So, is a resistor not needed to "turn off" the mosfet? (Don't answer. Cause you already did)

3 - Doh! Question in number 2 answered. Guess I should have thought more about it before I typed all that out. My memory dropped the ball again. Gate to ground! Gate to ground! Gate to ground!

4 - Why a diode for each fan? Is it because of voltage and/or current created by the fan turning after power has been switched off?

5 - There again, read somewhere it was good to have them. The article made sense. So, i went with it.

Thanks again for taking time out of your day!

TomGeorge:
Hi,
If you are a first timer at Fritzy, congratulations.
A very good effort, I like your attempt to keep everything open and clear.

I have done a quick redraw just to show how your layout can be improved along with the suggestions from @tinman13kup.


Keeping positive wires across the top of each section, so current (conventional current) flows down to the gnd.

Tom... :slight_smile:
Might I suggest you try ExpressPCB as your CAD program, google ExpressPCB download.

Oh WOW! :o

I can see you have at least one or two days more experience with circuits/Fritzing than I do! That's awesome. Thanks for the hard work! It's easy to see where I (I won't say failed) didn't do so well. And I clearly see what you mean about keeping positive to the top. It does make things easier to follow.

And I will certainly have a look at ExpressPCB!

Thanks again!

4 - Why a diode for each fan? Is it because of voltage and/or current created by the fan turning after power has been switched off?

Yes. You might only be powering those fans with 12Vdc, but upon removing it, the power spikes can be magnitudes higher, which can damage the mosfet.

5 - There again, read somewhere it was good to have them. The article made sense. So, i went with it.

those would act to limit the current through the opto isolator. The gate on the mosfet requires 0 current, (voltage controlled device), and the 10k gate/source resistor limits the current to ground.

OK. Well, have done a little reading up on diodes. Have to admit, I remember absolutely squat from the college days when it comes to diodes. The only ones I have available at this time are several 1N400X Series. (2) 1N4002, (1) 1N4004 and (1) 1N4007. They are good for 1amp and the 1N4007 is rated to 1000V. My fans only draw 0.2 amps each.

So, am I thinking correctly that the 1N4007 can handle all 3 fans? Or better to use one each? I "might" have some more of these still on old boards if I need 3 separate ones.