How to use RepRapDiscount Smart Controller

Is there any possibility to use RepRapDiscount Smart Controller without the use of Marlin FirmWare.

Sure. It is just a 4x20 LCD.

Below I attached Lcd screen like this,

When you say "like this" do you mean similar to or is that an picture of your actual display? Does the backlight light up?

This is how my OUTPUT like this. Sorry for the image I upload in #7.

Do the black white boxes show up when you adjust the contrast pot?

I suggest that you confirm the wiring between Mega pins and the actual pins on the LCD with an Ohmmeter. I mean is there continuity between pin 16 of the Mega and pin 4 of the LCD, Mega 17 to LCD pin 6, etc?

Do the black boxes show up when you adjust the contrast pot?

I suggest that you confirm the wiring between Mega pins and the actual pins on the LCD with an Ohmmeter. I mean is there continuity between pin 16 of the Mega and pin 4 of the LCD, Mega 17 to LCD pin 6, etc?

Thank you for providing a screen solution. Now I get a Result in my LCD screen like this.

But it will not display result what I expected. Below I attached my program that I upload to Arduino Mega board,

#include<LiquidCrystal.h>
LiquidCrystal lcd(16, 17, 23, 25, 27, 29);

void setup() {
  lcd.begin(20, 4);
  lcd.print("HELLO");
}

void loop() {

}

That is encouraging. Did you try adjusting the contrast pot again after the white boxes showed up?

The backlight LED is lighting up so I guess you have Pin 9 (Ground) and Pin 10 (Vcc) correct but the picture isn't clear enough to be sure the other six wires are correct. Have you double-checked them against the schematic? It appears you are using a grey wire for Ground and a black wire for +5v.

That would make the two rows:

2 4 6 8 10
Encoder 5 LCD-RS LCD-D5 LCD-D7 VCC
1 3 5 7 9
Buzzer LCD-E LCD-D4 LCD-D6 Ground

That is encouraging. Did you try adjusting the contrast pot again after the white boxes showed up?

@groundFungus, Thanks for your reply.

I adjust the contrast pot it will make changes in LCD display but I did not the output.

The backlight LED is lighting up so I guess you have Pin 9 (Ground) and Pin 10 (Vcc) correct but the picture isn't clear enough to be sure the other six wires are correct. Have you double-checked them against the schematic? It appears you are using a grey wire for Ground and a black wire for +5v.

@johnwasser, Thanks for your response.

I verify the pin configuration I did not get any changes in my output.

Still I am getting this output only.

Is there any other library needed for to access this reprapdiscount smart controller?

Not sure if the OP has made any progress on this in the last 3 months, but I'm interested in doing something this as well. I have a few of these controllers, and a use for them that doesn't involve 3D printing, so I have zero need for the Marlin firmware, though if need be, I CAN use a RAMPS shield to connect it. (Seems unnecessary, but I have at least 2 spare RAMPS shields as well.)

My requirements are to be able to use the 20 by 4 text output and to be able to read the rotary encoder, encoder pushbutton, and possibly the reset button. SD card write access isn't a must for this, but would be a huge bonus if I can do it.

(For those who care what the end result will be)

The idea is that I'll be using the Arduino with a couple of MAX6675 sensors to read a pair of type K thermocouples to monitor my car's exhaust gas and coolant temperature at the turbocharger, along with the output of a wideband O2 sensor, MAP sensor, and a few of the on-board ECU's diagnostic outputs for things like fuel trim compensation, injector duty cycle, vehicle speed sensor and airflow meter to get various performance metrics. If I can use the SD card slot as well, this would be used for logging the data for later analysis. If I don't get the SD card, that's fine, I can pump it out via a serial connection to a laptop for data collection.

So looking at the schematics for the 2004 controller adapter and the RAMPS 1.4...

The schematics connect the pins (Assuming Arduino Mega 2560)

EXP1:
Mega    CON     Mega
37      1  2      35
17      3  4      16
23      5  6      25
27      7  8      29
GND     9 10      48

