Please Help. How to increase the speed of storing data in SD card

Hi,

I am beginner in Arduino.

My objective is to scan the surface roughness of a disc which is rotating with very high rpm. One IR optical reflective sensor (CNY70) connected at ADC pin (A0) of Arduino NANO is used as the sensor. By using the serial monitor with 115200 as the baud rate ('File>Examples>Basics>AnalogReadSerial'), I achieve less than 1 msec (measured using 'millis()') for one scan. Now I need to store each scan into SD card with the same speed or with in 1 msec. I have used Catalex SD card module and SanDisc SD card with the example code for SD card read/write ('File>Examples>SD>ReadWrite). I altered the code so that I can store the data and time (using 'millis()') for plotting the surface roughness in a python based GUI. But while using the example code the speed for scanning is reduced to 10 msec. Then I added the 'SdFat' file and try the read/write code in that module ('File>Examples>SdFat>ReadWrite). Still I am not able to store the data in the required speed.

Please guide me to achieve my objective.

Are you wanting to write to SD because you want to disconnect the PC?

Yes, I would like to remove it from PC. Now I am placing my lap near to it to see the data.

chinthu:
Now I am placing my lap near to it to see the data.

I’m not sure what you imply by that. The reason why I asked is because yoiu appear to be using the serial monitor but, if you use a proper terminal, you can painlessly record to the hard disk and that might solve the speed problem.