MySensors Solar Powered Node – Part 2

I prototyped my Solar Powered Arduino design and started taking some measurements. I’ll show the (really bad) performance of my cheap solar panel, give you an idea of how much current my Arduino and MCP1703 suck and then explain my first stab at a sketch. Remember, this is work in progress and if you read the next post about my Solar Powered Arduino you’ll find out that I came across a few problems that I had to get around.

Solar Powered Arduino – some baselines

Solar Panel

Panel is rated at 6v 150mA ~ 1W. Here are some readings from the panel this morning. It’s a very cloudy midwinter day here. You can see that the panel is <1% efficient at times.

Measured Solar Panel Output
conditions voltage (mV) current (mA)
Very cloudy midwinter 8.30am 4.2 0.510
Very cloudy midwinter 10.00am 5.0 0.810
Very cloudy midwinter 10.30am 5.63 1.9
Very cloudy midwinter 12.30am 5.02 0.8

Arduino

This is a 3.3v Arduino clone with a couple of minor modifications.  The Power LED is removed, the onboard regulator is removed. These are the standard hacks to reduce the board’s power consumption. The bootloader is not modified as we are using the MCP1703 regulator.

It has a standard nRF24L01+ clone attached to it and is running the MySensors 2.1.0 software stack. Here’s an idea of power consumption in different scenarios. These are tested using my cheap multimeter so the uA value is probably not quite right. They are also tested before the MCP1703 as I want to get an idea of total power consumption.

Measured Arduino Power Consumption
Arduino Radio current (mA)
Awake On 30
Arduino Standard Sleep Off 4
MySensors Sleep Off 0.0077

The Solar Panel

It’s worth mentioning this part of the system. I’ve got a few worries here. I ordered a 1N4148TR diode. This is a very cheap low current device (max 300mA), double the rated output of the solar panel. The plan was that the diode was used to stop leakage from the capacitor back through the solar panel when it’s dark. It is also used to drop the voltage from the solar panel to ‘below’ the rated value of the Super Capacitor.

I think I’ve chosen the wrong diode. After measuring the voltage drop with no load, it appears to be just under 0.5v – not enough! As the current increases the voltage drop increases to 0.7v. Ideally I need to find one with a min voltage drop of 0.6v, or work on another solution. This is an interesting post about the 4148 diode characteristics.

I think what the article is telling me is that my diode has a bigger voltage drop at lower voltages and currents. I need either a diode with a fixed minimum voltage drop or a clamping circuit like this to make sure I keep within my voltage limits.

The Sketch

Here’s the example sketch for the Solar Powered Arduino. There are some things to note. If the Capacitor is in a good state then values for battery percentage and voltage are sent to the server every 5 minutes. In the case where the battery voltage has dropped too low, no values are sent and the Arduino sleeps for 15 minutes before checking again.

// Enable debug prints to serial monitor
#define MY_DEBUG 

// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RF24_PA_LEVEL RF24_PA_LOW

#define MY_NODE_ID 98
//#define MY_PARENT_NODE_ID 0
//#define MY_PARENT_NODE_IS_STATIC

#include <MySensors.h>
#include <SPI.h>

#define OFF_BATTERY_VOLTAGE 3500
#define ON_BATTERY_VOLTAGE 3800

int BATTERY_SENSE_PIN = A0;         // select the input pin for the battery sense point
unsigned long UPDATE_SLEEP_TIME = 300000;  // sleep time between reads (seconds * 1000 milliseconds)
unsigned long CHARGE_SLEEP_TIME = 900000;

MyMessage msg(0,V_VOLTAGE);

void before()
{
  #ifdef MY_DEBUG
   Serial.println("Node STARTING ");
   #endif
}

void presentation() { 
  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("Solar board", "1.1"); 
}

void loop()     
{     
   // get the battery Voltage
   int sensorValue = analogRead(BATTERY_SENSE_PIN);
   
   float batteryPcnt = static_cast<float>(static_cast<int>(sensorValue*10.0 / 10.23))/10.0;
   int batteryV = static_cast<int> ( batteryPcnt*50);

#ifdef MY_DEBUG
    Serial.print("Voltage: ");
    Serial.println(batteryV);
#endif
     
   if (batteryV< OFF_BATTERY_VOLTAGE ) {
#ifdef MY_DEBUG
      Serial.println("Voltage POOR - SLEEPING");
#endif
     sleep(CHARGE_SLEEP_TIME);
     return;
    }

   sendBatteryLevel(batteryPcnt);    
   msg.setType(V_VOLTAGE);
   send(msg.setSensor(0).set(batteryV));

#ifdef MY_DEBUG
   Serial.print("Battery Voltage: ");
   Serial.print(batteryV);
   Serial.println(" V");

   Serial.print("Battery percent: ");
   Serial.print(batteryPcnt);
   Serial.println(" %");
#endif
   sleep(UPDATE_SLEEP_TIME);
}

Problems!

My Solar Powered Arduino with the sketch and circuit above does work – mostly. During light periods the Super Capacitor is charged as you would expect. During low light periods the voltage across the Solar Panel drops and the diode stops the panel acting like a resistor.

Voltage Clamping

As mentioned before the voltage drop across the diode is not enough to protect the Super Capacitor. I think that this problem can be solved by voltage clamping the solar panel using a zener diode. This would also allow panels of higher voltages to be used.

MCP1703 should be MCP1700

If a voltage of less than 6v is used after the diode then a MCP1700 would be better suited. This has better performance at lower voltages and wastes less power.

Cheap Super Capacitor

I bought my Super Capacitor from eBay for about £3.50. I’ve eventually found some information on it’s performance (I think). I’m going to test but I think that it has pretty poor performance. It leaks quite a bit. I’ll have to work out how to test this and detail some more results

Low Voltage Problems

This is a problem. When it’s dark and the Super Capacitor voltage has dropped below the threshold required to run the circuit, the system never recovers. The Super Capacitor sits at a voltage of about 1.6v and never charges.

My assumption is that at this voltage the Arduino starts to continuously suck power (even though it is not starting) over the amount that the solar panel can provide. A scenario of starting….failing….starting….failing…starting occurs and keeps the Super Capacitor from charging.

I need a solution for this. Any thoughts?




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *