Solar Charging and Battery for Dash

Thanks, @ryanHologram. I still have some questions.

You mentioned: “So - VBATT is connected to the output of the battery charger circuit”. My observation is that the VBATT is NOT connected to the Battery port of the battery charger circuit, and (wrongly?) connected to the Load port of the battery charger circuit. For example, when I charge a 3.7V battery with a 5V DC source connected to the battery charger board, the BATT+ pin sees 3.7V, the Load+ pin sees 5V, and the VBATT pin (R01) on the Dash/DashPro sees 5V (and not 3.7V!). The specs says that the VBATT pin in battery mode is from 2.2V to 4.4V. This has been the concern that makes me nervous about plugging Dash/DashPro onto the Solar Shield.

You mentioned:“The only way to do this is to remove the (J2) jumper completely off.” What about the jumper on the bottom side of the Dash/DashPro? Should it be in battery-less mode? In battery mode, the higher voltage as mentioned above would appear on the modem, and would it damage the modem?

I notice that the new Dash has only one jumper (none on the bottom side). Is this the J2 jumper mentioned above, and to be completely taken off?

Is there a schematic available for the Solar Shield? I would like to understand the connection to Raspberry Pi and the SW1, SW2 etc. labelled on the board.

hi @juipin you’re correct the J2 jumper on the Dash 1.1 is the one that should be completely removed.
On the Dash 1.0 and the Dash Pro, there are two jumpers, J2 and J9.
J9 is important as well for the Dash 1.0 and Dash Pro. The uBlox is rated for 3.3 to 4.4 volts on the DC input. J9 needs to be in the location that is “no battery” location.
On the schematic, this is across pins 1-2 of the jumper (as though R22 on the Dash 1.0 or R27 on the Dash Pro had been placed)
On the Dash 1.0, J9 needs to be set to the pins furthest away from the battery connector; On the Dash Pro, J9 needs to be set to the pins closest to the edge of the board.
In both cases, this J9 setting will ensure that the uBlox is driven by 3.3V generated by the Dash’s regulator.

Let me know if you have any further questions.

Thanks,
Ryan

All,

My project requires solar power to recharge the battery but I have some questions and need some help around the power management. My current set up is as follows:

Solar panel - 20 volts, 70 ma output at peak
Sparkfun SunnyBuddy lipo battery charger
2000 mah LiPo battery
Dash 1.1 (jumper configured for battery mode) Firmware version 0.9.4
External Duck Antenna
US-100 Ultrasonic Distance Sensor (minimal energy drain)
DHT-11/22 Temp/Humidity sensor (minimal energy drain)

I’ve configured the power as follows:

  1. Solar Panel -> SunnyBuddy
  2. battery plugged in to SunnyBuddy battery port
  3. SunnyBuddy Load port -> Dash battery port

My code has the Dash wakeup for 10 mins each day, take some measurements, send to the cloud and then go into Dash.deepSleepMin().

What I’m finding is that the power use during the wake period averages 60 ma, which is fine, but when in Deep Sleep, it averages 31 ma, which is not. At 31 ma power consumption, I drain the battery in about 48 hours. With my solar panel attached, I can extend it, but with conservative estimates of 8 hours of peak sunshine, I can’t keep up and will eventually drain the battery. It seems to me that 31 ma in DeepSleep is excessive and I’m looking to understand whether this is valid or not.

So my two questions:

  1. Is 31 ma power consumption in DeepSleep normal (and do I just need a much bigger solar panel)?
  2. Is the Dash jumper config set to “Battery” correct even though technically the battery is plugged into the solar charging card, which is then connected to the Dash battery port?

Thanks for any assistance

I am seeing similar sleep currents in my experiments. In the simple code shown below I alternate between awake and sleep without ever starting the SerialCloud connection or the USB connection. Initially the awake current is around 100mA dropping down to 60mA. Once it drops into sleep the current drops to 30mA. After a few iteration of this the awake current stabilizes at 60mA and the sleep current is at 30mA. I am concerned that sleep doesn’t get below 30mA. My other battery operated designs all drop to below 10uA in deep sleep.

void setup() {
  Dash.begin();
}

void loop() {
  delay( 10000 );

  // Drop the Dash into a deep sleep
  Dash.deepSleepAtMostSec( 10 );
}

The code listed below shows functions I have been working on to determine whether the cloud connection is up or down. I am hoping that the SerialCloud class will have methods to report whether there is a connection or not, but these are work arounds so I can tell whether it ok to send a message and whether it is ok to drop the connection and go into deep sleep.

What I observed is that even when I drop into deep sleep for a minute, the connection is not dropped. I would expect either the connection to drop during deep sleep to save power or for there to be a method to explicitly drop the connection before going into deep sleep to increase power savings.

I hope someone can educate me on what I am missing about the low power modes of this device.

#define SHUT_DOWN_CLOUD false

const String connectKeyword = "Modem is now connected";
char connectKeywordEnd;
int connectKeywordLength = 0;
const String sentKeyword = "Modem event: CLOSE";
char sentKeywordEnd;
int sentKeywordLength = 0;

