W1209 Thermostat (programmable thermostat) with a sealed sensor. Programmable thermostat W1209 Instructions for thermostat from China 1209

There is such an inexpensive one Chinese thermostat W1209. A variety of Chinese stores sell them in fair quantities. One of the advantages is the price :). The rest are a few shortcomings, which can be partially corrected by reprogramming the on-board controller - STM8S003F3.

A thermistor works as a temperature sensor; the standard firmware allows you to enter only a reading offset. Accordingly, for such a thing the accuracy may not be very good (depending on your luck). However, there is a good digital temperature sensor DS18B20, which does not require calibration (well, conditionally). We take such a sensor, modernize the board a little (remove capacitor C1 near the sensor connector, replace resistor R2 with 4.7K). We attach the new sensor to the connector of the old one (there are GND and DQ), we take power from the programming connector (the square penny to the left of the indicator). Plus we upload new firmware - oops, it works :) I note that the original firmware is protected from reading, so it was not possible to save it. There will be no return to the old option. Other users were more fortunate; the Chinese did not block it from being read, so the native firmware is attached below. New - can set the relay response threshold and control method - the relay works if the temperature is lower than the set temperature or if it is higher. Briefly pressing the SET button allows you to set the threshold, holding SET is the control method.

What you will need:
1) ST-Link/V2 programmer. Or any STM8 Discovery board (it is built-in and can be used). The cost on Aliexpress is around 2..4$
2) software for the programmer
http://www.st.com/web/en/catalog/tools/PF260219# (driver)
http://www.st.com/web/catalog/tools/FM147/CL1794/SC1807/SS1747/PF210568 (programming software)
3) a piece of comb with a pitch of 2.54 mm for programming (you can do without it, just solder the wires)
4) resistor size 0805 with a nominal value of 4.7KOhm.
5) the DS18B20 sensor itself.

We are upgrading the thermometer board according to the picture

We take the programmer and connect it to the soldered programming connector (or just wires). Usually on the programmer it is written what goes where. For my version (as an example), see the picture


We get something like in the picture


Launch the ST-Link Visual Programmer program, set the programming parameters

The chip is inherently read/write protected. Need to unlock:

1) Do not supply +12V. powered by st-link.
2) launch the programmer.
3) without attempting to write, try to read the data. (there must be an error, in theory)
4) if yes - the options tab (the third, there is the first program, the second is eeprom, the third is bytes of options) switch to it and make a write page.
5) try to subtract - if everything is fine, the chip will begin to read as zeros and the hardware will stop working completely

Now we write the new firmware.

The W1209 digital thermostat module from China is popular due to its versatility and attractive price.

It can be used both for an incubator (in “heating” mode) and for a fan (in “cooling” mode).

It can also be used to control and maintain the engine temperature in a car or car interior by connecting an electric fan to its contacts. It is suitable for cooling a computer system unit or, for example, attached to a freezer, water tanks, a steamer, industrial equipment, heated floors, baseboards or ceilings and many other heating or cooling systems with adjustable temperature.

You can also inexpensively buy a dismountable transparent case for the module.

It is worth noting that to work with the module you do not need to use an additional thermometer - it displays the real temperature value in the sensor area. A waterproof temperature sensor (NTC 10K 0.5%) is supplied with the module.

W1209 MODULE DIAGRAM

For proper and long-term operation of the thermostat, it is necessary to supply a stabilized power supply of +12 volts. The module remains operational when the power supply drops to 10V. A 5V stabilizer is installed on its board (m/s AMS1117).

There is a relay on the module board that switches loads with voltages up to 220V and current up to 10A.

W1209 Specifications:

  • Temperature control range: - 50 … + 110 ° C
  • Resolution: 9.9 to 99.9; 0.1 ° C; 1°C
  • Measurement accuracy: 0.1°C
  • Control accuracy: 0.1°C
  • Accuracy (Hysteresis): from 0.1 to 30° C
  • Temperature update rate: 0.5 sec.
  • Power: + 12 V (stabilized!)
  • Measuring inputs: NTC (10K 0.5%)
  • Output: relay contacts 14V to 20A, 125V to 20A, 220V to 10A.

