0

Gemma M0 Power problem (2x2032)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Gemma M0 Power problem (2x2032)

by robboz4 on Sat Aug 17, 2019 2:38 pm

Hi,

I have a Gemma M0 connected to two Neo Pixel jewels I used Mu editor CircuiyPython and the USB port for power and coding. After I had the code running, I switched power to 2x 2032 coin cells in your 2 x 2032 Coin Cell Battery (PID: 783). At first the Gemma LED turns green and after several seconds the LEDS begin to show their patterns. However after about 30 seconds the Gemma green LED goes purple and an red LED flashed next to the Gemma slide switch. The LED pattern freezes. I retested with the USB power and everything works as I expected. as far as I know I have the latest Gemma code

Any clues as to why the Gemma is freezing after 30 seconds on CR2032 power? They are brand-new batteries straight from the store. Do you need a copy of the code to review?

Thanks

robboz4
 
Posts: 35
Joined: Tue Nov 20, 2012 7:01 pm

Re: Gemma M0 Power problem (2x2032)

by adafruit_support_mike on Mon Aug 19, 2019 2:51 am

Coin cells don't have enough stored energy to run NeoPixels for very long. They're designed for devices like clocks that use very little current, and their output falls dramatically if you try to draw more than about 50mA from them.

The actual cause of failure is probably voltage loss to the coin cell's internal resistance.

All power sources have some amount of resistance, which acts like a resistor between the ideal output voltage and the load. A power source whose nominal output voltage is 5V and whose internal resistance is 1 Ohm would lose 1V if you tried to draw 1A from it. The load would see an actual supply voltage of 4V.

For batteries, internal resistance is an approximation of how well the chemical process inside the battery can produce more energy. As an analogy, you can think of a hose sending water into a bucket with a hole in the side: the hose is the battery's ability to release more energy, the hole is the load, and the bucket is the amount of energy the battery can deliver at the moment. If the hole in the side of the bucket is larger than the hose, the water level in the bucket will fall even though the hose is pumping in as much water as it can.

The same kind of thing happens when you try to draw more than about 50mA from a coin cell. The chemicals can't release new energy fast enough to replace the energy you're pulling out, so the output voltage falls. If you run the numbers through Ohm's Law, it looks like the current is flowing through a resistor whose value is increasing.


If you want a small, NeoPixel-friendly power source, try a small LiPo:

https://www.adafruit.com/product/1570
https://www.adafruit.com/product/1317

They're a little larger than a coin cell, but have very low internal resitance. Lithium chemistries are really good at releasing energy quickly.

adafruit_support_mike
 
Posts: 58799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Gemma M0 Power problem (2x2032)

by robboz4 on Mon Aug 19, 2019 11:56 am

Hi!
Thanks for the reply. I thought it might be a power problem, but was curious as to why I get a purple led and a red flashing one. I couldn’t find any clues as to what that combination meant. I have Lithium batteries available, so I’ll use them.
Cheers

robboz4
 
Posts: 35
Joined: Tue Nov 20, 2012 7:01 pm

Re: Gemma M0 Power problem (2x2032)

by adafruit_support_mike on Mon Aug 19, 2019 11:31 pm

CircuitPython uses the NeoPixel to provide basic debugging information when something goes wrong.

https://learn.adafruit.com/adafruit-met ... ight-20-18

adafruit_support_mike
 
Posts: 58799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Gemma M0 Power problem (2x2032)

by robboz4 on Tue Aug 20, 2019 12:32 pm

Thanks for the link. For some reason I could find it on my searches, but I have it now!

robboz4
 
Posts: 35
Joined: Tue Nov 20, 2012 7:01 pm

Please be positive and constructive with your questions and comments.