# Connecting the Water Cooling Pump to PWM

- Link: https://www.samovar-tool.ru/en/2021/10/15/cooling-pump-pwm-connection/
- Published: 2021-10-15T21:03:30+03:00
- Author: kosoj.diy

To control cooling, Samovar can use automatic water supply, regulating the flow 
of water fed to the dephlegmator. The pump output is controlled with PWM. A PID 
controller is used to hold the set water temperature.

The principle of controlling a DC motor speed with a PWM controller is quite simple:
voltage is applied to the motor winding for a short time and the motor starts to
spin up, then the voltage is removed. By choosing the right period during which 
voltage is applied, you can maintain the speed you need.

![PWM control diagram: the principle of power regulation](https://i0.wp.com/www.
samovar-tool.ru/wp-content/uploads/2021/10/pwm-electric-circuit.png?resize=653%2C386&
ssl=1)

Using the PID algorithm, Samovar drives the pump to hold the set temperature, which
is defined in the sketch, in the Samovar_ini.h file

    ```wp-block-code
    //Water temperature that the PWM controller will hold; also, when power is switched off, if the water temperature is below TARGET_WATER_TEMP - 15, the water supply is shut off
    #define TARGET_WATER_TEMP 48
    ```

To build an automatic cooling system you will need a [pump with a power supply](https://aliexpress.ru/item/4000423826285.html),
a [solid-state relay](https://aliexpress.ru/item/10000311430050.html), a [water valve](https://aliexpress.ru/item/32779347064.html),
and a tank that the water will be drawn into. The pump will take cooling water from
this tank.

Pump wiring diagram

![Wiring diagram of the water cooling pump connected to the Samovar PWM output](
https://i0.wp.com/www.samovar-tool.ru/wp-content/uploads/2021/11/pump_scheme.jpg?
resize=734%2C532&ssl=1)

Wiring diagram of the pump connected to Samovar

### Like this:

Like Loading…

### _Related_