Operational requirements:

  • Ambient temperature: -10 … + 60 ℃
  • Humidity 20%...85%
  • Power consumption:
  • Current: 22mA (with relay off)… 72mA (with relay on)
  • Size: 48 (L) x 40 (W) x 14 (H) mm
  • Total weight: 20 g

Temperature setting

Briefly press the “SET” button and then use the “+” and “-” buttons to set the value of the maintained temperature. Press “set” again and the thermostat will remember the value and go into the mode of maintaining the set temperature.

Programming mode

To enter the programming menu, press and hold the “SET” button (about 5 seconds). You will enter the main settings menu. To switch modes P0…P8, press + or -. To change modes P0 ... P8, press the “SET” button, then + or -. Long press SET (about 5 seconds) or within 10 seconds if no button is pressed, the menu will be memorized and exited.

Setup menu (default values ​​in brackets)

Modules are available with two firmware versions:

Menu for new firmware

  • P1 - hysteresis settings - 0.1 - 30 (2)
  • P4 - Temperature error correction -7 ... +7 ° C (0)
  • P5 - Start time delay - 0 ... 600 sec (0)
  • P6 - Alarm (this function is not used)
  • P7 — Upper alarm temperature threshold — 0…110° C (OFF) (forced switching off of the relay, dashes light up on the screen —)
  • P8 - Reset to factory settings - S/N (when switching the parameter, all settings are reset)

Menu for old firmware

  • P0 - Cooling / Heating - C / H (C)
  • P1 - hysteresis settings - 0.1 - 15 (2)
  • P2 - setting the upper limit +110 ° C (110)
  • P3 - setting the lower limit - 50 ° C (-50)
  • P4 - Temperature error correction -7 ... +7 ℃ (0)
  • P5 - Start time delay - 0 ... 10 Minutes (0)
  • P6 - Upper alarm temperature threshold - 0 ... 110 ℃ (OFF) (forced switching off of the relay, dashes light up on the screen -)

Module faults

If the display shows: L L L— break in the temperature sensor;

N N N or 110 — short circuit of the temperature sensor;

888 — on the display with new firmware it means a sensor malfunction (break or short circuit).

Reboot. If the module is frozen, the display does not light up or the module behaves inappropriately, and power is supplied to the module (DC 12 V), you need to restart the module and return all settings to the factory values. To do this, turn off the power to the module, press the “+” and “-” buttons simultaneously and then supply power to the module.

Refinement of the module

On the board, the RESET input (4 pin of the controller) is connected to programming contacts and the controller is sometimes falsely reset due to strong spark noise from the relay or power supply. The modernization consists of installing a capacitor with a capacity of 0.1 µF on the common wire (-).

Flashing the W1209 module

Sometimes the module starts acting strange, glitching, etc. To flash the module we need:

  1. USB programmer ST-Link V2. The cost of such a programmer on Aliexpress is about 200 rubles.
  2. Software for the programmer on the offsite:
    http://www.st.com/web/catalog/tools/FM147/CL1794/SC1807/SS1747/PF210568 (driver and programming software). Below is the link. (To download, you need to fill out the table and a link will be sent by email).
  3. Comb with a pitch of 2.54 mm for programming (you can do without it, we use wiring for this).

Step 1. We connect the programmer to the programming connector on the W1209 board. The programmer is signed:

  • RESET

Step 2. Launch the program ST-Link Visual Programmer, set the programming parameters:

Step 3. Do not apply +12V to the board! Powered by ST-Link. Connect the programmer to USB.

Step 4. Try to read the data. If an error occurs, the chip is read/write protected. You need to unlock: the options tab, the first is the program, the second is eeprom, the third is the option bytes (we need the third one at the bottom), switch to it and make a write page.

Attention! Now the firmware is old Erased!

Step 5. Now we write the new firmware. File - open - unpacked from the archive (taken from user comments). Click - Program - All Tabs.

For reliable long-term operation of the thermostat with a load of more than 300 W, it is better to use a powerful intermediate relay or triac.



A thermostat is a control device for maintaining a certain temperature with a given accuracy. Can be useful in various automation systems (refrigerator, greenhouse, heating pipes, boiler, ventilation, auto, etc.).

I admit that I am skeptical about this kind of device - I am used to working with serious multifunctional devices, so I will be very critical.

