SD_MMC for Adafruit HUZZAH32

Hello everybody,

first i want to explain my project: I am building a heart rate sensor for HRV analysis with movement detection, therefore i need a sampling rate of at least 1000 Samples/Second. This device should work as a stand alone device with a battery for energy supply and a SD-Card for data logging. I need to log the calculated Heart Rate, as well as the movement patterns from the accelerometer and the underlying ECG for the Heart Rate detection. A 100 Hz resolution of the ECG would be enough.

I am using a Adafruit HUZZAH32, a BNO055 IMU, a Adafruit micro SD breakout board, a AD8232 Heart Monitor and a LiPo Battery Pack. To Charge the Battery i need to use the HUZZAH32 due to its integrated charging circuit.

Now my problem:
I am using the standard SD library and i am buffering all my data for about 5 seconds and then I push all the data to the SD-Card, here I observe write times of about 500ms. In this time there are no samples taken. When I don´t buffer the data the writespeed is not much faster, it is always about 200ms.
I create the files in setup and then i append the data to the files as a text file

To speeden up the SD write speed i wired a SD-Card for 4 bit use of SDMMC for ESP32´s on a different ESP32 Dev Board. I followed the instructions of this post:

It worked pretty good and i got 4 times faster write speed as using the SD-Module with SPI.
Then i tried to connect the SD-Card Adapter to the HUZZAH32, but the PIN2 is not broken out on the HUZZAH32. My Question is now, is it possible to change the GPIO´s in the SD_MMC library to wire the Data0 of the SD-Card to a different Pin on the HUZZAH32, for example to Pin33 instead of Pin2?

I also tried out the SdFat library witch didn´t really work...

As my project is quite complex i tried to explain my problem exactly without placing 500 lines of code.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.