Page 1 of 2

ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Fri Sep 29, 2023 10:39 am
by stefan.erni
Hi Ben

What about this hardware? SparkFun DataLogger IoT - 9DoF DEV-20594

It's has the 4bit sd-card what is now supported by FC10.

And on board is a IMU ISM 330 DHCX on SPI bus and a Magnetometer MMC5983MA.
It's support the interupt on the IMU.

This IMU and Magnetometer are also avaible on small demoboards.

Is it possible to create new component on SPI and i2c bus ?

component ISM 330 DHCX
component MMC5983MA.

regards

Stefan

ESP32 Board with ISM 330 DHCX MMC5983MA:
Snag_c4b9c1.png
Snag_c4b9c1.png (608.94 KiB) Viewed 18799 times
Snag_c569c7.png
Snag_c569c7.png (661.18 KiB) Viewed 18799 times
Demoboards IMU ISM 330 DHCX on SPI bus or i2c and a Magnetometer MMC5983MA:
Snag_c666a6.png
Snag_c666a6.png (70.48 KiB) Viewed 18799 times

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Mon Oct 23, 2023 11:14 am
by stefan.erni
Hi Ben

I have the board now. I can compile and let a Led flash.
Just the SD card make a small problem.

I can not init the sd-card.
There is no pin to choose for the card?


regards


Stefan

Fixed Pin on hardware....

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Oct 24, 2023 11:44 am
by BenR
Hi Stefan,

The pins for the SD peripheral are fixed and so cannot be altered so I've not exposed them as properties in the component. What cards are you using? not all cards support the 4-bit SD mode. I have some that work well and others that don't work at all. You could also try the 1-bit mode as this should work on more cards.

Looks like a cool little board, I'll see if I can get hold of one.

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Oct 24, 2023 12:38 pm
by stefan.erni
Hi Ben


Yes it's a nice board and working perfect with Flowcode10.


The card is my standard card. I use this kind of card in all my projects.

I have tried with 4bit and with 1bit mode and have tried different card (but always Sandisk)
I can not initialize the card.

regards


Stefan



Card
Snag_2506c8d9.png
Snag_2506c8d9.png (812.17 KiB) Viewed 13237 times



Here the Logger:
SPARKFUN DATA LOGGER IOT - 9DOF
Snag_2502c9d6.png
Snag_2502c9d6.png (52.04 KiB) Viewed 13237 times
https://www.digikey.ch/de/products/deta ... 4/19477557

And I also use this multiplexer together with 8 pieces Sensirion SHT45
so it's simple to connect with QWII cable....
8 Channel I2C multiplexer:
Snag_2502ff0f.png
Snag_2502ff0f.png (90.87 KiB) Viewed 13237 times
https://www.digikey.ch/de/products/deta ... gCwgF0BfIA
Snag_250ea879.png
Snag_250ea879.png (141.77 KiB) Viewed 13237 times
https://www.digikey.ch/de/products/deta ... 5/17831054

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Oct 24, 2023 1:56 pm
by stefan.erni
Hi Ben

Ok..... The card is initialising....

I have to set GPIO32 to high, to set power on for the RGB LED and the micro-sd card.

Sorry

regards

Stefan

here is a powerswitch to turn on 3.3V_SW. with the pin PWREN
Snag_255dc036.png
Snag_255dc036.png (25.02 KiB) Viewed 13229 times
on the esp32 GPIO32

Snag_255f7b25.png
Snag_255f7b25.png (73.61 KiB) Viewed 13229 times
on the card:
Snag_255fb9e4.png
Snag_255fb9e4.png (43.9 KiB) Viewed 13229 times

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Wed Oct 25, 2023 11:04 am
by stefan.erni
Hi Ben

The 4 bit mode is working fine also with 40MHz clock! cool!

I made a test to append 20'000 string, each string was 20char (and 2byte cr and linefeed)

To test the time I used a hardware pin connected to my Oscilloscope, so it took 1 second

