So, investigating my unintended blinking problem.
The LED driver I'm using, the TLC5947, has a constant current PWM output, so you only need to hook it up to an LED's cathode, and it will make it run, no current limiting resistor required.
That also means you can't reliably scope the LEDs directly, which is annoying.
So, off an LED comes, and a 500 ohm resistor soldered in place.
The code was then modified to make that position stay "full on". From previous experiments, when the disc is spinning, it's visually apparent that the LED isn't actually on the whole time.
With the following, keep in mind I'm testing on the low-side, so the scope trace is inverted to the "LED on" state.
Here is what I saw:
Yep, that certainly is doing a very bad job of staying on 100% of the time.
So it turns off for about 300ns pulses.
Here's the period:
It's kinda hard to see, but you can see the spikes about every 1.1ms or so.
That's impressive that it's actually visible to the eye, even if it is spinning.
It's a negative duty cycle of 300ns every 1100000ns, or off about 0.027%.
So there are a couple possibilities with what's going on:
- This is actually the IC's max duty cycle. Lots of servo drivers can't hit 100% duty cycle.
- My driver code is offset or incorrect somehow, so this is the max value my code will go to.
- My current limit is too high, so the IC hits thermal shutdown.
- Brownout? I am totally abusing a bunch of coincells.
Now that I know what I'm looking at on the real hardware, I'll go back to my test devboard and try to recreate it. It's much easier to troubleshoot on that one.