Go Down

Topic: arduino + SD card Question (Read 2 times) previous topic - next topic

SurferTim

What kind of equipment are we discussing? What Arduino and SD device are you using?

And I would add some error checking. Change the loop to this, then upload and open the serial monitor. Does it still fail after 10 minutes? Does it always open the file?
Code: [Select]
void loop()
{
int analogValue0;
t++;

        Serial.print("Open ");
myFile = SD.open("test.txt", FILE_WRITE);   

        if(myFile)
        {
           analogValue0 = analogRead(0);
   myFile.print(t);
   myFile.print("\t");
   myFile.println(analogValue0);
   myFile.close();
           Serial.println("OK"); 
        }
        else Serial.println("failed");

delay(1000);
}


a760109

hi SurferTim
I use equipment list
Arduino Uno(http://arduino.cc/en/Main/ArduinoBoardUno/)
SD shield(http://www.seeedstudio.com/depot/sd-card-shield-p-492.html?cPath=109)
series two  3.7V 1100mAh battery(like http://arduino.cc/playground/Learning/9VBatteryAdapter)

I used USB to computer always success(not loss data to sd card)
but because some required i need go out
so i can't use serial monitor

thank very much.

SurferTim

OK. Now I see. It is a power supply challenge.

Have you checked the +5v on the Arduino after the fail? Is it still +5v? That sounds like an overtemp shutdown on the voltage regulator. Is the regulator getting really hot?

a760109

hi SurferTim
i touch regulator very hot
If the problem is that it..
how can i do ?

http://softsolder.com/2010/10/15/arduino-mega-voltage-regulator-heatsink/
do you think it is a good idea ?

thanks.

SurferTim

Did you monitor the +5v pin on the Arduino during the test?

I would try a check to see if that is it. Remove the SD shield and run the blink example on the batteries. Does it fail after 10 minutes? Does the regulator still get as hot?

Go Up