Working around sync offsets and flicker when filming/taking pictures


#21

@Louis Thanks for explaining the flip-flop.
Maybe we can convince @Jason to make a new version of his ESP32 shield that includes a flip-flop. Until then, it would be too much weird soldering on top of his board, so I think I’ll continue without it.
Looking forward to an ESP32 smartmatrix shield, though :slight_smile:

Yes, what saved me is that the room is dark and I’m very bright, so the camera switches to a longer shutter speed, giving the time to the display to update enough that scanning is not visible.

I still need to check @seratosteve 's fork when I get a chance, unless you get to it first. It’d be great if it were a regular github fork though, easier to diff :slight_smile:


#22

@seratosteve, I made another SM fork and imported your code so that the diff is easier to see: https://github.com/MarcFork/SmartMatrix/commit/fdceb17cda0aaab3e655c6cee70bd37f3a2fac5b
Steve, would you be ok forking my branch and doing development in your own github so that we can keep track of your history and changes instead of doing unzip/diff/reverse engineered github checkins? :slight_smile:

@Louis I also wrote my own ESP32 PINOUT compatible with @Jason’s ESP32 16 channel level shifter shield. Would you accept a patch to merge that in your teensylc branch?


#23

@marcmerlin sure thing


#24

Thanks for the GitHub fork @marcmerlin (and for the code @seratosteve). I tried it here and sure enough, I don’t see scanning when my iPhone 6’s slow motion video camera mode is pointed at the panel. I do see that lines 0 and 16 on my panel seem to be out of place. With this gradient bitmap showing, it looks to me like what’s on line 0 should be on line 15, and what’s on line 16 should be on line 31.

I’m seeing a ton of the green ghosting issue when running the MultipleTextLayers example sketch. That’s one of the main reasons I moved away from doing frame-based refresh toward row-based refresh. Without a good fix for this issue, I don’t see frame-based refreshing working well for content that has a lot of blank pixels.

One idea: maybe have some really dim color applied to the background, so no pixels are actually blank, and the charged up row can discharge. Another idea: skip driving OE on rows that don’t have any content, so they aren’t actually lit up. (Probably bad idea, because we’re lighting up at least two rows on these panels, more on something like a P10/4 panel)


#25

I tried the idea of filling the screen with some dim value. Doesn’t help much. I added a backgroundLayer filled with {0x10, 0x10, 0x10} (smallest visible power of 2 gray with the default settings), and still see significant green streaks.

I’m also seeing another issue here, the text isn’t crisp, it’s bleeding into the row above:

image

I’m not sure this is the same issue as the green streaks issue. It’s matching the same color as the text, and bleeding into the row above, and only the row above, where the green streaks issue sometimes travels across several rows and in the bottom direction (and is green only).

Gut feel says the issue with the text bleeding into the row above is just a bug that can be fixed with code. The green streaks is a more fundamental hardware issue that shows up when switching rows a lot, like you do with frame based refresh.


#26

Regarding this bit, this is the wiring I made for @Jason’s board:

Diff wise, it’s:


plus

(I had to rework @Jason 's board to redirect pin 3 which I used for serial debugging to unused pin 27)


#27

It’s just a change to the ESPhardware.h file, right? Should be fine


#28

Correct just a change to MatrixHardware_ESP32_V0.h as per the 2 diffs I sent you above, and this comment one I just added


#29

Louis are you using an external row latch? My code doesn’t support that.


#30

Nope, I’m using the GPIOPINOUT SMARTLED_SHIELD_V0_PINOUT option. I’m using your fork with the only one change is the setting GPIOPINOUT ESP32_FORUM_PINOUT

When I go back to the main teensylc branch, with the same GPIOPINOUT ESP32_FORUM_PINOUT setting, the scrolling text is crisp.


#31

https://github.com/pixelmatix/SmartMatrix/pull/71 takes care of adding Jason Coon’s wiring.
If you can accept that, then @seratosteve can send a PR to add his own wiring if need be.
@seratosteve is there a reason why you made your own ESP32_D1R32_PINOUT when ESP32_FORUM_PINOUT already existed?
In my case I did use ESP32_FORUM_PINOUT using I switched to @Jason’s premade board and I was forced to use that wiring, hence the PR above, but otherwise on a breadboard, I did use ESP32_FORUM_PINOUT


#32

Marc, I didn’t even look at the ESP32_FORUM_PINOUT wiring, I just connected up the wires the simplest way I could.

Louis, your bad results could be explained if you’re using loadMatrixBuffers48. My prototype method is only implemented in loadMatrixBuffers24.


#33

Cool to see that you’re getting away with not using level shifters :slight_smile:
The one thing that sucks with ESP32 is how many wiring packages there are. It’s between hard and impossible to get a wiring that works for all.


#34

Got it. I recompiled the MultipleTextLayers sketch with kRefreshDepth = 24 and it looks better, but there are still plenty of visible issues:

@seratosteve are you seeing these in your setup, or do I still have some settings that don’t match yours?


#35

OK, the green streaks issue is very panel dependent. I only tried on two panels here, and both had the issue, and I incorrectly assumed all panels had the issue. After @marcmerlin showed what it looked like on his panels I tried again on a much wider selection of panels, and it’s either very visible, or not an issue at all, depending on the panel. I haven’t traced it down to a possible corrolation with chipsets used on the panel yet, but I did notice it wasn’t an issue on the more finer pitch panels, which are also panels I purchased more recently than the rest (so maybe they have newer chipsets?).

I’m more open to the idea of supporting this as an optional feature now. It has to be optional because in my opinion it looks terrible (depending on the content displayed) on panels that leave green streaks. I’m not planning on spending much time on this now though.


#36

Sounds good, thanks.
Note that while it doesn’t improve the memory use at all for me, and I may be ok enough with 120Hz for mostly dark/night use where cameras go into slower shutter mode anyway, his change looks like a worthwhile improvement, at least as an option.
The patch is also reasonably minimal.