GLCD V1.5 not drawing display correctly, no backlight, no temp?

I started this project a few years ago and have only recently got back into it. At the time I purchased two emonGLCD 1.5 displays. I built one of them when I got it and did nothing more with it until now. I had an issue with the display not drawing properly: Bottom half on the top and some stray pixels on RHS. Also no backlight and no temp. Tried another chip - same problem. I’ve just built the second unit to see if I’d stuffed something else up and got the same problems. See pic. I see some of the library files were modifed for a later display so guess it could be something to do with that? Can someone help me find where this issue is please. Cheers in advance.

What do you mean by this - the Atmel ATMega 328P?

I think you are looking at two separate problems.

But first, you say you have two units and both show exactly the same faults? That strongly suggests to me that there’s a problem either with your interpretation of the build instructions (and you copied your earlier mistake) or you have a bad sketch or software library. Or it’s quite possible that you have both.

First, I suggest you reinstall/update the relevant libraries. Note that it’s not sufficient to rename the old ones, if you want to keep copies, zip them and then delete all copies of the library.

The backlight. This is very simply an LED that’s driven by a PWM output pin. To test it, you can use what is little more than a one-line sketch. This should turn the backlight on for 5 s, then off for 5 s.

#include "Arduino.h"

#define BACKLIGHT 3

void setup() {

	pinMode(BACKLIGHT, OUTPUT);
	digitalWrite(BACKLIGHT, HIGH);
}

void loop() 
{ 
	delay(5000);
	digitalWrite(BACKLIGHT, LOW);
	delay(5000);
	digitalWrite(BACKLIGHT, HIGH);
}		

If the backlight does not light, check the voltage across the LED wires (~ 2.8 V) and at the IRQ pad on the PCB (~ 3.2 V).

If the backlight lights, then, because in the Tester sketch it’s driven via the GLCD library, this plus the other symptoms are a strong (but not conclusive) argument for a problem with that library or its installation.

[Edit]
Can we have a sharp clear photo of the PCB (component side) to check your component placement?

@mikealynch,

Related to this rather old library fix here?

It could well be, but that problem has never been reported here before now.

But it doesn’t explain the backlight nor the temperature not working. But it could explain the backlight if your copy of the library is corrupted.

Thanks Robert. I think I might possibly have solved it? I may have installed the wrong library I think. When I originally put together the first display, everything did work OK, but I re-installed libraries again before my recent bout of enthusiasm and have been playing around with sketches, but the library I updated from was this one:

And I think it should have been this one that I found this morning:

I’ll swap that over after work and try it. If it doesn’t fix things I will check as advised and get photo.
Thanks for your help.

Cheers.

Yes, please use glcdlib with emonGLCD.

EmonGLCDlib is for an archive development on emonGLCD SMT V2, I have updated the readme.

Apologies for the confusion. I will soon update the emonglcd repository to use platformio, this will make compiling much easier and practically remove any hassle installing the correct libraries, all will be done automatically. See blog post.

Thanks people. Using the correct library makes it work much better.

1 Like

That’s good to know. I’d not seen that fault reported, so with luck, if it pops up again, I’ll have the answer. :thumbsup:
Have you got the temperature and backlight working now?

Yes Robert. Temp and backlight all going as well. Thanks for your time.