DIY MQTT Temperature Controller Project Success

Hi everyone, I wanted to share an exciting project I recently completed. I’ve been exploring ways to integrate my home heating system with my smart home setup, and I stumbled upon an interesting challenge that turned into a successful DIY project.A few months ago, I came across a set of non-Bluetooth EQ3 radiator valves at a local hardware store. They were quite affordable, and I thought it would be a fun project to try and connect them to my MQTT-based smart home system. The idea was to create a smart radiator valve that I could control remotely through my home automation platform.The first step was to take apart one of the valves to see how it worked. Inside, I found a simple motor mechanism that controlled the valve position. I realized that with the right components, I could replace the original control board with a custom setup. I decided to use a Wemos D1 mini as the main controller since it’s compact and has built-in Wi-Fi support.Next, I needed to control the motor. Since it’s a two-wire motor, I opted for an L298N motor driver to handle the direction control. To ensure the motor didn’t get stuck, I added a MAX471 current sensor to detect stall conditions. This way, the valve wouldn’t overheat or get damaged if it hit the mechanical limits.I also wanted to monitor the valve’s position without relying on limit switches. To achieve this, I connected the motor’s current draw to the MAX471 sensor. By analyzing the current, I could determine when the motor was moving and when it had reached the desired position. This approach proved to be quite effective and eliminated the need for additional hardware.After assembling the components, I programmed the Wemos D1 mini using Arduino IDE. The code handled motor control, position sensing, and communication with my MQTT broker. I also integrated the valve into my Home Assistant setup, creating custom sensors and switches to control it through the frontend.One of the challenges I faced was ensuring the valve’s movements were smooth and precise. I experimented with different motor speed settings and current thresholds to find the optimal balance between responsiveness and reliability. After several iterations, I was thrilled to see the valve operate seamlessly, responding to commands from my smartphone or voice assistant.I also documented the entire process, taking photos and writing detailed notes. I hope to share the build instructions and code with the community in the coming weeks, so others can replicate the project if they’re interested.This project has been a fantastic learning experience. It not only enhanced my smart home setup but also deepened my understanding of motor control and IoT integration. I’m incredibly proud of the result and grateful for the support I received from online forums and communities during the build process.If anyone has similar projects or tips for improving this setup, I’d love to hear about them! Happy tinkering everyone!