sleep on voltage drop of lipo arduino pro mini - pigeon tracker

hi guys. first post here :slight_smile: thought after a day of googling i would ask the questions directly as it might help someone else in future.

i am building a gps tracker to fit on a pigeons back (for a friend who keeps pigeons lol)

I’m using a 3.3v pro mini and I’m going to run it off a 500mah 3.8v lipo cell as its got to be small and light for obvs reasons.

I’m trying to basically send the Arduino to sleep once the voltage drops below 3.6v.

the lipo will run from 4.2v to 3.6v but if if drops below 3.5v it can be dangerous. what i want to know is what is the lowest state the Arduino can be in?

i cant get a reading of what the actual voltage is at the moment as I’m writing this code blind until the parts arrive.

i have attached the code below for reference as this is what i have until i can get the board running with a volt meter. but how low can i go with power state. can i effectively switch the pro mini off and the gps and sd card shields?

#include <avr/sleep.h>
#include <Vcc.h>



///////////below is an example while i wait for parts to arrive//////////////

//battery voltage system
const float VccMin        = 2.0*0.6;  // Minimum expected Vcc level, in Volts. Example for 2xAA Alkaline.
const float VccMax        = 2.0*1.5;  // Maximum expected Vcc level, in Volts. Example for 2xAA Alkaline.
const float VccCorrection = 1.0/1.0;  // Measured Vcc by multimeter divided by reported Vcc

Vcc vcc(VccCorrection);


void setup()
{
//my gps startup code and sd start up code here

}


void loop()
{


//all my other code here




//sleep if voltage drops

//read voltage from vcc
float v = vcc.Read_Volts(); 

//power down if volts is below 3.6v
if(v <= 3.6)
{
  
sleep_enable();
sleep_bod_disable();
sleep_cpu();

}


}

i have been piecing parts of peoples code together through this forum and other places on google over the past few years with my other Arduino projects but using a failsafe for lipo batteries doesn’t seem as common as i thought it would.