Adding a MicroSD flash card module to a SquidBee
Marcos Yarza - October 8, 2008


Important: Libelium has launched a new sensor device: Waspmote. It is ready for research and market applications. You can discover the differences between both platforms in the document: Waspmote vs SquidBee.


1
With this new microSD module for Arduino, we add to a mote a really big amount of data storing space. This module lets us plug a microSD card (Standard Flash memmory card) and write / read data in it. In this article we are going to show an example of how the module works.

The main idea of this module is that a mote with this SD "expansion" is able to store a big amount of data from sensors when there is not available wireless communication with the Wireless Sensor Network, later we can get the card from the mote and plug into the computer to check / store the information.

For this application we'll use an example created by Ingo Korb (ingo [@] akana [dot] de) adapted by David Cuartielles. See the link below.

The SD card is connected to Arduino SPI port and analog pins, digital (0-7) pins and UART are available.

Powering the module. In the image below we see the module and the jumper to select the power for the card.

6

The connection is very easy, the module can be connected to Arduino in two places:

13

14

1

- MicroSD module connected to Arduino => Digital pins 8 - 13 (Power (5V) is taken from pin 8 set as HIGH output).

12

- Micros SD module connected to SquidBee => The SD module needs an extensor for the pin connector.

9

10


11

8


Software: First of all we need to create a text file in the microSD card called hola.txt, in this file we write 32 characters, for example '0'.

2
3

5

Then we plug the card into the slot and we connect the module to arduino and arduino to a PC via USB.

The program we use for arduino is very simple, we connect to arduino with a serial port terminal (115200 bps) and we can read / write data in the microSD card. The basic commands are:

- 'R' => for reading the file (hola.txt)

- 'W' => for writing data in the file

We get the characters in the file typing 'R' and we can write new characters typing 'W' and later the 32 characters we want

4

7

The advanced code is an example of code for integrating the SD module to SquidBee, data read from sensors are stored in a 512 characters txt file (the file hola.txt with 512 charcaters has to be created in the card previously).

Downloads

- SD basic code

This first example code shows how to read / write data in a txt file with arduino connected to a PC using a serial port terminal.

- SD advanced code

In the second example code an autonomous SquidBee with the SD module is storing data from the sensors.

gallery.png
theGroup.png

barra_lateral/rss
Research
  • Enclosure
  • Energy Management
  • GPS Mesh Networks
  • Hardware Node
  • Manager Platform
  • Mesh Routing Protocols
  • Securing the Mesh
  • Sensor Integration
  • System and Communications
  • System and Manager Platform
barra_lateral/techM