Arduino Thermostat that is controlled with a Bluetooth Low Energy mobile app

I made a thermostat that has no UI and is only controlled via a mobile app by using Bluetooth Low Energy
Aug 23, 2022 — 3 mins read — Arduino

Arduino Thermostat that is controlled with a Bluetooth Low Energy mobile app

I was recently approached by Seeed Studio to try out their new nRF52840 powered XIAO BLE board and make a project with it, so I agreed.

The board is quite powerful and has a lot of features, but what stood out for me was its support for Bluetooth Low Energy communication so I decided to make a project that utilizes it by combining it with a complimentary Android application that serves as a UI for the project. The XIAO BLE board can be programmed in multiple ways, but I opted for using the Arduino IDE as that is most familiar to me.

The project uses the XIAO BLE board, a DHT22 temperature and humidity sensor, a relay, and an SPDT switch to act as a manual override for the activation of the thermostat if you are around, but don't have the phone in your hands. You can check out the demo and the full project explanation in the video below or in the project Instructable.

The mobile application for controlling the thermostat is made using the MIT App Inventor software, where you can build Android and iOS applications directly in the browser. The software has two major parts, the designer and the blocks editor where all the code is created using a visual editor. This was my first time using this platform and it was relatively easy to figure stuff out.

MIT App Inventor code blocks editing

MIT App Inventor code blocks editing

Since the XIAO nRF52840 board has the ability to charge a lithium battery and use it as a backup power source, the project can be extended in many ways so that is also powered during a power outage. Additionally, the software on both the thermostat and the mobile app can be extended so that it adds a lot more features like schedules, automatic on/off cycles, triggers based on temperatures, anti-frost mode, and a lot more so it becomes a versatile DIY thermostat option for people to use in their home automation setups.

If this sounds interesting to you and you want to contribute to it, feel free to fork out the GitHub repository and create a pull request for some of the features. I will be more than happy to review it!

Additionally, if you want to try out the project on your own, the Arduino code, as well as the App Inventor .aia file can be also downloaded from the GitHub repository.

Tools and materials used in the project:


prototype dht22 bluetooth ble relay
Read next

Custom power bank for electronics projects

Making a project that is battery operated is always a challenge because you need to overcome several obstacles as the placement and mounting...

You might also enojy this

No SIM GPS Tracker Using LoRa and Custom Android App

Tracking an object via GPS, requires a way to send that data back to a receiver or a central processing station so it can then be worked wit...