Improving a Water Cooler


In my work area I have a benchtop water cooler. Sometimes while working you need a quick break and a long cool drink of water.

Last summer, which was particularly hot, I notice that when the ambient temperature was high the water dispensed was not very cool. Also, a significant amount of water (3 x 300mL glasses) had to be dispensed from the unit before cooling would recommence.

Now that I was practising social isolation due to the coronavirus I had time to look at less important items that could need repair.

The Cooler

Obviously from the small size of the unit, the cooling element had to be a Peltier module and I assumed that the thermostat would be electronic. The unit has 2 status LEDs, one to indicate power and one to indicate cooling is occurring. According to the unit’s specification, the water reservoir held 5 litres but the chilled reservoir was only 600 mL in volume.

On opening the unit I found its general arrangement is as shown below –

Watercooler General Arrangement

The electronics in the unit consisted of an AC-DC converter PCB, a thermistor embedded in the lower section of the cooling reservoir and a Peltier device with heatsink and fan attached to the upper section of the reservoir. There was just one IC on the PCB, a TL494 switching regulator controller. There was also a larger than usual number of discrete components around this IC but no adjustment pot for temperature.

Now being able to check the internals in operation I was surprised to see that the fan was running even when the COOL LED was not on. The fan was running at low speed so was not noticeable when the unit was operating assembled.

When the COOL LED was off and sufficient water was dispensed the unit it started to cool again When the unit was cooling the fan ran at a much higher speed until the COOL LED turned off and then the fan would slow down again.

So how could I adjust the temperature if there was no temperature adjustment pot on the PCB? I needed to trace the circuit so I could locate and adjust the appropriate component(s). Also before and after I made an adjustment I would need to monitor the operation of the cooler.

Control systems are usually tested by applying step disturbances and observing the behaviour of the system’s output. Dispensing a large glass of water was the natural disturbance to apply. Actually dispensing 300mL of water is quite a large test step (50% of the reservoir capacity) but is appropriate in this application.

Tests were conducted in the following manner –

  1. The cooler was started with the reservoir at ambient temperature. The time needed to cool the water to a steady-state temperature and the actual steady-state temperature could therefore obtained.
  2. 300mL of water were dispensed and the rise in reservoir temperature and its recovery back to steady state monitored. When the system went to high cooling mode and when it returned to low cooling mode would indicate the system’s cooling mode change thresholds.
  3. Once steady state was again reached another 300mL was dispensed. Then after an hour another, and after a further 30 minutes another. This would show how quickly the system responded in heavy use. Water temperature would rise quickly so this would show any time delays in response.

Rather than sit around for hours observing a water cooler I decided to set up a simple data logger to capture data from the unit. I just needed to dispense water when appropriate then would analyse the data gathered at my convenience. A trend display also would be useful.

4 parameters would be logged –

  1. Cooled water temperature
  2. Ambient temperature
  3. Voltage on the Peltier element
  4. Peltier element current

The Peltier element and fan are in parallel so I did not need to monitor the fan. Later I found that the Peltier current was not that useful so this parameter was removed.

I had an Arduino Nano on hand so that was what I used. A bespoke data logger was assembled on a prototyping board using the Arduino Nano, a resistor divider for voltage measurement, and 2 x DS18B20 one-wire temperature sensors. The software was set up to take readings approximately every 60 seconds and output them in CSV format via the Arduino’s USB serial port. This serial data was received by a laptop and written into a Microsoft Excel spreadsheet using the Parallax PLX-DAC macro. As the data string arrived it was time-stamped by the macro then entered into the spreadsheet. The data was also graphed when received so creating an almost real-time trend display. After a test sequence was completed the data in the spreadsheet could be saved for analysis.

Data logger design, construction, programming, 1-wire setup, and calibration of the analogue input attenuator only took a short time and the logger was ready. The Arduino program was written in such a way that if more, or less, voltage or temperature channels were needed the program could be easily modified. This is a very convenient way to create a custom data logger. The software is shown below.

Arduino Code –

// cooler_logger_parallax.ino
// ---------------------------------------------------------------------------
// This code reads analog inputs and sensors on the Arduino
// and sends the readings to PLC-DAQ in Excel
// V1.0 30/3/2020
// V1.1 4/4/2020 Removed Peltier current channel

