SD Card Module and Temperature Sensor

I recently tested two new modules that I received from Chinese suppliers: a SD Card Module made by LC Technology (www. lctech-inc.com) and a DHT-11 Temp & Humidity sensor.

My test makes 25 temperature/humidity readings (inside my house) and writes them to the SD card. The test program can be downloaded from THIS-LINK (Pastebin) or THIS-LINK (fnpaste) or THIS-LINK (Github Gist) or at THIS-LINK (codepad)

Both the SD module and the temperature sensor were operating on the 3.3V power supply while the Arduino Nano was operating on 5V over the USB (the grounds were linked)

IMG_9171

Console output:

DHT11 TEST PROGRAM
LIBRARY VERSION: 2S0A
Initializing SD card…initialization done.
Test limited to 25 temperature readings
File on SD created, temperature tests will now start
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Sensor read: OK
Test Complete – Halting system

Truncated Contents of file “TEMPS.TXT” on SD card:

Test of LC Technology SD Module and DFRobot DHT11 Temperature & Humidity Sensor
Test limited to 25 temperature readings

Sensor read: OK
Humidity (%): 35.0000000000
Temperature (°C): 23.0000000000
Temperature (°F): 73.3999938964
Temperature (°K): 296.1499938964
Dew Point (°C): 6.7365255355
Dew PointFast (°C): 8.2909698486

Sensor read: OK
Humidity (%): 36.0000000000
Temperature (°C): 23.0000000000
Temperature (°F): 73.3999938964
Temperature (°K): 296.1499938964
Dew Point (°C): 7.1472058296
Dew PointFast (°C): 8.2909698486


Sensor read: OK
Humidity (%): 35.0000000000
Temperature (°C): 23.0000000000
Temperature (°F): 73.3999938964
Temperature (°K): 296.1499938964
Dew Point (°C): 6.7365255355
Dew PointFast (°C): 8.2909698486

I recently found a resource that may of some value to anyone else planning to use a similar SD card. While I did not use this resource, it contains some good information. See: http://www.geeetech.com/wiki/index.php/Arduino_SD_card_Module

This entry was posted in Arduino, Electronics, hardware, Programming, software and tagged , . Bookmark the permalink.

12 Responses to SD Card Module and Temperature Sensor

  1. Luis says:

    Can you show how you connect de sd card module to arduino? Tks

    Like

    • celem says:

      If you will click on the link in the second paragraph where it says “The test program can be downloaded from THIS-LINK.” it will display the source code showing the SD connections to the Arduino * SD card attached to SPI bus as follows:
      ** MOSI – Arduino pin D11
      ** MISO – Arduino pin D12
      ** SCK – Arduino pin D13
      ** CS – Arduino pin D4
      ** GND – GND
      ** +3.3 – 3.3V

      Like

      • Luis says:

        I mean, do you connect directly to these ports? No resistors or anything?

        I ask because I see on the net many people aplying resistors as voltage dividers. Finally I found a module exactly like mine (your’s) so I had to ask you. Whatever works for you will work for me also 🙂
        Thanks

        Like

        • celem says:

          No resistors, only direct connections. If you have seen voltage dividers, they were probably to derive 3.3V from a 5V source. Note that I pull the 3.3V from the Arduino’s 3.3V output.

          Like

        • celem says:

          Correction – for this test I pulled 3.3V from the power supply (see the green light on!). If you connect the Arduino via the USB, make sure that the Arduino ground in in common with the power supply ground.

          Like

          • lmsalgado says:

            I used the 5v and connected directly to Arduino (no external power supply) and worked fine.
            I read that if you want to use the 3.3V you should use an external power supply, like you did, because Arduino’s 3.3V can hold about 50mA and the card reading can use more than 100mA.

            Thanks for all you help!!

            Like

  2. Alex says:

    Hi.
    This module has two columns of pins.
    Which one should I choose? Or they are connected so no difference between left and right column?

    Like

    • celem says:

      If you use separate wires all that matters is that you connect to the correct pins. The signal names are what is important: (SS/CS) “Slave Select”, (MOSI) “Master Out Slave In”, (MISO) “Master In Slave Out”, (SCK) “System Clock”. If you are using a cable, then, of course, the signal placement must match your cable’s requirements.

      Like

  3. Michael says:

    Can you give another link for this program, please? This link is not available in my country, unfortunately.

    Like

    • celem says:

      Pastebin.com is not accessible from Turkey?

      I added several other cloud storage sites – see if any of them will work.

      If none of them work, What similar text cloud storage is accessible for you?

      Like

  4. Benjamin says:

    Thanks for the code, much appreciated.

    Like

Leave a comment