Low Power Device and Solar Chip , need Input.

Hi Guys

This topic is of the back of another recent thread that can be found here.
http://forum.arduino.cc/index.php?topic=259048.msg1829943#msg1829943

I did not want to hijack that thread with my question so I'm starting a new thread.

Iv been doing test on the sleep library and example code of Nick Gammon(Arduino Master in my eyes)
But I need help with alternative ways to power the device while is sleep mode.

a couple of years ago.
I bough a few of these Miniature Solar Cell - CPC1822 - PRT-09962 - SparkFun Electronics solar chips with the original idea that that would be able to charge a small coin battery but they did not make the cut. now after playing and getting my Arduino pro mini 3v3 to run at 4.8 uA in sleep mode these devices has a new meaning.

these solar chips has a max current delivery of 50 uA in direct sunlight at 4V, i have 4 of these chips connected in parallel and in ambient light setting i get around 11-16 uA out. :slight_smile: this is enough (tested) to run the modified pro mini in sleep mode with no battery connected.

Interested yet ? I AM !!!.

My problem is as follows and this is where i need input and advice.
When the solar chip(s) is connected and there is no light on them they actually draw 1 uA more from the battery then just a pro mini alone in sleep mode. So how can i detect that there is enough voltage on the solar chips to disconnect the battery (save power) without using more CPU power to monitor this. ?

Can I use a mosfet or transistor as a stand alone hardware solution or what can you guys suggest ?

PS here is the code with a few modes
I managed to create a crude timer form the internal watchdog to wake the chip up at any desired time.

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

const byte LED = 13;
int ATimer;
void AwakeTimer()
{
  ATimer++;
}
  

void flash ()
  {
  pinMode (LED, OUTPUT);
  for (byte i = 0; i < 2; i++)
    {
    digitalWrite (LED, HIGH);
    delay (1000);
    digitalWrite (LED, LOW);
    delay (50);
    ATimer = 0;
    }
    
  pinMode (LED, INPUT);
    
  }  // end of flash
  
// watchdog interrupt
ISR (WDT_vect) 
{
   wdt_disable();  // disable watchdog
}  // end of WDT_vect
 
void setup () { }

void loop () 
{
 
  AwakeTimer();
  if ( ATimer == 7) // 45 = 6 min// 75 = 8 min // 450 = 1 Hour
  { flash (); }
  
  // disable ADC
  ADCSRA = 0;  

  // clear various "reset" flags
  MCUSR = 0;     
  // allow changes, disable reset
  WDTCSR = bit (WDCE) | bit (WDE);
  // set interrupt mode and an interval 
  WDTCSR = bit (WDIE) | bit (WDP3) | bit (WDP0);    // set WDIE, and 8 seconds delay
  wdt_reset();  // pat the dog
  
  set_sleep_mode (SLEEP_MODE_PWR_DOWN);  
  sleep_enable();
 
  // turn off brown-out enable in software
  MCUCR = bit (BODS) | bit (BODSE);
  MCUCR = bit (BODS); 
  sleep_cpu ();  
  
  // cancel sleep as a precaution
  sleep_disable();
  
  } // end of loop

Hi, Rustie, I gather the problem is that current will discharge back through the solar cells when they are not providing charge current.
The solution to this is the place a diode between the solar cell and the battery, this should be a schottky type as it will have the minimum forward volt drop when charging.

The diode anode connects to the solar cell positive output and the diode cathode connects to the battery positive.

Try this suggestion on the app note from sparkfun.

The volt drop will be even lower, you will need some extra cells, but at that price..no problem.

Tom... :slight_smile:

Hey Tom

Thank you that worked a treat.
Lol shows you simple is better. i thought voltage drop over diode would effect the current as-well and since the current only micro amps i didn't give it much further thought.

Im very chuffed about the cells being able to run the unit in sleep mode. it actually puts 2uA back into the battery in direct sunlight while running the Pro mini. i know it wont charge it but at least Im sure its not draining the batt.