Teensy 3.5 and bounce2 - different behaviour on USB power bank vs PC!

Status
Not open for further replies.

Talkiet

Well-known member
I had to take a video of this behaviour because I wouldn't believe me if I told me about this...

I have a Teensy 3.5 with an I2C 20x4 LCD screen, 6 x MLX90614 IR sensors (same behaviour with 0, or 17 of them), Ublox GPS and CAN transceiver. (The 9DOF is not connected)

The software was working fine on my desk so I picked up a USB power bank and took it to the car to see how it was working there. Note that I observed the same behaviour whether the CAN bus was connected or not.

It was sluggish to respond to the button (which turns logging on and off using Bounce2) and sometimes didn't work at all. The CAN values seems horrendously delayed (which makes no sense) as well. I took it back to the desktop and it behaved.

I eventually tried it on a USB3 hub connected to PC (works), Orico USB charger (works), Surface Pro 3 (doesn't work), 4*18650 USB powerbank (doesn't work) and single 18650 USB power bank (doesn't work). The odd thing is the nature of the failure. It loads up fine and starts, it even logs ok, but the button behaviour is wildly different between the working an non working USB supplies.

As I said, I wouldn't believe me without a video...


Any ideas?

Cheers - N
 
Looks like a broken lead on a resistor was playing havoc... Seems that somehow the button was working mostly when plugged into a PC or something with a ground, but with power banks the button just went haywire (technical term because I don't yet have a scope to see exactly what was happening) and the debounce code was ending up killing the sketch...

New resistor soldered in and it appears to behave the same on any power source now :)

Cheer s- N
 
Status
Not open for further replies.
Back
Top