Author Topic: Using the MCP16251 with CR2032 battery. A good choice?  (Read 4699 times)

doublec4

  • Jr. Member
  • **
  • Posts: 53
Using the MCP16251 with CR2032 battery. A good choice?
« on: May 11, 2018, 11:10:40 PM »
Hi all,

So I recently made a two button remote with a regular pcb trace Moteino. I used the MCP16251 boost regulator with a CR2032 battery to power it (directly to the 3.3V pin on the Moteino). In the programming I used sleep mode for the MCU and radio sleep for the radio. The unit wakes up on a button press and only stays awake for a few seconds to receive the ack and a possible error code from the receiver.

The first time I tested the remote, it seems to work fine. I got a little carried away and was pressing buttons over and over for a little while. Then I left the unit to sleep, came back a few hours later and the remote was dead. When I removed the battery the voltage eventually came back up to 3V on the coin cell but when inserted back into the remote I believe it can no longer support enough current for the radio to work. Pressing a button will not send a packet and the unit seems unresponsive. When I calculated the battery life before designing and building the remote I estimated that the battery would last ~1 year with ~2 button presses per day. However, by aggressively using the remote for a short period of time, does this somehow drain the battery faster than using it with longer intervals of rest in between?

Also, the MCP16251 chip has an enable/shutdown pin... one version of the chip has input to output disconnect when this pin is grounded, and the version that I have has input to output bypass when the enable pin is grounded. I'm assuming this means that voltage is no longer regulated and the datasheet says current consumption drops to ~0.6uA in this state. Right now I am not using this feature, but would it be as simple as connecting the enable pin to a digital I/O on the Moteino and pulling the pin low before sleeping the Moteino? Then the interrupt could wake the Moteino, I could pull the enable pin high again and the regulator would kick back on to boost for a reliable 3.3V output? Would this be better than leaving the boost regulator on the entire time? Or is it more complicated than this? Thanks!

Schematic:



Pictures:

upload a picture

upload picture



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #1 on: August 03, 2018, 01:38:01 PM »
Nice little project!
IMO probably not a great match between COIN-cell and step-up booster because the up-boost will be inneficient especially at high currents required by the transmitter.
You could probably do much better with a tiny LiPo which will eliminate the need for boosting while being able to support the TX even at max power.

BTW at no load the coin cell will tend to show a good-looking voltage, you really need to put a small load on it to get the real voltage.
You could perhaps do quite a bit better by eliminating the booster and using a Moteino-8Mhz which runs down below 3V directly from a coin cell. Don't forget to always dial TX power down as much as possible, perhaps use RFM69_ATC with a low enough RSSI parameter.

doublec4

  • Jr. Member
  • **
  • Posts: 53
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #2 on: September 10, 2018, 12:40:43 AM »
Thanks for the reply Felix,

I put this project away for a while but I'd like to revisit it. Do you have the eagle design files available for the Moteino with PCB trace antenna, or the 8Mhz moteino? I checked your Github page but don't see those variants.

Rather than combine two PCBs like I have shown in the pictures, I would like to integrate everything into one PCB for a slimmer design. (8Mhz, PCB antenna, coin cell mount and buttons)

Is there any danger of damage or unintended/unpredictable behavior with running the battery down too low without any regulator?

Thanks!


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #3 on: September 10, 2018, 10:07:01 AM »
Only what is published is available.
The antenna was designed for the form factor of the Moteino, changing it in any way might render the antenna ineffective or useless.

Damage? No. Weird behavior? Yes, brownouts when VCC reaches the limits stated in the datasheet of the 328p.

doublec4

  • Jr. Member
  • **
  • Posts: 53
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #4 on: November 02, 2018, 03:12:05 PM »
Hi Felix (or anyone else who might be able to help!)

I have some time again to tinker and I am going to try and use the R6 open source design you posted to make my own bare bones 8Mhz moteino with integrated CR2032 cell and a few buttons.

I've started by removing the regulator, 16mhz resonator, pads for the higher power radios, flash memory, and some other things not needed for my application.

I also read your post here:

https://lowpowerlab.com/guide/diy-moteino/bootloader-and-basic-testing/

about burning the bootloader to the 328P chip. You mention that DualOptiboot was used because of the external flash memory / wireless programming. If I do not need this option, should I still use DualOptiBoot? Also, I notice it mentions something about D9 flashing... I'm assuming this has something to do with the LED on D9. Does this just flash when programming? Or what is this function?

I apologize if these are basic questions, but I've never put a blank 328p chip on a board before...


Thanks!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #5 on: November 02, 2018, 05:35:22 PM »
You can still use Dualoptiboot, but it is 1K instead of 512bytes, and you might have to compile it yourself if you dont find a precompiled Optiboot hex that runs on internal 8mhz oscillator.
D9 is simply a GPIO that is hardwired to an LED on the Moteino. So if you use Dualoptiboot, there will be some flashes during resets.

doublec4

  • Jr. Member
  • **
  • Posts: 53
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #6 on: November 02, 2018, 05:58:19 PM »
Awesome, thank you. But other than during resets, I will have control over pin D9 (the LED) as I normally would, correct? I would like to use it to flash to show confirmation of received messages etc.

Thanks again!

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #7 on: November 03, 2018, 12:20:12 AM »
you can have led on any pin if you compile your own Dualoptiboot, just change the code before compile

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #8 on: November 03, 2018, 06:43:45 PM »
doublec4 - yes, D9 is at your disposal. If you just use it with some digital peripheral, the LED will come ON as long as D9-HIGH.

doublec4

  • Jr. Member
  • **
  • Posts: 53
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #9 on: November 03, 2018, 11:50:47 PM »
Great, thank you so much guys! One more question, if I use a ATMega1284P on another board, I've read that some of the AVR programmers cannot burn a bootloader to this chip with more memory.

Any suggestions on AVR programmers to use with the ATMega1284P ? I wouldn't be running this at 8mhz, so I realize I would need to find a different hex file, but if I am going to purchase an AVR programmer I would like to find something that works for both the 328p and the ATMega1284P

Thanks again!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Using the MCP16251 with CR2032 battery. A good choice?
« Reply #10 on: November 21, 2018, 10:18:25 AM »
Why would an ISP programmer not work with 1284p?
I think any should work, regardless of compiled sketch size, it's not like they store the compiled sketch in their own flash before they program it into the target.