Arduino nano Vin powered by 3.7 V Lipo Battery

Hello,

I am designing a solar battery charger where the load of the battery is used to power the arduino nano amongst other loads.

I have connected my battery to the Vin pin of the Arduino nano to be able to temporarily power my arduino in periods of low sunlight since the charging chip i am using has a "load sharing" attribute which prioritizes the larger source (ie the solar panel over the battery). My issue however arises during times of poor solar exposure and dependence on the battery as a source for the arduino.

I noticed that the arduino does not function as expected and i was wondering whether the issue comes with the fact that im operating the nano at below 5 V causing it to malfunction or whether there was an issue in the way that I have coded my board.

PS: The enable pin is triggered to turn on/off a regulators enable pin to restrict the amount of charge being dispersed out of the regulator during periods of prolonged idleness.

Here is the code:

int buttonpin = 4;
int buttonstate = 0;
int ledpin=6;
int enable_pin=5;

boolean enableState = false;
boolean LEDState = false;
long buttonTimer = 0;
long longPressTime = 1000;

boolean buttonActive = false;
boolean longPressActive = false;


void setup() 
{
  pinMode(ledpin, OUTPUT);
  pinMode(enable_pin, OUTPUT); // sets the digital pin 4 as output
  pinMode(buttonpin,INPUT); //sets the digital pin 9 as input
}
void loop() {
  buttonstate = digitalRead(buttonpin);
  if (buttonstate == HIGH)
  {
    if (buttonActive == false)
    {
      buttonActive = true;
      buttonTimer = millis();
    }
      if ((millis() - buttonTimer > longPressTime) && (longPressActive == false)) 
      {
          longPressActive = true;
          enableState = !enableState;
          digitalWrite(enable_pin, true);
      }
   }
  else
  {
    if (buttonActive == true)
    {
      if (longPressActive == true) 
      {
          longPressActive = false;
      }
      else
      {
          LEDState = !LEDState;  
          digitalWrite(ledpin, LEDState);
      }
      buttonActive = false;
    }
  }
}

The regulators fixed 5 V output was not connected to the Vin or 5 V pin of the nano since my method to turn the enable pin on/off to save power would not work due to the turning off of the incoming power to the arduino once the enable pin is triggered.

I have also attached a schematic of my configuration below

Any help would be greatly appreciated,
Thank you!

Schematic_Final base model_2020-05-21_16-04-40.pdf (148 KB)

The Nano's Vin pin is the input to the Nano's 5V regulator. If you supply 3.7 V there, the resulting output at the 5V pin is unpredicatble. Vin normally requires about 7V or more. Also, operating the 5V Nano at 16MHz using a 3.7V power supply is outside the recommended specs in the 328P datasheet. 8MHz would be a more proper speed. The 3.3V 8MHz Pro Mini, which also uses the 328P, might be a better choice. I have powered that device directly at its Vcc pin from an 18650 battery pin with no problems.

Well that clears everything up.

Thank you for your suggestions, I truly appreciate them

I also recommend the 3.3V Pro Mini. For a solar power operation you should remove the voltage regulator and the power LED, which just waste current. It is easy to "swipe" them off using the tip of a hot solder pencil.

That sounds like a great idea, Thank you!