EXP2:
Mega    CON     Mega
49      1  2      NC
31      3  4      52
33      5  6      50
+5V     7  8      41
NC      9 10      NC

For whatever good it does, this will be how the controller is connected to the Arduino via the RAMPS as far as the Marlin firmware is expecting. At least in this configuration we might be able to examine the Marlin code as far as pin diagrams go.

This is probably more connection than it needs to use the display and encoder, as it also includes the connections to the SD card reader, but I do note that it only shows ground being connected to EXP1 and +5V connected to EXP2. (Well, I didn't look too closely at the functions of the other pins on the Arduino.)

Hopefully I've read the diagrams correctly.

As I had said, I'm not 100% averse to installing a sacrificial RAMPS shield for a proof of concept, but that's not a good log-term solution, and certainly not if I end up making more of them for other people.

I'm reasonably certain that this controller will produce an aestheticly pleasing and reasonably intuitive UI for what my purposes, which is one of the reasons that I'd like to use it.

Checking to see if you had any further progress. I too am interested in a non 3d use of this controller.

I don't get were your problem is ?

All is documented ...

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(20, 4);
  // Print a message to the LCD.
  lcd.print("1st row");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print("2nd row");
  lcd.setCursor(0, 2);
  lcd.print("3rd row");
  lcd.setCursor(0, 3);
  lcd.print("4th row");
}


Just connect the pins to the holes on the connector

Hi,
Witch Arduino output with connector pin?

Thanks.

bjean238:
Hi,
Witch Arduino output with connector pin?

Thanks.

According to posted image and example:

//EXP1      Arduino
// 3        D11
// 4        D12
// 5        D5
// 6        D4
// 7        D3 
// 8        D2
// 9        GND
//10        5V

This worked for me.

Hi all. Reviving this old thread because I, too, am having trouble getting mega 2560+ramps 1.4+reprap discount smart controller to work. I'm running Arduino 1.8.9 with Windows 10.

controller is RepRapDiscount Smart Controller - RepRap
My setup includes the adapter shield and looks like: Imgur: The magic of the Internet

my test is:

#define BEEPER             37
#define LCD_PINS_RS        16
#define LCD_PINS_ENABLE    17
#define LCD_PINS_D4        23
#define LCD_PINS_D5        25
#define LCD_PINS_D6        27
#define LCD_PINS_D7        29

// Encoder rotation values
#define BTN_EN1            31
#define BTN_EN2            33
#define BTN_ENC            35

// SD card settings
#define SDPOWER            -1
#define SDSS               53
#define SDCARDDETECT       49

#define KILL_PIN           41

#define LCD_HEIGHT         4
#define LCD_WIDTH          20

#include <LiquidCrystal.h>

LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7);

void setup() {
  lcd.begin(LCD_WIDTH, LCD_HEIGHT);
  lcd.display();
  lcd.noCursor();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Hello, World!");

  pinMode(BEEPER,OUTPUT);
  digitalWrite(BEEPER,HIGH);
  delay(100);
  digitalWrite(BEEPER,LOW);
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
}

for some reason the lights don't even come on and I never hear the expected beep.
When i use the exact same pins with Marlin, everything works.
I just can't see what I've missed. Contrast dial is not the issue. swapping out hardware makes no diff. I know the panel works

SupraGuy:
So looking at the schematics for the 2004 controller adapter and the RAMPS 1.4...

The schematics connect the pins (Assuming Arduino Mega 2560)

EXP1:

Mega    CON     Mega
37      1  2      35
17      3  4      16
23      5  6      25
27      7  8      29
GND     9 10      48

EXP2:
Mega    CON     Mega
49      1  2      NC
31      3  4      52
33      5  6      50
+5V     7  8      41
NC      9 10      NC

Something is wrong here. According to the schematic of the RepRap Discount Smart Controller this would source VCC from Pin 48 and connect the SD Card Detect switch to VCC.

