0

QT PY BFF odd behavior when started without usb
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

QT PY BFF odd behavior when started without usb

by jappavoo on Tue Jun 21, 2022 2:39 pm

Hi All,

I have a qt py es32 c3 and the LiIon or LiPoly Charger BFF. I am trying to use it with an Adafruit 420mAh battery along with the oled 128x32 mono stemma qt breakout. For my project I need to connect the BFF via wires to get thinks to fit in my project box. To do this I have wired +5, GND and A2 between the QT PY and the BFF.

Things seem to work as expected if things are plugged in via the USB port on the QT PY. Eg. Project is running and displaying on the OLED. When I disconnect the USB things continue to work fine including if I reset the board. However if while disconnected I turn the BFF on and off things do not seems to start up correctly. I see the green power led on the oled breakout but I see no evidence of updates to the OLED. In this condition pressing reset does not seem to help.
If I plug the USB back in and press reset things see ok again.

Any advice on what I should debug?

jappavoo
 
Posts: 19
Joined: Mon Jan 09, 2017 2:15 am

Re: QT PY BFF odd behavior when started without usb

by dastels on Tue Jun 21, 2022 3:05 pm

I don't have one yet to check, but I'm curious what he voltage on the 5v pin is like. When USB is connected it will be 5v. But what happens when USB gets unplugged? what happens when you turn the switch off and back on?

Does the QtPy without the display behave the same way?

Does it behave the same way with a larger battery?

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT PY BFF odd behavior when started without usb

by jappavoo on Tue Jun 21, 2022 7:43 pm

Unfortunately my multimeter is dead :-( so I can’t check the voltages.

As far as I can tell everything else is working other than the oled display. I have tested with the simple neopixel blink program and all behaves as expect. Similarly when I put the rest of my devices back on the i2c bus (rtc and haptic breakouts) all work other than the oled. All this leads me to believe it is some problem with the oled initialization process when I turn the bff on.

But it is weird though that everything works, including the oled, when I unplug the usb even resetting. The problems only arises if I turn off and on the bff and then it is only the oled.

Have not tried with a bigger battery.

jappavoo
 
Posts: 19
Joined: Mon Jan 09, 2017 2:15 am

Re: QT PY BFF odd behavior when started without usb

by dastels on Tue Jun 21, 2022 8:45 pm

My current thinking is that the 10uF capacitor on the BFF that's on the 5v pin. The USB connection would charge that, and the battery would keep it charged, albeit at a lower voltage.

When you switch off the BFF that cap will discharge. Switch it back on and it will start charging up again. But, if the OLED requires a surge of current when it starts up, the battery may not be able to supply it (hence my question about a bigger battery). That cap once charged may be able to buffer a spike in demand like that. When you say the OLED doesn't come back when resetting, are you resetting the OLED as well or just the QtPy?

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT PY BFF odd behavior when started without usb

by jappavoo on Tue Jun 21, 2022 11:37 pm

Thanks so much for the detailed explanation... I am a software guy so any guidance and information on the electronics is deeply appreciated.
I only have the biggest battery I have is the Adafruit Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh which is what I am using now. I might be able to borrow the 500mAh battery but not sure if that is sufficiently larger.

With respect to resetting the oled breakout I am using the https://www.adafruit.com/product/4440. I am pressing the reset on the QT PY and my setup code should run and reinitialize the oled. I assumed that the following text meant I did not need to wire the reset pin given that I am using it via the STEMMA QT I2C connector:

"We've updated the design to add auto-reset circuitry so that the reset pin is optional, since it speaks I2C you can easily connect it up with just two wires (plus power and ground!). We've even included SparkFun qwiic compatible STEMMA QT connectors for the I2C bus so you don't even need to solder! "

But in all fairness I have not taken a detailed look at the documentation for the oled display or carefully read the library code.

jappavoo
 
Posts: 19
Joined: Mon Jan 09, 2017 2:15 am

Re: QT PY BFF odd behavior when started without usb

by dastels on Wed Jun 22, 2022 10:13 am

The power-on-reset could be messed up if there was a current issue on power up and could conceivably put the display chip in a bad state. Resetting the QtPy won't have any effect on the display. The display does have a "manual" reset pin. You could try wiring that to one of the QtPy's digital pins and use it to reset the display. Unfortunately the QtPy doesn't expose its reset signal. Resetting the display before starting to use could fix it. Alas, you'll need another wire soldered in along with the STEMMA connection.

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT PY BFF odd behavior when started without usb

by jappavoo on Wed Jun 22, 2022 10:51 pm

Thanks. Unfortunately it looks like my QT PY died :-(. The project was in a case running and then I noticed it had stopped working. Removed all I2C devices plugged QT PY into a USB port but no luck in getting it to be recognized by my laptop. Tried entering rom boot loader with boot and reset but no luck either. Not sure if it is a coincidence or a related problem. Will have to wait until I get another one to see what's going on.

Thanks again for all your help.

jappavoo
 
Posts: 19
Joined: Mon Jan 09, 2017 2:15 am

Please be positive and constructive with your questions and comments.