QT Py Solid red LED on battery power

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

QT Py Solid red LED on battery power

Post by wilkobot »

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?
IMG_20230124_190024.jpg
IMG_20230124_190024.jpg (724.66 KiB) Viewed 185 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

Is the QT Py running Arduino or CircuitPython code?

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

Arduino code

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

Now its solid green after I do a boot-reset-boot to try reset it. No serial port showing either

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

No serial port showing either
Are you back to being connected via USB to a PC?

Which specific QT Py is that?

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

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:

Code: Select all

WARNING: ESP32-S2FNR2 chip was placed into download mode using GPIO0.
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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

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

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

This is the full error message:

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
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?

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

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.

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

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?

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

No errors. Last message on the ESPTool webpage is this:

Code: Select all

To run the new firmware, please reset your device.
Is the esptool python file more reliable?

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

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

User avatar
wilkobot
 
Posts: 11
Joined: Mon Jan 02, 2023 9:54 am

Re: QT Py Solid red LED on battery power

Post by wilkobot »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: QT Py Solid red LED on battery power

Post by adafruit_support_carter »

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:
voltdiv.png
voltdiv.png (5.13 KiB) Viewed 150 times
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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”