EXP1:
1	37	Beeper
2	35	BC111E5244B2 Encoder Pin 5
3	17	LCD-Enable (Pin 6)
4	16	LCD-RS (Pin 4)
5	23	LCD-D4 (Pin 11)
6	25	LCD-D5 (Pin 12)
7	27	LCD-D6 (Pin 13)
8	29	LCD-D7 (Pin 14)
9	GND	Ground
10	48	VCC ?!?


EXP2 (a.k.a. JP3):
1	49	SD-Card MISO
2	NC	SD-Card SCK
3	31	BC111E5244B2 Encoder Pin 3
4	52	SD-Card SS
5	33	BC111E5244B2 Encoder Pin 1
6	50	SD-Card MOSI
7	+5V	SD-Detect
8	41	Reset button to Ground
9	NC	NC
10	NC	NC

I think I see the problem. In the schematic for the Smart Controller adapter board I think they got the AUX-3 (SPI) connector rotated 180 degrees so the numbering doesn't match the numbering on the RAMPS 1.4 schematic.

LCD Adapter schematic shows AUX-3 connections as:

1	NC		2	GND
3	D53		4	SCK
5	MOSI    	6	MISO
7	D43		8	VCC

The RAMPS 1.4 schematic shows AUX-3 connections as:

1	VCC		2	D49
3	D50(MISO)	4	D51(MOSI)
5	D52(SCK)	6	D53(SS)
7	GND		8	NC
RepRap Discount Smart Controller Schematic
https://reprap.org/mediawiki/images/7/70/Controller_final_reprapdiscount.pdf


EXP1:
1	Beeper
2	BC111E5244B2 Encoder Pin 5
3	LCD-Enable (Pin 6)
4	LCD-RS (Pin 4)
5	LCD-D4 (Pin 11)
6	LCD-D5 (Pin 12)
7	LCD-D6 (Pin 13)
8	LCD-D7 (Pin 14)
9	GND
10	VCC


EXP2 (labeled JP3 on the schematic):
1	SD-Card MISO
2	SD-Card SCK
3	BC111E5244B2 Encoder Pin 3
4	SD-Card SS
5	BC111E5244B2 Encoder Pin 1
6	SD-Card MOSI
7	SD-Detect
8	Button to Ground labeled RESET
9	NC
10	NC


RAMPS 1.4 schematic showing AUX-3 and AUX-4 connectors 
where the adapter board is connected:


https://reprap.org/mediawiki/images/f/f6/RAMPS1.4schematic.png


AUX-3 SPI (4x2):
1	VCC
2	D49
3	D50(MISO)
4	D51(MOSI)
5	D52(SCK)
6	D53(SS)
7	GND
8	nc


AUX-4 (18x1):


1	VCC
2	GND
3	D32
4	D47
5	D45
6	D43
7	D41
8	D39
9	D37
10	D35
11	D33
12	D31
13	D29
14	D27
15	D25
16	D23
17	D17
18	D16






RAMPS 1.4 LCD Adapter Schematic showing the connections 
between EXP1/EXP2 and AUX-3/AUX-4
https://reprap.org/mediawiki/images/7/79/LCD_connect_SCHDOC.pdf


WARNING! The AUX-3 pins are numbered differently on this 
schematic than on the RAMPS 1.4 schematic! 


LCD Adapter schematic shows AUX-3 connections as:
1	NC		2	GND
3	D53		4	SCK
5	MOSI	6	MISO
7	D43		8	VCC


The RAMPS 1.4 schematic shows AUX-3 connections as:
1	VCC			2	D49
3	D50(MISO)	4	D51(MOSI)
5	D52(SCK)  	6	D53(SS)
7	GND			8	NC


If you believe the labels or the pin numbers the schematic makes no sense:


AUX-3 (4x2):
1	nc			EXP1-9	GND
2	GND			nc 
3	D53(SS)		EXP2-2	SD-Card SCK
4	D52(SCK)  	EXP2-4	SD-Card SS
5	D51(MOSI)	EXP2-1	SD-Card MISO
6	D52(MIS0)	EXP2-6	SD-Card MOSI
7	D43			EXP1-10	VCC
8	5V			EXP2-7	SD-Detect


If you ignore the labels and the pin numbers on this schematic
and use the numbering from the RAMPS 1.4 schematic, you get this:


AUX-3 (4x2):
1	VCC			EXP1-10	VCC
2	D49			EXP2-7	SD-Detect
3	D50(MISO)	EXP2-1	SD-Card MISO
4	D51(MOSI)	EXP2-6	SD-Card MOSI
5	D52(SCK)  	EXP2-2	SD-Card SCK
6	D53(SS)		EXP2-4	SD-Card SS
7	GND			EXP1-9	GND
8	nc			nc


The AUX-4 looks correct.
AUX-4 (18x1):
1	VCC	nc
2	GND	nc
3	D32	nc
4	D47	nc
5	D45	nc
6	D43	nc
7	D41	EXP2-8	Button to Ground labeled RESET
8	D39	nc
9	D37	EXP1-1	Beeper
10	D35	EXP1-2	BC111E5244B2 Encoder Pin 5
11	D33	EXP2-5	BC111E5244B2 Encoder Pin 1
12	D31	EXP2-3	BC111E5244B2 Encoder Pin 3
13	D29	EXP1-8	LCD-D7 (Pin 14)
14	D27	EXP1-7	LCD-D6 (Pin 13)
15	D25	EXP1-6	LCD-D5 (Pin 12)
16	D23	EXP1-5	LCD-D4 (Pin 11)
17	D17	EXP1-3	LCD-Enable (Pin 6)
18	D16	EXP1-4	LCD-RS (Pin 4)


AUX-3 (4x2):
1	VCC			EXP1-10	VCC
2	D49			EXP2-7	SD-Detect
3	D50(MISO)	EXP2-1	SD-Card MISO
4	D51(MOSI)	EXP2-6	SD-Card MOSI
5	D52(SCK)  	EXP2-2	SD-Card SCK
6	D53(SS)		EXP2-4	SD-Card SS
7	GND			EXP1-9	GND
8	nc			nc

Hello, I'm currently working on a project using the REPRAPDISCOUNT smart controller. The project requires me to write information to an SD card and I am having trouble getting it to initialize. I'm assuming this has to do with the pin layout. Can someone here tell me how to redefine the each pin for the SD card? I know I need "#define" and then the name of the pin but I'm not sure how to do it on the smart controller.

aggrav8d:
Hi all. Reviving this old thread because I, too, am having trouble getting mega 2560+ramps 1.4+reprap discount smart controller to work. I'm running Arduino 1.8.9 with Windows 10.

controller is RepRapDiscount Smart Controller - RepRap
My setup includes the adapter shield and looks like: Imgur: The magic of the Internet

my test is:

#define BEEPER             37

#define LCD_PINS_RS        16
#define LCD_PINS_ENABLE    17
#define LCD_PINS_D4        23
#define LCD_PINS_D5        25
#define LCD_PINS_D6        27
#define LCD_PINS_D7        29

// Encoder rotation values
#define BTN_EN1            31
#define BTN_EN2            33
#define BTN_ENC            35

// SD card settings
#define SDPOWER            -1
#define SDSS              53
#define SDCARDDETECT      49

#define KILL_PIN          41

#define LCD_HEIGHT        4
#define LCD_WIDTH          20

#include <LiquidCrystal.h>

LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7);

void setup() {
  lcd.begin(LCD_WIDTH, LCD_HEIGHT);
  lcd.display();
  lcd.noCursor();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Hello, World!");

pinMode(BEEPER,OUTPUT);
  digitalWrite(BEEPER,HIGH);
  delay(100);
  digitalWrite(BEEPER,LOW);
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
}




for some reason the lights don't even come on and I never hear the expected beep.
When i use the exact same pins with Marlin, everything works.
I just can't see what I've missed. Contrast dial is not the issue. swapping out hardware makes no diff. I know the panel works

Hi
I just uploaded your code and it's working fine. bip and Hello word, but your board is not looking as this one RepRapDiscount Smart Controller - RepRap

1 Like