Controlling an externally powered 12V PC fan by fan output PWM pin? - Page 1
Forum section: electronics / beginners

author: incognito
author_rank: Contributor
timestamp: May 28, 2023, 11:56:21 am
content: To avoid breaking anything I'm trying to find out beforehandcan I use a standard PC 4pin 12V PWM fan powered externally, most likely by a regular 12VDC wall charger, speed controlled by a motherboard 4pin 5V PWM fan output PWM pin alone?The reason why not to use only the connector is there at the end, as 5V PWM fans in required form factor seems to be practically nonexisting, aside from the original Delta AFB0705MC-00. So, 12V + and - would come from elsewhere and I would only connect the PWM and RPM pins from the fan connector.According to white papers PWM control pin should always be the same 5V regardles of fan nominal voltage, be it 5, 12 or 24 V:https://www.intel.com/content/dam/support/us/en/documents/intel-nuc/intel-4wire-pwm-fans-specs.pdfhttps://noctua.at/pub/media/wysiwyg/Noctua_PWM_specifications_white_paper.pdfTo provide more background here, I've taken up a project trying to replace a noisy, low quality and poorly performing original fan of a monitor with G-Sync module inside, which needs active cooling. I've already tried to replace the original fan with a Noctua NF-A8 5V PWM, but the 25mm thickness of the fan was too much to fit inside. Noctua doesn't have any slim 5V models, so that leaves standard 12V as only option. If speed control could be viable by the PWM pin alone, I would next try NF-A9x14 12V PWM, which should physically fit inside easily.Here's a video showing the NF-A8 5V PWM running from that fan output:https://photos.google.com/share/AF1QipPKI1k3EwxKTpncRfAWzckV5PMLKG4x1dAh2nDvxdv5bLVpmmDG5c0_fWOnhZ2IrA/photo/AF1QipPYAq9AYLNfq35FEyE1mJ2JwrdJUrS1zspHqifN?key=NVc5SmVOX2hSdl9kMmJ1Tl9lb0hqeHk1NVJodnZRIn case you're interested I'm describing the project in more general terms here:https://forums.overclockers.co.uk/threads/lg-38gl950g-3840x1600-g-sync-144hz.18840788/page-19

author: dobsonr741
author_rank: Frequent Contributor
timestamp: May 28, 2023, 04:40:40 pm
content: Is the concern the new fan will mess up the mobo when hooking up?Two options:1. Study the new fan in isolation, to see if the PWM output is indeed 5V, and the PWM in not pulling up to 12V, and it properly controls PWM@5Vinput PWM signal.2. Build a current limiting/voltage limiting interconnect. A 1K resistor and a 5.1V zener on both lines would do.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 28, 2023, 10:00:11 pm
content: 4-pin fans have permanent power and adjust their speed from the pwm signal, so yes, it should work.Just don't mess up when wiring, power on the wrong pin might easily kill your motherboard.Remember to connect together the grounds from the PSU, mobo and fan.

author: Jwillis
author_rank: Super Contributor
timestamp: May 29, 2023, 03:51:27 am
content: Powering the fan externally is not a problem. But you may have to have Both the PWM(drive) and Tach(sense) wires connected to mother board. The PWM needs feedback from the fans tach sense to maintain "speed" control from the PWM. And as DavidAlfa pointed out the grounds have to be at the same potential for the fan to work from an external power supply.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 29, 2023, 06:57:01 am
content: Typical wall chargers in Finland are insulated ones, but I would personally use something likeMean Well IRM-02-12(datasheet PDF) connected to the display mains input; TME and Mouser have the IRM-02-12S model (34mm × 22mm × 16mm, 34x27x16mm if including the legs; only four of the pins, two at each end are used) in stock for under 10€ apiece, and it seems to me soldering wires directly to it with suitable heatshrinking would make it easily placeable inside some nook or cranny in the enclosure. (As it is 75% efficient, it'll generate at most 0.67W of waste heat.)These are "class II" isolated, meaning there is no capacitor from either output to the inputs, so connecting the DC negative output to the motherboard ground should be safe. IRM-02 only provides up to 2 watts or 167 mA at 12 V DC, but NF-A9x14 only consumes max. 1.3 watts. If you want more headroom, look at IRM-03-12 (3 W) or IRM-05 (5 W).

author: incognito
author_rank: Contributor
timestamp: May 30, 2023, 05:45:43 pm
content: Excellent. I couldn't even have hoped for a better input and suggestions. I might wait a few days if Noctua decides(/dares) to comment my enquiry by email (basically same what I've asked here) before proceeding with this. Also excellent suggestion by Nominal Animal. I love the idea of not having to run extra wire to the monitor from an outlet, but nevertheless I might first try it out with an 12V wall adapter to see if it works, as I have one ready with free wire ends.To make sure I'm on the same page with everyone else, I've attached the schematics.

author: MathWizard
author_rank: Super Contributor
timestamp: May 31, 2023, 09:45:01 am
content: I wouldn't use external power from another supply. I'd just add a supply wire, back to 1 of the 12V sata or ATX cables. I'd even cut open an unused SATA cable, and solder right onto the 12V wire. What PSU is in your PC ? If it has any free GPU connector, or older style 4-pin cable, just twist up or fold some wire into a 12V pin or 5V if thats what you need, and tape it in place. Or with a header connector, and tap 12V off the mobo and run that single wire over to your fan Vcc.

author: incognito
author_rank: Contributor
timestamp: May 31, 2023, 09:51:43 am
content: This project is for a monitor. My PC is several meters away from my desktop and only optical display cables run from it to my desk, so unfortunately your suggestion in not viable option here. It also sounds a bit unpractical, at least in my opinion. Would you care to comment why you wouldn't use external 12V power supply? Thanks.

author: MathWizard
author_rank: Super Contributor
timestamp: May 31, 2023, 09:59:24 am
content: OK I missed that it's for a monitor. If it was me, I'd probably open up the monitor and look for a 12V rail, but yeah if the fan is a standard fan, and the wallpack is an isolated SMPS, like most are, then it should be fine.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 31, 2023, 01:00:36 pm
content: Quote from: incognito on May 30, 2023, 05:45:43 pmYeah, that should do it. There are theoretical failure modes with power sequencing (i.e., fan receiving the 5V control signal without having power supply present) but it's pretty far-fetched so I would not stress about it; such a product should be able to deal with it, else they would be failing left and right.

author: incognito
author_rank: Contributor
timestamp: June 01, 2023, 08:54:26 am
content: Quote from: MathWizard on May 31, 2023, 09:59:24 amHow likely do you think it is that a 12V rail can be found inside the monitor? In a case there is one, is it unnecessary to interconnect the ground from that rail between the fan and the fan output connector, or just use the sole +12V line to the fan and only run GND from fan to fan output?edit: Side note: There is that another 12VDC auxiliary fan, that's worth mentioning, but as it's a non-PWM fan that line is up only when that secondary fan runs, which is hardly ever, but perhaps that's a place where near to start looking for?

author: incognito
author_rank: Contributor
timestamp: June 04, 2023, 05:40:20 pm
content: Quote from: Nominal Animal on May 29, 2023, 06:57:01 amIs there any solution with similar output, but that can take ~20VDC input? If I recall right the monitor's DC adapter output is 19V or close by. That would allow me to solder the transformer's input lines onto the board's main power.

