Welcome! Log In Create A New Profile

Advanced

Mod for Reprapdiscount full graphics LCD

Posted by rklauco 
Mod for Reprapdiscount full graphics LCD
December 21, 2016 11:08AM
I made a dirty hack.
I bought the full graphics LCD (128x64 pixels) from china for ~$10.
The display was defective - the contrast was insufficient and it was very difficult to see something.
Luckily I found a way - solder a 230ohm resistor over pins 2 and 3 on top of the interface board - that fixed the contrast issue.
But still, the board had some annoying behaviours.
First of all - the "STOP" button - I did not find it useful. I usually print from OctoPrint, so this is not very usable for me. And once, when the printer was homing and I forgot that I still did not installed the Y endstop, I wanted to use the button to reset the printer, but to no avail - while the printer is moving, the button is simply ignored (Repetier firmware).
And the worst thing - even with the setting for the buzzer disabled, the printer still made (very quiet) sounds when refreshing the display. It was mildly annoying during the day, VERY annoying through the night.
Finally, the backlight was on all the time. Again, annoying in the night.

So, I got to "hacking".
First of all, I de-soldered the piezo from the board. But now I was left with a switching transistor connected to GPIO and having to do nothing.
That got me thinking - I checked the schematics and find out, that the Kathode of the LCD is connected directly to earth pin and the anode has a resistor on it. Little bit of exacto-knife operation separated the pin from the earth connection. One cable to connect it to now free transistor collector and voila - it worked.
By using G-code "M42 P37 S255" I was able to turn the light on and using the same thing but with S0 to turn it off. So far so good.
Next I wanted to modify the useless STOP button to operate the backlight.
I have to state here that I am a terrible programmer and I should not be allowed to code at all smiling smiley
However, using some dirty and nasty hacks I was able to modify the firmware - I injected a small piece of code into the LCD initial routine (the one that displays the logo of Repetier and maker label). This code set the pin to output and set it on - so that the display works right after printer reboot.
Next, I copied and modified the piece of code for user menu - now it reads the status of the pin and sets it to it's negative value.
And, finally, I modified the code for the button called RESET in the firmware (STOP in the schematics) and let it call my dirty routine.
All went well - now, when I reboot the printer, everything works as it did, except when I press the stop button, the only thing that happens is that the backlight goes off. When I press it again, it turns back on.
I am very happy with this hack - I totally encourage anyone to try it - it's worth it!
Sorry, only registered users may post in this forum.

Click here to login