Schematic design feedback

Are there any red flags with the approach below ?

I’m using a single slide switch (EG2219) to disconnect power (grid power and LiPo battery) to the Boron when needed.

Anyone willing to chime in on this ?

@oraclerouter,

Hey, sorry you had not received a response. I have been working on these questions for a bit and would be happy to share what I have come up with.

Your approach is the simplest and I have to admit that I have looked into this several times. Basically, there are a couple drawbacks that you need to consider based on your use case:

  1. Your switch has a 500mA current rating for DC. This is typically not a problem for the Boron but you will need to limit the current for charging the LiPO as the default is 900mA. Also, since you are not using the data pins on VUSB there is not max current negotiation between your USB host and your Boron.
  2. These switches can be “noisy” so there could be some weirdness as the Li+ and VUSB are switched on and off. On-board caps on the Boron should help with this so not sure it will be an issue.
  3. If your device will disconnect from the Particle cloud and sleep, you will need a real time clock. In your arrangement, you would need to connect the VBat for the RTC upstream of your switch if you want to retain time when the device is switched off.
  4. In your approach, you cannot charge the battery without switching on the device.

So, depending on your use case, this arrangement can work and, when switched off, the device will draw no power. You will need to address the current issue in your code. A couple other approaches you may consider:

  • You can achieve very low power consumption and enable charging while the device is off by controlling the “Enable” pin. This also has the advantage of allowing charging when the device is off
  • You could use load switch ICs to control the power sources. These support lower current through the switch and support using a surface mount switch.

I hope this is helpful. Please let me know if you have questions.

Chip

1 Like

Thanks @chipmc, appreciate the feedback.

The switch is used to easily shutdown the boron when needed instead of disconnecting all the wire - that is all. I found the discussion about the 900ma being default but surprisingly I was not able to find this anywhere else aside from that post. I will lower it using this firmware code

PMIC pmic;
pmic.setChargeCurrent(500);

The device is always ON but the battery is needed to execute code anytime the USB power is lost. The device is used indoors in somewhat of a controlled environment. I’m using a Lithium ion polymer 3.7V/1150mAh battery that 99% of the time is fully charged and sitting idle “waiting” for a power loss.
Are there any other safety measure you would recommend taking with this Lithium ion polymer batteries? I doesn’t seem like the Borons have a temp sensor that would prevent charging if the temp drops too low. I did get the Particle TrackerOne and it looks like they are using the Lithium ion polymer batteries in them but I assume those devices come with fail safe features that keep the batteries from catching fire.

@oraclerouter ,

I think you have hit on the main point with temperature control for your charging.

Take a look at this thread for some ideas on how best to handle this. My approach was to put a temperature sensor on my carrier board and determine whether to charge each hour. You will also see some great suggestions on improvements too.

I think you approach with the switch is very simple and effective. By limiting the charge current via the pmic commands or the new serPowerConfiguration API, you should be all set.

Thanks,

Chip

1 Like

Thanks for the tips @chipmc !
Added some temperature safety measure using the nrf52840 internal temperature sensor. Not ideal since this is not ambient temp but for my use case since I only charge after a grid power outage and the battery is next to Boron this will be perfect. I’ll run the code every 5 minutes.


 int32_t temp;
  uint32_t res = sd_temp_get( & temp);
  if (res == NRF_SUCCESS) {
    float tempC = (float) temp / 4;
    tempF = tempC * 9 / 5 + 32;

  } else {
    tempF = 999;
  }

  if ((tempF < 40 || tempF > 120) && chargeEnabled) {

    PMIC pmic(true);

    pmic.disableCharging();
    chargeEnabled = false;
    // Log.info("Battery charging is diabled due to unsafe temperature");                                           
  } else if ((tempF > 40 && tempF < 120) && !chargeEnabled) {
    PMIC pmic(true);

    pmic.enableCharging();
    chargeEnabled = true;
    // Log.info("Battery charging is enabled due to safe temperature"); 

  }

As far as lowering the default charge current for the LiPO battery, is there any issues with doing it this way?

void setup() {

pmic.setChargeCurrent(0,0,0,0,0,0)

}

Sorry for all the questions and thanks again for the guidance.

1 Like

Interesting. I am curious how accurate the internal temp sensor is. Please let me know.

As for setting the max charge current, I would recommend:

// Power Management function
int setPowerConfig() {
  SystemPowerConfiguration conf;
  System.setPowerConfiguration(SystemPowerConfiguration());  // To restore the default configuration
  conf.powerSourceMaxCurrent(500) // Set maximum current the power source can provide (applies only when powered through VIN)
  int res = System.setPowerConfiguration(conf); // returns SYSTEM_ERROR_NONE (0) in case of success
  return res;
}

Hope this helps. Chip

1 Like

Based on my testing the internal temp is about 5 to 7 degrees warmer when compared to ambient temp. By any means this is not a comprehensive test just having an external temp next to the boron. Also, this will depend on what your boron is doing. I did notice the more cell activity the boron was doing the warmer it got. If the boron is sitting " idle" the temp difference was steady at about the 5 to 7 degrees. Just holding your finder on the Boron sticker will raise the temp too.

Not ideal but in certain cases this might be a cheap option to keep the battery safe. Many thanks to the Particle Community. You learn something new everyday! Thanks @chipmc for the setPowerConfig code

2 Likes

@chipmc what kind of switch would you recommend to simply turn on/off the boron?

@oralclerouter,

Switches never cease to disappoint me.

Assuming you are looking to keep things simple and just use a slide switch for both your DC-IN and LiPO. Digikey starts with almost 4500 candidates but only 24 can meet the following requirements:

  • Active and In-Stock
  • Handle at least 1A of DC current
  • Dual Pole / Dual Throw
  • Non-Shorting

All are through-hole and some are quite expensive (only 4 are under $2 each). Here is the result of that search:

https://www.digikey.com/short/4393bd

As with all things electronic, your price will vary based on volume so this is only a suggestion to get your started. I hope it helps

Chip

1 Like

@chipmc and @oraclerouter,

For what it is worth I took a different approach for providing a power disconnect. I include this “jumper” with two 2.54mm pins and

combined with a standard jumper cap

image

This has proven to be cheap and effective. When I cut power, I just pull the jumper cap from both pins and push it onto one pin for safe keeping.

5 Likes

Thanks @chipmc @Backpacker87 for the suggestions!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.