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

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
stefan.erni
Valued Contributor
Posts: 758
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 18721 times
Snag_c569c7.png
Snag_c569c7.png (661.18 KiB) Viewed 18721 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 18721 times

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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....
Attachments
Snag_1fa82bf8.png
Snag_1fa82bf8.png (212.58 KiB) Viewed 13222 times
Snag_1fa4d54b.png
Snag_1fa4d54b.png (90.18 KiB) Viewed 13222 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

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

Post 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.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 13159 times



Here the Logger:
SPARKFUN DATA LOGGER IOT - 9DOF
Snag_2502c9d6.png
Snag_2502c9d6.png (52.04 KiB) Viewed 13159 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 13159 times
https://www.digikey.ch/de/products/deta ... gCwgF0BfIA
Snag_250ea879.png
Snag_250ea879.png (141.77 KiB) Viewed 13159 times
https://www.digikey.ch/de/products/deta ... 5/17831054

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 13151 times
on the esp32 GPIO32

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

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 13070 times

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

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 12658 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 12658 times

mnfisher
Valued Contributor
Posts: 956
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 509 times

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

Post 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

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

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

Post 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 5417 times

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

A way to use 1Bit Mode with 4Bit connection:
Attachments
Snag_59b37c5.png
Snag_59b37c5.png (149.05 KiB) Viewed 5417 times

mnfisher
Valued Contributor
Posts: 956
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 509 times

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

Post 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

Post Reply