Board dimensions: 50x40x16mm.

The quality of workmanship was pleasantly surprising, the board was almost washed, the installation was neat, all the parts were in place.

However, the design is inconvenient for embedding - the indicator and buttons are recessed in relation to the relays and connectors. According to the mind, they should have been placed on the back side of the board.

The temperature setting and display range is -50 ºС +110 ºС, which is quite enough for domestic use.

Red LED 3-digit indicator 22x10 mm shows temperature up to tenths of a degree, temperatures below -10 ºС (up to -50 ºС) and above 100 ºС (up to 110 ºС) without decimals, because There are not enough indicator digits. The set point discrete is set according to the same principle.

The red LED on the board simply duplicates the relay activation.

3 control buttons: set, +, - . set - selects the setting mode and parameter settings, + and - change the value of the setting and parameters.

It would be more logical to place the + button on the right, and not in the center, because according to common sense, the increase should be at the top or to the right.

In mode C (cooling) it works like this: while the temperature is below the set point, the relay contacts are open; when the set temperature is reached, the relay contacts close and remain in this position until the temperature decreases by the amount of the set hysteresis (default is 2 ºC).

In H (heating) mode it works the other way around.

The control relay is 12V with NO contact, switches current up to 20A (14VDC) and up to 5A (250VAC).

It would be better to install the relay with a switching contact and connect all 3 pins to the connection connector, which would slightly expand the scope of application of the thermostat.

The temperature sensor is a 10 kOhm thermal resistance hermetically sealed in a protective metal cap. The cable length is 30 cm (50 cm stated), but if necessary, it can be extended.

Setting parameters with explanation:

    Setpoint temperature -50 ºС 110 ºС, default 28 ºС

    P1 - switching hysteresis 0.1 - 15.0 ºС, default 2.0 ºС. Asymmetrical (minus the setpoint), it allows you to reduce the load on the relay and the actuator at the expense of the accuracy of temperature maintenance.

    P2 - maximum temperature setting -45 ºС 110 ºС, default 110 ºС. Allows you to narrow the setpoint range from above.

    P3 - minimum temperature setting -50 ºС 105 ºС, default -50 ºС. Allows you to narrow the setpoint range from below.

    P4 - correction of the measured temperature -7.0 ºС 7.0 ºС, default 0.0 ºС. Allows simple calibration to improve measurement accuracy (characteristic shift only).

    P5 - response delay in minutes 0-10 min, default - 0 min. Sometimes it is necessary to delay the response of the performer, critical for example for a refrigerator compressor.

    P6 Limitation of displayed temperature from above (overheating) 0 ºС-110 ºС, default OFF. It's better not to touch it unless necessary, because... If the settings are incorrect, the display will constantly display “---” in any mode and you will have to reset the settings to the default state; to do this, hold down the + and - buttons the next time you turn on the power.

    Operating mode C (cooler) or H (heater), default C. In fact, it simply inverts the logic of the thermostat.

All settings are saved after power off. No additional or tricky settings (PID, tilt, processing, alarm) were found, but the average user does not need them.

At temperatures below -50 ºС (or when the sensor is turned off), LLL is displayed on the indicator.

At temperatures above 110 ºС (or when the sensor is shorted), the indicator displays HHH.

An interesting feature is that the rate at which the temperature readings are updated depends on the rate of temperature change. With rapid temperature changes, the indicator updates readings 3 times per second, with slow changes - approximately 10 times slower, i.e. The result is digitally filtered to increase the stability of the readings. .

The control controller is STM8S003F3P6. The reference voltage for the temperature sensor and controller power supply is stabilized 5.0V on AMS1117 -5.0. The current consumption of the thermostat in the off mode of the relay is 19 mA, on 68 mA (with a supply voltage of 12.5 V).

It is not advisable to connect a supply voltage below 12V, because The relay is supplied with a voltage 1.5V less than the supply voltage. It is better that it be a little larger (13-14V). Current-limiting resistors on the indicator are in a chain of discharges, not segments - this leads to a change in their brightness depending on the number of burning segments. It doesn't affect normal operation, but it's noticeable.