author: Eraldo
author_rank: Regular Contributor
timestamp: June 04, 2023, 07:26:02 pm
content: Why not just use a buck converter or a linear regulator like 7812. They are pretty small and can fit inside the monitor. As for the 7812 it might need some cooling so it would be best if you hold it down with screws or even solder it in the metal chassis of the monitor if it has one and is not close to the monitor display.The buck converter you can find it pretty cheap on aliexpress or even on amazon (but costs more) and that one heats less.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 04, 2023, 07:58:09 pm
content: Quote from: incognito on June 04, 2023, 05:40:20 pmIs the input ground directly connected to the fan ground?If it is, a DC-DC converter likeR-78K12-0.5that Mouser sells for under 3€ apiece, ought to work well. According to the datasheet, it is very efficient at 20-to-12V conversion, too, promising 90% efficiency at the 100mA mark (and better for any load above, up to 500mA). If you can add the EMC filter according to the datasheet (two 10µF capacitors, one 1µF capacitor, and one 100µF inductor, on the input), even better. It's tiny, too, just 8×12×11mm plus the three legs.If it is not, an isolated DC-DC converter likeMean Well SPBW03F-12that Mouser sells for under 11€, ought to work well. It is slightly less efficient, but not too bad. The input EMC filter is just a 18µF inductor and a 6.8µF ceramic capacitor. This one is 22×10×12mm, with four of the eight legs NC (not connected, but cut and sleeve the stubs in heatshrink). Because the minimum load is 11mA, you should add a 1kOhm resistor between the outputs, unless the fan always turns when there is power. The resistor does waste 144mW of power into heat, so better select a quarter-watt or better rated resistor, and put it somewhere the little bit of heat is easy to dissipate.Because the load is inductive, I'd also put a flyback diode in reverse on the output in both cases, i.e. cathode to positive output, anode to negative output. For the same reason, the 0.05 to 0.1 Vpp noise on the output of the DC-DC converter shouldn't be a problem at all.I'm only a hobbyist myself on the electronics side, so if any members here point out anything I missed here, I'd definitely listen. I do try to carefully read the datasheets, and I did do some electronics courses at Uni, but I do not have the practical experience many of the members here do.I do like to use digital isolators and isolated dc-dc converters in my own projects, mostly dealing with microcontrollers (Teensies mostly!), but stuff like EMC/EMI is way outside my skill set. I don't even have suitable equipment to test (not even a proper oscilloscope, only an AD2), so I just follow the datasheet recommendations, prefer conductive cases for my projects, and hope for the best...

author: incognito
author_rank: Contributor
timestamp: June 06, 2023, 07:23:17 pm
content: Quote from: Nominal Animal on June 04, 2023, 07:58:09 pmHow can I know this? I connected multimeter negative end to the fan ground and searched the board for a 12V rail. Didn't found one. Instead I found plenty of ~19,5V rails, which is exactly what the main power adapter outputs. Also found several 3V rails and a couple of 10,2V. I think I might've tested the main power connector's legs and the ground from those showed zero or practically near between the fan ground. I'll have to double check that, if that's how to make sure what you were asking for.But today I got to the point of testing in practise what I started the thread for and it looks like it works as planned. You can read my more lengthy update with videos here:https://forums.overclockers.co.uk/threads/lg-38gl950g-3840x1600-g-sync-144hz.18840788/post-36440001

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 06, 2023, 08:38:08 pm
content: Quote from: incognito on June 06, 2023, 07:23:17 pmWhen powered off, check the continuity or resistance between the fan ground and the negative/ground side of the 19V/20V rail you intend to use.If you have a low-resistance connection between all the negative/ground sides you intend to use (on the TV board), then you don't need isolated DC/DC conversion.Quote from: incognito on June 06, 2023, 07:23:17 pmSome DC/DC converters like non-isolatedCui V78E12-500-SMT-TRhave a separate Remote On/Off input. That particular converter has one that when grounded turns off the converter, and when pulled to 3.2V - 8V (or left floating/unconnected) enables the converter. Thus, if you were to connect the GND pins (3 and 7) to the ground, VIN+ pins (1 and 2) to the 15-36V input, VOUT+ pins (4 and 5) to fan 12V, and the board +5V supply for the fan to remote (pin 10) with a pull-down resistor to ground (say, 10k), the 12V PWM fan would only be powered whenever the 5V PWM fan would be powered. (The adjust pin, pin 6, is left floating for no output voltage adjustment.)Perhaps that would let you use Deep sleep and save power when not in use?The V78E12-200-SMT-TR does need a tantalum (or low-ESR electrolytic) capacitors: 10µF between VIN+ and GND (rated at least 50V), and 22µF between VOUT+ and GND (rated at least 25V). The input side EMC seems to be an LC filter; see the datasheet. I'm hoping more experienced members will help with exactly what kind of filtering is needed/appropriate here.A similar isolated DC/DC converter isCui PQQ6W-Q24-S12-S, with input ground pin 1, VIN+ pin 2, control pin 3 (board +5V supply to the fan with a pull-down resistor to ground/pin 1, requires fan ground and pin 1 to have low-resistance connectivity), VOUT+ pin 6, and VOUT- pin 7. Pin 4 is the gap, and pin 8 is not connected. Some capacitors and possibly a common-mode choke on the input is needed with this one.

