Hello,
I am trying to run my QT-PY ESP32-C3 off a lipo battery. Im using your product "Adafruit Micro-Lipo Charger for LiPo/LiIon Batt w/MicroUSB Jack - v1" https://www.adafruit.com/product/1904?g ... usQAvD_BwE to transfer the power from the lipo to the board.
To test if it would work. I just added a simple code that flickers the neopixel light. The light never flickers. I tested the voltage output on the board and it was reading 3.3 volts. So the QT-PY ESP32-C3 is getting power ok.
Any suggestions?
Thanks,
Travis
QT-PY ESP32-C3 - Running off Lipo battery?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
I'm not clear on what you are doing. Please post photos of your circuit.
https://www.adafruit.com/product/1904 is a LiPo charger. 5v comes in the USB socket and is used to charge the connected battery.
Dave
https://www.adafruit.com/product/1904 is a LiPo charger. 5v comes in the USB socket and is used to charge the connected battery.
Dave
- gotapi
- Posts: 6
- Joined: Wed Feb 12, 2020 3:43 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
Ok, I probably made an incorrect assumption that the ground and battery pins where output on the https://www.adafruit.com/product/1904.
Here is an image of the wiring
Here is an image of the wiring
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
OK. Now I understand. Yes, they are output. They are directly connected to +/- on the battery. What you have should work fine. Although, technically, you should connect BAT/GND on the charger to the BAT/GND pads on the bottom of the QtPy under the USB connector. That would also allow use of the USB connector for programming without having to disconnect anything.
The next thing is the code you used to manipulate the NeoPixel. Can you post it here?
Dave
The next thing is the code you used to manipulate the NeoPixel. Can you post it here?
Dave
- gotapi
- Posts: 6
- Joined: Wed Feb 12, 2020 3:43 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
Thank you so much for the reply and the help.
That makes way more sense. I'll wire the BAT/GND on the charger to the BAT/GND pads on the bottom of the QtPy.
Here is my testing code that runs fine when plugged into my computer but doesn't run when powered by the current configuration I posted.
That makes way more sense. I'll wire the BAT/GND on the charger to the BAT/GND pads on the bottom of the QtPy.
Here is my testing code that runs fine when plugged into my computer but doesn't run when powered by the current configuration I posted.
Code: Select all
#include <Adafruit_NeoPixel.h>
// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
// say hi
Serial.println("Hello!");
// Wait until serial port is opened
while (!Serial) { delay(1); }
// put your setup code here, to run once:
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
pixels.setBrightness(20); // not so bright
}
void loop() {
// put your main code here, to run repeatedly:
flickerNeoPixelLights();
delay(500);
}
void flickerNeoPixelLights() {
// set color to red
pixels.fill(0xFF0000);
pixels.show();
delay(500); // wait half a second
// turn blue
pixels.fill(0x0000FF);
pixels.show();
delay(500); // wait half a second
//turn magenta
pixels.fill(0xFF00FF);
pixels.show();
delay(500); // wait half a second
// turn off
pixels.fill(0x000000);
pixels.show();
delay(500); // wait half a second
}
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
It's likely this:
No serial port is getting opened without the USB connection. As a test, comment out all mentions of Serial.
Serial isn't used in the code, so you can just get rid of
Dave
Code: Select all
// Wait until serial port is opened
while (!Serial) { delay(1);
Serial isn't used in the code, so you can just get rid of
Code: Select all
Serial.begin(115200);
// say hi
Serial.println("Hello!");
// Wait until serial port is opened
while (!Serial) { delay(1); }
- gotapi
- Posts: 6
- Joined: Wed Feb 12, 2020 3:43 pm
Re: QT-PY ESP32-C3 - Running off Lipo battery?
Dave,
Was 100% the cause. Now I am off and running.
I do very much appreciate your time in answering my questions!
Sincerely,
Travis
Code: Select all
// Wait until serial port is opened
while (!Serial) { delay(1);
I do very much appreciate your time in answering my questions!
Sincerely,
Travis
Please be positive and constructive with your questions and comments.