Child pages
  • ST SensorTile.box Sump Pump Monitoring
Skip to end of metadata
Go to start of metadata

Introduction

Sensors can be fitted to Electric Motors to monitor a number of data sources, such as Temperature, Humidity and Vibration. In some climates, we use Sump Pumps where basement flooding can regularly happen or help solve dampness issues. These Sump Pumps are either installed in basin dug out in the basement, or along the outside wall of the structure. Most installations are wired directly into the Building's AC power grid, with no Battery Backup supply. Sump Pump's use a float switch to determine the level of water inside the basin, when this reaches a pre-set level, it'll trigger the Pump to remove all water to a second turn off point. Over time, these floats can fail or get stuck, which can cause the motor to run longer than expected, thus causing potential damage to the motor. During the colder months, discharge pipe can also easily freeze up or clog causing more stress on the Pump and pipe. Regular monitoring of these systems is highly recommend during times of extreme wet conditions, such as the spring thaw or during large rain storms. Most current Monitoring systems rely on detecting water seepage in area's you wouldn't normally expect, aka flooding. With STMicroelectonic's' SensorTile.Box our goal is to show another possible Monitoring system, by watching vibrations directly from the Motor or Discharge Pipe, we can watch out for Anomaly's or any other changes to operation of the Sump Pump.

Hardware Requirements

Supplier Documentation and Tools

  • SensorTile.box - wireless multi sensor development kit with user friendly app for IoT and wearable sensor applications
  • BlueST SDK - Bluetooth Low Energy Sensors Technology Software Development Kit (Python version for Linux Gateways)
  • FP-AI-SENSING1 - 4.0.1 -STM32Cube function pack for ultra-low power IoT node with artificial intelligence (AI) application based on audio and motion sensing
  • STM32CubeProg - STM32CubeProgrammer software for all STM32

SensorTile.Box Firmware Setup

For this project we will be flashing STMicroelectronic's FP-AI-SENSING1 4.0.01 firmware onto the ST SensorTile.Box. This firmware is an STM32Cube function pack featuring examples to let you connect your SensorTile.Box node to a smartphone over BLE. These examples include, Temperature, Humidity, Pressure, Magnetometer, Gyroscope, Accelerometer, Audio Classification and Activity Recognition.





  • Select the SENSING1_BL.bin firmware




  • Make sure the ST SensorTile.Box is powered



Configuration Options

  • 1800 kHz
  • Hardware reset

SensorTile.Box Test Firmware

Boot any Debian based device with WiFi/BLE, such as the STM32MP157C-DK2 install python3

sudo apt update
sudo apt install python3

Install blue-st-sdk's python3 dependencies:

sudo pip3 install bluepy
sudo pip3 install future
sudo pip3 install blue-st-sdk

Download BlueST SDK repository via git

git clone https://github.com/STMicroelectronics/BlueSTSDK_Python.git
cd ./BlueSTSDK_Python/blue_st_examples/

Run ST's example_ble_1.py project to make sure BLE connection is working:

sudo python3 example_ble_1.py 

##################
# BlueST Example #
##################

Scanning Bluetooth devices...

Discovery started.
New device discovered: BAI_400.
Discovery stopped.

Available Bluetooth devices:
1) BAI_400: [fb:09:5f:c2:db:ab]

Select a device to connect to ('0' to quit): 1
Connecting to BAI_400...
Device BAI_400 connected.

Features:
1) Activity Recognition
2) Temperature
3) Temperature
4) Humidity
5) Pressure
6) Magnetometer
7) Gyroscope
8) Accelerometer
9) Audio Scene Classification

Select a feature ('0' to disconnect): 8
Accelerometer(9776): ( X: 1009 mg    Y: 8 mg    Z: 116 mg )
Accelerometer(9783): ( X: 1008 mg    Y: 9 mg    Z: 117 mg )
Accelerometer(9789): ( X: 1008 mg    Y: 9 mg    Z: 116 mg )
Accelerometer(9795): ( X: 1009 mg    Y: 9 mg    Z: 117 mg )
Accelerometer(9801): ( X: 1009 mg    Y: 10 mg    Z: 117 mg )
Accelerometer(9808): ( X: 1010 mg    Y: 9 mg    Z: 116 mg )
Accelerometer(9814): ( X: 1009 mg    Y: 9 mg    Z: 117 mg )
Accelerometer(9820): ( X: 1008 mg    Y: 10 mg    Z: 117 mg )
Accelerometer(9826): ( X: 1010 mg    Y: 9 mg    Z: 117 mg )
Accelerometer(9833): ( X: 1009 mg    Y: 10 mg    Z: 117 mg )

