Fans & water cooling pump controller
DESCRIPTION
Water cooling pump&fans controller
TECHNICAL DETAILS / COMPONENTS
C1,C2,C5 100mFx16V
C1 capacitance may differ due to different pump power: if you have no RPM changes at high PWM values, lower it.
C3,C4 10nF
All resistors 10k
Q1 2N2222 (warning - use transistor with ECB pinout!)
Q3 IRF4905
D1 10BQ030TR (if you don't connect +5V in USB cable, pads can be simple soldered together)
LEARN / TOPIC / BUILD INSTRUCTIONS
This board needs Arduino Leonardo to work.
Connect USB cable to any free header on motherboard. 3-pin pump must be connected to PUMP header on shield, 4-pin pump - to PUMP PWM header. Radiator fan/fans must be connected to RAD PWM header. You can use either two groups of 4-pin fans connected to GR A and GR В headers. To control RPM of these groups by motherboard, use SIG A and SIG B headers. RPM of pump and radiator fan are controlled by Arduino.
Interaction
Use standard COM port provided by Arduino at 112500 baud. Output from Arduino comes as ASCII string "P[XXX]F[YYY]" where XXX means RPM of pump and YYY means RPM of radiator fan. For example string P0F1200 means pump stopped and fan running at 1200 RPM.
To cоntrol fans and pump send to COM port string "P[XXX]F[YYY]A[ZZZ]B[WWW]" where XXX, FFF, ZZZ and WWW are number from 000 to 255. At 000 fan or pump will be stopped, at 255 it will run full speed.
You can answer me to get C# code for Windows, but program has only Russian language interface.
Sketch
int pumpLeg = 9; int fan1Leg = 10; int fan2Leg = 13; int fan3Leg = 6; byte buf = 0; byte key = 0; int tries = 0; byte lastPPWM, lastFPWM, lastFAPWM, lastFBPWM; volatile int ticks_ISR0 = 0; unsigned int fan_rev = 0; volatile int ticks_ISR1 = 0; unsigned int pump_rev = 0; unsigned int millis_pump = 0; unsigned int millis_pump_last = 0; String message = ""; char buffer_in[16]; char trans[4]; String s_toTrans = ""; int bufPos = 0; bool loopStarted = false; void setup() { TCCR1B = TCCR1B & 0b11111000 | 0x01; TCCR4B = TCCR4B & 0b11111000 | 0x01; lastPPWM = 255; lastPPWM = 255; lastFAPWM = 255; lastFBPWM = 255; for (int i = 0; i < 256; i++) { analogWrite(pumpLeg, i); analogWrite(fan1Leg, i); analogWrite(fan2Leg, i); analogWrite(fan3Leg, i); delay(20); } Serial.begin(112500); while (!Serial) { ; } attachInterrupt(0, pin_ISR0, FALLING); attachInterrupt(1, pin_ISR1, FALLING); delay(200); } void loop() { if (!Serial) tries++; if (tries > 1000) { analogWrite(pumpLeg, 255); analogWrite(fan1Leg, 255); analogWrite(fan2Leg, 255); analogWrite(fan3Leg, 255); } if (Serial.available() > 0) { tries = 0; buf = Serial.read(); if (loopStarted) { buffer_in[bufPos] = buf; bufPos++; if (bufPos > 15) { for (int i = 0; i < 4; i++) { for (int m = 0; m < 4; m++) { trans[m] = buffer_in[m + i*4]; } s_toTrans = trans; s_toTrans = s_toTrans.substring(1); switch (trans[0]) { case 'P': lastPPWM = s_toTrans.toInt(); analogWrite(pumpLeg, lastPPWM); break; case 'F': lastFPWM = s_toTrans.toInt(); analogWrite(fan1Leg, lastFPWM); break; case 'A': lastFAPWM = s_toTrans.toInt(); analogWrite(fan2Leg, lastFAPWM); break; case 'B': lastFBPWM = s_toTrans.toInt(); analogWrite(fan3Leg, lastFBPWM); break; } } loopStarted = false; bufPos = 0; } } if (buf == '-') { bufPos = 0; loopStarted = true; } } else tries++; delay(5); millis_pump = millis(); if (millis_pump - millis_pump_last > 250) { pump_rev = (unsigned int)(30000.0*ticks_ISR0 / (millis_pump - millis_pump_last)); fan_rev = (unsigned int)(30000.0*ticks_ISR1 / (millis_pump - millis_pump_last)); ticks_ISR0 = 0; ticks_ISR1 = 0; millis_pump_last = millis_pump; message = "P"; message.concat(pump_rev); message += "F"; message.concat(fan_rev); Serial.println(message); delay(5); } } void pin_ISR0() { ticks_ISR0++; } void pin_ISR1() { ticks_ISR1++; }
Fans & water cooling pump controller
- Comments(0)
- Likes(1)
-
Aufwiegler Dec 27,2018
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Aufwiegler
-
-
Instrumentation Input, high impedance with 16 bit 1MSPS ADC for SPI
199 0 0 -
RGB LED Matrix input module for the Framework Laptop 16
398 0 2 -
-
📦 StackBox: Modular MDF Storage Solution 📦
239 0 2 -
-