The RESET input (4 pin) is routed to programming contacts, has only an internal high-resistance pull-up (0.1 mA) and the controller is sometimes falsely reset by strong spark noise nearby (even from a spark in its own relay), or when the contact is accidentally touched by hand.

Easily corrected by installing a 0.1 µF blocking capacitor on the common wire.

Verification and calibration was carried out classically at two control points 0 ºС and 100 ºС In water with melting ice it showed +1 ºС

The W1209 thermal relay module is designed to control temperatures in the range from -50 to +100 degrees. Equipped with a 3-character LED display, a relay activation indicator, three electronic thermostat control buttons, a connector for connecting an external temperature sensor, “K0/K1” terminals for connecting a load and “+12V/GND” for powering the thermostat board. The display shows the current measured temperature from the sensor, "LL" if the sensor is not connected, and "HH" if the temperature is out of range.

Characteristics of thermal relay W1209:

    Thermistor
    NTC (10K 0.5%) waterproof sensor
    Temperature Range
    -50°C to +110°C
    Measurement accuracy

    Control precision
    0.1°C between -9.9°C and 99.9°C, or 1.0°C outside this range
    Update time
    0.5 seconds
    Hysteresis (lag)
    0.1°C ....... 5°C
    Hysteresis accuracy (lag)
    0.1°C
    Supply voltage
    DC 12V
    Quiescent current
    < 35 мА
    Operating current
    < 65 мA
    Output voltage
    DC 12V
    Maximum load current
    5A/AC 125V, 15A/DC 14V
    Permissible humidity
    from 20% to 85%, Rh
    Length of cable 0.3 meters
    Dimensions
    48mm*40mm

The LED display shows the following values:

“LLL” - Sensor not connected
“HHH” - Temperature out of range (less than -50°C or more than 110°C)
"- - - " - Exceeding the limits specified in parameter P6

Preparing for work:

  1. Connect a 12V DC power supply to the “+12V” (plus 12V) and “GND” (minus 12V) contacts.
  2. Connect the load to contacts “K0” and “K1” (connected to the open power circuit of the controlled device - serial connection)

After supplying 12V power to the “+12V” and “GND” contacts, the LED display will display the current temperature measured by an external temperature sensor

Setting and setting the set temperature:

To set the control temperature, briefly press the “SET” button. then use the “+” and “-” buttons to set the desired temperature. After setting the temperature, you must press the “SET” button again, or do not press any buttons for 5 seconds.

Programming:

  1. To enter the programming mode, press the “SET” button for 5 seconds!
  2. Use the “+” and “-” buttons to select the menu parameter code (P0....P6) from the table “Thermostat Menu”
  3. To configure a parameter, press the “SET” button and use the “+” and “-” buttons to change the parameter value
  4. To save the settings, press the “SET” button, or do not press any buttons for 5 seconds.

To reset settings to factory settings (default settings):

  1. Turn off the power
  2. Press and hold the "+" and "-" buttons
  3. Apply power to the thermostat

The LED display will show “888” and then display the current temperature.

Thermostats are a class of equipment designed to regulate and maintain the temperature in a controlled space within specified limits. They can be used in both heating and cooling applications. These are artificial climate installations, heating systems, and freezing equipment.

Mechanical thermal relay

Based on the principle of operation, thermostats are divided into:

  1. Mechanical:
  • Bimetallic;
  • Capillary.
  1. Electronic:
  • With mechanical temperature setting;
  • Programmable.

Module overview

Thermostat W1209 is a programmable temperature control relay. The supplied sensor is operational in the temperature range from -50°C to +110°C. The regulator is designed to work with heating and cooling equipment with a power of up to 1 kVA.

Thermostat W1209

Technical characteristics of the w1209 thermostat:

  • Controlled temperature range – -50°C – +110°C;
  • Measurement accuracy in the range from 9.9°С to 99.9°С – 0.1°С, above the range – 1°С;
  • Control accuracy in the range from 9.9°С to 99.9°С – 0.1°С, above the range – 1°С;
  • Hysteresis setting – from 0.1°C to 30°C;
  • Supply voltage – 12V;
  • Current consumption – 22-72 mA;
  • Overall dimensions – 48x40x14 mm;
  • Weight – 20 g;
  • Permissible operating temperature – -10°C – +60°C.