Features:
1) Activity Recognition
2) Temperature
3) Temperature
4) Humidity
5) Pressure
6) Magnetometer
7) Gyroscope
8) Accelerometer
9) Audio Scene Classification

Select a feature ('0' to disconnect): 0

Disconnecting from BAI_400...
Device BAI_400 disconnected.
Scanning Bluetooth devices...

Discovery started.
New device discovered: BAI_400.
Discovery stopped.

Available Bluetooth devices:
1) BAI_400: [fb:09:5f:c2:db:ab]

Select a device to connect to ('0' to quit): 0
Exiting...

Known SDK Limitations

The BlueST SDK currently suffers from the following limitations, which are intrinsic to the bluepy library:

When running a discovery process, the already connected devices get disconnected.
There is no supervision timeout API within the SDK, hence it is not possible to detect immediately an unexpected disconnection; it is detected and notified via listeners as soon as a read/write/notify operation is executed on the device.

Project Design

Our theory for this project, is to attach the SensorTile.box directly to the discharge pipe of the Sump Pump. As our Sump Pump is installed too deep down the trench for direct connection, the discharge pipe is the best possession.



  • Sensor Location



  • Discharge Pipe



  • Discharge Pipe with Sensor Attached

Project Application

For this project, we are using a modified version of STMicroelectronic's example_ble_1.py application, patched to log 2400 samples (2 minutes of raw BLE data), and auto-connect to the sensor to work around the current bluepy limitations. Data is stored locally in date stamped log files and served up by Apache for external access.

sudo python3 grab_accel.py
#Scanning Bluetooth devices...

#Discovery started.
#New device discovered: BAI_400.
#Discovery stopped.

#Available Bluetooth devices:
#1) BAI_400: [fb:09:5f:c2:db:ab]
#Connecting to BAI_400...
#Device BAI_400 connected.

#Features:
#1) Activity Recognition
#2) Temperature
#3) Temperature
#4) Humidity
#5) Pressure
#6) Magnetometer
#7) Gyroscope
#8) Accelerometer
#9) Audio Scene Classification


2020-05-06 15:09:59.993541
Accelerometer(26892): ( X: -53 mg    Y: 146 mg    Z: 981 mg )
Accelerometer(26898): ( X: -53 mg    Y: 146 mg    Z: 983 mg )
Accelerometer(26904): ( X: -53 mg    Y: 146 mg    Z: 982 mg )
Accelerometer(26910): ( X: -53 mg    Y: 146 mg    Z: 983 mg )
Accelerometer(26917): ( X: -53 mg    Y: 147 mg    Z: 983 mg )
Accelerometer(26923): ( X: -52 mg    Y: 146 mg    Z: 982 mg )
Accelerometer(26929): ( X: -53 mg    Y: 147 mg    Z: 983 mg )
Accelerometer(26935): ( X: -52 mg    Y: 146 mg    Z: 983 mg )
Accelerometer(26942): ( X: -52 mg    Y: 146 mg    Z: 984 mg )
Accelerometer(26948): ( X: -53 mg    Y: 146 mg    Z: 983 mg )
Accelerometer(26954): ( X: -52 mg    Y: 147 mg    Z: 984 mg )
Accelerometer(26960): ( X: -53 mg    Y: 146 mg    Z: 983 mg )

Project Snapshot




  • Sensor Readings over a 2 Minute Snapshot




  • Sensor with No Motion




  • Sensor X Axis Data with No Motion




  • Sensor with Motion (Pump Active)




  • Sensor X Axis Data with Motion (Pump Active)

Project Conclusion

From our initial findings, we are seeing a consistent vibration pattern from the discharge pipe. At this time, the Motor is consistently running around 8 seconds, every 2 to 3 minutes, so I'm unable to replace it with a broken Sump Pump for comparison purposes. It will take more data samples before we are able to take advantage of STMicroelectronic's AI library. This library would allow us to detect Normal and Ab-Normal vibration patterns.

  • No labels