// I/O
int vSensorPin = A0;
int dsPin = 2; // One-wire on pin (4.7K pullup is necessary)

// Program variables
int voltageVal = 0;
float peltierVoltage = 0;

float ambientTemperature = 0;
float waterTemperature = 0;

int logPeriod = 60; // Seconds between readings

// Analog configuration
float vRef = 1.1;
float vScale = 1000.0 / (15300.0 + 1000.0); // Nominal 15K and 1K0 voltage divider. 15K value scaled to calibrate

//DS18B20 IDs
byte dsID1[] = {0x28, 0xFF, 0x6B, 0x5A, 0x63, 0x14, 0x02, 0xC0}; // Ambient
byte dsID2[] = {0x28, 0xFF, 0xDF, 0x15, 0x44, 0x04, 0x00, 0x54}; // Water

// Function protypes
float ds_read(int arr[]);
void processSensors();

void setup()
  analogReference(INTERNAL); // Use 1nternal 1.1V reference
void loop()


  // Send data to Excel

  // Delay between readings
  for (int i = 0; i < logPeriod; i++)

void processSensors()

  // Read voltage
  voltageVal = analogRead(vSensorPin);
  peltierVoltage = (float)voltageVal / 1023.0 * vRef / vScale;

  // Read ambient temperature
  ambientTemperature = temp_read(dsID1);

  // Read water temperature
  waterTemperature = temp_read(dsID2);
// ds_read.ino
// ---------------------------------------------------------------------------
// DS18B20 temperature read
// The DallasTemperature library does all the work for you

OneWire ds(dsPin);

