This project is part of the Smarter Sustainable World Challenge with Nordic Semiconductors Thingy:53 and Edge Impulse.
Is to design and Implement a simple Remote Home Climate Monitoring Station used in machine learning using Edge Impulse.
I hope to reduce some of the usage of certain energy resources in my home and become more energy efficient. My light, heating and cooling bill has been crazy the past 2 years with the weather patterns here in the USA. I hope to lower the energy consumption in my home.
I will use the Thingy53 as a remote Home Climate Station My hope is, that I can use the collected data to reduce the heating, cooling, humidity, lighting and general energy consumption of my home, and become more energy efficient. My plan is to use the results of machine learning using Edge Impulse,
The Thingy:53 collects environment data in the home. Other environment sensors are attached to the Thingy. The Thingy will feed data into the ML model that will monitor the perfect balance of energy consumption in my home and report the resources that are failing to conform to the ranges of the model. the Telemetry data is also sent to the cloud for historical Analysis.
In addition the Telemetry data will be sent to the cloud using Nordic's cloud solution. nRF Cloud. Other environment sensors are attached to the Thingy that are not on the board. The Thingy will feed data into the ML model. The Telemetry is also sent to the cloud for Analysis.
I've been presently experimenting with IoT and I've used many Development kits. I have participated in 9 RoadTest on element14.com. I have worked with EVK's from Arduino, NXP, Lattice, Renesas, Infineon and Cypress. I have also done experimenting with the several models of the Raspberry PI. I am a Retired Software Engineer. My background is more on the software side, with a Bachelors of Science Degree in Computer Science from Boston University. I Graduated from BU in 1980 and had been working as a Software Engineer since then until I retired in 2018. Here is a link to my element14 Activity blog, that list my roadtest and design challenges that I've been involved in http://community.element14.com/members-area/b/blog/posts/my-element14-com-activities.
Research & ExperimentationThis section will describe my experimentation with the firmware development environment and the features of the Thingy:53 that I'll be utilizing to implement my Weather Station.
Since I have not used the Thingy:53 kit before I will need to research and experiment with the kit. This should not be too much of a learning curve since I've worked with another Nordic semiconductor product, the nRF9160 DK. The firmware development and cloud environment are also used by all Nordic nRF series kits. I'm familiar with the resources available on the company website. I will need to experiment with the Thingy:53, in order to better understand its capabilities.
included in the Thingy:53 box, Listed 2 steps
1. Turn on the button
2. Go to the getting started page http://nordicsemi.com/start-thingy53
· This link takes you to the middle of the Nordic Thingy:53 product page at https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-53
· Here you will find an 8 step wizard, that will walk you thru connecting the Thingy:53 and trying out the Edge Impulse ML Model, using the firmware that comes pre-installed. You will be using the nRF Edge Impulse App on a smartphone to test the Model for simple gestures.
1. Power on your Thingy:53 and download the nRF Edge Impulse app from the Google Play store( Apple App Store if you own an iPhone
2. Log into the Edge Impulse Studio app
3. Connect to your new Thingy:53 by selecting the device name EdgeImpluse in the app
a. Since I have other projects the app takes me directly to the “dashboard” and I have to create a new project to see the menu as described in this step.
4. Go to the tab named interfacing and press “start”
a. Before I do interfacing. I need to go to the “Device” menu at the bottom of the app and Connect first. Then I can go to “Interfacing” and select the connected Device and press “stat”.
b. Even though it is a little different then the getting started wizard, I now see the interfacing screen, and can continue.
5. Do the wave motion
6. Do the up and down
7. Do the snake
8. Notice the interfacing results on the app
NEXT Step is to get started developing· To get started, I followed the Nordic Thingy:53 Getting started guide.
I first intended to include my notes in this project, but found it to be too long, so I created another project, Research & Experimentation with the Nordic Thingy:53. It contains my notes that I took while following the steps in the getting started guide.
This completes my Research and Experimentation of the Thingy:53. Now it’s time to move onto designing my Idea for this project.
DESIGN
Due to time constants, I’ve decided to implement the Matter Weather Station Sample from the nRF SDK. I will use the this example, to gather sensor data from the Thingy:53. This is using examples given on the Nordic matter documentation pages.
Home Energy Monitoring DesignThis section includes a design using the Matter Weather station Project to gather sensor data from the Thingy:53.
Functional Specification- This section will describe the functionality of my Home Energy monitoring design.
- Monitor temp, humidity, dew point. pressure using the thingy:53 environment sensors temperature, humidity and pressure.
- Use the Thingy:53 as a Matter device. that will run the Matter Weather station sample to gather sensor data from the Thingy:53.
- Use and analysis code. This will allow you to figure out how to collect data from the sensors.
The following diagram shows the "Elements of a Matter over Thread" setup that I am using It shows the four individual independent components and the three RF protocols used.
Matter is a communication protocol running over a thread network. The following diagram shows where the thread network fits into the architecture.
Elements of my setup and Hardware/Software implementation
- Matter Device : Thingy:53 running Matter Weather station sample firmware
- Matter controller my Phone running CHIP Tool for Android
- WiFi Router : my WiFi Router
- Thread Border Router : Raspberry Pi 4 and a Nordic nRF9160
This section describes my implementation of the four Elements of my setup: Matter Device (Thingy:53+Matter Weather) Sample,, Matter Controller (Android +Chip Tool),
Matter Device : Thingy:53This section will describe what I accomplished to get the Matter Weather Station setup and running on the Thingy:53
- I used the following online tutorial Thingy:53: Matter weather station to implement the firmware on the Thingy:53
- First download the Matter weather Station sample. Use the mobile nRF Programmer and select it from the list of available samples. After it is downloaded and starts running it will send debug and error message to the USB Serial. Open up your favorite Serial Monitor (I use Tera Term) and observe.
- At this point you should get errors because the configuration is not setup yet.
- You will need to setup the other components of the matter components in order to run this sample
- Next step, is to get a Matter Controller setup and working. Onto the next section.
- Now get the CHIP Tool for Android CHIP Tool for Android (also known as Android CHIPTool) is the recommended Mobile controller that runs on a smartphone, This will allow you to test Matter Weather sample using an Android smartphone.
- To use CHIP Tool for Android, choose one of the following options:
Use the prebuilt tool package from the Matter nRF Connect releases GitHub page. Make sure that the package is compatible with your nRF Connect SDK version.
Build it manually from the source files available in the modules/lib/matter/src/android/CHIPTool
directory and using the building instructions from the Building Android page in the Matter documentation.
I used the fist option and downloaded the latest release of the Android package file (apk) to my android. Then I had to set my security setting "allow to install applications from unknown sources". Then I was able to click on the downloaded apk file and the app installed.
For instructions about how to test using the CHIP Tool for Android, see the Commissioning nRF Connect Accessory using Android CHIPTool page in the Matter documentation.
Note
The testing procedure assumes you are using the CHIP Tool for Android Matter controller application. You can also obtain the measurement values using the PC-based CHIP Tool for Linux and iOS Matter controller and invoking the read commands manually. Compared with the PC Matter controller, the mobile Matter controller only gives access to a subset of clusters supported by the Matter weather station application. If you want to access all the supported clusters, including Descriptor, Identify, and Power Source clusters, use the PC Matter controller. To see how to send commands from the PC Matter controller, read the Working with the CHIP Tool page in the Matter documentation.
Next
step, is to implement a Thread Border Router and configure a Thread Network and put it all together
- I will be connecting the Thread Border Router to my WiFi Router.
- This will part of the next section on the implementation of the Thread Border Router.
I found out that, a Thread Border Router connects a Thread network to other IP-based networks, such as Wi-Fi or Ethernet. A Thread network requires a Border Router to connect to other networks.
The following diagram shows both sides of the RF connections for an OpenThread Border Router (OTBR). WiFI RF on one side and Thread RF on the other. The OTBR can be implemented on a Raspberry PI 4.
The following links are two tutorials to setup a Matter Thread Border router
- The CodeLab tutorial on openthread.io to set up your OpenThread Border Router on a Raspberry Pi 4 device.
- Configure the Thread Border Router on a Raspberry Pi. For detailed steps, see the OpenThread Border Router Page in the nRF Connect SDK documentation.
The OTBR will run on raspberry PI This link will describe the workings of the OTBR. OpenThread Border Router (OTBR), released by Google is an open-source implementation of the Thread Border Router.
The Nordic nRF9160 will be used to implement the Radio co-processor (RCP) variant compatible with the IEEE 802.15.4 standard. It is stated in the documentation that, "This application can be implemented, on an nRF52 device". I plan to use my INRF9160 in nRF52 MODE (switch set to nRF52).
I used "Configure the Thread Border Router on a Raspberry Pi. For detailed steps, see the Thread Border Router Page in the nRF Connect SDK documentation."
Here is the link to my auxiliary project A Thread Border Router with Pi 4 and nRF9160 describing implementation of the setup, configuration, and testing of the Thread Border Router. I originally planned to included it in this project, but decided to create an auxiliary project to contain my notes on this topic.
Within this auxiliary project I'm stuck on SETP 3. Form a Thread network. Basically I cannot run the command:
$ot-ctl
I
was unable to get a Thread Border Router SETUP in my project A Thread Border Router with Pi 4 and nRF9160 , so I was unable to get configure and test the Thread Border Router using the Raspberry PI 4 and the nrf9160.
I HAD TO STOP HERE, BECAUSE I COULD NOT "Form a Thread Network". The $ot-ctl command is not working and I don't know why?
Putting all the elements togetherThis section will describe and show the weather station working. Hopefully all four elements are configured correctly and will work the first time?
NOT ABLE TO GET TO THIS implemented, because I cannot get the Thread Border Router setup.
Project SUMMARY and CONCLUSIONS
I gained a tremendous amount of knowledge on using, programming, and prototyping the Thingy:53 for the use in this challenge. This is a very complex and feature rich device, with a very impressive Toolchain. It is very useful in prototyping IoT embedded Firmware. This took up most of my time on this project and left only 3 weeks to Design and implementation of my idea.
I was able to setup a firmware development environment for the Thingy:53 using VS code and the nRF Connect SDK.
I was successful in implementing the sample firmware for the Matter Weather Station. included in the nRF Connect SDK on the Thingy:53.
I came up with some functionality for a design for a Home Energy Efficiency ML model, but due to time constraints was unable to get it implemented in time.
I authored 2 auxiliary project to contain my notes on the following topics:
I was unable to get my implementation of the Thingy:53+Matter Weather Sample running. Unfortunately i was unable to get a Thread Border Router setup to be able to run the Matter weather Station sample on the Thingy:53. This is very frustrating and I will continue to try and get it setup. And once I do, I can implement the Thingy:53+Matter Weather Sample.
I have only scratched the surface with the possibilities of the Thingy:53. I have some other ideas on using the Thingy:53 as a prototype device.
Experiment more with Matter protocol
- When I successfully get a thread Network setup, configured and tested, I can experiment further with other Matter Devices.
- Try Running OTBR using Docker
- Other matter experiments.
Experiment with Machine learning to try to attain the most efficient Energy environment for my Home. These are some of functionality requirements and things to consider for Machine learning for more energy efficiency.
- How to monitor temp, humidity, dew point .pressure using thingy 53 3 sensors temp humidity and pressure.?
- Use and analysis code in the weather apps Matter This will allow you to figure out how to collect data from the sensors.
- How to train a model to detect an ideal (comfortable) environment in my office?
- What is the ideal environment? For example (70 degrees. Not humid. I'm not sweating. not to hot or not to cold).
- What room(s) are we monitoring?
Office with computers running 24/7... Needs to be comfortable for work... 2 windows.
Living room where thermostat is... Primary living space.. same comfortable conditions as office.. much bigger space with more windows.
Bedroom on second floor with Fan .... needs to be comfortable for sleeping. One window.
- List all sources of heating, cooling, dehumidifier.
Open widows to get outside air in warmer months from each room.
HVAC thermostats . Two and there location to each room monitored.
The 4 Seasons of the year. How to determine the different seasons (Spring, Summer, Fall, and Winter? How to compare outside environment with inside? When "the windows are open"?
Using it as a sensing device for Home Assistant A Open source home automation OS, that puts local control and privacy first.
Using it as a node device in a Home Mesh network.
I'd like to experiment with it by creating and connecting devices to a Home Mesh Network.
Using it for prototyping of my other IoT future projects.
- I sure I can find plenty of uses for this as a prototyping kit
That is all for now good luck to everyone in this challenge. This was a fun project. I'll review the winners projects to get even more idea's.
Comments