author: incognito
author_rank: Contributor
timestamp: June 08, 2023, 09:38:38 am
content: Quote from: Nominal Animal on June 06, 2023, 08:38:08 pmExcellent suggestions, again. Although the last two paragraphs were a little too advanced for me to yet fully understand.I'm on vacation and visiting home only every now and then, thus the project having seldom updates. It just came to my mind how about using a 5-12 DC/DC step-up converter from the original fan output? Looking from the pictures the original AFB0705MC-00 5V fan is rated 0,5 A, which would add up to a nominal 2,5W power:https://photos.google.com/share/AF1QipPKI1k3EwxKTpncRfAWzckV5PMLKG4x1dAh2nDvxdv5bLVpmmDG5c0_fWOnhZ2IrA/photo/AF1QipO9OrxWUDgjt2vLzup03-kYYhp4n8jp5iIwm8Y4?key=NVc5SmVOX2hSdl9kMmJ1Tl9lb0hqeHk1NVJodnZRThough a table here with a slighly different model suffix (*-00F0R) says 0,3A and 1,1W:https://www.delta-fan.com/technology/frameless-fans/AFB0705MC-00F0R.htmlAs NF-A9x14 PWM is rated 1,32W max. do you see this possible, without major risks? How much of a waste power would such a converter introduce?Another interesting option would be to take power from one of the three USB ports backside with this I just stumbled upon:https://www.spelektroniikka.fi/p24522-usb-dc-dc-step-up-muunnin-5v-12v-14-35mm-dc-plugi-paassa-en.htmlI don't know yet, but I think there's a good chance those ports would be powered monitor turned off but deep sleep disabled (fan PWM control is present) and powered down deep sleep enabled, which would be ideal, stopping the fan when PWM control is cut off in deep sleep.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 08, 2023, 01:05:32 pm
content: Quote from: incognito on June 08, 2023, 09:38:38 amWith a suitable step-up DC/DC converter, sure, if the original fan is rated at 2.5W.If you have a DMM, you could always measure the current (of the original fan), although it may involve cutting one of the fan wires (because to measure current, the DMM has to be in series with the load). I don't really see any major risks here, but then again, I too am only a hobbyist.Quote from: incognito on June 08, 2023, 09:38:38 amI can't find too many suitable DC/DC step-up converter modules, but Mouser does haveMPS mEZD41501A-B, which accepts an input voltage between 4.5V and 10V, and outputs 12V, at maximum 1A output current (datasheet PDF; note that the block diagram on the first page is of theinnardsof the converter, not how you use it; it actually does not require any external components at all –– except possibly for the reverse flyback diode on the output, since the load is inductive.)The NF-A9x14 fan is rated at 0.11A (110mA @ 12V = 1.32W), and the mEZD41501A-B efficiency curve states 92%+ efficiency there. Thus, the input power is 1.32W/0.92 ≃ 1.44W, and the generated waste heat the difference, or 0.12W –– very, very little, since this DC/DC converter is quite efficient.This DC/DC converter is easier to use than the others I've referred to, because it is intended to be used by DIY'ers and as-is in products, according to the datasheet. On the other hand, Mouser sells it for 13.70€, so quite a bit more than the alternatives... but I really like this option myself.Quote from: incognito on June 08, 2023, 09:38:38 amTrue, that should work too.USB is well regulated. The 5V fan supply can be noisy, because fans generally don't mind a bit noisy supply, so I am not sure if wiring one of those (any USB-to-12V step-up converter) would work when connected to the 5V fan supply. From an actual USB, they tend to work quite well.Quote from: incognito on June 08, 2023, 09:38:38 amIt ought to be easy to test, with any USB gadget or power bank!That said, I personally prefer the MPS mEZD41501A-B solution. You simply connect its input to the fan 5V supply and ground to the fan ground on the board, and output and ground to the new fan. The flyback diode between the output and ground, as well as the pull-up resistor and voltage divider for the tach signal you can even dead-bug (use through-hole resistors and diode, solder them "in air", but cover with heatshrink tubing). I personally would make a small board though, probably in EasyEDA, with surface-mount resistors and components (that I'd order from Mouser as well, to fill up the 50€ minimum order), and try and put transparent heatshrink over the entire assembly for good measure.I think it would be nice to have a standard 12V PWM fan connector on one end, plus a pigtail to the original 5V PWM fan connector, making it a module others with the same or similar problem could use – 5V to 12V PWM fan converter. If you want, I can try and draw one up based on the MPS mEZD41501A-B, so we could ask the more experienced members here to review and check it and make suggestions if necessary? (All my designsare in public domain. All I ask is you pass the help forward.)

author: incognito
author_rank: Contributor
timestamp: June 08, 2023, 01:59:57 pm
content: Quote from: Nominal Animal on June 08, 2023, 01:05:32 pmYes, that's actually a great idea, if you have time in between at some point.PS: I'll stay tuned, as it's a few days away anyway until I get back to this project in practise.

author: incognito
author_rank: Contributor
timestamp: June 14, 2023, 07:09:11 pm
content: While waiting if Nominal Animal has at some time point a chance to design the step up board are these Aliexpress solutions passable or something to avoid:search results:https://www.aliexpress.com/w/wholesale-USB-step-up-5V%252F12V.html?catId=0&initiative_id=SB_20230614105518&SearchText=USB+step+up+5V%2F12V&spm=a2g0o.home.1000002.0USB step up module:https://www.aliexpress.com/item/1005004782722294.html?spm=a2g0o.productlist.main.1.9875193fOy3xEd&algo_pvid=ee5080aa-b3b8-4c4a-a6e8-7453a735cf19&algo_exp_id=ee5080aa-b3b8-4c4a-a6e8-7453a735cf19-0&pdp_npi=3%40dis%21EUR%211.62%211.38%21%21%21%21%21%40210218bf16867689191416261d0743%2112000030468028036%21sea%21FI%214218132387&curPageLogUid=wFEw3UmdToosAnd general 5V to 12V module:https://www.aliexpress.com/item/4000197777372.html?spm=a2g0o.productlist.main.3.9875193fOy3xEd&algo_pvid=ee5080aa-b3b8-4c4a-a6e8-7453a735cf19&algo_exp_id=ee5080aa-b3b8-4c4a-a6e8-7453a735cf19-1&pdp_npi=3%40dis%21EUR%211.71%211.49%21%21%21%21%21%40210218bf16867689191416261d0743%2110000001116164371%21sea%21FI%214218132387&curPageLogUid=8j1H9sJx60bVDoes it look like the latter module includes everything possibly required here, like the flyback diode?

author: mariush
author_rank: Super Contributor
timestamp: June 14, 2023, 08:39:27 pm
content: Can't believe nobody suggested this already.Looking at the video in first post, the monitor has external power supply, which is probably 12v or higher. most likely in the 18-19.5v rangeIt would be MUCH easier to get a step-down regulator to produce 10-12v for the fan from this higher voltage, directly from the barrel jack input. There's a big diode near the barrel jack connector and there will be some capacitors there rated for 25v or higher - your 19.5v (or thereabouts) voltage will be on the positive of those capacitors, so you could just solder a wire to that side to get your voltage... or on one end of that big diode.You can get cheap step-down regulators from eBay, for example :https://www.ebay.com/itm/134428816503= just tape the bottom so it won't cause short circuits and then you can use some double sided adhesive tape to stick it somewhere inside the case.If the 5v fan only starts sometimes, you could take advantage of that by using a transistor to connect the negative wire of the fan to ground. Have a wire from the 5v of the original fan go to base pin of a transistor, with a small resistor (10-100 ohm) in series to protect the transistor, then negative wire of fan goes to collector, and emitter of the transistor goes to ground. Now the fan will start only when there's 5v on the original fan.Otherwise, you could still control the fan's speed by adjusting the voltage of the step-down regulator.For example, the step-down regulator uses a 10kOhm potentiometer to adjust the voltage.The output voltage can be calculated with formula Vout = 1.23 ( 1 + R2/R1) where one of the resistors is the potentiometer and the other one is a resistor near the potentiometer, probably the resistor with 331 on it, meaning 330 ohm.So, let's say you want the fan to work with voltages between 6v and 12v, that would mean R2/ 330 = 6/1.23-1 = 3.88 => R2 = 3.87 x 330 = 1280 ohm and R2/330 = 12/1.23 -1 = 8.76 => 2890 ohm so you have a range of 2890 - 1280 ohm = 1610 ohm between these voltages.But you could do it the other way and instead of a fixed 330 ohm resistor, you could have maybe a 180 ohm + a 220 ohm thermistor (when it's cold it's 220 ohm, the warmer it is the lower the resistance).So for example, at 25c the thermistor will be 220 ohm so you set the potentiometer on 1800 ohm and you get Vout = 1.23 ( 1 + 1800/400 ohm ) = ~ 6.75vExample thermistor :https://www.digikey.com/en/products/detail/epcos-tdk-electronics/B57164K0221J000/652169and you can see in the 1305 column on page 7 of datasheet:Temp Rt/R2525.0 1.000030.0 0.841835.0 0.7108 --- 156.2 ohm -> vout = 1.23(1+1800/336.2) = 7.8v40.0 0.6031745.0 0.51419 --- 112.2ohm => vout = 1.23(1+1800/292.2) = 8.8v50.0 0.4403755.0 0.37824 -- 81.4 , vout = 9.7v60.0 0.3263665.0 0.28333 -- 61.6 , vout = 10.39v70.0 0.2469775.0 0.21573 - 46.2 , vout = 11v80.0 0.1890885.0 0.16649 -90.0 0.14709 - 30.8 , vout = 11.73v

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 14, 2023, 09:13:38 pm
content: I think it depends on how stable the 5V on the board is. Fans do not need a very clean supply voltage at all, so it may not be well regulated, and may be noisy; that can affect the DC-DC converter as well.There are Youtube reviews on these modules, and although I have some myself, I'd be hesitant on putting one inside an expensive display...(I do intend to use something like that on an Orthex SmartStore 45 box-to-soldering-fume-hood conversion with activated charcoal HEPA filter and a few old 3-pin 120mm Noctua/Gentle Typhoon fans. As these are voltage controlled, I can just set up the output voltage to match the desired fan speed. That is, I do believe these work just fine, I just don't reallytrustthem inside anything expensive.)That's why I like the mEZD41501A-B solution, even though it is nowadays Not Recommended for New Designs: it has such a wide input range, and is designed for exactly this purpose (DIY, 12VDC regulated output). The datasheet also specifies its efficiency at low loads (12V, 110mA for the 1.32W fan), which definitely helps; and even shows the actual circuit and components on it.A lot of existing DC-DC step-up/boost ones have very tight input (4.5V to 5.5V) and/or unregulated output. Almost all the isolated ones (which obviously work for un-isolated uses as well) I can find in the <10€ class have an unregulated output, requiring a minimum of 10% of nominal load, or their output voltagemay even double. They also tend to be very inefficient at low loads.(Thus, I took a bit of a detour intoTI Power Designerto see how complex a fully DIY step-up from say 4-6V to 12V would be, but my design skills just aren't up to that level yet. Also, the efficient chips tend to be legless packages, which I'm not confident soldering myself.)If you already tested the 12V PWM fan with a separate supply, and it works fine, then the PWM and Tach signals do not need level shifting, all you need is mEZD41501A-B andoptionallya flyback diode, say 1N4148, with its cathode (-) to the 12V output, and anode to GND. No board needed, just solder wires directly (and protect with heatshrink); use a leaded diode. I do believe Noctua (and other quality) fans either have one or equivalent circuitry built-in.To do the PWM and Tach level shifting properly without inverting them, each needs a couple of resistors or a trimmer (as a voltage divider), a diode (in case the board pulls the Tach to higher VCC than the adapter, or fan the PWM), a couple of resistors, and a pair of signal N-MOSFETs. Even the dual N-MOSFETS cost only a couple dozen cents each (under 3€ for ten in SOT-323-6, which is small but still hand-solderable; with many having the same pinout, for example DMN63D8LDW-13), so it's really just a matter of having to solder all the components.(Because I am a hobbyist, I had to simulate the circuit using ngspice – I use Linux. The PWM frequency is nominally 25 kHz, and at two pulses per rotation, 2000 RPM, the Tach output is 67 pulses/second. So, these aren't exactly high-frequency signals.)I need to do some component datasheet checks, and simulate the final schematic in ngspice before it is ready for review, though.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 14, 2023, 10:33:35 pm
content: Attached is the schematic I'm working on; it still needs review, and I myself will try to simulate it in ngspice (usingthis DMN64D8LDW spice model) to check it works correctly in all situations. After simulation, I'll check the footprints, create a board, and publish the entire thing.Simply put, the core is the MPS mEZD41501A-B step-up DC-DC converter. It requires no external components.Note that the optional 1N4148 diode does not normally pass any current; it is there only if the fan motor causes an inductive negative spike on the supply. (I suspect most PWM fans are brushless nowadays, so there is no need for such a flyback diode, but obviously it does no harm either.)The host provides an open-drain PWM output, marked PWM_IN in the schematic. Per the standard, this has to be pulled up to 5V or 3.3V in the fan. R2-R3 is the voltage divider (from 12V), here configured for 5V. The proper voltage depends on the host, so I am thinking R2-R3 could instead be a 10k multi-turn trimmer potentiometer, that one would adjust when making the board. Possibly keep pads for 0805/0603 resistors and through holes for a standard multi-turn trimmer? The diode ensures that even if the host does not provide a true open drain output, and pulls it to a higher voltage, the circuit will work just fine. The PWM to fan is marked PWM_OUT in the schematic, and is a proper open drain output that can handle being pulled to anywhere between -15V and +15V in the fan.The fan provides an open-drain Tach output, marked TACH_IN in the schematic. Per the standard, this has to be pulled to 12V. The Tach output to the host is proper open-drain one, that can be pulled to anywhere between -15V and +15V by the host.The 100 ohm resistors at the gates of the MOSFETs are there to filter out VHF noise picked up by the long leads. I suspect their value needs to be smaller, something like 10 ohm or 22 ohm or so.Because a single N-MOSFET inverts the signal, we cascade two of them. I chose this over a more common BJT transistor, to keep continuous current draw low, and because dual N-MOSFETs are cheap and plentiful in tiny SOT-323-6 packages, while still being hand-solderable. This particular one is available at LSCS, JLCPCB, Mouser, and others; including JLCPCB assembly service, if you don't want to solder these yourself.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 15, 2023, 07:21:58 am
content: Looking at the attached EasyEDA 3D renders of the board, I think I'll replace the 3-pin SOT-23-3 diodes (dual common cathode, NXP BAT54C,215) with SOD-123; and the 6-pin dual N-MOSFET in SOT-363 with 3-pin N-MOSFETs in SOT-23-3, for easier soldering. The board itself is only about an inch square.Simulations indicate this should work pretty well.R1 and R2 on the backside are only used if the blue multi-turn pot is not used. For 3.3V PWM pull-up, R1=2.75k and R2=7.25k; for 5V, R1=4.2k, R2=5.9k.The idea is to connect 12V and GND, pot, and the diode, and then adjust the pot until PWM_IN (blue input wire) reads 3.3V (or 5V) or a bit less.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 16, 2023, 03:23:30 am
content: Andhere is the schematic and board files, in Public Domain.Both the schematic and the board design needs some critical review!Any and all comments and suggestions and fixes are welcome and appreciated. The circuits themselvesaretrivial, just open drain level shifting without inversion. The important magic, boosting 4 VDC to 9VDC to 12 VDC at high efficiency, is done by the mEZD41501A-B module.R1 and R2 are alternates in case one does not want to use the trimmer marked R3. My reasoning for the design choices:D1 is an optional freewheeling diode. I suspect most standard 12V PWM fans are brushless nowadays, and don't need one, or have the equivalent built-in to their control circuits.D2 ensures that even if the host were to use a nonstandard circuit to drive the PWM signal, exceeding the pull-up, nothing bad happens.100 Ohm resistors at the gates of the MOSFETs have a dual purpose: one is to filter out high-frequency noise picked up by the long wires, and the other is to limit the current to the gate (when switching), as the PWM and Tach signals are not expected to handle more than 5mA of current.The pull-ups and voltage dividers are all 10 kOhm, for both simplicity and because it leads to reasonable currents (0.33mA to 1.2mA, depending on pull-up voltage).In the silkscreen, the 100 ohm resistors have a continuous surrounding rectangle, and the 10 kOhm ones have a broken outline. The board is small, and I didn't want to use extra space for just the designators.Board is offset like theMPS mEZD41501A-Bmodule is. The idea is that you can carefully trim the module pins, and just stack the two boards.All components except the 6-pin mEZD41501A-B DC-DC step-up converter were chosen to have JLCPCB assembly counterparts (either same, or sufficiently similar). The JLCPCB assembly should be able to handle all the SMD parts, but I did try to make the entire design hand-solderable using just a soldering iron (or hot air) with a fine or conical tip.The NX138AKR N-MOSFETs may seem like overkill for this, but note that its gate can be ±20V with respect to source (always ground here); plus the gate-source threshold voltage (Vgs) and on-state resistance (Rdson) are so low, it works reliably even if the gate never exceeds 1.5V. In other words, this choice makes thisrobust: even if the fan or host do Funny Stuff with the PWM or Tach signals, it is Okay.The basic PWM fan control used nowadays is standardized based onIntel 4-wire PWM Fan Specs(Intel PDF), simply because there are so many PWM-controlled fans in computers –– not just desktop ones, but in servers also.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 17, 2023, 04:23:08 am
content: Any comments or suggestions on the schematic or board? Please?Simulations show it should work well, and I would trust it, but nothing beats experience.I did change the silkscreen, hopefully to make it clearer. (I realized there are two sets of colors used, so signal names make more sense. Also added the 4-pin connector locking tab location on the top silkscreen, so one can easily check the wiring with an existing fan or fan extension cable.) Plus a couple of vias (two for GND, one for +12V), for good measure.I also forgot to mention that the two 100 Ohm resistors with solid outline are horizontal (parallel to the 6-pin DC-DC converter pins), and the three 10 kOhm resistors are vertical with a broken outline, to help avoid soldering mishaps. I'd solder the upper left SOT-23 before the top center SOT-23, but otherwise there should be room enough with a hand-soldering iron.

author: magic
author_rank: Super Contributor
timestamp: June 17, 2023, 08:12:01 am
content: Quote from: Nominal Animal on June 14, 2023, 10:33:35 pmI'm lazy so I would probably pass PWM straight through if this is the case.For tacho, the single MOSFET level shifter could be enough. HV side to the fan, and bias the gate to a few volts by whatever means - just enough to turn on the FET when tach signal is at its maximum specifed logic low level.D2 seems kinda pointless, it would only prevent a seriously broken host from feeding maybe a few mA into the 12V rail through pullup resistors. It isn't even protecting the FET or anything.

author: incognito
author_rank: Contributor
timestamp: June 17, 2023, 07:24:51 pm
content: I feel like a bystander here, trying my best to learn.Any rough ballpark estimates on the price? Was it well under 50€, but with minimun order rate from Mouser makes it 50€ in practise? I suppose the board can be ordered nearly readily printed, with only minimun soldering required? Am still away from home spending holiday...

author: magic
author_rank: Super Contributor
timestamp: June 17, 2023, 08:53:55 pm
content: When it comes to cost and parts availability, you can't beat LM7812 powered from the 19V DC input of the monitor. A bit of heatsinking may be necessary for 7V drop at 0.5A load, which is 3.5W dissipation, but screwing it to some metal part of the chassis (with insulation if necessary) would usually suffice. If actually trying that, you should verify that ground of the 5V circuitry controlling the fan has continuity to the 19V input ground, but that's usually exactly how such equipment is made.Signal connections could be as simple as direct wiring PWM if the new fan pulls up that pin to the same voltage as the old one, and maybe a 1N4148 diode on tach letting the fan pull down the board side tach signal, but not pull it up. If that doesn't work, then it would be time to worry about properly engineered solutionsNote that doing a one-off conversion of a specific piece of hardware is not the same as designing a universal board that can adapt any 12V fan to any 5V device without issues. The former may be easier and cheaper.Yes, I'm lazy.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 17, 2023, 09:55:01 pm
content: Quote from: incognito on June 17, 2023, 07:24:51 pmI did do a couple of electronics courses at the Uni (U of H, Physics), but never did any kind ofdesignbefore EasyEDA came along.To me, it was a very gentle learning curve, as I started with simple carrier boards for microcontrollers.I started with stuff like thePro Micro gamepad, which doesn't even have a schematic, and is just Pro Micro (ATmega32u4, which has a native USB port, and thus can show up as a standard keyboard/joystick/mouse, and not require any OS drivers at all) clone board carrier with 12×12mm and 6×6mm tactile button footprints, and optionally a 128x32 I2C OLED display, as the intent is for the "gamepad" to actually look like a keyboard, with selectable sets of keys for the buttons, so I could more easily play online platformers and puzzle games. Nowadays, there are cheaper boards to use; and one could use e.g. one of the ESP32-C3 boards with LiPo charger support for a wireless one, for example theOlimexone with a1400mAh LiPobattery.I do warmly suggest you explore such designs. If you look at mine, remember I'm a hobbyist and still early in the learning curve myself; but you can find there quite a few SparkFun boards and others that are pretty well designed (based on my hobbyist estimation!).I am now shifting to KiCAD, because that way I can more easily integrate simulations of my designs with the projects themselves, using the open source ngspice Spice simulator. It has an initial learning step, much bigger than EasyEDA, but version 6 seems to work really well on Linux Mint for me.Quote from: incognito on June 17, 2023, 07:24:51 pmAll components, including the connectors and both trimmers and resistors for both 3.3V and 5V PWM pull-ups costs about 20€ apiece at Mouser.Attached is an Excel Mouser.fi basket (that you can import) for2boards, including all options and connectors, plus a couple of extras of each SMD component just in case. I definitely recommend you add stuff to reach the 50€ minimum shipping limit.. or just bump up the counts to make three boards, for about 60€ total. Mouser packages these in small plastic bags with stickers labeling the components, so there is no risk of confusing what part is what.The basket does not contain any fasteners (the DC-DC converter has 1.7mm holes at two corners, my board has a 3mm hole in the bottom corner) or heatshrink tubing. If you want a compact package you can hang off the wires, I would omit the connectors and the trimmer, and use heat shrink tubing or Kapton tape (polyimide tape) for insulation.You can find the Gerber files as a Zip for manufacturing the board at JLCPCB, PCBWay, et cetera, in the Project attachments section of theproject page, as well as at the end of this post. You can also open the board in the EasyEDA editor, then select Fabricate > PCB Fabrication file (Gerber), design rules check, and finally One-click Order PCB/SMT, and Ok, to order the boards from JLCPCB. Note that solder mask color does not change the price, and just delays the delivery for a day or two. Five boards cost under 2€ total, but the shipping via DHL to Finland is about 23€.Do you live within visiting distance of Helsinki?Helsinki Hacklabin Pitäjänmäki hasopen Tuesdays, so we could meet there one Tue evening and I could help you solder the boards. Even if I am not present (I am a member), there are lots of helpful people there who are happy to help with that sort of stuff.If I wasn't a burned out husk of a man suffering from recurrent depression, I would offer to order and build one or two for you, at cost. I even have some additional parts I could pad the Mouser order with... Unfortunately, I cannot handle stress at all – I literally get hives and other health problems (cortisol issues) evenpromisingsomething – soI am not able to. Sometimes even this kind of fun project triggers it, making me literally unable to continue the project even if I want to.Quote from: magic on June 17, 2023, 08:53:55 pmYep, absolutely: it is very likely that incognito only needs a 12VDC supply with the same ground reference as the 5V fan supply, and the PWM and Tach signals can be used as-is.This design is very, very much a "belt and braces" approach, so that even if the hardware is marginal/nonstandard/odd, it will be safe to use, as long as this module is wired correctly. I did not want to add polarity protection diodes or circuits at the input, because the 5V supply current can reach 300mA for a 1.32W fan (including the DC-DC converter efficiency, and power used in this circuit) so the losses would be significant, and just short-circuiting the 5V if connected in reverse might damage the host. (A single diode on VIN is not sufficient, because of the return paths through PWM and Tach on host side; the voltage might still burn the host circuits.)As to D2, it helped me simulate various odd voltage combinations. In circuit, it helps if the host may "pull" (due to parasitic capacitance or inductance in a badly designed PWM driver circuit?) PWM over the DC-DC converter output voltage when the fan is idle/off, possibly damaging/confusing the DC-DC converter.In essence, this board makes the host and the fan look like perfectly standard ones to each other, even if they internally do something really odd or nonstandard.

author: incognito
author_rank: Contributor
timestamp: June 18, 2023, 09:37:47 am
content: I do live in Helsinki. Hacklab sounds fun. I might visit sometime, even if I didn't need help with the soldering with this one. I can do basic level soldering, but I will have to see if this is within my skills. It definitely could be a possibility to include some of your stuff in the order, if the minimum required tab falls far short from the 50€, to not having to spend extra money. But we'll see how things turn out.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 19, 2023, 01:38:52 am
content: Quote from: incognito on June 18, 2023, 09:37:47 amNo, I recommend you get some good quality leaded solder, likeChipQuick SMDSW.020(56g, 0.51mm diameter), because it's difficult to get elsewhere here, but makes the soldering easier as it melts at 183°C, so the soldering iron doesn't have to be as hot as with lead-free solder, reducing the chances of damaging the components with excess heat. Thin soldering wire also makes it easier to use the correct amount; I've found that with 1mm wire I tend to use too much. Add that to the Excel basket in my message, and you reach 54 € or so, for fully populating two boards with all options. Or remove the components you don't need, and buy stuff you'll find useful; a bit of stock in SMD components is always nice.The one thing I'm still wondering about, is whether it would help with signal integrity to add a ground pour to the top layer also. (Clough42 released a video on the weekend showing a crosstalk or EMI signal integrity issue in his electronic lead screw control panel board, which made me realize this. What he did not discuss was whether his old board with the capacitors would have still had the issue; i.e. whether the ground plane or the capacitors were the bigger factor in eliminating the issue. This stuff is not taught in any courses; you need practical experience to tell.)On the host side, PWM and Tach signals cross and are not on top of ground plane for some 4mm or so, but adding a top layer ground pour and stitching the two ground pours together with vias would put the ground or return path much closer,possiblyreducing any crosstalk between the PWM and Tach signals near the host side connector. On the other hand, these are low-voltage, low-current, relatively low-frequency signals (< 30kHz), so there should not be any crosstalk anyways... I just don't have the practical experience to say whether it is a good idea or not!

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 20, 2023, 05:49:37 am
content: I decided to add the ground pour on top side also, and a few vias to stitch the bottom and top ground planes together. I figure it cannot do any harm, at least, even if it does not affect the PWM or Tach signal integrity at all.I also updated theprojectpictures (now with purple boards, just to point out a tiny change was done), and added the new Gerbers, Gerber_Board_1_2023-06-20.zip to the project attachments.The difference between the two Gerbers is minimal, and it was really just my OCD that made me do the change. At least this way, the design is as sound and robust as I can make it at my current skill level.A note: If anyone decides to build the board without the fan connectors, and just directly solder the wires eg. off a fan extension cable, I do recommend putting them on the bottom side, with the wire end poking through the top. The reason for this is that the DC-DC module backside is also "flat", but this board will stand a couple of mm higher, leaving plenty of space for the wires underneath, making board positioning inside an enclosure easier, I think.

author: incognito
author_rank: Contributor
timestamp: June 22, 2023, 04:38:36 pm
content: I got to measure the original whiny 5V fan the whole project is about replacing and with a wall adapter with a nominal 1,5 A max output and an unloaded 4,955 V actual output it uses about 240 mA. A new original replacement fan also arrived some days ago and that uses 225 mA. Those are less than half of their nominal rating, that is 0,5 A and transalte to 1,15-1,2 W, which is a little lower than NF-A9x14 PWM's 1,32 W.Very rudimentary test setup, but you go with what you have:https://photos.app.goo.gl/AQqq1uoaFxLKfVjm8Could this be a problem? I mean the the display's mainboard fan connector could have clearence for higher power output, right, but if it doesn't what could happen? Is it that it just wouldn't provide the necessary amps for full workload and Noctua runs marginally slower and nothing bad happens, or can it lead to overheating and possible damaging of the fan's power source on the board?Having returned to home for now I'm trying to carefully read and make sense of Nominal Animal's design and how to proceed.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 23, 2023, 01:52:44 pm
content: I'd still love to hear some feedback on the board, if any of the experienced board designers here have the time to take a look?_ _ _ _ _The difference in the old and new fans indicates to me that the old fan bearings have dried out or are failing, the old one needing a bit more power (6.7%) than the new one.I do not believe anyone would design an expensive board that requires a specific fan. Looking at step-down DC-DC converters, there also does not seem to be any way to save on costs by reducing the maximum current provided at 5V below 500mA or so. I askedTI Webenchfor low-cost designs from 18-20V to 5V at 0.25A, and although I only did not check every one of the 457 matching designs, I didn't find a single one with less than 500mA output. Then again, maybe the same supply is used for other circuits as well.If the new fan requires 1,32W (12V, 110mA), and we trust the DC-DC moduledatasheet, it is about 92% efficient at 100mA (better at higher currents). This means it draws about (1,32 W / 0,92) / 5V = 290 mA at 5V; plus a few milliamps for my board. I like to add a safety margin, so I consider 330 mA the "design figure", equivalent to a 1.65 W fan.If we trust my unfounded belief that surely the 5V fan is designed for at least 1.65 W fans for future compatibility without having to redesign the board, then we're good.Yet...We could also use a DC-DC step-down from the ~ 19V to 5V, and use a P-channel MOSFET to control the step-down or its input based on the 5V fan supply, so that the step-down output is only enabled when the 5V fan supply is enabled. (This assumes your multimeter reads zero voltage when connected between the 19V ground and the fan ground if powered on, and preferably low resistance when the board is not connected to mains at all.)The problem there is, perhaps the 5V output isdesignedto be loaded, and if there is no fan load there, will the board work? Long-term?Many DC-DC converter circuits have a minimum load, below which their output voltage can shoot up even above twice the nominal output voltage; 10% of the rated load is typical. With no load at all on the fan 5V output, the voltage might stress the related components on the board, especially if they're rated at just 16V. (One does need to check the datasheet carefully to see if the output is regulated even at low loads. Some don't even mention what happens at low loads, just that "Xload is required for the device to operate within parameters".)The designed might have thought "if the fan is not working, the board is going to bake anyway, so it's okay if the components fry then".The question is, which is better?To leave the 5V supply on board unloaded, using the 19V instead, and hope the lack of load on the 5V supply is okay?orTo load the 5V supply by a third more than it is with a new fan, 300mA instead of 225mA (or "by design", with safety margins, 330mA instead of 250mA)?Testing the fan 5V supply without a fan installed but the board powered might help. If it is even then around 5V, then perhaps using the 19V supply, only controlled by the fan 5V supply, would be a better choice? (It's not a big deal to do such a variant the board; I'll probably do that anyway.)Quote from: incognito on June 22, 2023, 04:38:36 pmIf you want, I can describe the circuit and the reasoning component by component, referring to theIntel 4-wire PWM Fan specification. I avoided doing that earlier, because many members here dislike my wall-of-text posts, and I didn't want to turn them away from this thread even faster than my presence already does

author: incognito
author_rank: Contributor
timestamp: June 23, 2023, 03:11:36 pm
content: Quick reply: I've ran the board and monitor passively without the fan altogether for 10-15mins before temps started to rise too high on the G-Sync circuit. Also, I believe the original fan very rarely, if almost ever runs full speed or even high speeds, and mostly only slow to moderate. Having said that, much more efficient Noctua would likely need to run even slower speeds to maintain same target temps, which would result the 5V line being far from fully utilized. But I've not tested the fan output voltage unloaded. Will have to do that. But I also like the alternative of taking power from the main 19V line. Both ways sound alright to me, but you made some good cautionary points either way.Just today I started to mod both the Noctua and the heatsink to fit them together... Some very delicate cutting/grinding with Dremel was required.

author: incognito
author_rank: Contributor
timestamp: June 23, 2023, 07:59:13 pm
content: Everything else is basically done, besides the electronics and puttings things together. Modding the Noctua and the heatsink fins was unexpectedly lot of work, a full day or near. But that's done. Some of the small fins came loose from the heatsink. I might solder them back on.I'll try to get around tomorrow to check the voltage on the fan output unloaded and grounding between that and the main power line monitor on, as well as resistance between the ground lines power disconnected. After that lets decide which way to go. If the testing comes out positive, powering the fan from that main line is starting to feel more sound way, as you can't be fully sure about the safe max amperege of the fan output, and not least if it's more straightforward and cheaper.

author: incognito
author_rank: Contributor
timestamp: June 25, 2023, 06:49:31 am
content: Basically wasted entire yesterday trying to solder those small pieces of fins on the heatsink, that came loose, as I made room for Noctua. That's probably cause I'm anything but well informed expert solder or the coating is just very keen to repel solder, or both. Reasons were mostly esthetics, but fortunately I was able to give up on that idea. I know, it's fugly (can be seen on the video).The resistance between the fan and the main ground is basically the same as the DMM wires, if I'm not reading this wrong:https://photos.app.goo.gl/3DrAdpkt9E3ENvXd9edit: Oopsie. Testing the audio out ground there. But the main input ground gives the same result. I got down to 0,15 ohms, basically accross the board with all the connector etc. grounds.The voltage on the 5V fan out keeps steady between 5,012 and 5,013 V monitor power plugged in switched on or off. The fan has a brief 10 second or so fan spin cycle when mains is plugged in, but voltage remains the same.

author: magic
author_rank: Super Contributor
timestamp: June 25, 2023, 07:19:07 am
content: What do you mean, soldering aluminium? That's extremely hard because its surface oxidizes instantly.Normally special fluxes are used for this, although some people say it's possible to scratch the oxide away under oil cover and then solder in oil. Never worked for me, YMMV.

author: incognito
author_rank: Contributor
timestamp: June 25, 2023, 07:34:50 am
content: Quote from: magic on June 25, 2023, 07:19:07 amWell, I guess that explains it.

author: incognito
author_rank: Contributor
timestamp: June 25, 2023, 07:42:36 am
content: Quote from: incognito on June 25, 2023, 06:49:31 amAlso, I get a voltage reading between fan and main power line ground around 0,2 to 0,5 mV monitor powered on.Looks like it should be okay to power the fan from the main power connecter.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 25, 2023, 09:04:25 am
content: Yep. Let me draft a new schematic for using a step-down from the 19V (18-22V or wider) to 12V, with the 5V supply only as an enable signal. I'll try to find a step-down converter that regulates even at zero load and doesn't require much external filtering (a couple of electrolytic caps is typical, maybe an inductor for LC input EMI filter), but otherwise it will be very similar, and not much larger. I'll try to leave room in at least two corners for M3 screws or standoffs, as they also tend to fit the plastic motherboard standoffs one can use, making the mounting much easier (any flat surface should then do).When I get that schematic done, I'll post it here in the hopes of getting the more experienced members to comment on it. I'll also try to post a wall-of-text explanation of the circuit, component by component, to expose the design process – which I personally would like to see in other project posts here too, because I'd learn a lot more that way myself.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 26, 2023, 04:32:36 pm
content: Here is a preliminary schematic, using a P-MOSFET to cut off the power when the 5V is not present. The cut-off is before the DC-DC converter, to minimise power use (and waste heat generated) when the fan is off. The PWM and Tach level shifting is unchanged.I'm still checking out suitable P-MOSFETs (Q1). The Si7315DN-T1-GE3 is difficult to solder by hand, and I'm leaning towards FQPF7P20 instead.I have not simulated the new power section yet, but I do have Spice models for both FQPF7P20 and NX138AKR MOSFETs, so I can examine the behaviour at various voltages for the 5V supply. (Edit: Then there are nice power switch ICs we could use too, likeInfineon ITS4100S-SJ-N. It is exactly this kind of choosing that would benefit from experience...)There are two suitable DC-DC converters, with basically the same footprint:Recom Power R-78K12-0.5andXP Power TR05S12, with input voltage range of 15V to 28V (or wider). The component values for the recommended EMI varies slightly, but is just a BOM detail. At 100mA load, the R-78K12-0.5 should be at least 90% efficient, so in this use it should generate at most about 0.13W of waste heat. And it is cheap.The control circuit:Q1 is the P-channel enhancement type MOSFET. Its gate is normally pulled to source via R1, so Vgs=0 and it is not conducting.When the 5V input is close to GND, Q2 (an N-channel enhancement type MOSFET) has its gate pulled to source via R2, so Vgs=0 and it is not conducting either. This means it does not affect the gate of Q1, which stays non-conducting.When the 5V input exceeds about 2.5V, Q2 starts conducting, pulling the gate of Q1 to ground. R3 is an inrush current-limiting resistor, limiting the maximum inrush current to the gate at 5V at 5V/100Ω = 0.050A = 50mA or less (at peak in the short pulse; MOSFETs are voltage-controlled devices, and the gate is like a capacitor). It is purely a precaution.When the gate of Q1 is pulled below 15V, it starts conducting. The gate will be pulled close to ground, and the resistance of Q1 will be less than one ohm.(That means that a current of say 100mA, the voltage drop over it is less than 0.1V, and waste heat generated 10mW or less in the steady state.)U1 is the DC-DC step-down converter. C1, C2, C3, C4, and L1 handle its EMI filtering and output stability; their values depend a bit on which DC-DC converter is used. At least one of the options suggests D1 on the output (which also means no flyback diode is needed), so basically C1-C4, L1, D1, and U1 are directly off the datasheet.

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 11, 2023, 03:17:03 am
content: Apologies for the long silence! Progress has been made, but the board is not yet completed. This variant of the board and schematic is and will be athttps://oshwlab.com/nominalanimal/19v-5v-to-12v-pwm-fan-adapter, and is of course in Public Domain.The board is 46mm × 23mm, with 2.5mm mounting holes at each corner (40.64mm and 17.78mm center-to-center distances). The reason for such a large board is the big hunkin' 10mm×10mm 100uH inductor on the input, as recommended by the RECOM Power R-78K12-0.5 datasheet for EN55032 Class B electromagnetic compatibility for multimedia equipment emission requirements.BOM (from Mouser) is complete, assuming the potentiometer is used to adjust the PWM pull-up the host device expects (3.3V or 5V), but I think I'll just get rid of it, and instead make a three-resistor version, so that when two resistors are populated, you get a pull-up to 3.3V, but if that does not suffice to the host device, you just add one additional resistor, to bump the PWM pull-up to 5V. If the host device uses a (nonstandard) logic output, these resistors can be omitted completely. (This change may shrink the board a bit, since the potentiometer takes quite a bit of space.)

author: incognito
author_rank: Contributor
timestamp: July 11, 2023, 11:17:07 am
content: No apologies needed! I have several simulatenous projects, which takes all my time and also I haven't wanted to hassle/hurry you, as there's even been no need for that. Absolutely no problem.

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 12, 2023, 04:49:20 pm
content: I have finished theschematic and board, including design rules checks et cetera, and additional changes to the layout; but it sure could use a look-over by someone more experienced.The board is 38.1mm × 25.4mm (or 1.5" by 1"), and all components are on the top side. Aside from the through holes, there is only one small 12V trace, (and a backup tachometer via in case the trace gets damaged by a screw), on the bottom side. I also found a better-suited inductor for the EMC input filter.There are four 2.5mm diameter mounting holes with 5.5mm diameter pads in each corner. (You can redrill them to 3mm if needed.) These pads are not electrically connected to anything, even the vias are only structural. The center-to-center distances for the holes are 32.0mm by 19.3mm; each hole center is nominally 3.05mm from the edge.You can use M2, M2.5, or #2-54 standoffs and screws. The latter two are easily available (e.g. PC motherboard standoffs).All components except the four identical NX138AKR MOSFETs are labeled on the silkscreen. When the resistor marked 11k3* is omitted, the host PWM is pulled to 3.3V; when it is used, the host PWM is pulled to 5V. Omitting the three resistors (3k83, 10k, 11k3) next to each other, omits the pull-up completely.Although the resistors in the BOM are in 0603 size, the pads fit both 0603 and 0805 –– I used a custom footprint with the outer edges of 0805, with the same gap as 0603 footprints. So, you can replace the 0603 resistors with equivalent ones in 0805 if you want.Attached are the board image, 3D renders, and the updated schematic. (Only the potentiometer and its two replacement resistors were changed, into now three resistors.)

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 12, 2023, 06:30:15 pm
content: It was already asked by @magic above, but I'm still curious if there's another technical consideration for the two transistor level shifter design here? Surely the 5V PWMOUT driver is strong enough to sink some additional current thatone transistor level shiftershould still work? You can even use dual transistor package here. Maybe pick one with 8 pin for easier routing too (most 8 pin package have drain and source facing the same way unlike one in typical SOT-363-6 package).I'm not sure if you even need that huge of an inductor for EMI. Surely ferrite bead e.g MH2029-221Y is enough (if even necessary)

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 13, 2023, 05:22:27 am
content: Quote from: ArdWar on July 12, 2023, 06:30:15 pmSafety, and because when using it inside expensive equipment it makes sense to trade a couple of euros and a bit of board space for peace of mind.I described this approach as "belt and suspenders" kind: designed not for simplicity and low cost, but for robustness and safety and minimal requirements.We do not really know what kind of circuit the host has on the PWM output. It could be perfectly standard, in which case none of the level shifting is needed at all!Or, the manufacturer could have chosen a particular series of 5V PWM fans that can deal with whatever they did.Most standard fans do require an open collector or open drain PWM signal, but some can handle push-pull as well.The logic is that while this circuit is excessive, it looks exactly like a 5V PWM fan to the host (except with almost no current draw on the 5V input) and a perfectly specs-compliant motherboard to the fan, perIntel 4-pin PWM fan specs. This is also why there is an option to choose between 3.3V and 5V pull-up on the PWM host side, or even leave it out, just with three resistors.Even if the host uses a push-pull driver to 12V on the PWM output (because it was easy and it worked with the fan they used), this circuit will handle that just fine, because the NX138AKRs can handle Vgs up to ±20V.Quote from: ArdWar on July 12, 2023, 06:30:15 pmGood point, but I do not want to risk expensive equipment just to save a bit of board space and components.Mostly, the fear revolves around the host using logic chips on the PWM and Tach with a low absolute maximum VCC (say, 3.7V or 4.5V), knowing the innards of their selected fan; and me burning those by assuming the host side "surely must be standard".To repeat, if weknewthe host side conformed to the Intel spec (except for 5V instead of 12V fan supply), none of the level shifting would be necessary.Quote from: ArdWar on July 12, 2023, 06:30:15 pmI'm way too bumbleduck to solder SOT-363-6 by hand!Note how the board layout is designed to help hand-soldering with a chisel or truncated cone tip; I personallyneedthat help.If you look at the board, you can see that the components could be placed much tighter together. Even the resistor pads are for 0805 (with 0603 inner gap, so both can be used just as easily); just using tighter 0603 footprints would save quite a lot of room. So would ditching the fan connectors, and instead providing just through holes to solder the wires to.Thus, board space isn't an issue anymore. At 1" by 1.5", it is as small as my sausage fingers can handle.Quote from: ArdWar on July 12, 2023, 06:30:15 pmI wouldn't know; EMI and EMC and RF stuff is way outside my knowledge. I just used the Pi filter values described in theRecom Power R-78K12-0.5 datasheet: 10µF+100µH+10µF filter in input, and a 1nF cap across Vin and Vout.The 100µH inductor, VLS6045EX-101M, is 6×6mm, but only costs 0.43€ at Mouser in singles, and its DC resistance is just 470mΩ, so at the expected 80mA input current (at 19V) only produces 3mW of waste heat, making it "perfect" in my view. Remember, any waste heat is a problem here (this is about better cooling!); even the DC-DC converter (90%+ efficient at 19V-to-12V at 110mA output current) should produce only about 0.13W of waste heat. I guess any sub-Ohm DC resistance would be acceptable.However, now that you mention it, a VLS5045EX-101M is just 5×5mm, and a couple of cents cheaper. The board is already so small shrinking it further will make hand-soldering more difficult, but what I will do, is adjust the footprint so that one can use either a 5×5mm or a 6×6mm inductor here.If one were to have ready-made boards, they can simply jumper the entire input filter by connecting the two top 10µF pads together.Do note that I fully acknowledge that the design is larger and more complex than is absolutely necessary; it is just a design decision, because these are one-off boards used inside potentially expensive equipment, so they have "extra" components in the hopes to make the design "safer" to use.That is just my own design decision in this particular case; and is not a sensible approach to be used in general.So, I do believe it magics and ArdWars notes about the potentially overcomplicated design are correct and apt, and useful to mention in this thread; and it is only my own design choices why I do things differently. Just because I counterargue, does not mean they don't have a good point!Also, it is very easy to open the design in EasyEda, and modify and create your own variant, if anyone disagrees with my design choices. The design (including schematic and board) are in Public Domain explicitly for that purpose.As of 2023-07-13, the BOM cost at Mouser is just 8.05€, of which the DC-DC converter, high-side switch IC, and the two connectors are 5.00€, so the MOSFETs and passives including the big honking inductor and 10µF caps only cost 3.05€. So, this 3.05€ and most of the board area is not used because it is necessary, but in the hopes that it makes the circuit safe(r) to use inside expensive equipment, regardless of whether the original 5V PWM fan and driving circuit was PC-standard or a slight variant, while also keeping additional heat production to a minimum.