NodeMcu + DMD2 + P10 panels = Low Brightness

Hi,

I tried my first nodemcu + dmd2 combination for the very first time. It all seems to work well, but… The brightness is VERY low…

I have used it with a DUE before, which is also 3volts, so I hope that’s not it

I tested with the original controller and it burns my brain indoors, so the power and leds are ok.

It is a little bit brighter than without the external power, so that’s connected.

It displays what’s supposed to display, so I have no idea…

Here;s how the code looks, please help! :wink:
Thank you!

// copied from Control LED Screen Panel with Wemos d1 mini | by Tharindu Darshana Peiris | Medium

#include <SPI.h>
#include <DMD2.h>
#include <fonts/Arial14.h>

/*P10 led pannel pins to ESP 8266
A D0
B D6
CLK D5
SCK D3
R D7
NOE D8
GND GND
*/

int i = 0;
const uint8_t *FONT = Arial14;

SPIDMD dmd(2, 1); // Number of P10 panels used X, Y // change the “SPIDMD”, this is very important to change this ESP8266 module
DMD_TextBox box(dmd, -4, 0, 32, 16); // x, y change text posistion [ Set Box (dmd, x, y, Height, Width)]
const char *MESSAGE = “ABCD”;

void setup() {
Serial.begin(11500);

dmd.setBrightness(255); // Set brightness 0–255
dmd.selectFont(FONT); // Font used
dmd.begin();
}
void loop() {
scrolling();
}
void scrolling() {
const char *next = MESSAGE;
while (*next) {
dmd.clearScreen();// clear screen
if (i != 0) {
box.print(*next); //print the led pannel
}
i++;
delay(800); // letters speed changing
next++;
}
}

Hi, I am working with the same configuration and I have the same problem and some others:

1.- While working with the original DMD2 library and the examples it gives low brightness

  • If you just need high brightness you can put the nOE pin that is supposed to go to the D8 to Vcc.

2.- When trying to control the brightness the display speeds up the letters making it unreadable.

  • Tried fixing the PWM frequency (Don't know why I just run out of ideas) and didn't work.

3.- I have also tried cascading (If that word exists) 3 P10 Displays and I get wrong dots turning on in the second and third Displays, this didn't happen with the DMD library using arduino uno.

The Library is not fully tested it's a beta version. I can find some mistakes in the implementation, for example in the docs says that AnalogWrite uses goes up to 1023 (16 bits) for the ESP8266 and the library is using only 8 bits (up to 255) (Link 1) without any kind of conversion, I'm not sure about this one but it also seems that the nOE and the sck pins are mixed in the documentation and therefore in the library maybe causing the low brightness, I don't have a oscilloscope to test it.

I can't solve the issues yet but the easy solution is not to spend to much time on this one and go back to using Arduino uno to control the P10 using the DMD library and add a ESP8266 for the wifi communication

Let's see if somebody else has a solution.

Link 1==>> Reference — ESP8266 Arduino Core 3.0.1-1-g421d02ee documentation

I am using ESP8266(NodeMCU) with this code, and it seems to be working fine, including the brightness. My display has 4 panels linked.

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

#include <SPI.h>
#include <DMD2.h>
#include <fonts/Arial14.h>

/*

const char MAIN_page PROGMEM = R"=====(

Matrix Display Controller

Enter Text : )=====";

//SSID and Password of your WiFi router
const char* ssid = “B708B”;
const char* password = “pelasaco”;

ESP8266WebServer server(80); //Server on port 80

// Set Width and Hight to the number of displays you have
const int WIDTH = 4;
const int HIGHT = 1;

const uint8_t *FONT = Arial14;

/*
Pin Defination
nOE - GPIO5
A - GPIO16
B - GPIO2
CLK - GPIO14
SCLK - GPIO12
r/Data - GPIO13
*/

SPIDMD dmd(WIDTH , HIGHT, 5, 16, 2, 12); // DMD controls the entire display
DMD_TextBox box(dmd); // “box” provides a text box to automatically write to/scroll the display
char MESSAGE[255]; //Store the message

void handleRoot() {
String s = MAIN_page; //Read HTML contents
server.send(200, “text/html”, s); //Send web page
}

void handleForm() {
String msg = server.arg(“msg”);
int msg_len = msg.length() + 1;
MESSAGE[msg_len];
msg.toCharArray(MESSAGE, msg_len);

String s = MAIN_page;
server.send(200, “text/html”, s);
Scroll();
}

void Scroll(){
const char *next = MESSAGE;
while(*next) {
Serial.print(*next);
box.print(*next);
delay(200);
next++;
}
}

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

WiFi.begin(ssid, password); //Connect to your WiFi router
Serial.println("");

// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

//If connection successful show IP address in serial monitor
Serial.println("");
Serial.print("Connected to ");
Serial.println(“WiFi”);
Serial.print("IP address: ");
Serial.println(WiFi.localIP()); //IP address assigned to your ESP

server.on("/", handleRoot); //Which routine to handle at root location
server.on("/action_page", handleForm); //form action is handled here

server.begin(); //Start server
//Serial.println(“HTTP server started”);
dmd.setBrightness(255);
dmd.selectFont(FONT);
dmd.begin();
}

void loop(void){
server.handleClient(); //Handle client requests
}

Haha, I was looking for another issue and I found my post and didn't even realize it, I was trying my own code :wink:

Anyway, I didn't get notices and I didn't know there were replies.

The answer for me was to tie the PWM to the 3.3v output pin and it worked fine. I even managed to power 2 panels from a USB power bank for hours in daylight.

However, when I tried it a second time with a second display the light was really low so I put the PWM on the 5v and it worked fine, but it was drawing too much power from the power bank and it only worked with mains power, good enough.

And I tried again with a panel with SMD leds, and it works, kind of, the LEDs that are supposed to be off are still like 5% on, and I can't fix it. This one doesn't work at all unless I connect the PWM to 5v.

It is really annoying so I ordered another panel. I was told by someone in the LED business that the implementations differ significantly from manufacturer to manufacturer...

Fun,
Dan