// Read temperature from addressed device
float temp_read(byte arr[])
  int i;
  bool found;
  byte data[12];
  byte addr[8];
  float celsius;

  // Scan for required device
  found = false;
  while (
    //    Serial.print("Device req =  ");
    //    for ( i = 0; i &lt; 8; i++) {
    //      Serial.print(arr[i], HEX);
    //      Serial.print(" ");
    //    }
    //    Serial.println();
    //    Serial.print("Device found =  ");
    //    for ( i = 0; i &lt; 8; i++) {
    //      Serial.print(addr[i], HEX);
    //      Serial.print(" ");
    //    }
    //    Serial.println();

    // Check if addr and arr equal
    if (equality(addr, arr))
      found = true;

  // Return an error temperature if devices not found
  if (!found)
    // Serial.println("Not found");
    return -1.0;
    // Serial.println("Found");

    // Read temperature from device
    ds.write(0x44); // Start conversion
    ds.write(0xBE); // Read scratchpad

    for (i = 0; i &lt; 9; i++)
    { // Get 9 bytes
      data[i] =;
    // Convert the data to actual temperature
    int16_t raw = (data[1] &lt;&lt; 8) | data[0];
    celsius = (float)raw / 16.0;
    return celsius;
// Check for equality
bool equality(byte a[], byte b[])
  int i;
  for (int i = 0; i &lt; 8; i++)
    if (a[i] != b[i])
      return false;
  return true;

The Excel sheet with PLX-DAQ macro –

One-wire Setup

As the DS18B20s were connected on a single one-wire bus, first an Arduino program found in the one-wire library sample directory was used to scan the bus and identify the address of each of the devices present. Each one-wire device is encoded with a unique address in manufacture. I entered the identified addresses into my program so that specific sensors could be addressed and read.

Logger Results

The resulting data and trends gave much insight into the operation of the cooler.

Firstly, the fan/Peltier assembly was powered all the time.

When cooling was required the PSU output was around 12V. When not cooling the output was around 5V. The voltage did not gradually change between 12V and 5V as the cooling requirement reduced. It quite quickly switched between the 2 levels.

Initially I monitored the cooled water temperate at the discharge port. When a draft of water was discharged the temperature at the outlet was seen to spike low then rise.

Monitoring at output port

As water is dispensed it is replaced in the cooling reservoir by ambient water from the main reservoir. So the temperature in the cooling reservoir must rise but even though the temperature of the output port appeared to have risen by 20°C the controller did not start cooling again until a long time later. Cooling then ran for a time until some internal threshold was reached and it switched operation back to the low voltage mode. Because the Peltier element was still powered it slowly cooled the water but water temperature never reached a steady state and appeared to track changes in the ambient temperature.

Note, as the test ran for for over 12 hours ambient temperature changed during the day and into the night.

The initial dip in outlet temperature and the fact that the water discharged was not at the temperate of the water entering the reservoir indicated that there must be some internal baffling in the cooling reservoir. When water is discharging and new water entered the reservoir the cooler water at the bottom was pushed up to the discharge port. This behaviour also showed that the water temperature I was monitoring at the outlet was not indicative of the temperature that the Peltier module was cooling to. I should monitor the temperature toward the bottom of the reservoir where the thermistor was located. I lowered the thermistor into the cooling reservoir and a temperature difference of more than 3°C was seen between the water at the top and bottom. It was further noted that it took a significant time for the ambient temperature water that had been added to mix with cooled water and peak the temperature seen by the thermistor. Temperature stratification was occurring as the water in the cooling reservoir it is not being actively mixed while cooling.

Performing further water discharge tests the characteristic of the water at the bottom of the reservoir was obtained. At this location the water temperature rose as multiple drafts of water were discharged. Cooling though did not cut in till the water was more than 12°C above the initial steady-state temperature.

In reservoir response of Watercooler

Independently I measured the actual temperature of the water that had been dispensed. As expected it was always higher than the temperature measured by the sensor in the reservoir.

I consider that if the dispensed water was 10°C or less it would be acceptable for use.

For a temperature control system the logged data indicated performance was poor. It set down too early before the set-point was reached so took a long time to reach the set-point. Also it had a narrow but delayed deadband in reacting when cooling should stop/start. These poor control characteristics would be the cause of a number of the problems originally noted in the unit’s operation.

I therefore decided to attempt to improve these characteristics. For this I needed to reverse engineer the control circuit to find its arrangement so that I could undertake tuning.

Watercooler Schematic (traced)


The circuit appeared to be a standard TL494 pulse width modulated converter but the circuitry around the error amplifiers was much more complex than usual. To aid understanding I drew the circuit so that the control section of the TL494 could be looked at independent of the power section. This helped make the schematic clearer. A custom 2-part library for a TL494 was created for this purpose.

The TL494 has 2 internal error amps whose outputs are ORed together to provide the feedback to the power stage. This ORing of the error amp outputs resulting in the amplifier that is demanding the minimum pulse width out dominating.

Initial it looked like Error Amp 1 would control the regulation of output voltage while Error Amp 2 controlled the temperature. Unfortunately, it was not so clear cut and the circuit’s operation was far more convoluted than I imagined. The key source of problems was that the design needed to maintain a minimum output voltage from the inverter of 5V so it could power itself. Also apparently the designer had decided to use just the one IC to implement the whole control.

The TL494 is a very common pulse width modulating regulator controller. Almost every PC power supply from the original PC through to the latest high power gaming rig uses this IC in their power supply. In a PC supply, there is a standby 5V output that is used to power any circuitry that always needs power. The water cooler only has one power supply output and this needed to be 5 V or greater to allow powering of its control IC. Faced with this the designer decided to have the PSU output 5 volts to the Peltier module even when it was not needing to cool. In operation the cooling reservoir has losses to ambient hence it will need some make up cooling energy to maintain steady-state water temperature, so this is an acceptable decision.

As an aside commercial Peltier modules degrade over the long term when operated with on-off power cycling because it results in sharp temperature fluctuations across the thermocouple elements. Therefore, it is potentially beneficial to module life to always keep the module under some power. When it is turned off convection from the cooling reservoir cools the module so results in thermal shocks when powered up again.

So how does the circuit work? Initially disregard Error Amp 2. Error Amp 1 in conjunction with the voltage divider R27, R7 and R8 is a standard voltage regulator arrangement and would set the PSU voltage to someway between 5V and 12V.

Now consider the effect of Error Amp 2. Its input combines the water temperature, the PSU output voltage, and the control pulse width. When its output exceeds that of Error Amp 1 it takes control of the operation of the TL494 power section. The output voltage of the PSU will then be driven to either 5V or 12V. R5 gives some positive feedback to Error Amp2 to provide hysteresis so that its output will go fully high or low.

When the PSU output is 12V it remains at this level until the summed effects of output voltage, thermistor resistance, and output pulse width (circuit involving Z1 and D20) changes sufficiently. This then reduces the pulse width to a minimum which causes the PSU output voltage to fall.

When the PSU output drops to around 5V the voltage clamping action of resistive divider R24 and R25 in conjunction with D27 cuts in and reduces the voltage out of the resistive divider of R17 and R27 and the thermistor, so the PSU output settles to around 5V irrespective of the low temperature reached.

Unfortunately, disabling temperature control and going to voltage control once a low cooling temperature is reached had a major downside. When the ambient temperature changes the water temperature will be affected because being powered by a fixed low voltage the Peltier element can only remove a limited amount of heat energy. Hence on hot days, the cooled water’s steady-state temperature will be higher than on normal days.

After trying to understand this operation it left an impression of a circuit that had grown by trial and error rather than having been designed. It was both ingenious and clumsy at the same time. My understanding of the circuit’s operation may be somewhat in error but the circuit is still a kludge.


Overall the circuit’s cooling temperature control and response to temperature disturbance are barely adequate for the task. Just adding a cheap op-amp (e.g. LM358) to the circuit would have allowed temperature and PSU voltage control to be segregated so both could be better.

So now knowing that the control circuit was inadequate you may think I envisaged modifying the circuit with some additional op-amps or even, as is often proposed by others when faced with a flawed design, to replacing the whole control circuit with a microcontroller!

No I did not. After all it is just a cheap water cooler and the main problem was that the water was not cool enough for my liking. Also from the data gathered several major issues with the mechanical arrangement of cooling, temperature measurement, and discharge port location were apparent.

To allow the system to get to temperature faster and recover quickly after a disturbance a better control system for cooling types of application would be of the PID variety. But PID control may not be capable of dealing with the large transport delays that are present between the cooling element, the temperature sensing device, and the discharge port. Perhaps feed-forward control would be needed. These control loop(s) would then need to be tuned, making a replacement control system far more work than it would initially appear.

Being pragmatic I decided to just lower the operating steady-state water temperature with the hope that the unit would then be acceptable to my needs.

Looking at the schematic, now with a reasonable understanding of its operation, it appeared that changing R27 would accomplish that. I therefore replaced this 27k resistor with the next highest preferred value, 30k, and ran the tests again.

Improved response of Watercooler

The effect of this simple change were significant. The steady-state water temperature dropped a little below 5°C but was reached far more quickly. The temperature of the dispensed water stayed below 10°C for multiple drafts. High cooling was cutting in faster after water was dispensed and also recovery cooling ran for longer before setting down. Also now because the water temperature was able to change the Peltier voltage more readily, higher ambient temperatures should have a lesser effect.

Increasing R27 yet further to 33k did not improve operation. It actually prevented operation ever coming out of high cooling mode so the unit kept running trying to cool the water temperature down. It managed to reach below 3°C.

I therefore returned R27 to 30k. The performance was now adequate for my purpose so I re-assembled the unit and put it back into service.


What was gleaned from this exercise?

  1. That thermodynamic performance of a system is a combination of its physical and electrical characteristics. Control systems can only partially compensate for limitations of the physical system and often control system tuning is more art than science.
  2. That an highly minimised circuit may not work as well as its designer planned. A straight forward circuit can be better than a highly optimised one.
  3. That analogue circuitry has great sensitivity to component values. Hence a small variation in a key component value, can have a major effect on the operation.
  4. Any design can be somewhat improved once you understand what it is trying to do and how it is currently working.

A number of these points though must be qualified by the realities of designing for mass production of low cost items. The circuit only has to work. A higher performance design may not be warranted. If thousands of units are to be produced, then a small reductions made in the design’s BOM will add up to major savings to the manufacturer.

Looking on Chinese Wholesaler web sites I found similar water coolers to the one I have are currently being sold in lots of 100 for under $20 a piece. I remember buying my unit retail a few years ago for over $80. If extra circuitry added a few $ to the price I would still buy the unit, but increasing of the cost to the manufacturer by just a $ could significantly diminish their sales and profitability.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s