Skip to playerSkip to main content
PCBway: only $5 for 10 pcbs from https://www.pcbway.com/?from=CZcouple

Summer has been relentless this year. My passion for #Bitcoin mining took a major hit due to the immense heat from my miners and the electricity costs required to keep them cool and running. There were times when the miners #overheated so badly that I had to shut them down "manually" to prevent a fire hazard.
To automate the shutdown and restart process and to enable remote #temperature monitoring, I built an RGB thermometer with its own web interface that can control home appliances based on temperature changes.

Watch this video, for detailed step by step instructions on how to build this circuit and to know how this circuit works.

Direct Aliexpress Links
------------------------------------
ESP32-C3 Super Mini : https://s.click.aliexpress.com/e/_omnke4z
WS2812B : https://s.click.aliexpress.com/e/_c4oOdHi9
DS18B20 : https://s.click.aliexpress.com/e/_c3oKzGsz
4.7K Ohm : https://s.click.aliexpress.com/e/_c3jMGVWl
Relay Modules : https://s.click.aliexpress.com/e/_c3pdcpop

Thanks
------
Thanks again for checking my post. I hope it helps you.
If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/@CrazyCoupleDIY

Video: https://youtu.be/WecOhmHxspg
Full Blog Post: https://diyfactory007.blogspot.com/2026/01/RGBThermometer.html
Gerber:
Github:

References
----------
All About PC817 Optocoupler: https://www.youtube.com/watch?v=Rj9H0beMQq8
DIY Relay Module: https://www.youtube.com/watch?v=3n69b4sdDjk

Support My Work
---------------
BTC: 1Hrr83W2zu2hmDcmYqZMhgPQ71oLj5b7v5
LTC: LPh69qxUqaHKYuFPJVJsNQjpBHWK7hZ9TZ
DOGE: DEU2Wz3TK95119HMNZv2kpU7PkWbGNs9K3
ETH: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4
BAT: 0x9D9E77cA360b53cD89cc01dC37A5314C0113FFc3
LBC: bZ8ANEJFsd2MNFfpoxBhtFNPboh7PmD7M2
COS: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 Memo: 572187879
BNB: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4
MATIC: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4

