Controlling 12VDC fan on different power rail - Page 1
Forum section: electronics / beginners

author: made2hack
author_rank: Frequent Contributor
timestamp: January 29, 2018, 01:50:58 pm
content: Hi all,Wondering if this following circuit would work and if it is the proper way to control a fan which is on a different power rail than the MCU.Thanks

author: Zero999
author_rank: Super Contributor
timestamp: January 29, 2018, 02:07:00 pm
content: That's fine, if you want active low, but it will only switch the MOSFET at low speeds, so is only good for on/off control, not PWM. If you want active high, then exchange the positions of R2 and the opto-transistor, so the resistor pulls it down and the transistor turns it on.

author: made2hack
author_rank: Frequent Contributor
timestamp: January 29, 2018, 03:23:27 pm
content: Thanks,Yeah, I can't use PWM with this fan, it's a cooling fan from Sunon and they don't recommend PWM. Plus, I only need it to periodically turn on off at certain intervals.

author: james_s
author_rank: Super Contributor
timestamp: January 29, 2018, 08:23:26 pm
content: Shouldn't even need to be that complex in most cases. A simple NPN transistor or N channel mosfet on the low side of the fan ought to work, driven directly by the uC pin without the opto isolator.

author: Ian.M
author_rank: Super Contributor
timestamp: January 29, 2018, 08:26:32 pm
content: Quote from: james_s on January 29, 2018, 08:23:26 pmExactly, as long as the MCU and the fan share a common ground.

author: David Hess
author_rank: Super Contributor
timestamp: January 29, 2018, 08:54:09 pm
content: If the MCU and fan supplies share a common ground which you show in the schematic, then the optocoupler is not even required but there is nothing wrong with using it.

author: made2hack
author_rank: Frequent Contributor
timestamp: January 29, 2018, 09:38:52 pm
content: Well, that was my concern. I don't think they share GND. Did I screw something up in my schematic?I have 2 windings on the secondary one for 12VAC and one for 6VAC. After rectification, smoothing and drop down, they are two rails with two distinct GNDs.Can I common the GND between the two different rails?

author: james_s
author_rank: Super Contributor
timestamp: January 29, 2018, 09:40:16 pm
content: The schematic doesn't show a common ground but you may be able to use one. Whether or not that is the case depends on the rest of the circuit you are powering.

author: David Hess
author_rank: Super Contributor
timestamp: January 30, 2018, 02:34:46 am
content: Quote from: james_s on January 29, 2018, 09:40:16 pmHuh? The schematic explicitly shows a common ground for both supply outputs.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 30, 2018, 03:16:24 am
content: Quote from: David Hess on January 30, 2018, 02:34:46 ammay not be what he meant by asking the topic. they could be 2 different gnd. and i'm not sure if he can common both ground that way without screwing the full bridges return paths... full bridge's gnd vs secondary winding's gnd is among the hardest things i can imagine in my head...

author: David Hess
author_rank: Super Contributor
timestamp: January 30, 2018, 03:30:57 am
content: Quote from: Mechatrommer on January 30, 2018, 03:16:24 amSince the two output windings are floating, the two power supplies may be connected together at any *one* point. Usually this would be the negative side for both at their outputs which is what is shown producing a +5 and +12 volt output with a common ground but in theory it could be +5 and -12, -5 and -12, or +12 and -5 depending on where the connection is made. Or with the optocoupler, they could be kept completely separate but the schematic does not show that.The optocoupler is still not a bad idea whether the supplies share a common ground or not and I have often done this. It provides fault protection and simplifies level shifting if necessary.

author: Zero999
author_rank: Super Contributor
timestamp: January 30, 2018, 08:58:15 am
content: Quote from: made2hack on January 29, 2018, 09:38:52 pmYou've used the same ground symbol, which implies they're connected together. Myself and many others assumed they were separate grounds, because of the question, but some people took the schematic more literally.QuoteYes, in this case, you can connect the grounds and just use the MOSFET. Sometimes this isn't desirable. For example, if the fan was in a car, connected to a 0V wire carrying a large current from other loads, then connecting the 0V wire to the 0V on a logic board, could cause a large current to flow through the thin 0V trace, resulting in overheating.Also note that after rectification and smoothing, you'll get the peak mains AC voltage, minus a couple of diode drops, which will be 15.8V on the 12V side, but could be more, when it's unloaded.

author: made2hack
author_rank: Frequent Contributor
timestamp: January 30, 2018, 05:42:20 pm
content: @Hero - Thanks, yeah that clarifies things.This circuit is meant to be used in a Reflow Oven I am building, any concern about combining GND? Or just go for it? I imagine heat isolation would be a bigger factor here than high current on traces.

author: james_s
author_rank: Super Contributor
timestamp: January 30, 2018, 09:36:55 pm
content: The schematic is drawn a bit strangely, I didn't even notice the second ground symbol.Without seeing the circuit it is meant to power I can't tell you if it's ok to combine the grounds. Doing so is a very common occurrence though, most of the multi-voltage power supplies I've seen in various gear use a single combined ground for all the rails.