Note! Some sellers position this device with the name xh w1209. All devices of this type are absolutely identical.

Setting up and operating the thermostat

Installing the W1209 programmable thermostat involves connecting the device to a stabilized power source, setting up the temperature sensor and the controlled circuit.

Important! The fundamental point is that the device contains only “dry” relay contacts, that is, it switches the circuit and does not supply any power to the line.

How to connect an electric heater

To operate the device correctly, you should know the features of its operation:

  • It is possible to delay the start from 0 to 10 minutes;
  • The circuit has adjustable hysteresis. Hysteresis is the temperature difference between switching on and switching off. This function is important for switching heating or cooling devices with high inertia.

Further setup consists of selecting the required parameters using the control buttons and LED digital indicator.

The instructions for the w1209 thermostat in question do not provide detailed description circuit design, but enthusiasts have compiled a schematic diagram of a w1209 with a 12 V DC power supply, from which it is clear that the work is controlled by a programmable microcontroller connected according to a standard circuit.

Setting procedure

Please read the instruction manual before turning on.

To manage settings diagramW1209 provides three buttons:

  • "Set";

All provided functions and capabilities are configured by clicking on the listed buttons.

According to the instructions for W1209, to change settings you must enter programming mode. To do this, press and hold the “Set” button for 5 seconds. When the number of the setting item is displayed on the screen, the button can be released. To navigate through the settings menu, use the “+” and “-” buttons.

Total thermostat instructionsW1209 provides from 6 to 8 positions, depending on the current firmware of the built-in microcontroller:

  • P0 – switching heating or cooling control;
  • P1 – adjustment of the hysteresis range;
  • P2 – change in the maximum temperature control limit;
  • P3 – change the minimum temperature control limit;
  • P4 – correction of temperature measurement error;
  • P5 – programming the turn-on delay time;
  • P6 – alarm (not used in most firmware);
  • P7 – forced shutdown when the upper control threshold is reached;
  • P8 – reset to factory settings (does not work on all firmware).

By default, when entering the programming mode, the first menu item is set to P0.

Terminal and Control Locations

Having entered the desired item, use the “+” or “-” buttons to set the required parameter value. To exit the programming mode, press and hold the “Set” button for 5 seconds. Entering the operating mode with recording settings also occurs after 10 seconds, if no button was pressed during this time.

The instruction for the w1209 dc 12 V thermal relay informs that this device has an alarm for incorrect operation, which is displayed on the indicator:

  • LLL – temperature sensor break;
  • 110 or HHH – short circuit of the sensor loop;
  • 888 – sensor malfunction.

In addition to using the programming mode, a factory reset can be performed as follows:

  1. Remove power from the regulator;
  2. Press the “+” and “-” buttons simultaneously;
  3. Turn on the power.

Calibration of thermal relay W1209

Thermal relay calibration is carried out in programming mode in menu item P4. For calibration you need to have a reference thermometer. Comparing the readings of the standard with the readings of the design, they are brought to the same values ​​by manipulating the “+” or “-” buttons. After exiting the settings, W1209 automatically adjusts the measurement temperature over the entire range.

If you don’t have a thermometer, you can use the known values:

  • Snow melting temperature – 0°C;
  • The boiling point of water is 100°C.

Important! To reduce errors during the calibration process, it is necessary to use distilled water.

For domestic use, the error will be within acceptable limits when calibrated using boiled water instead of distilled water.

Do-it-yourself modernization of the W1209 thermostat module

The design of the device provides ample opportunities for modernization. You can modify the device as follows:

  • Place the thermal relay in the housing;
  • Extend the temperature sensor cable;
  • Change the firmware version.

The last point can be accomplished if you have skills in working with programmable controllers. For this purpose, use the ST-Link V2 USB programmer. The required firmware version can be downloaded from the official website of the controller manufacturer. Redesigning the device by changing the firmware to a newer one allows you to introduce new functions and improve performance characteristics.

Housing option

Modifying the cable makes sense due to the short length of the standard sensor wire (about 0.5 m).

Setting the temperature corrector

The thermostat temperature corrector is adjusted during device calibration. The essence of the corrector is to change the measured values ​​in accordance with real temperature indicators.

Video