Connection a Arduino Mega Board to a SATA HDD

Hi Guys,

I'm thinking of connecting a HDD to my Arduino board. I would like to build a data logger that would log about 15 different sampling points a very high sampling rate.

So that would be a huge amount of data and was thinking of logging this data to a HDD.

So have anyone managed to get something like this to work?

dirkiek:
Hi Guys,

I’m thinking of connecting a HDD to my Arduino board. I would like to build a data logger that would log about 15 different sampling points a very high sampling rate.

How high is high?
Wouldn’t an SSD be faster?

dirkiek: I'm thinking of connecting a HDD to my Arduino board.

You are surely joking!

We hear some funny things here, but this must be the one for the day, if not the week!

Sd card is the way to go.

Check out fat16lib's efforts here https://github.com/greiman/SdFat/tree/master/AnalogBinLoggerExtras

I don't know what the joke is, and I don't see anything funny. There is the storage section in the very forum that, amongst other things, specifically addresses this matter, and I assumed that, if you already have a hard drive in a USB enclosure, it is just a matter of getting a USB host board for Arduino, and you are off to the races.

For all that, other than the convenience of what you might have to hand, I'm not sure what the point is either. As Crossroads says, SD cards are the way to go. The practice is commonplace, you can get a card slot board for $2, and it is all so simple.

You first need to consider the practicalities and real needs. "Very high" and "huge amount" are meaningless terms and, while you consider them, you might as well include "how long", as it is just as valid.

The output from a datalogger does not usually take much space. I understand that Arduino can handle SD cards up to 32Gb. I get by with 2Gb as I found that timestamped output from four sensors recorded every ten seconds will take over three years to fill it.

Thanks for the feedback.

I apologize for not using the correct terms or acronyms. I'm still new at programming and utilizing my Arduino to its full potential. Also do not know all the "tricks of the trade"" yet.

If it comes to how fast. I would like to log data form these signals as fast as I possibly can.

So if I could log at a sampling rate 1 ms. It will be fantastic. As the changes in these signals is very important for me to see when its displayed in graphs. So any changes in state no matter how fast can be recorded. So I have to log at the fasted possible rate I can get with my Arduino Uno Board.

The how much part. This device will log data form a machine that runs 24/7 and I would like to keep it attached to this machine for a min of a month. If I need to go weekly to download the data so I can analyse it it will be fine. The important part is that I want to see the minute changes happening in relation with each other.

If a SD card can handle the amount of data I will rather use that as it seems to be simpler to use a a SATA HDD.

dirkiek: So if I could log at a sampling rate 1 ms. It will be fantastic.

The how much part. This device will log data form a machine that runs 24/7 and I would like to keep it attached to this machine for a min of a month.

OK, you aren't joking. Indeed this is so serious that I'm not sure the arduino is up to the jiob. It's not for me to question if 1000 readings a second is sensible, but you need to check if it is realistic for an Arduino.

You have two big problems:

  1. The abiilty of Arduino to read and send the data quickly enough
  2. the ability of the device to receive it.

I understand the Arduino Due is a lot faster than the plain-vanilla ones, but I don't know anything about them, and they might still be too slow.

In your case, the SD may indeed be the worst choice - no joke. An SSD is a hell of a lot faster, and a SATA has a hell of lot more capacity. The latter may be faster than an SD as well.

Hi Nick,

Jip no joke.

The changes in these signals are quite fast. As an individual signal they mean nothing but together they make sense if you plot them.

We are developing a new machine that works with a hydraulic system. The machine has a number of pipes that goes everywhere. So on some of these pipes we have flow meters, pressure sensors and also a few temp sensors. Then there is a few proxies.

So the idea is to log these signals and plot them to see the relation ship between then and also look at certain events. By analyzing the system in such detail we can improve the machine and also make it more efficient.

So hence the reason for such an advanced and high volume/sampling rate.

I'm going try the SD card out and the SSD. I incidentally have 250Gig SSD laying around.

Nick thanks for your input.

Well, an Arduino won't speak SATA, and any USB HOST solution is going to top-out at "full-speed" USB (~10Mbps, tempered by dealing with disk stuff, and by the SPI connection that will top out at 8Mbps or less.) It's not a good choice for this application. Try a Raspberry Pi or one of their competitors.

westfw: Well, an Arduino won't speak SATA, and any USB HOST solution is going to top-out at "full-speed" USB (~10Mbps, tempered by dealing with disk stuff, and by the SPI connection that will top out at 8Mbps or less.) It's not a good choice for this application. Try a Raspberry Pi or one of their competitors.

Sigh!

I would think a Raspberry Pi might do the trick, but if I really needed something like you are describing, I think I’d go to a full sized desktop running Linux and a serial interface to the machine. That way you are not limited to storage size.

Hmm. The OP bowed out here nearly four years ago after moving on to some other topic with no indication he completed anything at all.

I think my comment was synoptic. :grinning:

Yeah, I had done a search on using SSD with the Arduino just out of curiosity and hit this thread. After I posted I saw the date and figured it had been closed or just forgotten about.

Indeed!

Not to worry. :sunglasses: