Smart Wireless Thermostat on PIC32CZ CA90 Curiosity Ultra Development Board

Download

Description

This wireless thermostat application uses Bluetooth Low Energy 5.2 and Wi-Fi technology to collect real-time temperature data from two BLE sensor nodes. It allows users to easily set and control the temperature, creating a pleasant environment by adjusting the heating or cooling system to their desired level through an intuitive BLE central node acting as a wireless thermostat that connects to the end nodes over BLE and acts as the temperature control panel. The collected temperature is also streamed through the Wi-Fi Gateway node to the AWS IoT cloud for monitoring.

This solution includes four projects to demonstrate a Wireless Thermostat.

This project employs the RNBD451 BLE module to create multi-link BLE connections with two peripheral nodes. Once connected, the central node functions as a GATT client, periodically requesting real-time temperature data from the peripheral GATT servers(peripherals) and displaying it on a 4.3-inch maXTouch graphics display. Users can set and send temperature threshold limits to the BLE peripheral nodes using the GUI. Furthermore, the central application transmits the gathered temperature data to the WFI32 IoT gateway via UART for real-time monitoring on the AWS cloud.

This application operates as a GATT server using the RNBD451 BLE module. It periodically collects temperature data from the IO/1 Xplained Pro board and updates the temperature characteristic value whenever the temperature changes. The node waits for the connection request from the central node. Once connected, it sends temperature data in response to read requests from the GATT client(central node) and can receive and implement threshold limit values from the central node. An onboard LED turns on whenever the temperature exceeds the designated limit.

This application uses ADC to read the analog output from the onboard MCP9700A temperature Sensor. Once connected to central node over BLE, it periodically sends the temperature characteristic value to the central node upon request. It can also receive and set threshold limit values from the central node, with an onboard LED illuminating when the temperature surpasses the defined cutoff

This application acts as bridge between the central node and the AWS cloud. It periodically receives the BLE end nodes temperature data from the central over UART and publishes the same over MQTT to the AWS IoT cloud for constant monitoring.

Modules/Technology Used:

Hardware Used:

Hardware Nos. Required
PIC32CZ CA90 Curiosity Ultra Development Board 1
PIC32CM LS60 Curiosity Pro Evaluation Kit 1
RNBD451 Add On Board 2
WBZ451 Curiosity Development Board 1
WFI32 IoT Development Board 1
I/O1 Xplained Pro Extension Kit 1
4.3” WQVGA maXTouch Display module 1
565 LCD Adapter Graphics Card 1

A group of electronic components Description automatically generated

Software/Tools Used:

The projects have been verified to work with the following versions of software tools:

Because Microchip regularly updates tools, occasionally issue(s) could be discovered while using the newer versions of the tools. If the project doesn’t seem to work and version incompatibility is suspected, it is recommended to double-check and use the same versions that the project was tested with. To download original version of MPLAB® Harmony v3 packages, refer to document How to Use the MPLAB® Harmony v3 Project Manifest Feature

Hardware Setup:

PIC32CZ CA90 Thermostat Central Node:

PIC32CM LS60 Thermostat Peripheral Node 1:

WBZ451 Thermostat Peripheral Node 2:

WFI32 IoT Thermostat Wi-Fi Gateway:

Demo Hardware Setup:

Pre-requisites:

Programming Methods:

Method 1: Programming prebuilt hex file:

Note: Program the prebuilt hex files for other projects similarly, by choosing the respective devices and tool.

Method 2: Programming/Debugging the Application Project:

PIC32CM LS60 Thermostat Peripheral Node 1

WBZ451 Thermostat Peripheral Node 2:

PIC32CZ CA90 Thermostat Central Node:

WFI32 IoT Wi-Fi Thermostat Gateway

Running the Demo:

A black background with a black square Description automatically generated with medium confidence

PIC32CZCA90 BLE Central Node:

Screen 1: Home Screen

A red circuit board with a screen and a display Description automatically generated

Note:Before proceeding to the next step, make sure the console messages shown on the peripheral Node 1 and Node 2 are as Node 1 Ready Status and Node 2 Ready Status

Screen 2: Multi-Connect Screen

Screen 3: Multi Node Sensor Monitoring

A red circuit board with a screen and a small display Description automatically generated

Note:The corresponding temperature can be viewed on the tera term console of nodes 1 and 2

Note:Please wait for a couple of seconds if the next screen doesn’t appear immediately.

Screen 4: Temperature Control

Note: Please note that the limits for each node should be set individually. The nodes do not get updated simultaneously. To set threshold for both the nodes, change the limit in one node, press enter and then do the same for the other node.

PIC32CM LS60 BLE Peripheral Node:

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

A red circuit board with a black cable Description automatically generated

WBZ451 BLE Peripheral Node:

A screen shot of a computer Description automatically generated

A black background with white letters Description automatically generated

A black screen with white text Description automatically generated

A black background with white text and red line Description   automatically generated

WFI32 IoT Wi-Fi Gateway Node:

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

Comments:

Revision: