Monday, January 23, 2012

A Review of SnootLab's 'Memoire' Arduino Shield

SnootLabs were kind enough  to send me one of their Memoire Shields. This useful little shield combines an SD card slot with a DS1307 Real Time Clock (RTC). If you haven't come across one before, an RTC is a hardware clock with its own battery back-up, so that when your Arduino gets turned off, it does not forget the time.

The rationale for combining SD card with a RTC is that you can read temperatures or whatever and write then to the SD card along with the date and time form the RTC.

This useful card costs about 25 USD in kit form and a bit more ready assembled. I actually enjoy this kind of thing in kit form. It is easy enough to assemble and the instructions are clear and logical. They are found on the 'downloads' tab for the product information and you will also find the schematic and Eagle files there too.

One immediately noticeable feature of the board is the prototyping area. Which gives you can solder in your own temperature sensors or whatever else you want to log along with the time.

Rather than make a logger, I decided to make myself a thick juicy Arduino sandwich and combine it with a Freetronics LCD shield and an Arduino Uno to make a clock. I reviewed LCD Shields a while back.

Its a rather expensive and over-engineered clock - but none the less a clock. You set the time by sending a string from the Serial monitor and from then on, it will keep time for you.

The three boards are shown below.

The Snootlabs shield is placed on the Arduino Uno and then the LCD shield on top of that.

The only potential conflict in pin usage between the two shields is for pin D9 that is used for a general purpose LED on the Snootshield. As the LCD shield uses this for LCD Enable, occasional flickering of  the LED was not seen as a problem.

In summary, its a useful shield with good documentation from SnootLabs.

There are other boards including this from AdaFruit. The AdaFruit version is a similar price and even a similar layout. It does however use a buffer chip for the SD interface, where as the Snootlabs design uses potential dividers to drop the SD card levels.

Correction: In an earlier version of this post, I stated that the Snootlabs device did not have its own regulator - actually it does. Its a SMD ready soldered onto the bottom of the board. 

The code for the example project was adapted from here. Its Arduinio 1.0 code.

#include "Wire.h"
#include <LiquidCrystal.h>

#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup()
  Serial.println("Set date sending format: YYMMDD HHMMSS W");
  Serial.println("Where W = day of week - 1-7");
  lcd.begin(16, 2);

void loop()
  if (Serial.available())

void setTimeFromSerial()
  byte year = ('0') * 10 + ('0');
  byte month = ('0') * 10 + ('0');
  byte day = ('0') * 10 + ('0');;
  byte hour = ('0') * 10 + ('0');
  byte minute = ('0') * 10 + ('0');
  byte second = ('0') * 10 + ('0');;
  byte weekDay = ('0');

  Wire.write(zero); //stop Oscillator


  Wire.write(zero); //start 



byte decToBcd(byte val){
// Convert normal decimal numbers to binary coded decimal
  return ( (val/10*16) + (val%10) );

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );

void printDateTime(){

  // Reset the register pointer

  Wire.requestFrom(DS1307_ADDRESS, 7);

  int second = bcdToDec(;
  int minute = bcdToDec(;
  int hour = bcdToDec( & 0b111111); //24 hour time
  int weekDay = bcdToDec(; //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(;
  int month = bcdToDec(;
  int year = bcdToDec(;

  lcd.setCursor(0, 0);
  if (minute < 10) lcd.print("0");
  if (second < 10) lcd.print("0");


About the Author
These are my books. Click on the image below to find out more about them.

No comments: