2022-08-19 01:21 AM
Hi,
I want to set up data logging from some of the sensors (accelerometer and ultrasonic microphone) of the STEVAL-STWINKT1B to the SD card using the FP-SNS-DATALOG1.
However, I also want to add more externally connected sensors to the STM32 via SPI (in particular thermocouple sensors, but the exact type doesn't matter, of course).
I thus wanted to ask (1) if that is possible and (2) how simple it will be. Will I run into issues disrupting the high sampling rates for the onboard sensors?
Solved! Go to Solution.
2022-09-13 04:03 AM
Hi @nickagian ,
It is not automatically handled, but you can manually update the HSDCore component.
The HSDCore contains one file for each sensor.
So you can write down your new custom sensor to enable it (something like "thermocouple_app.c/.h").
You should also check and eventually modify properly HSDCore.h, sensors_manager.c/h and device_description.c/h (i.e.: verify the proper #include, add missing macros, check SPI configuration).
Once the updated HSDCore is ready, you should be able to setup the board both by a DeviceConfig.json in the root of the SD card or by using ST BLESensor app.
If you switch on only one accelerometer and one microphone plus your new external sensor, I'm not expecting issues due to the sensor bandwidth.
Let us updated on your development
Regards
2022-09-13 04:03 AM
Hi @nickagian ,
It is not automatically handled, but you can manually update the HSDCore component.
The HSDCore contains one file for each sensor.
So you can write down your new custom sensor to enable it (something like "thermocouple_app.c/.h").
You should also check and eventually modify properly HSDCore.h, sensors_manager.c/h and device_description.c/h (i.e.: verify the proper #include, add missing macros, check SPI configuration).
Once the updated HSDCore is ready, you should be able to setup the board both by a DeviceConfig.json in the root of the SD card or by using ST BLESensor app.
If you switch on only one accelerometer and one microphone plus your new external sensor, I'm not expecting issues due to the sensor bandwidth.
Let us updated on your development
Regards
2022-09-18 12:26 PM
Hi @SPRAD.1,
thanks for your comment.
In the meantime, I actually gave it a try but soon abandoned the idea due to a lack of enough time to spend on it.
My (perhaps quick and dirty) approach was to modify the STTS751-related files and make them compatible with MCP9600, which is the IC I have for accessing the thermocouple temperature values. My idea was that both are accessible through I2C, therefore it should be easy to do the modification.
However, my first couple of tries failed, and, as I said, didn't try more. What I experienced, was that no data are gathered from the fake STTS751 sensor. For example, at the CLI script, I observed that the acquisition starts (I have also another sensor just to be sure) but the byte count from STTS751 remains zero and in fact, the acquisition end hangs.
I'm not sure if it is a hardware or software problem.
For the moment I used a temporary solution with a second board in parallel, only to handle the thermocouple measurements, but if it becomes relevant later on (for the moment we only need to do data acquisition, but later we might include the thermocouple within the sensors for the edge application), I will dig deeper.