0

Help running neopixels on QT-PY with battery
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Help running neopixels on QT-PY with battery

by SmallThings on Wed Mar 03, 2021 4:25 pm

Hello there!

I'm currently trying to run a group of 4 chained neopixels (https://www.adafruit.com/product/4776) from a QT-PY, which is being powered by either a 2032 lithium coin cell, or a 150mah lipo (i'm testing both to see which will give better results).

I've got my 4 neopixels connected together, and I've uploaded a variation of the "strandtest" example code from the adafruit neopixel library. Everything works and looks fine when the qtpy is plugged in via USB, but the moment I try to power it from the battery, I get weird results. The neopixels start out strong, but then progressively get dimmer and dimmer until only the red diode is weakly pulsing.

Since it works perfectly when plugged in, the issue must lie somewhere in the power supply, right? Also, I'm using one of these step up modules to get the battery output up to 5V https://www.amazon.com/Comidox-Module-Voltage-Converter-0-9-5V/dp/B07L76KLRY

Any help troubleshooting this would be greatly appreciated!

SmallThings
 
Posts: 10
Joined: Mon Aug 10, 2020 8:28 pm

Re: Help running neopixels on QT-PY with battery

by adafruit_support_mike on Wed Mar 03, 2021 6:22 pm

You'll need a larger battery.

Each LED in a NeoPixel can use about 20mA, so four of them can use up to 320mA. The 'strandtest' sketch has two LEDs lit per pixel on average, so that would be in the range of 160mA.

Coin cells aren't designed for that kind of current.

Every power source can be treated as a perfect voltage source (the voltage stays constant and it can supply any amount of current) connected through a resistor. We call the resistor the power source's 'output impedance', and it models how well a real power source maintains its voltage as the current load increases.

In coin cells, the output impedance rises sharply when the load gets to about 80mA. Inside the cell that's caused by the chemical reactions that release electrons not being able to keep up with the demand, but the resistor model works well enough for an external approximation.

Ohm's Law never stops working though, so if you have the same load and less current, the voltage will fall. Blue LEDs have the highest forward voltage (around 3V) so they'll cut out first, then the green ones will go (about 2.1V), and finally the red ones (around 1.7V).

LiPos have much lower internal resistance than coin cells, but still have some limits. Their output current is dictated by the size of the anode and cathode plates, and the amount of lithium polymer between them. Cells with large plates close together can deliver lots of current quickly, while cells with small plates spaced farther apart deliiver less current for a longer time. A cell's expected load is measured in terms of a value called 'C', which is the amount of current necessary to drain a fully-charged cell in 1 hour. For a 150mAh cell, C=150ma. For a 6600mAh LiPo pack, C=6.6A.

Most small LiPos (below 1000mAh) are designed to work at 0.5C or less. When you get down to the 150mAh level, the rating will probably be around 0.2C. They can produce more current without having their internal resistance spike up like a coin cell, but the reactions are less efficient. A 0.2C 150mAh cell delivering 150mA might only last half an hour, and only deliver about 75mAh of usable power before needing to be recharged.

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

Re: Help running neopixels on QT-PY with battery

by SmallThings on Wed Mar 03, 2021 6:36 pm

adafruit_support_mike wrote:You'll need a larger battery.

Each LED in a NeoPixel can use about 20mA, so four of them can use up to 320mA. The 'strandtest' sketch has two LEDs lit per pixel on average, so that would be in the range of 160mA.

Coin cells aren't designed for that kind of current.

Every power source can be treated as a perfect voltage source (the voltage stays constant and it can supply any amount of current) connected through a resistor. We call the resistor the power source's 'output impedance', and it models how well a real power source maintains its voltage as the current load increases.

In coin cells, the output impedance rises sharply when the load gets to about 80mA. Inside the cell that's caused by the chemical reactions that release electrons not being able to keep up with the demand, but the resistor model works well enough for an external approximation.

Ohm's Law never stops working though, so if you have the same load and less current, the voltage will fall. Blue LEDs have the highest forward voltage (around 3V) so they'll cut out first, then the green ones will go (about 2.1V), and finally the red ones (around 1.7V).

LiPos have much lower internal resistance than coin cells, but still have some limits. Their output current is dictated by the size of the anode and cathode plates, and the amount of lithium polymer between them. Cells with large plates close together can deliver lots of current quickly, while cells with small plates spaced farther apart deliiver less current for a longer time. A cell's expected load is measured in terms of a value called 'C', which is the amount of current necessary to drain a fully-charged cell in 1 hour. For a 150mAh cell, C=150ma. For a 6600mAh LiPo pack, C=6.6A.

Most small LiPos (below 1000mAh) are designed to work at 0.5C or less. When you get down to the 150mAh level, the rating will probably be around 0.2C. They can produce more current without having their internal resistance spike up like a coin cell, but the reactions are less efficient. A 0.2C 150mAh cell delivering 150mA might only last half an hour, and only deliver about 75mAh of usable power before needing to be recharged.


This is incredibly helpful and informative. I appreciate you

SmallThings
 
Posts: 10
Joined: Mon Aug 10, 2020 8:28 pm

Please be positive and constructive with your questions and comments.