Now my question. would it be possible also to have AppendINTArray and ReadINTArray like the the "spi" FAT?
I use this mostly to store data in binary form.

regards

Stefan


Command for FAT File SD

Snag_b0a0fa.png
Snag_b0a0fa.png (101.49 KiB) Viewed 13148 times

simple test part:
Snag_9b2950.png
Snag_9b2950.png (31.22 KiB) Viewed 13148 times
good result all the 20'000 lines:
Snag_9e0c92.png
Snag_9e0c92.png (13.61 KiB) Viewed 13148 times

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Nov 21, 2023 3:00 pm
by stefan.erni
Hi Ben

The 4bit Mode is working nice with the CSV writer.
Snag_18f5cd1.png
Snag_18f5cd1.png (22.27 KiB) Viewed 12736 times
Also AppendString is working perfect!

To write binary data is a little problem.
write byte to buffer is not working
and AppendIntarray does not yet exist. I would like to use this AppendIntarray for data.

and one more small question....
Do you or anyone know of any other ESP32 boards with this 4bit connection to the sd-card?

regards

Stefan

Snag_191204b.png
Snag_191204b.png (20.46 KiB) Viewed 12736 times

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Wed Jan 03, 2024 1:04 pm
by mnfisher
I believe the esp-cam boards have 4 bit connection to the SD slot?

I'm trying to get the 1bit mode working with a display SD card (a14 SCK, a15 MOSI and a2 MISO) - but no joy.

I get

E (5884) sdmmc_periph: sdmmc_host_clock_update_command(200): sdmmc_host_start_command returned 0x107
E (6884) sdmmc_periph: sdmmc_host_clock_update_command(200): sdmmc_host_start_command returned 0x107
E (6884) sdmmc_req: handle_idle_state_events unhandled: 00001000 00000000
E (6884) sdmmc_req: handle_idle_state_events unhandled: 00001000 00000000
E (10894) sdmmc_periph: sdmmc_host_clock_update_command(200): sdmmc_host_start_command returned 0x107
E (10894) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (10904) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
Kicked out as debug. What I'm trying to do might not be possible - but I found this:
At the same time, many LCD breakout board also breakout a full size SD card slot. However, most of them only break out the SPI mode pins. It is not enough to use as 4-bit SD bus mode, but you can still use it as 1-bit SD bus mode by this connection mapping:

LCD -> ESP32
SD_CS -> nil
SD_MOSI -> 15
SD_MISO -> 2
SD_SCK -> 14
Any suggestions to as to whether this is either possible? or what I am doing wrong?

Martin

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Jan 09, 2024 10:00 am
by stefan.erni
Hi Martin

Yes some of the ESP32 kit has a 4Bit mode.
Only which one works is not clear to me.
In the schematics, connections are marked blue or gray, perhaps because one ESP32 or the other ESP32 soldered assembled
At the moment I continue to use the sparkfun loger. It works well there. I hope the component will be extended a little and allow a simple replacement.
You should be able to use any SD card with 1 bit mode.
Can you let me know which hardware you are using and I will see which pins do what.

not clear to me:
Snag_5969629.png
Snag_5969629.png (243.52 KiB) Viewed 5495 times

not clear to me:
Snag_59763ba.png
Snag_59763ba.png (88.84 KiB) Viewed 5495 times

A way to use 1Bit Mode with 4Bit connection:

Re: ESP32 with 4bit sd-card sparkfun iot 9Dof and ISM330 DHCX

Posted: Tue Jan 09, 2024 2:23 pm
by mnfisher
Thanks Stefan,

I'm using a wroom board at present with a ili9488 display from Banggood. I'm looking forward to an ESP32 - S3 with parallel display (ili9488) arriving from Ben (thankyou) in the next day or two when I'll fiddle some more.
I also experimented with a separate SD card board - also no joy. So I'm either doing something silly or have trashed a handful of assorted cards..

Martin