Thanks, ca again in my next tutorial.
Transcript
00:00Summer has been relentless this year. My passion for Bitcoin mining took a major hit due to the
00:06immense heat from my miners and the electricity cost required to keep them cool and running.
00:11There were times when the miners overheated so badly that I had to shut them down manually
00:17to prevent a fire hazard. To automate the shutdown and restart process and to enable
00:22remote temperature monitoring, I built an RGB thermometer with its own web interface
00:28that can control home appliances based on temperature changes. Watch this video for
00:33detailed step-by-step instructions on how to build this circuit and to know how this circuit works.
00:47This video is sponsored by PCBWay. PCBWay specializes in manufacturing of very high quality,
00:53low volume colored PCBs at a very budgetary price. In addition to standard PCBs, you can also order
01:00advanced PCBs, aluminum PCBs, rigid flex PCBs. They also provide PCB assembly and other related services
01:08which can meet your need to the greatest extent.
01:15For this project, we need one ESP32C3 mini development board, one WS2812B RGB LED strip,
01:24one DS18B20 temperature sensor, one 4.7 Kilo ohm resistor, up to six optional relay modules,
01:32a 3D printer and a smart hot gun for demo and testing purpose.
01:38The circuit is quite straightforward. Start by connecting the LED strips data pin to pin 4 of
01:44the ESP32 board and the temperature sensor's data pin to pin number 3. Then, simply link all the
01:50positive and negative wires together. That's it. As simple as that. A 4.7 Kilo ohm pull-up resistor
01:56is required between the temperature sensor's data pin and the positive terminal as the sensor uses an
02:02open drain configuration for one wire bus communication. The temperature sensor connects
02:07to the microcontroller using just one data pin allowing multiple sensors to share the same data
02:13bus. Since the main goal of my project was to automatically cool down my miners, I added a
02:19pedestal fan to this circuit. When the temperature reaches 40 degree centigrade, the fan turns on to
02:25provide extra cooling and lowers the miners temperature. This can either be achieved by connecting a relay
02:31module to any one of the pins 5 through 10 of the ESP32 board or alternatively my setup sends the
02:38temperature readings to my home server over Wi-Fi which then uses another ESP module to turn the fan
02:44on or off based on the temperature. With the custom PCB designed for my project, the system can be expanded
02:51to support up to six relays or optocouplers. This allows you to control other circuits whether by
02:57activating a fan based on a temperature threshold or by shutting down an overheating device to protect
03:02it. If you would like to build your own relay module, I have a video tutorial that walks you
03:07through the process. For guidance on adding an optocoupler, you can also check out my video on
03:12TC817 optocoupler. Both links are provided in the description below. The code is quite simple. It
03:21begins by including all the necessary libraries followed by defining the variables and constants.
03:27In my setup, the temperature range is set to be checked between minus 10 and 50 degrees celsius. For
03:33the LED colors, I am using an array that holds pre-computed hex values. As the temperature rises or falls,
03:41the corresponding LED lights up in sequence. In the setup section, we first establish a wi-fi connection
03:47and then initialize all other components. In the loop section, we start by requesting the temperature
03:54reading from the sensor and display it. We then check for any relay logic in the code. If present,
04:00the relay is either turned on or off based on the temperature. The ESP then sends a heartbeat to the
04:06server every minute and also transmits the temperature reading every 30 minutes to the
04:11server. This data is then saved in the MySQL database which is then presented using Google charts.
04:19So, this is the 2D version of my custom-designed PCB. The 220V to 5V step-down converter is soldered
04:27here
04:27and the ESP32 board is soldered here. The LED strip and the temperature sensor connects to their
04:34respective ports while the AC main line is soldered here. I used Microsoft 3D Builder to design the
04:423D model of the unit. This is the base which will house the custom PCB and this is the cover
04:48of the
04:48base. This section is where the LED strip will be attached to display the temperature reading.
04:53Finally, this 3D model which I downloaded from Thingiverse will hold the temperature sensor and will
04:59be attached to the back of the scale. Using my 3D printer, I printed the body of the unit.
05:04I highly recommend using PCBWay for 3D printing services. I have used them for many years and
05:11frankly speaking, I never had any issues with their fabricated products. I used acrylic colors to color
05:18the scale and the numbers on the unit. I wanted to keep my design simple so I left the rest
05:24white.
05:24But feel free to color it to whatever color you like.
05:36Before soldering the components to the board, let's test them on a breadboard. Connect the temperature
05:41sensor and the LED strip to the ESP32 board on the breadboard. Then use a hot gun to heat the
05:47temperature sensor. As the temperature rises, the LED lights up sequentially, changing color from blue to
05:54green to yellow to red. Perfect. Everything works as expected. Now, let's solder the ESP32 resistor and the
06:03step-down converter to the board. Next, extract 24 LEDs from the LED strip and attach them to the strip
06:11holder.
06:12After that, let's first slide the temperature sensor's cable, followed by the 3D printed LED strip holder
06:20into the base of the unit. Then, solder the AC cord, LED strip and the temperature sensor to the board
06:27one by one. Once done, close the lid using screws. That's it. As simple as that.
06:39So, this is how my final setup looks like. In my final setup, I am sending the temperature reading to
06:45my home server over Wi-Fi. And then using another ESP32 module connected to the minor, I am turning
06:52the pedestal fan on or off based on the temperature. As previously discussed, this can also be accomplished
06:59using a relay module connected directly to the custom PCB within the setup. Thanks again for watching this
07:05video. I hope it helps you. If you want to support me, you can subscribe to my channel and watch
07:10my
07:10other videos. Thanks. See you again in my next video. Bye now.
Comments

Recommended