Setup RepRapDiscount Full Graphic Smart Controller LCD with RADDS on Arduino DUE and Repetier Firmware
After spending several days trying methods I found on various sites, I gave up and decided to put to work my electronics skills.
So, here it is the setup which worked for me on the following configuration:
- RepRapDiscount Full Graphic Smart Controller (12864)
- Arduino DUE with RADDS
- Repetier firmware (current version 0.92.9)
Making the cables requires 4 connectors (only 2 if you don’t need to use the SD Card reader on the back of the display) and two pieces of cable (again, only one if the SD Card reader is not used). Why not use the SD Card reader? Because RADDS already has one which you can use. But is your choice.
For the connections, I used two cables: one for the display and one for the card reader. Note that the one for the card reader alone will not work because the display/card reader is powered through the EXP1 connector.
Note that the flat ribbon cable, like the ones which you got with the display, might have noise issues which can cause:
– the display shows nothing
– the display shows only garbage
– the display works partially and partially shows garbage
– the beeper makes random noises
– the card reader detects the card but nothing more
– the card reader shows only the first few files
– the card reader works randomly
The solution to this is to use shielded cable. A piece of an older serial cable (9+1) will work just fine.
Note: As mentioned in the comments, using 1k resistors in the 3-6, 4-5, 5-7 connection points will solve the noise issues.
The display connector includes the beeper and the rotary encoder while the card connector includes the reset button.
So, wiring only the display connector will make usable the display itself, the rotary encoder and the beeper.
Here is the wiring for the cables:
You can buy the PCB for this adapter or the full adapter kit here.
Now, for the Repetier firmware configuration the following changes are needed:
1. In the Repetier.h file, at the end of the controller definitions (the ones starting with CONTROLER_) add the following line:
#define CONTROLLER_REPRAPDISCOUNT_12864_MOCANU_ADAPTER 25
For the current version that would be after line 163.
2. In the Configuration.h, search for #define FEATURE_CONTROLLER and set the value to 25, like this:
#define FEATURE_CONTROLLER 25
If there is no line for FEATURE_CONTROLLER, you can add it.
3. In the ui.h file, just after the last FEATURE_CONTROLLER definition (line 2027 for the current version), add our own controller definition like this:
#if FEATURE_CONTROLLER == CONTROLLER_REPRAPDISCOUNT_12864_MOCANU_ADAPTER #if MOTHERBOARD != 402 #error This config only works with RADDS motherboard! #endif #define UI_DISPLAY_CHARSET 3 #define UI_DISPLAY_TYPE 5 #define U8GLIB_ST7920 #define UI_LCD_WIDTH 128 #define UI_LCD_HEIGHT 64 //select font size #define UI_FONT_6X10 #define UI_FONT_WIDTH 6 #define UI_FONT_HEIGHT 10 #define UI_FONT_SMALL_HEIGHT 7 #define UI_FONT_DEFAULT repetier_6x10 #define UI_FONT_SMALL repetier_5x7 #define UI_FONT_SMALL_WIDTH 5 #undef UI_ANIMATION #define UI_ANIMATION 0 #define UI_DELAYPERCHAR 50 #define UI_HAS_KEYS 1 #define UI_HAS_BACK_KEY 0 #define UI_INVERT_MENU_DIRECTION 0 #define UI_HAS_I2C_ENCODER 0 #define UI_ENCODER_SPEED 2 #define UI_COLS (UI_LCD_WIDTH/UI_FONT_WIDTH) #define UI_ROWS (UI_LCD_HEIGHT/UI_FONT_HEIGHT) #define UI_DISPLAY_D0_PIN -1 #define UI_DISPLAY_D1_PIN -1 #define UI_DISPLAY_D2_PIN -1 #define UI_DISPLAY_D3_PIN -1 #define UI_DISPLAY_D5_PIN -1 #define UI_DISPLAY_D6_PIN -1 #define UI_DISPLAY_D7_PIN -1 #define UI_DISPLAY_RS_PIN 44 #define UI_DISPLAY_RW_PIN -1 #define UI_DISPLAY_ENABLE_PIN 45 #define UI_DISPLAY_D4_PIN 46 #define UI_ENCODER_A 52 #define UI_ENCODER_B 50 #define UI_ENCODER_CLICK 48 // #define FEATURE_BEEPER 1 should be set in Configuration.h for the beeper to work #define BEEPER_TYPE 1 #define BEEPER_PIN 41 #undef SDSS #define SDSS 10 #ifdef UI_MAIN void uiInitKeys() { UI_KEYS_INIT_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); UI_KEYS_INIT_BUTTON_LOW(UI_ENCODER_CLICK); } void uiCheckKeys(uint16_t &action) { UI_KEYS_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); UI_KEYS_BUTTON_LOW(UI_ENCODER_CLICK, UI_ACTION_OK); } inline void uiCheckSlowEncoder() {} void uiCheckSlowKeys(uint16_t &action) {} #endif #endif // CONTROLLER_REPRAPDISCOUNT_12864_MOCANU_ADAPTER
Now upload and enjoy.
5 thoughts on “Setup RepRapDiscount Full Graphic Smart Controller LCD with RADDS on Arduino DUE and Repetier Firmware”
Leave a Reply
You must be logged in to post a comment.
I can’t thank you enough for making the effort to share this information.
Nothing else I’ve tried worked except this solution !!!
It is unclear if the uiconfig.h has to be edited and what display type should be set (it has 5 in mine) but it worked like that for me .. for now the stop/reset button does nothing, but I didn’t wire the SD card connector and maybe it needs a definition – I am sure it will work too, display was the most important thing and it worked great thanks to you!
Again – thank you 1000 times !!
Hi,
I’m glad it helped you.
The entire display definition is done in the ui.h file. No need to change uiconfig.h
Regarding the reset button and the encoder, for them to work you need to wire the SD Card connector. That is because on the display connector (EXP1) is wired the push of the rotary encoder and on the SD Card connector (EXP2) are wired the left/right rotations and the reset button. So, if you didn’t wire the SD Card connector, you should have only the push functionality of the rotary encoder working, no reset and no rotation.
Well, today created a shielded cable and it is not working anymore .. I am 100% sure it is correctly soldered and all connections are fine, but I can’t make it work anymore – it shows garbage and that’s it. I can’t believe it is THAT prone to noise, there must be something else I am missing ..
To add to my previous comment – I resolved the problem by adding 1k resistors in series to the LCD_(EN,RS,4) lines – 3-6,4-5,5-7 connection points in your pinout must be connected not directly, but trough a 1k resistor. Seems that the level shifter they used to translate the 3.3v logic of due to 5v logic of display (TXB0106) oscilates and introduces bad noise on the line.
[…] a follow up to the post regarding setting up the RepRapDiscount graphic display to work on a RADDS board and an Arduino…, I’ve made an adapter that will not require any special cable. It works with normal flat […]