As I've described in earlier posts, I'm trying to see if I can use the sensor to pick up footstep vibration patterns to identify who is in the room. With a single sensor this can't work for multiple people simultaneously, but hopefully it will work for a single person.
I've been researching the topic and I found an interesting article: Person Identification using Seismic Signals generated from Footfalls . This is the pre-publication article as I don't have access to the published article. It has some interesting and hopefully relevant information. There is a chart comparing performance of different detection systems up to the time of publication (2018).
I think that the response of the vibration sensor will be equivalent to a seismic sensor although I think the seismic sensor (geophone) may have more sensitivity. The two parameters that I want to extract from the published data are sample size and sampling frequency. I'll also need to investigate machine learning algorithms/models later. The algorithm used with the seismic sensors is the Support Vector Machine (SVM).
I'll discuss the data processing in a future post, but the jump up for now is that reasonable accuracy was achieved using a 5-10 footstep sample and an 8 KHz sampling rate.
The tradeoff in number of steps captured is that with a single sensor the amplitude detected will be a function of the distance between the sensor and the footstep. For a single sensor, probably 3-5 steps is a good tradeoff. I'm going to start with a 5 second sample window. I'm somewhat surprised that an 8 KHz sampling rate is required. I'm used to a much lower sampling rate using accelerometers. I'm hoping to use Edge Impulse to process the sensor data, so I may have to compromise the sample rate based on the method that I use to upload the data - more on that later.
Sending data to Edge Impulse
There are 3 basic methods for uploading sensor data to Edge Impulse: (these are all covered in the documentation - https://docs.edgeimpulse.com/docs/getting-started )
The basic requirement for all of these methods is the installation of the Edge Impulse CLI which has the pre-requisite installation of Node.js v10 or higher.
The Edge Impulse CLI contains the 3 tools required for uploading data
- edge-impulse-daemon - configures devices over serial, and acts as a proxy for devices that do not have an IP connection.
- edge-impulse-uploader - allows uploading and signing local files.
- edge-impulse-data-forwarder - allows collecting data from any device over a serial connection, and forwarding the data to Edge Impulse.
Supported device and sensor
In this method, Edge Impulse provides firmware that is installed on the device (e.g. Arduino Nano 33 BLE Sense) and the firmware runs in conjunction with the edge-impulse-daemon to upload data.
Since the vibration sensor is not supported, I can't use this method although I have used it with the BLE Sense board.
Unsupported device and/or sensor
There are two methods of uploading data for non-supported devices and sensors:
- Data forwarder - used to relay data from any device to Edge Impulse over serial. Device writes sensor values over a serial connection, and the data forwarder collects the data, signs the data, and sends the data to the ingestion service using the edge-impulse-data-forwarder script. Requires that you create and load a program on the device to send data at a consistent (fixed) rate over serial to the host computer where the edge-impulse-data-forwarder script is running. This method limits the sample rate by the speed of the serial connection. At 115200 bps, the sample rate is limited to about 400 Hz. I'll use this method initially to get sample data uploaded to Edge Impulse so that I can play with it. Since the sensor will be remote from the host computer, I won't use this method to capture the real data. I guess I could load the CLI software on a laptop or set up serial over WiFi, but I won't do that unless using the uploader fails.
- Uploader - the edge-impulse-uploader script signs local files and uploads them to the ingestion service. This is useful to upload existing data sets, or to migrate data between Edge Impulse instances. This is the method that I plan to use. I'm going to capture sensor data into files on an SD card and upload the files using the edge-impulse-uploader running on the host computer. Using this method there won't be a limitation on the sample rate other than the device capability and data file sizes.
Data capture setup
There are a few basic requirements for my data capture setup
- Display - to see the data as it is captured.
- SD card interface - to save the data
- Battery operation - for portability
- Analog DMA capability - to increase sample rate and to provide consistent logging
- RTC - to timestamp the data
- User button - to trigger data capture
I've recently been using a couple of sensor platforms from Seed Studio that would satisfy the all requirements.
The first is the Xiao Expansion board which is shown below. It has a SAMD21 MCU and a 128x64 OLED display. I wrote a blog post about it Seeeduino XIAO Expansion board .
Xiao Expansion board
The second platform is the Wio Terminal. It has a SAMD51 MCU and a 320x240 LCD display. I used it for my Sensors project Wio Terminal Sensor Fusion - Introduction . In the end I decided to use the Wio Terminal because in addition to a more capable MCU, it also has WiFi and BLE communications capability.
Wio Terminal
You'll notice that I'm no longer using the microphone stand as that caused too much damping of the signal amplitude. I'll need to experiment with different techniques of directly attaching the sensor to the floor to get the best sensor response..
In the next post I'll cover the process of capturing data and uploading to Edge Impulse.