LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 04-06-2021, 03:42 AM   #1
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
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.
 
Old 04-06-2021, 05:50 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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).
 
Old 04-06-2021, 06:49 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
Old 04-06-2021, 07:01 AM   #4
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
my project would be a similar project to this project https://www.youtube.com/watch?v=7B8ArjoQpVc
 
Old 04-06-2021, 07:56 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Arduino Create expands to run Arduino on BeagleBone and Raspberry Pi LXer Syndicated Linux News 0 03-14-2018 08:24 AM
LXer: New Arduino Srl SBC merges Arduino, WiFi, and Linux LXer Syndicated Linux News 0 05-17-2016 01:04 AM
LXer: 6 Arduino projects to play with on Arduino Day LXer Syndicated Linux News 0 03-27-2015 08:40 AM
Ubuntu 12.10 Attempted Installation of Arduino IDE with arduino-1.0.5-linux32.tar.gz mahnac72 Linux - Newbie 2 06-21-2013 04:26 PM
[SOLVED] Arduino MEGA 2560 REV3, Arduino IDE working software versions jamesf Slackware 1 05-02-2012 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration