D5 pump works on motherboards PWM but not arduinos PWM

Hello,

i have recently built a small arduino based pwm controller for LEDs, fans and pump in my computer. I have an OLED screen and a menu system which uses a rotary encoder to control everything.

I got everything to work except the pump, which constantly runs at 100% speed. I can use rot. enc. to change fan speeds, LED brightness and turn the PC on but it has no effect on the pump. When i connect my pump back to the motherboard header it works normaly and runs at whatever i set it to in the bios.

I have a EK-D5 pump and for those of you who don't know how it works, it is supposed to run just like PWM fans (ground wire, 12V+ wire, sense wire(hall effect) and PWM wire(25kHz)).
They even connect to the same motherboard headers who are supposed to have a PWM frequency of 25kHz - well i measured mine at 23,4kHz - and that is why i assumed the pump runs at 25kHz aswell.
The difference is that the pump draws more current than motherboard headers allow, so you have to connect it directly to PSU via molex connector.

I probably also need to explain how i generate PWM on arduino. I use timer one and set the registers to the correct values. I run it in mode 10 with ICR1 as TOP.

void SetTimer1(){
  //Set control registers to 0
  TCCR1A = 0;
  TCCR1B = 0;
  //Reset the timer
  TCNT1 = 0;

  //Set control registers to non inverted PWM on channel A and B - mode 10: phase correct PWM, TOP = ICR1
  TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM11);
  //Set prescaler to 1 and use main 16MHz base clock
  TCCR1B = _BV(WGM13) | _BV(CS10);

  //Set top to get desired frequency
  ICR1 = 320;

  //For changing duty cycle I use Output compare registers A and B (OCR1A/OCR1B which correspond to pins 9 and 10 on arduino) and set their value via rotary encoder.
}

I just want to add here that when i measured mobo frequency at 23,4 kHz i changed top to 342 because i thought the pump needed a more specific frequency but from what i understand theese motors accept anything from 21 - 28kHz.

I believe this code is correct and i have also measured the frequency on both pins. Sadly i dont have an oscilloscope, so i have to rely on another arduino runing a FreqCounter library. It is a reliable library, but it doesnt do duty cycles. Maybe the issue lies in duty cycles??

I need help with understandingthe difference between 25kHz arduino signal and 25kHz mobo signal. My guess is that it has something to do with a pull up resistor or some kind of additional logic on the motherboard...basicly i have no idea why the pump ignores arduino PWM.

Any help would be greatly appreciated,

-Nik

Always post all the code. Snippets are useless. Also, a wiring diagram is needed. Did you connect the Arduino and pump or PC grounds?

The fastest way to debug problems like this is to use an oscilloscope. Ask around, maybe someone who has one can help.

You didn't show all of your code.

There could be an issue with the speed sensor feedback. I really don't know if the Arduino can handle multiple speed sensors. (you are trying to control the fan and pump as the same time with the same Arduino, right?)

And, the high-frequency PWW probably sucks-up more processing power making the speed-sensing more difficult. You probably don't need the high-frequency PWM. DC motors usually work with the default PWM but you might hear a "whine" since it's in the audible frequency range.

So, what happens with a regular-old analogWrite()?

Does it run full-speed with analogWrite(255) and does it stop with analogWrite(0)? If that works, what happens with some in-between values? If you can't stop it or control the speed that way, connect an LED (with the usual current limiting resistor) to the PWM output at the same time to make sure the PWM is working.[/b]

Simple as that :slight_smile:

I used just an analog write on pin 5 and pump slowed down hahaha

Well what can i say...thank you. Sometimes the simplest things solve hours of debugging.

Best regards,
-Nik