0

Adafruit Feather Adalogger - Power Management
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Feather Adalogger - Power Management

by RichardW_UK on Fri May 14, 2021 6:55 am

Hi

What are the performance impacts of running the Feather 32uF Adalogger board on 5vUSB supply vs 3.3v LiPO battery? What are the driving design limitations I need to avoid to ensure my code works fine when connected via USB and also when running on battery alone?

For context my setup is:
When I switch from 5v USB input to my Feather 32uF Adalogger board to the local 3.3v battery supply then my code stops working. Other simple codes work fine so nothing wrong with the battery connection etc. For info, I am running a datalogger code using LSM303 accelerometer and driving NEOPIXELS which change colour depending on movement of devices. I have two LSM303 so have multiplexed them using Adafruit TCA9548A I2C Multiplexer.

Thanks

Richard

RichardW_UK
 
Posts: 2
Joined: Fri May 14, 2021 6:44 am

Re: Adafruit Feather Adalogger - Power Management

by blnkjns on Fri May 14, 2021 7:38 am

I think Neopixels need 5V. Are you sure the board stops working, or is it just the neopixels that no longer light up?

blnkjns
 
Posts: 607
Joined: Fri Oct 02, 2020 3:33 am

Re: Adafruit Feather Adalogger - Power Management

by adafruit_support_bill on Fri May 14, 2021 7:46 am

I think Neopixels need 5V.

Although the spec sheet says they are designed for 5v operation, we have found that Neopixels work just fine powered by a 3.7v LiPo. Most of the portable Neopixel projects in the Learning System are designed that way.

When I switch from 5v USB input to my Feather 32uF Adalogger board to the local 3.3v battery supply then my code stops working.

Make sure you don't have a 'while(!Serial);' or similar code statement at the beginning of your code. That will cause it to wait indefinitely for a serial connection.

adafruit_support_bill
 
Posts: 81281
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Feather Adalogger - Power Management

by blnkjns on Fri May 14, 2021 7:53 am

adafruit_support_bill wrote:Make sure you don't have a 'while(!Serial);' or similar code statement at the beginning of your code. That will cause it to wait indefinitely for a serial connection.

Interesting: is UART doing a handshake with the computer? I thought it just "boots" the serial service in a pretty dumb way, and that it will succeed with or without cable and computer attached.
Is there a smart way to have the board wait for Serial but not indefinitely? Or do I have to hack in some millis() watchdog that stops the while after 5 seconds?

blnkjns
 
Posts: 607
Joined: Fri Oct 02, 2020 3:33 am

Re: Adafruit Feather Adalogger - Power Management

by adafruit_support_bill on Fri May 14, 2021 8:07 am

For simple chips with just TTL Serial (e.g. Atmega 328p), initializing Serial just initializes the UART. It doesn't care if there is anyone on the other end. A separate USB/Serial chip takes care of establishing a communication link with the host.

But for chips like the 32U4 with native USB/Serial, it needs to communicate with the host computer to establish the virtual serial link over the USB connection.

Checking 'millis()' and bailing out of the loop is probably the simplest way to avoid hanging indefinitely while waiting for the serial link.

adafruit_support_bill
 
Posts: 81281
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Feather Adalogger - Power Management

by RichardW_UK on Fri May 14, 2021 8:53 am

Thanks adafruit_support_bill

It was the 'while(!Serial);' code in the setup....doh!

For info. The NeoPixels work fine on the 3.7v LiPo supply

Cheers

Rich

RichardW_UK
 
Posts: 2
Joined: Fri May 14, 2021 6:44 am

Please be positive and constructive with your questions and comments.