I disassembled an AMD CPU Wraith Cooler, meaning, I took the fan off of the heatsink, because I want to attach the fan on top of a Raspberry Pi that I'm using as a router. The Pi runs quite hot because it transmits several hundred megabytes per second, non stop, and I want to give it some cooling. (It already has its own heatsinks on its various chips inside the chassi and I don't want to use the little shitty Okdo fan, because it's loud.)

Is there any smart solution to how I could power this 4-pin fan? It needs 12V DC.

This is the Pi with its chassi.

And I'm considering something barbaric like this.

Are there perhaps conveniently positioned GPIO pins on the Pi that the 4-pin connector could just slide on to and just work? Never mind this. The Pi 4 that I'm using can only output 5V:

Or would I need to cut off the 4-pin connector to expose the individual wires and attach them to a 12V DC adapter?

Or any other genuis solutions? :)

all 27 comments

sorted by: hot top controversial new old
[–] 7 points 9 months ago (5 children)

1st, do not power the fan from the pi if possible to avoid any underpower headaches. It should be fine.

Your best bet is to just power it at 5v using a standard USB wall wart and a sacrificial USB cable (old 2.0 ones work best). Strip the USB cable and expose the positive and negative wires and hook them up to the positive and negative fan pins (identify these using a 4pin fan header diagram). You can either try just shoving the tips of the USB cable into the fan header using electrical tape as a quick bodge, or cut and strip the fan cables and twist them together.

  • source
  • hideshow 5 child comments
  • [–] [S] 2 points 9 months ago (4 children)

    Gotcha! Thanks for the directions! Any reason why I shouldn't power it with 12V, since it says 12 on the fan...?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 9 months ago* (2 children)

    Assuming the supply can saturate the current the fan will use, at 12V it’ll be running at full speed. That’s probably pretty loud. Give it 5V, it’ll run slower and quieter.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 9 months ago (1 child)

    I just found a "noise reduction cable" from Noctua. It ads 51 Ohms. I have no idea how to calculate what the new voltage would be on a 12V 2A DC power supply ( https://www.noctua.at/en/products/nv-ps1/specifications ), but Noctua's website says that the cable lowers fan speeds, so I'll give it a try.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 7 points 9 months ago (1 child)

    You can buy usb to 12v fan adapters for like $8 on Amazon.

    But for a pi you don't need that fan to run at full speed, just the 5V of USB or that header + any sort of a heatsink on the CPU will be plenty.

  • source
  • hideshow 1 child comment
  • [–] 5 points 9 months ago* (last edited 9 months ago) (3 children)

    fourth pin is an output i think.

    https://glkinst.com/cables/cable_pics/4_Wire_PWM_Spec.pdf

    if you bypass it you don't get a signal from the rotation speed sensor and the fan should run at 100% given 12v.

    easiest solution is probably one of those 12v inverters for cars but that seems overkill. 5v fans are most likely cheaper.

  • source
  • hideshow 3 child comments
  • [–] [S] 2 points 9 months ago (2 children)

    Right! I have no reason for it to run art full speed on a Pi anyway. I'm leaning towards buying a 5V USB adapter.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 9 months ago (1 child)

    If you decide you wanna go the easy route there are quiet 5V fans out there
    https://www.noctua.at/en/products/nf-f12-5v-pwm

    pi-noctua-pwm
    Controls a 4-pin (PWM) 5V Noctua fan using a Raspberry Pi 5's GPIO pins. The fan speed is automatically adjusted based on the temperature readings from an NVMe drive, making it ideal for cooling solutions like the Pimoroni NVMe Base.

  • source
  • hideshow 1 child comment
  • [–] 3 points 9 months ago* (1 child)

    A good external desk/box/tower fan might be an easier solution

  • source
  • hideshow 1 child comment
  • [–] 3 points 9 months ago (1 child)
  • [–] 3 points 9 months ago* (2 children)

    12v fans will typically run fine, albeit much slower at 5v. This was a favorite trick many moons ago to reduce fan noise in desktops before quiet fans became mainstream. The main watch out is that the fan doesn't stall at startup and fail to spin completely.

  • source
  • hideshow 2 child comments
  • [–] 3 points 9 months ago (2 children)

    You can use a transistor to pwm the 12v input to the fan. I used IRLZ44n to this effect since they work ok at logic level. There are better transistors but the principle is the same

  • source
  • hideshow 2 child comments
  • [–] [S] 3 points 9 months ago* (last edited 9 months ago) (1 child)

    Nice! I was just going to ask if I should add in a potentiometer to regulate the fan speed. But you say it should be a transistor? I'm a complete noob at hardware, so please excuse any inaccurate lingo. 😅

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 9 months ago*

    The pot is if you want to control the speed manually. The transistor if you want to control it from the pi (from the temperature for example).

    If you want a potentiometer, there are two ways I think :
    Have the potentiometer plugged to the pi ADC input, and in software regulate the pwm output to the transistor based on the signal coming from the pot.
    Another way is to have the potentiometer in series with the fan and only control it from the pot. I've never built any circuit like this so there may be consideration to be put into the max current the pot can handle, but I guess for a small fan it could be okay.
    In both cases you'll need a 12v source. Either a 12v power supply, or a DC step up from 5v (from the 5v power supply (maybe the same as the pi), not from a pin on the raspberry as it can't draw much current). In both cases, the grounds should be tied together so they all see the same voltage in reference to ground.

    I can help you further if you want, but don't hesitate to ask a LLM for it as they can be quite good now for such circuits, and can in theory explain concepts you don't yet understand.

  • source
  • parent
  • [–] 3 points 9 months ago (1 child)

    I think PWM fans need 12V all the time. Maybe you have a cheap 3-pin fan, then you can just give it 5V. It'll run slower, but you probably don't need full power.

    You could get a cheap boost convert to up 5V to 12V if you want the Pi to power it.

  • source
  • hideshow 1 child comment
  • [–] 3 points 9 months ago