LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Raspberry PI: SD connected to an arduino board is fine or direct to the PI would it be better? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/raspberry-pi-sd-connected-to-an-arduino-board-is-fine-or-direct-to-the-pi-would-it-be-better-4175693197/)

floppy_stuttgart 04-06-2021 03:42 AM

Raspberry PI: SD connected to an arduino board is fine or direct to the PI would it be better?
 
Hello,

data and SD corruption is something I already experienced on raspberry PI (no wild voltage drop! no alimentation cut!..) else the SD could become corrupt (few errors could come up at boot; I never experienced a destroyed SD card).
So, everytime: booting.. using the PI.. and "shutdown" command. And all is fine for the next 30years ;-).. (ok ok.. stable alimentation.. safety battery.. automatic shutdown when the PI see it is on the safety battery.. we could make it for the next 40years). So, I know this is a sensible topic on a PI but how is this with an Arduino board?

I would like to connect a SD to an arduino (small quick cheap) and not sure this is a robust way (perhaps a more expensive PI with extensive voltage security is better).
I am trying to understand the process of corrupting SD cards:
- data corruption is only happening when data are written on a SD card and its cut in the middle of it? (typically PI-Raspbian has a SWAP on the SD card and cut the alimentation off)
- mounting a SD card dont mean taking it out of the board, we destroy it or destroy the data? (if no writing process in action)
= a SD on an arduino will become corrupt only when the voltage break down for any reason during a writing session? reading session will not impact? just taking the voltage off the board dont impact the SD card when it was recognized previously and no special process is doing anything with the card?.
Any experience/comments/hints are welcome. I am trying to evaluate what would be the best and cheapest and lower-risk solution for a project with SD card: PI (with raspbian) or arduino.
I know PI-raspbian with a SD (and USB FAT32, and USB HDD ext4..) for now.
I dont know arduino with an SD.

Thanks to all.
Happy eastern.

pan64 04-06-2021 05:50 AM

I guess SD cards do not like the power on/off switch itself, so data corruption may occur even if it was not mounted at all.
For pi (especially RPi4 with USB3) I would suggest you to use a high speed usb pendrive (you can also boot from usb now), but you can put your OS onto an SD card if you wish - and put your own files onto pendrive or nfs.
Modern filesystems (like ext4) can help you to avoid software related data corruption, but not the ones occurred by power issues.
You need to check the power supply of your RPi, you need at least 2.5 A (or probably more for RPi4).

michaelk 04-06-2021 06:49 AM

Without knowing anything about your project it is difficult to suggest the best method.

With the Arduino your limited to a FAT filesystem. It might be possible to corrupt the sd card during writing if you lost power or at least the last bit of data. There is no mounting nor open buffers or other open files on the card.

floppy_stuttgart 04-06-2021 07:01 AM

my project would be a similar project to this project https://www.youtube.com/watch?v=7B8ArjoQpVc

michaelk 04-06-2021 07:56 AM

As far as I know the Arduino SD card is only for reading/writing data. If your interface box only performs a single function the Arduino might be a better choice.


All times are GMT -5. The time now is 01:14 PM.