Arduino Pro Mini - interupt problems

My code is that the Arduino is asleep, is woken up by a PIR, writes the time and date to an SD card file, then goes back to sleep. I tested the code on an UNO first, where this problem occurred - I solved it by using a different interupt pin.

Now I have switched over to Pro Mini, and the problem is recurring no matter which interupt pin I use (d2 or d3).

Problem is that the Arduino sets up the SD card OK, but then either doesn’t wake from sleep at all, or wakes and goes through the awake-write-sleep one or two times, then never wakes up again. What have I done wrong? or is this a hardware issue?

UPDATE: This is a hardware problem, typically I worked it out as soon as I posted this.

 * Arduino is asleep, is woken up by the PIR, writes the date and time to a txt file on the SD card, then goes back to sleep 

#include <avr/sleep.h>//this AVR library contains the methods that controls the sleep modes
#define interruptPin 2 //Pin we are going to use to wake up the Arduino
#include "RTClib.h"      // 
#include <Wire.h>
#include <SD.h>
#include <SPI.h>

RTC_DS3231 rtc;
const int chipSelect = 10;   // chipSelect pin for the SD card Reader - 10 

void setup() {
  Serial.begin(115200);//Start Serial Comunication
  pinMode(interruptPin,INPUT_PULLUP);//Set pin d2 to input using the buildin pullup resistor

  // Setup the RTC
 if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);

  if (rtc.lostPower()) {
    Serial.println("RTC lost power, lets set the time!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // This line sets the RTC with an explicit date & time, for example to set
    // January 21, 2014 at 3am you would call:
    // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  Serial.print("Initializing SD card...");

  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    while (1);
  Serial.println("card initialized.");

void loop() {
 delay(500);//wait before going to sleep
   Serial.println("Sleep now");//Print message to serial monitor
   delay(250);//wait a moment

void Going_To_Sleep(){
    sleep_enable();//Enabling sleep mode
    attachInterrupt(0, wakeUp, LOW);//attaching a interrupt to pin 2
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);//Setting the sleep mode, in our case full sleep

    sleep_cpu();//activating sleep mode
              // ?on wake up arduino runs from here?
    Serial.println("Motion detected!"); // Print message to serial monitor
    writeFile(); // activate writing the date and time to SD card

void wakeUp(){
  Serial.println("Interrrupt Fired");//Print message to serial monitor
   sleep_disable();//Disable sleep mode
  detachInterrupt(0); //Removes the interrupt from pin 2;

void writeFile() {
    // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile ="data.txt", FILE_WRITE);

 DateTime now =;
   char dateBuffer[12];

//Print date and time to the data.txt file

   sprintf(dateBuffer,"%02u-%02u-%04u ",,now.month(),now.year());
   sprintf(dateBuffer,"%02u:%02u:%02u ",now.hour(),now.minute(),now.second());
   dataFile.println(); //End of Row move to next row
   dataFile.close(); //Close the file
   Serial.println("date logged");   // print to the serial port too: