Welcome! Log In Create A New Profile

Advanced

Mega 2560 with Ramps 1.6 and 128LCD

Posted by bkarpuz 
Mega 2560 with Ramps 1.6 and 128LCD
May 12, 2023 03:12AM
Dear friends, I a trying to learn operating with the kit below.
  • Arduino Mega 2560
  • Ramps 1.6
  • Drv 8825
  • Nema 17 (17HS4401)
  • LCD 128x64 with SDCard
  • Marlin
  • Pronterface
I need your help in this direction.
Problem 1.
I can install Marlin 2.1.2 (current release at the moment) and connect to Arduino Mega 2560 with Ramps 1.6 with Pronterface.
I have set the vref for my Drv 8825s to 0.60 and then connect my drivers and Nema 17s to Ramps 1.6.
After connecting with Pronterface I use G1 X10 Y10 without any problems (motors run very smooth).
However, when I use the +x (or -x) and +y (or -y) buttons on the navigation panel of Pronterface,
Nema 17s does not run but they buzz. After this, G1 X30 Y30 does not work just make Nema 17s buzz.
Do you think DRV 8828s are set wrongly or what can it be?
This is my first problem.
Problem 2.
I have plugged Arduino Mega 2560,Ramps 1.6 and LCD 128*64, and installed the library u8glib.
Then, using the setting in u8glib
U8GLIB_ST7920_128X64_1X u8g(23, 17, 16); // SPI Com: SCK = en = 23, MOSI = rw = 17, CS = di = 16
I can play the examples on the library u8glib (see [1]).
But when I enable the LCD settings in Marlin with the pin settings
#define ST7920_CLK_PIN  23
#define ST7920_DAT_PIN  17
#define ST7920_CS_PIN   16
I am not able to see anything on the screen (see [1]).
This is my second problem.

I would be very glad if you can help me in this direction.


As a note, I have managed working with the following combination previously.
  • Arduino Uno
  • CNC Shield
  • Drv8825
  • Nema 17 (17HS4401)
  • GRBL
  • Pronterface



References
  1. [www.youtube.com]
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 12, 2023 04:29AM
Problem 1:

You have not updated #define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
to fit your hardware. these are the max feedrates each axis can do on your hardware

so you at the will of the previously set feedrate.

If its to high, you buzz instead of moving.
With these set the max feedrate is capped to the provided value.

Problem 2:

you don't just set those pins.. without setting a display type marlin will not setup a display

Enable a ST7920 based lcd such as CR10_STOCKDISPLAY (no sd card)

then set

#define LCD_PINS_RS 16 // CS = di = 16
#define LCD_PINS_EN 17 // MOSI = rw = 17
#define LCD_PINS_D4 23 // SCK = en = 23

you will also need

BEEPER_PIN (can be set to -1)
BTN_EN1
BTN_EN2
BTN_ENC

If you want the sdcard you need to use REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
and you need all the sdcard pins also

Edited 3 time(s). Last edit at 05/12/2023 04:44AM by Dust.
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 14, 2023 04:27AM
Dust, thank you very much for your answer.
Problem 1.
I have buzzing with the default values (#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }) without the jumpers for the x-axis and y-axis drivers.
When I plug the jumpers, I do not have any buzzing.
Probably, this relates to your explanation.
How can I determine the parameters for DEFAULT_MAX_FEEDRATE (in the file Configuration.h) for my Nema 17 (17HS4401).
Is it try and trial or is there a mathematical computation?

Problem 2.
I have activated the following lines in Configuration.h.
// Zonestar OLED 128×64 Full Graphics Controller
//
#define ZONESTAR_12864LCD           // Graphical (DOGM) with ST7920 controller
Then, I am able to run the screen with your directions but I did not do anything with the BEEPER_PIN.
Where can I find it? Is it in the file pins_RAMPS.h?

To give further details, I would like to share picture of my screen below.

Thank you very much.
bkarpuz
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 14, 2023 07:38AM
That display is a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER clone not a ZONESTAR_12864LCD
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 15, 2023 04:04AM
Quote
Dust
That display is a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER clone not a ZONESTAR_12864LCD
This worked for me.

Quote
bkarpuz
Problem 1.
How can I determine the parameters for DEFAULT_MAX_FEEDRATE (in the file Configuration.h) for my Nema 17 (17HS4401).
Is it try and trial or is there a mathematical computation?
Do you have any answer for this one?

Thank you.
bkarpuz
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 15, 2023 06:09AM
Trial and error

You set the values high in firmware

The you use simple gcode eg G1 X100 F{number}

You you back and forward trying larger numbers till it is no longer reliably moves. You then set slightly smaller number in the firmware.

Edited 1 time(s). Last edit at 05/15/2023 06:10AM by Dust.
Re: Mega 2560 with Ramps 1.6 and 128LCD
May 20, 2023 06:28PM
Quote
Dust
Trial and error

You set the values high in firmware

The you use simple gcode eg G1 X100 F{number}

You you back and forward trying larger numbers till it is no longer reliably moves. You then set slightly smaller number in the firmware.

Dust, Thank you very much for your guidence.
bkarpuz
Sorry, only registered users may post in this forum.

Click here to login