Repository project - Github: Termostat - Ethernet
Support the Ethernet thermostat project via PayPal. Support will allow you to add new features in the future and open the source code of the application: PayPal donate
Arduino Ethernet Wiznet W5100 / W5500 DS18B20 OneWire Dallas HTML Webserver WebSocket
MAC address of Ethernet thermostat: DE:AD:BE:EF:FE:ED - For the needs of static IP address assignment from the DHCP service
Uploading the program to Arduino via avrdude (sample for COM21 and the program sketch.ino.hex):
avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:sketch.ino.hex:i
Uploading the program to Arduino Nano with "OLD Bootloader" via avrdude (sample for COM21 and program sketch.ino.hex):
avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b57600 -D -Uflash:w:sketch.ino.hex:i

Launch of the room thermostat project - Arduino + Ethernet Wiznet W5100 / W5500


The Ethernet (room) thermostat project also exists in a free version, which is available in the Githube repository. The version contains a total of 6 machine - precompiled programs for the Arduino Uno platform. Machine code (.hex) guarantees that the program is compatible and has the same functionality for all devices to which it is loaded and run. Firmware upload is quick and easy via the AVRDUDE / XLoader with a graphical interface. The main application starts immediately after the firmware is loaded. The code is thus universal and provides an opportunity to provide the author interested in trying out the project of its build without access to the source (.ino) code. Since each Ethernet thermostat has the same - predefined MAC address, it is possible to use only one thermostat in the LAN network, otherwise there will be a conflict of MAC addresses and not a single thermostat will communicate.

The free version is only available in machine code form without access to the application written in .ino format from which the program was compiled.

Supported Ethernet shields for Thermostat:
  • Ethernet Wiznet W5100
  • Ethernet Wiznet W5500 (W5200 - 5500 compatible)
  • Machine code distribution based on IPv4 LAN address assignment:
  • Static - assigned statically directly in the source code (192.168.4.1 / 192.168.1.254) 24-bit mask, i. network 192.168.4.0 / 192.168.1.0
  • Dynamic - assigned dynamically via DHCP server in the LAN network (can be statically assigned to the destination MAC address via a rule in the router)
  • Firmware name Shield / module IPv4
    dynamic_W5100.hex EN W5100 assigned via DHCP (also contains maintain to extend lease time / request a new IP)
    dynamic_W5500.hex EN W5200 - W5500 assigned via DHCP (also contains maintain to extend lease time / request a new IP)
    static_W5100_1_254.hex EN W5100 192.168.1.254
    static_W5100_4_1.hex EN W5100 192.168.4.1
    static_W5500_1_254.hex EN W5200 - W5500 192.168.1.254
    static_W5500_4_1.hex EN W5200 - W5500 192.168.4.1
    PHY_thermostat_EN ESP32 + PHY LAN8720 assigned via DHCP (visit WiFi thermostat page for upload firmware instructions)
    Firmware for Wiznet W5500 is NOT compatible with W5500 V2 (USR-ES1)

    To upload machine code to Arduino, it is possible to use the AVRDUDE tool, which also uses the Arduino IDE environment to upload the compiled program. The tool can be run directly from the command line, but it is necessary to set all configurable data correctly, so it is not suitable for less experienced programmers or laymen. XLoader is a Windows application (tool) with a simple graphical interface that allows the selection of firmware - machine code (.hex), the target platform and can dynamically show the COM port on which the device is located. It allows you to burn firmware to AVR platforms, i. Arduino Uno, Nano, Duemilanove (AtMega328 / AtMega168), Arduino Mega (AtMega1280 / AtMega2560). By simply clicking on Upload, the machine code can be uploaded automatically (XLoader uses the AVRDUDE tool similar to the Arduino IDE). The XLoader window informs about the successful upload in the form of a list of the number of bytes uploaded.

    XLoader - Arduino - AVRDUDE - Termostat - Ethernet

    COM port selection


    In case of uploading firmware via AVRDUDE, it is necessary to specify the COM port manually directly in the command for uploading firmware to the microcontroller. You can find the current port where the microcontroller is logged in in Device Manager. The device is most often marked as USB-SERIAL CH340 in the case of clones, or e.g. Arduino Uno in the case of original Arduino boards. For Arduino Nano versions, the FT232RL device designation can also be found if it uses the FTDI232RL converter. The baud rate for the New Bootloader is: 115200 baud / s, for the Old Bootloader: 57600 (especially the Chinese version of the Arduino Nano V3.0). The XLoader interface itself warns of an incorrect baudrate with a message stating that the firmware upload failed.

    Device Manager - Arduino COM port
    After successfully uploading the machine code to the Arduino, the thermostat is fully ready and available at its IP address. The program works on the basis of the project wiring diagram and the logic from the description.

    Video tutorial for uploading firmware to Arduino via XLoader