// wait for the network to be connected
void waitForNetworkConnected( void ) {
  bool found = false;
  char cloudCurrentChar;
  String receivedFromCloud;
  
  found = false;
  while(!found) {
    if (SerialCloud.available()) {
      cloudCurrentChar = (char)SerialCloud.read();
      // Keep our compare buffer to the keyword length
      if (receivedFromCloud.length() >= connectKeywordLength) {
        receivedFromCloud.remove(0, 1);
      }
      receivedFromCloud.concat(cloudCurrentChar);
    
      // Watch for then end of strings
      if ((cloudCurrentChar == connectKeywordEnd) && (receivedFromCloud == connectKeyword)) {
        receivedFromCloud = "";
        found = true;
      }
      
    }
  }
}

// Wait for message to be sent
void waitForMessageSent( void ) {
  bool found = false;
  char cloudCurrentChar;
  String receivedFromCloud;
  
  found = false;
  while(!found) {
    if (SerialCloud.available()) {
      cloudCurrentChar = (char)SerialCloud.read();
      // Keep our compare buffer to the keyword length
      if (receivedFromCloud.length() >= sentKeywordLength) {
        receivedFromCloud.remove(0, 1);
      }
      receivedFromCloud.concat(cloudCurrentChar);
    
      // Watch for then end of strings
      if ((cloudCurrentChar == sentKeywordEnd) && (receivedFromCloud == sentKeyword)) {
        receivedFromCloud = "";
        found = true;
      }
    }
  }
}

void setup() {
  Dash.begin();
  
  // put your setup code here, to run once:
  connectKeywordLength = connectKeyword.length();
  connectKeywordEnd = connectKeyword.charAt( connectKeywordLength - 1 );
  sentKeywordLength = sentKeyword.length();
  sentKeywordEnd = sentKeyword.charAt( sentKeywordLength - 1 );

}

void loop() {
  Dash.begin();
  Dash.onLED();
  
  // Open the cloud
  SerialCloud.begin(115200);

  // Wait for the cloud to be connected
  waitForNetworkConnected();
  Dash.pulseLED(500, 100);
  
  SerialCloud.println("before sleep 1");

  // Wait for the message to be sent
  waitForMessageSent();
  Dash.pulseLED(100, 500);

  SerialCloud.println("before sleep 2");

  // Wait for the message to be sent
  waitForMessageSent();

  if (SHUT_DOWN_CLOUD) {
    // Shut down the cloud before sleeping
    SerialCloud.end();
  }
  
  Dash.offLED();
  Dash.deepSleepAtMostMin( 1 );
  Dash.onLED();
  
  if (SHUT_DOWN_CLOUD) {
    // Reopen the cloud
    SerialCloud.begin(115200);
  
    // Wait for the cloud to be connected
    waitForNetworkConnected();
    Dash.pulseLED(500, 100);
  }
  
  SerialCloud.println("after sleep");

  // Wait for the message to be sent
  waitForMessageSent();

  Dash.offLED();

  while (true) ;

}

Will the modem off feature in the new firmware help with this?

Hi All - The updated firmware should help in a few ways here:

  1. Checking modem connection status with the HologramCloud.getConnectionStatus(). This will reduce processing through the serial line from debug statements to reliably check for modems status.
  2. Modem power off - The new HologramCloud.powerDown() will turn off the modem and additionally deep sleep the system MCU. This will lower power consumption when called in addition to the deepSleep commands. You can see an example in our example sketch here of how to use the two in practice together:
    hologram-dash-arduino-integration/hologram_dash_cloud.ino at master · HologramEducation/hologram-dash-arduino-integration · GitHub
1 Like

Ryan, what do you expect the deep sleep current to be with this sketch?

Reuben, I misread your post and connected a battery directly to the board and a solar panel to USB while in non-battery mode. It seems to be working though. Am I causing any harm to the gear this way? Since it’s been running for a few days like this do I need to do anything extra before changing the jumper to battery?

I don’t think that’ll blow anything up but the battery is probably not charging and I doubt you’re getting correct battery level info.
Should be safe to switch it, just power it off first.

I’m still struggling with the Dash 1.1 and solar/battery. I had it setup on battery mode with a 2500 mah battery and a 1500 may solar 5 V solar pane. The setup ran great and the battery never got lower than 60% overnight in the early summer. Then we had a stretch of rain and the battery did run out and the dash stopped reporting for a few days. When the sun came out again the dash didn’t come back. I retrieved the device and found that the battery had charge, the panel was working but the dash was still not reporting and no signs of life.
Trying to reproduce the problem I managed to break the USB connector on both dash I have so the solar panel is connected through the 5V and GND pins. I have a new 2000 mah battery on the battery connector and the jumper on battery. I’m reading 1400 ma 4.9V on the solar panel, 1200 ma 4.9V on the dash pins and 400 ma 0.9V on the battery connector. That dash hasn’t reported for several hours. So I unplugged and re-plugged the battery, nothing. Hit the user reset button, nothing. Hit the system reset button, nothing. Removed the 5V and GND and reconnected, nothing. Then I took the jumper from batt to no-batt and the dash is alive, I have data! So I move the jumper back to battery and hit the user reset, it boots and reports data just fine.
I’ve seen it work like this until the battery dies, then it will not come back until I repeat the process.
What’s going on? Please help, because I have no idea. Thanks!