DO turn off delay after AI threshold exceeded

So after 3 days of banging my head against the wall here is the issue. I have a voltage input on pin A0 then once that voltage goes above 2 turn on the relay. I have that part down working great.

Problem is when the voltage spikes its a pulse so the relay is pulsing with the voltage spikes. what i want to happen is once the spike is seen hold the relay on for 15 min then shut off and watch for another spike.

I have messed around with delay() millis() and a few others i just dont have a strong enough grasp on placement and or how to use them. ANY help or direction would be amazing.

const int RELAY = 3;
const int BUTTON = A0; 
const float VOLTAGE_THRESHOLD = 1.5;


void setup() {
   Serial.begin(9600);
  pinMode(RELAY, OUTPUT);  
}

void loop() {
  int analogValue = analogRead(BUTTON);      // read the input on analog pin
  float voltage = floatMap(analogValue, 0, 1023, 0, 5);

  
   if(voltage < VOLTAGE_THRESHOLD)
     digitalWrite(RELAY, HIGH); // relay on 
    
    if(voltage > VOLTAGE_THRESHOLD)
    digitalWrite(RELAY, LOW); //relay off
}
 float floatMap(float x, float in_min, float in_max, float out_min, float out_max) {
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
  
}
if ('pulse' detected)
{ 
  activate relay;
  delay();  // need nested delays (32767 max)
  deactivate relay; 
}

I would suggest taking code out until it works. Unless the actual voltage is needed for something else just compute the required analogValue (1023*1.5/5) = 307 as an int. Then get rid of all the float stuff. Also one the the checks should include = (<= or >=) - the current code does nothing on equal. You seem to have the checks reversed from your description, unless the relay turn on is active low. You also talk about 2V but set the threshold to 1.5V

If all you need to do is wait an ugly delay could be used.

[EDIT] Change delay code which was way off, delete some more code that was not needed

const int RELAY = 3;
const int BUTTON = A0; 
const int VOLTAGE_THRESHOLD = 307;


void setup() {
   Serial.begin(9600);
  pinMode(RELAY, OUTPUT);  
}

void loop() {
  int analogValue = analogRead(BUTTON);      // read the input on analog pin
  
   if(analogValue >= VOLTAGE_THRESHOLD) {
     digitalWrite(RELAY, HIGH); // relay on 
     for (int i=0 ; i<30;i++ ) {
       delay(30000); //wait 30 seconds
     }
   } 
    else {       //  pulse has gone away
      digitalWrite(RELAY, LOW); //relay off
    }
}

This was the ticket I had to switch the relay signals low/high and high/low, for some reason, regardless thank you so much.