Pulse sensor example giving me incorrect results

Hi guys. I've been trying for the best part of three weeks to solve an issue I've been having with getting my pulse sensor (Pulse Sensor - SEN-11574 - SparkFun Electronics) to work.

In it's most basic form, the problem is in the timing of the beats detected. I spent a while trying to write my own code to detect the beats, but reverted to using the PulsePlayground library "Get started" example just to test whether or not the raw analog readings were correct in the first place. The following page shows what my readings should look like: The "GettingStartedProject" – World Famous Electronics llc.

The attached image shows the readings I'm getting. Could anyone give me a hint as to why my readings differ from the individual in the tutorials?

I've seen another page that suggests 'interrupts', but I could not integrate the code with my own to test it: Pulse Sensor Amped – World Famous Electronics llc.

Some extra information about my wiring if it matters at all, I have the signal pin of the sensor connected to A5 of the Arduino, and the VCC and GND pins connected to the VCC and GND of the ICSP pins on the Arduino instead of the regular 5V and GND pins because those are taken up by my LCD.

I've been able to get the code to detect my pulse correctly, but the amplitude is very small and the signal is very noisy compared to the example I linked above. Below you can see the code which I'm using. I've tried incorporating the analog smoothing example but that doesn't do much but dampen the signal as a whole.

Does anyone know why my signal isn't as strong as the first picture in the attached image?

#include <Adafruit_GFX.h>
#include <UTFTGLUE.h>
UTFTGLUE myGLCD(0x9488, A2, A1, A3, A4, A0);

// Declare which fonts we will be using
#if !defined(SmallFont)
extern uint8_t SmallFont[];    //.kbv GLUE defines as GFXFont ref
#endif

int LastTime = 0;
bool BPMTiming = false;
bool BeatComplete = false;
int BPM = 0;

#define UpperThreshold 516
#define LowerThreshold 515

void setup() {
  Serial.begin(115200);
  pinMode(A0, OUTPUT);       //.kbv mcufriend have RD on A0
  digitalWrite(A0, HIGH);
  // Setup the LCD
  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
  // Clear the screen and draw the frame
  myGLCD.clrScr();
  // BPM Parameters
  myGLCD.setColor(255, 255, 255);
  myGLCD.print(" BPM", 5, 34);
}

void loop() {

  static unsigned long lastTime = 0;
  const unsigned long INTERVAL = 20; //milliseconds, calculated as 1 divided by sample frequency
  while (millis() - lastTime < INTERVAL)
  {
    //wait; do nothing until the sample interval expires
  }
  lastTime = millis();

  // Calculate when a beat has been completed
  if (analogRead(A5) > UpperThreshold)
  {
    if (BeatComplete == true)
    {
      BPM = millis() - LastTime;
      BPM = int(60 / (float(BPM) / 1000));
      BPMTiming = false;
      BeatComplete = false;
    }
    if (BPMTiming == false)
    {
      LastTime = millis();
      BPMTiming = true;
    }
  }

  if ((analogRead(A5) < LowerThreshold) & (BPMTiming))
  {
    BeatComplete = true;
  }

  Serial.println(analogRead(A5));   //Plots the readings in the serial plotter

  // Display BPM when calculated at the bottom of the loop
  myGLCD.setColor(255, 255, 255);
  myGLCD.printNumI(BPM, 40, 34);
}