Welcome! Log In Create A New Profile


Panel buttons don't work

Posted by leadinglights 
Panel buttons don't work
October 21, 2019 06:03AM
The buttons on my control panel either don's work or are unusabley flaky. Pushing the O.K. button may or may not flash the next menu on but only for about a second. On the single occasion that I was able to make a selection, the encoder seemed to work but the other button 'Back' does not work at all. The 20 character by 4 line LCD HD44780 type display works fine.

This panel works with Repetier firmware in the same printer with the same RAMPS controller.

Can anybody tell me where I may look for the solution to this problem

Marlin version 1.1.9
Printer controller: RAMPS1.4/Arduino Mega2560
Printer: Cartesian
Controls: Encoder ALPS 24 detent with NO push switch
Tactile NO push switch

In file Configuration.H I have selected:-


In file pins.RAMPS.h I have modified the pins for NEWPANEL and REPRAP_DISCOUNT_SMART_CONTROLLER as below

// LCD Display input pins

	     #define BTN_BACK		31	// New line **********
	     #define BEEPER_PIN		45	// was 37 **********

	       #define BTN_EN1		17
	       #define BTN_EN2		23
	       #define BTN_EN1		37	// was 31 **********
	       #define BTN_EN2		35	// was 33 **********

	     #define BTN_ENC		33	// was 35 **********
	   //  #define SD_DETECT_PIN	49
	   //  #define KILL_PIN		41

	       #define LCD_BACKLIGHT_PIN 39

Thanks for any assistance,

Re: Panel buttons don't work
October 23, 2019 04:19AM
I came back to looking at this and found the following:-

The back button, assigned pin 31, is floating i.e., the pull up is not set.
The O.K. button, that is the encoder middle button, does have a pull-up and doesn;t show noise on an oscilloscope.
All other connections, the encoder itself, the LCD and SD card work as expected.

Any thoughts, clues, tips or advice?

Re: Panel buttons don't work
October 23, 2019 05:08AM
re BTN_BACK pull up, give this a go.

in ultralcd.cpp is
add this to the end of the above code

Perhaps the BTN_BACK is always active without the pullup so it immediately returns to the main screen, So it just needs the above fix and you might be sorted.

Edited 4 time(s). Last edit at 10/23/2019 09:47AM by Dust.
Re: Panel buttons don't work
October 23, 2019 01:57PM
Thank you Dust, that worked. It is now solid and subcategories can be selected and return works as expected.

As you asked pre-edit to see the circuit diagram I have put it on [drive.google.com]

Many thanks again,

Re: Panel buttons don't work
October 23, 2019 07:02PM
I've created an marlin issue for this, so hopefully future versions of marlin will enable the BTN_BACK pull up as it should

Sorry, only registered users may post in this forum.

Click here to login