QT Py Solid red LED on battery power
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
QT Py Solid red LED on battery power
Occasionally when I power the board using a battery I get a solid red LED. I think this prevents my programs running. Does the board think it doesn't have enough power or something?
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Is the QT Py running Arduino or CircuitPython code?
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
Arduino code
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
Now its solid green after I do a boot-reset-boot to try reset it. No serial port showing either
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Are you back to being connected via USB to a PC?No serial port showing either
Which specific QT Py is that?
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
Yes back on the USB now.
I am using Adafruit QT Py ESP32-S2.
Its like I am locked out. Heres what happens:
1. I reboot it with boot-reset-boot on USB power
2. LED is off and device appears on USB serial port
3. I try to upload sketch using platformio, fails with the error message:
4. I disconnect USB (hence power)
5. I connect USB and green LED comes back on, device not detected on USB.
This process was working before and at step 5 I would see the device on my serial ports and be able to upload my sketch and no green LED would light up. I was having to do this when using deep sleep for my project
I am using Adafruit QT Py ESP32-S2.
Its like I am locked out. Heres what happens:
1. I reboot it with boot-reset-boot on USB power
2. LED is off and device appears on USB serial port
3. I try to upload sketch using platformio, fails with the error message:
Code: Select all
WARNING: ESP32-S2FNR2 chip was placed into download mode using GPIO0.
5. I connect USB and green LED comes back on, device not detected on USB.
This process was working before and at step 5 I would see the device on my serial ports and be able to upload my sketch and no green LED would light up. I was having to do this when using deep sleep for my project
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
That's a warning, not an error. Maybe the sketch uploaded OK? Try reverting to a basic Blink sketch to get back to a known state and make sure sketch uploads are working.
If all else fails, may need to do a lower level reset:
https://learn.adafruit.com/adafruit-qt- ... tory-reset
If all else fails, may need to do a lower level reset:
https://learn.adafruit.com/adafruit-qt- ... tory-reset
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
This is the full error message:
Okay will try the low-level reset. It's not uploaded because nothing is being printed to the serial port, which my sketch is doing. Are there known issues with this board and deep sleep?
Code: Select all
Leaving...
WARNING: ESP32-S2FNR2 chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
Failed uploading: uploading error: exit status 1
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Ok, in that case does appear to be failing. The fail message is coming *after* the warn message, which is different.
See if you can get back to being able to upload a basic Blink sketch.
See if you can get back to being able to upload a basic Blink sketch.
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
Tried using the Adafruit ESPTool to erase and reupload the firmware. No luck. Still getting the green LED after the reset.
Can I double check this is the correct binary file: https://github.com/adafruit/Adafruit-QT ... loader.bin
Can I double check this is the correct binary file: https://github.com/adafruit/Adafruit-QT ... loader.bin
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Yes, that is the factory reset bin file.
https://learn.adafruit.com/adafruit-qt- ... tory-reset
Did the process work as shown in the guide? Without any errors at any steps?
https://learn.adafruit.com/adafruit-qt- ... tory-reset
Did the process work as shown in the guide? Without any errors at any steps?
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
No errors. Last message on the ESPTool webpage is this:
Is the esptool python file more reliable?
Code: Select all
To run the new firmware, please reset your device.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Sort of. It's more direct. The WebSerial is essentially just a GUI front end for the same process. If there were any issues, there would be associated messages though.
So at this point you're at the state where the factory reset process worked as shown, but does not appear to actually be reset?
https://learn.adafruit.com/adafruit-qt- ... rd-3106864
So at this point you're at the state where the factory reset process worked as shown, but does not appear to actually be reset?
https://learn.adafruit.com/adafruit-qt- ... rd-3106864
- wilkobot
- Posts: 11
- Joined: Mon Jan 02, 2023 9:54 am
Re: QT Py Solid red LED on battery power
Update: This was a hardware issue, I had soldered a wire from the battery + pin to A2 with the hope of using that pin to measure battery voltage. But seems to have been causing the issue
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: QT Py Solid red LED on battery power
Oops, yah, that could explain it. Sounds like it was wired directly? If so, that indeed would not work.
What you'll want to do is setup a "voltage divider". It's pretty simple - just two resistors. Here's an example commonly found on Feathers: The two resistors are 100k each.
The middle connection going to the left would be attached to an analog pin. That let's you safely read the battery voltage. And then you'd do math in your code to covert and scale the raw analog value up to battery voltage.
What you'll want to do is setup a "voltage divider". It's pretty simple - just two resistors. Here's an example commonly found on Feathers: The two resistors are 100k each.
The middle connection going to the left would be attached to an analog pin. That let's you safely read the battery voltage. And then you'd do math in your code to covert and scale the raw analog value up to battery voltage.
Please be positive and constructive with your questions and comments.