Edge Impulse logo
Blog Post

TinyML Can Save You Some Big Bucks in Repairs!

Machine Learning, TinyMLUsing an Edge Impulse ML model and an Arduino Oplà IoT Kit, determine the state of a heat pump and if it requires maintenance.

Justin Lutz

March 30, 2022

    Air source heat pumps are becoming a popular method for heating and cooling a home. They can provide targeted heat or air conditioning to individual rooms, resulting in energy savings and therefore a lower energy bill. On the exterior of the house is the heat pump condenser, which circulates either hot or cold refrigerant depending on the mode you are using. Inside the condenser is a fan. If that fan were to stop working, or work sub-optimally, the heating and cooling efficiency of the heat pump would suffer (or not work!). Wouldn't it be cool (see what we did there?) to know if it were about to fail so you could have it serviced before it breaks? Well, with Edge Impulse and Arduino hardware, now you can!

    I came up with a simple device to detect the vibration of the heat pump's fan motor and identify any vibrations that are outside the normal operation of the fan. The solution uses Edge Impulse and a low-power microcontroller to determine if the excessive vibration could mean it is time to get your heat pump looked at and serviced.

    The hardware for this idea consists of an Arduino Oplà IoT Kit, powered by a MKR WiFi 1010 board. The MKR WiFi 1010 packs a 48 MHz Arm Cortex-M0+ processor, 32 KB of SRAM, 256 KB of Flash, and the u-blox NINO-W102 radio module for wireless connectivity. The MKR board mounts to the Oplà carrier, which includes five capacitive touch buttons, temperature, humidity, and barometric pressure sensors,  a six-axis IMU, a color detection sensor, a gesture sensor, two relays, a display, and a spot for an 18650 Li-Ion 3.7V battery for true cordless operation. It also comes with a plastic housing for limited protection. The Oplà carrier board is compatible with any board in the MKR series, meaning other communication boards (e.g. LoRa, NB-IoT) could be used for your solution if Wi-Fi is not available.  

    I then turned to Edge Impulse for its advanced anomaly detection with feature importance capability to convert the Oplà IoT Kit into a smart heat pump monitoring system. I wrote a quick sketch following the data forwarder example, uploaded the sketch to the MKR WiFi 1010, and connected the board to Edge Impulse via the Edge Impulse CLI to start reading accelerometer data. For the project, I only had to collect for two classes: on and off. I acquired five minutes of data with the heat pump on and five minutes of data collection with the heat pump off. 

    Above is the heat pump off and below is on. You can see the difference in the signal amplitudes between the two samples.

    Once all the data was gathered, I followed the anomaly detection tutorial and used all the default values for the impulse. How easy is that?

    I then trained the model and deployed it to an Arduino library .zip file. 

    The project can be found here if you want to view or clone it. 

    From there, I used the Arduino Cloud interface to create a cloud-based dashboard for heat pump monitoring.

    The dashboard consists of the state of the heat pump (off/on), no issues (true/false), and the anomaly score (float value). I employed the Arduino Web Editor to develop a sketch that sends accelerometer data (x,y,z) to the Edge Impulse model and the model utilizes that data to determine if the heat pump is off or on. It also calculates an anomaly score to determine if the heat pump is behaving abnormally (e.g. vibrating more than usual). If the anomaly threshold is exceeded, no issues turns to "false,” and the LEDs on the Oplà illuminate red. Time for maintenance!

    Check out the project write-up for more details and the source code to build your own predictive maintenance device!

    Want to see Edge Impulse in action? Schedule a demo today. 


    Are you interested in bringing machine learning intelligence to your devices? We're happy to help.

    Subscribe to our newsletter