Problem description
I am trying to build a datalogger with an Arduino UNO. I have connected a SD card module to the Arduino. I have planned to catch the measurement data from the analog input pins. Everything works fine if connected to the usb port. But if I run the Arduino over an external power supply, the SD.open
-method fails (It simply returns false).
The problem occurs even, if I connect the external power supply additional to the USB connection. So the problem can't be a missing serial connection.
Note that the problem only occurs, if SD.open
is in WRITE-mode.
(File dataFile = SD.open("datalog.txt", FILE_WRITE);
)
What I've already tried:
- running the SD-card example code, which is included in the SD card library.
- trying different types of file-system formattings (FAT, FAT32, with different cluster-sizes)
- powering the sd-card reader with 3.3V instead of 5V
Arduino wiring
Look at the pictures to check if there are some mistakes with the wiring:
Specifications of the power supply
And here are the specifications of the power supply:
- Manufacturer: MyVolts
- Model: DD282MU
- Input: 100-240V (AC) - 50-60 Hz
- Output: 9V, 1A (DC)
I hope you can help me with my problem. And of course, I hope there is a solution for the problem at all. Thank you.
SD.open()
returns false when you arent connected to the PC over USB?SD.open()
returns false, because I have connected a LED and let it flashing in this case. Secondly I saw it in the Serial monitor: The error also occurs if both, the usb cable AND the PSU, are connected.SD.begin()
?