0

ESP32, 64x32 RGB Matrix row 1 dups on row 3
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Fri Sep 06, 2019 7:02 am

I'm using an ESP32 Dev Board with the P3RGB64x32MatrixPanel library on GitHub. I've wired up quite a few of them and suddenly a new proto board is causing duplicate rows to be displayed. As if one row of text overlays the next row. That is, font is 8 pixels high=4 rows of text. When writing text row 1, it duplicates on text row 3; writing text row 2, duplicates on text row 4 (I will include a photo later). I've looked at all the connections (solder bridges), thinking I've shorted "A" and "C" or something but there are no faults. I've tried 2 different RGB Matrix displays and it does the same thing on both. I go back to another prototype board and both displays work fine (same software uploaded to ESP). I've changed ribbon cables, no affect.

The ONLY difference between proto board A (which works) and proto board B (which doesn't) is that board A is powered by a (Adafruit) 5V 2A supply and board B is powered by a 3A 12V supply with a 5V regulator (EzSbc 5v/3A 7805 replacement). I checked the voltages and they are stable at 5.01 to 5.02 when the display is active. I checked the current draw and it never exceeds 0.9 amps.

It is obviously a hardware issue, but I don't see any wiring mistakes.

Anyone have an idea where to look ?

Thanks
Tom

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Mon Sep 09, 2019 1:21 am

It sounds like you're getting signal coupling on the address lines.

That can happen without any kind of DC short circuit between the lines. If the lines that carry the signals are close to each other for more than a couple of inches, you can get capacitive or inductive coupling.

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Mon Sep 09, 2019 4:32 am

So the answer is to make as short of cables as possible ? Is there a pattern I should try: run straight parallel to each other; run next to a ground, run across from each other ? Looking at the Mega/M4 shield, the lines seem to be running straight, but they are short. Since the use of these displays on an Arduino are limited, it is because of the rate or frequency of the signals, correct? That's why I searched for using an ESP32, since it is much faster. I'll have to go back and look at all my working circuits and see if I see a pattern to how I ran those wires.

Thanks for the reply.

Tom

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Mon Sep 09, 2019 4:46 am

Here is the test code I'm running. The "true" sketch is a WiFi NTP clock with a list of calendar events (birthdays, etc.) displayed on the last line of the display-scrolling right to left:

#include <Adafruit_GFX.h>
#include <P3RGB64x32MatrixPanel.h>

P3RGB64x32MatrixPanel matrix;

void setup() {
Serial.begin(115200);
matrix.begin();
}

void loop() {
matrix.fillScreen(0);
matrix.swapBuffer();
delay(1000);
matrix.setCursor(0, 0);
matrix.setTextColor(matrix.color444(15, 15, 15));
matrix.print("11111111");
matrix.swapBuffer(); delay(1000);
matrix.setCursor(16, 8);
matrix.setTextColor(matrix.color444(6, 15, 6));
matrix.print("22222222");
matrix.swapBuffer(); delay(1000);
matrix.setCursor(32, 16);
matrix.setTextColor(matrix.color444(15, 15, 15));
matrix.print("3");
matrix.swapBuffer(); delay(1000);
matrix.setCursor(48, 24);
matrix.setTextColor(matrix.color444(6, 15, 6));
matrix.print("4");
matrix.swapBuffer();
delay(10000);
}
Attachments
Board2.jpg
This is board #2, it's symptom is that the bottom 16 rows won't display GREEN.
Board2.jpg (352.29 KiB) Viewed 294 times
Board1.jpg
Layout of board #1
Board1.jpg (355.71 KiB) Viewed 294 times
displayIssue.jpg
Here is the symptom.
displayIssue.jpg (310.67 KiB) Viewed 294 times

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Mon Sep 09, 2019 11:46 pm

As a sanity check, did you get the LED matrix from us?

There are no standards for matrix connections, and the output you're seeing looks like a couple of the signals have been swapped.

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Thu Sep 12, 2019 1:42 am

Not this particular one, but yes. It does the same on the Adafruit unit as well. I tried my (Chinese) P5 and then an Adafruit P4 unit. I fried all my other Adafruits with 12V instead of 5V. I have 2 P5s in production and 1 P3, both Adafruit.

Update to my circuit. I shortened all the wires and tried some rerouting so they didn't run so parallel. The symptoms have changed. Now it does not duplicate, but there is distortion in the upper left corner (lots of random pixels lighting up). So I'm sure it is a wire run issue, just not sure how to fix.

I reconnected the display to my M4 Grand Central setup and it displays properly.

I've just purchased an inexpensive CNC machine that can make PCBs. I used to do the old ferrate (sic) liquid light exposure technique (Radio Shack???), but I think the CNC stuff will be easier and less messy (I.E., no toxic chemical to recycle). So I am going to try that solution. I will keep this thread active with my results.

Thanks
Tom,

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Thu Sep 12, 2019 2:41 am

Try running all the signals through twisted-pair phone wire, with one wire in each pair connected to GND.

The twist is designed to eliminate inductive coupling between wires from different pairs, and having a GND line running in the same pair will strongly reduce capacitive coupling between pairs.

If you still want to rout a PCB (which is a good idea), put traces connected to GND between the signal traces. They're called 'guard traces', and they prevent capacitive coupling between the signal traces.

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Fri Sep 13, 2019 8:50 pm

Something else just occurred to me: your Raspberry Pi RGB Hat contains level converters since the Raspberry is 3.3 logic. Could the same be occurring with the ESP-not being able to drive stable signals for all those active pins ?

Thanks
Tom

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Sun Sep 15, 2019 1:00 am

Hmm.. that shouldn't be a problem in general, but the ESP8266 and ESP32 have built-in operating systems that keep all the radios running.

The OS suspends the code you've written periodically to give the radio-management firmware time to do its thing, and we've seen that cause timing problems for people in the past. There's a known problem trying to control more than about 60 NeoPixels with an ESP32, for instance.

RGB LED matrices use clocked signals, so a short pause shouldn't cause that much trouble, but there may be some kind of edge condition where a bit flips at the wrong time. You'd have to check that out with a logic analyzer.

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Wed Oct 16, 2019 7:04 am

Well it's definetly a problem with only *some* displays. I'm going to setup a matrix of what works and what fails. Since I use mostly 32x64, it shouldn't be difficult.

So I added TTL level bufferes between the ESP I/O pins and the Matrix. Ran into an issue that IO12 was used by one of the signals, the I/O buffer took the low reading of the siginal from the matrix and set it low on the ESP. It is used by the ESP, that if it is brought low, no booting.... I tried bringng the input side high with a resistor, but the original issue of" display is wrong" stayed the same (although it reloaded code and rebooted this time).

So next step, I bought a micro CNC machine so I could make my own PCBs without using that IronFerrite stuff we used to buy from Radio Shack and then bury in the back yard. Remember heating it up on mom's stove so it would last a little longer ? This looks like fun. It makes me really wonder why certain pins are used be engineers, though. The RGB pins for (1) are in opposite order of those in (2). Why would he make that confusing? Just use 21, 22, 23 & 25,26,27 not 21,22,23then27,26,25. I rerouted the pins such that there are few jumpers required on the top side (one +3 volt and 1 Ground) and no routing between pins. Any suggestions on the running of the traces ? Parallel lines, type of corners, etc. Should I put a ground between each A,B,C,D signals or R!,R2,B1,B2, etc. ??? I will certainly leave the bulk of non-etched lines sold copper grounding.

I haven't gotten the Raspberry Bonnet working yet, quite a different animal. Too many choices of operating systems and not much consistency doing the installs. I'm used to Microsoft and DEC's VMS/ULTRIX OS installs.

Tom

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Wed Oct 16, 2019 11:47 am

For traces, rounding the corners doesn’t make a lot of difference electrically. A square corner has marginally higher impedance than a rounded or angled corner, but the effect on signals is so small that it’s hard to measure until you get into radio frequencies.

Diagonal traces do use space more efficiently than when you need to run traces in parallel. Multi-trace square corners waste a lot of board space.

The general rules for PCB routing are to keep related components reasonably close to each other so most of the connections are short, then use longer traces for connections between subcircuits. Try to do as much routing on one side as possible, but don’t obsess over it. Most circuits have some group of connections that can’t be made without one trace crossing another.

Complex routing is easy if you get aggressive about using two layers: run traces on the top of the board north/south, and traces on the bottom side east/west. You get a huge number of crossovers (which don’t cause any electrical problems), but it’s easy to find a path from one part of board to another.

Double-sided boards cost more than single-sided when you get them from a board house, and you have to drill and solder every top-to-bottom connection or jumper when you make boards on your on, so crossovers do have their cost. On the other hand, it isn’t cost-effective to spend an hour shuffling traces around to try and avoid five minutes of soldering.

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by tommynar on Mon Oct 28, 2019 3:13 am

So I've resolved that my larger (7cm x 9cm) prototyping boards are just not going to work. I don't know for sure why, I've tried running the cables in exactly the same layout as on the Mega board and it still doesn't work. So I'll give up on that and concentrate on using the mini-CNC to carve my own PC boards. I'll run the traces like you said, diagonal, etc. I'll do cross over traces by hand, so I don't spend a lot of time trying to get double sided boards lined up on the CNC. I haven't used any of the on-line PC board makers because I don't want to have to learn everyone's different drawing programs.

I did find there was a batch of the 3rd party-direct from China-boards that do not work well-even on the Grand Central. So I'll discard them (actually, I use them for making my wooden cases to mount these displays). I don't want to put a bunch of static electricity on a good board.

I've probably soldered about 20 of the Mega boards (burned 5 sending 12V instead of 5V). All of them except for 1 worked perfectly. It had some cold solder joints when I changed solder, I think it was a tin % that I haven't used before and I'm not sure I was using the correct tip temperature on the soldering iron.

Thanks for all of your comments. A lot of times I search other boards for help and some of the moderators are very condescending in their replies. I have a saying I like to tell people: There is always someone who knows more about computers than you, there is always someone who knows less. The one who knows more is likely to be younger than you. I had a 15 year old tell me "you're right, my younger brother figures things out on game xxyyzz that I can't seem to get".

Tom

Please close this thread as resolved.

tommynar
 
Posts: 9
Joined: Sat Jan 19, 2019 1:22 am

Re: ESP32, 64x32 RGB Matrix row 1 dups on row 3

by adafruit_support_mike on Tue Oct 29, 2019 11:43 pm

tommynar wrote:I haven't used any of the on-line PC board makers because I don't want to have to learn everyone's different drawing programs.

You don't need to. There's a common format called 'Gerbers' that any board house should be able to use.

Back in the 1980s and 1990s, board houses used high-quality industrial plotters made by the Gerber company to apply masking to the copper clad, and Gerber files use the format for those plotters. As plotters were replaced by digital methods, the file format hung on, and is still in use today. Pretty much any PCB routing software should be able to generate Gerbers as an output option.

tommynar wrote: A lot of times I search other boards for help and some of the moderators are very condescending in their replies.

Yeah, we're aware of that, and deliberately steer away from it.

Ladyada went to MIT, and was exposed to the healthy culture of shared information that exists there in groups like the Tech Model Railroad Club. She also got a taste of toxic, clique-driven forums online, and decided she never wanted to be part of one. Right from the start, this forum has been dedicated to the idea that everyone has something to learn, and everyone has something to share.

Glad to hear you've got things working. Happy hacking!

adafruit_support_mike
 
Posts: 60685
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.


cron