Welcome! Log In Create A New Profile

Advanced

Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)

Posted by b0ba 
Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 20, 2015 09:09AM
Seems I have made post to the wrong forum and I duplicate it here now.
Link to original post is [forums.reprap.org]
Thanks in advance for any help.
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 20, 2015 10:25AM
I replied in the other section, but here it is again...

Please attach your configuration.h and pins.h files.

Looking at mine, it appears that the encoder pins are defined for REPRAP_DISCOUNT_SMART_CONTROLLER, but not the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

I'm not using either controller, but will take a look...


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 21, 2015 06:15AM
Thanks for your answer. Here you are:

Configuration.h
........................................
//LCD and SD support
//#define ULTRA_LCD  //general LCD support, also 16x2
//#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
#define SDSUPPORT // Enable SD Card Support in Hardware Console
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
//#define ULTIPANEL  //the UltiPanel as on Thingiverse
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click

// The MaKr3d Makr-Panel with graphic controller and SD support
// [reprap.org]
//#define MAKRPANEL

// The RepRapDiscount Smart Controller (white PCcool smiley
// [reprap.org]
//#define REPRAP_DISCOUNT_SMART_CONTROLLER

// The GADGETS3D G3D LCD/SD Controller (blue PCcool smiley
// [reprap.org]
//#define G3D_PANEL

// The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCcool smiley
// [reprap.org]
//
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: [code.google.com]
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

// The RepRapWorld REPRAPWORLD_KEYPAD v1.1
// [reprapworld.com]
//#define REPRAPWORLD_KEYPAD
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click

// The Elefu RA Board Control Panel
// [www.elefu.com]
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARUDINO library folder: [github.com]
//#define RA_CONTROL_PANEL

//automatic expansion
#if defined (MAKRPANEL)
 #define DOGLCD
 #define SDSUPPORT
 #define ULTIPANEL
 #define NEWPANEL
 #define DEFAULT_LCD_CONTRAST 17
#endif

#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
 #define DOGLCD
 #define U8GLIB_ST7920
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif

#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
 #define ULTIPANEL
 #define NEWPANEL
 
 #ifndef ENCODER_PULSES_PER_STEP
   #define ENCODER_PULSES_PER_STEP 1
 #endif

  #ifndef ENCODER_STEPS_PER_MENU_ITEM
    #define ENCODER_STEPS_PER_MENU_ITEM 5
  #endif
#endif
...................................................

pins.h
..............................
#ifdef NEWPANEL
      #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

      #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
        #define BEEPER -1
        //#define BEEPER 37 //TVJ

        #define BTN_EN1 31 //31
        #define BTN_EN2 33 //33
        #define BTN_ENC 35

        #define SDCARDDETECT 49
....................
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 21, 2015 06:24AM
Encoder pins are correct and encoder is working. I have made debug trace with echo fuctions to console.
Here is what I did in ultralcd.cpp

.....................................

SERIAL_ECHO_START;
SERIAL_ECHOPAIR("enc=",(unsigned long)enc);
SERIAL_ECHOLN("");


        switch(enc)
        {
        case encrot0:
            if(lastEncoderBits==encrot3)
                encoderDiff++;
            else if(lastEncoderBits==encrot1)
                encoderDiff--;
            break;
        case encrot1:
            if(lastEncoderBits==encrot0)
                encoderDiff++;
            else if(lastEncoderBits==encrot2)
                encoderDiff--;
            break;
        case encrot2:
            if(lastEncoderBits==encrot1)
                encoderDiff++;
            else if(lastEncoderBits==encrot3)
                encoderDiff--;
            break;
        case encrot3:
            if(lastEncoderBits==encrot2)
                encoderDiff++;
            else if(lastEncoderBits==encrot0)
                encoderDiff--;
            break;
        }
    }
    lastEncoderBits = enc;
}
................................................

I see here 1 and 3 with right rotation of encoder and 3 and 1 with left rotation. I think it is correct. Something wrong with menu switch algorithm.
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 22, 2015 11:40AM
I found, place, where my encoder desabled.
file stepper.cpp has line

void st_init()
{
.................................................
SET_OUTPUT(E1_DIR_PIN);
................................................

Seems pin of entruder E1 conflicts with encoder pins 31 or 33. May be RAMPS has defect, or Aurdino board. Contunue to investigate. but LCD and encoder are working now.

Edited 1 time(s). Last edit at 01/23/2015 11:53AM by b0ba.
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
January 24, 2015 04:39PM
Finally, 33 and 34 had short circuit between. Found very small ball of solder alloy between 56 and 57 contacts of CPU. Problem solved smiling smiley
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
July 20, 2016 09:25AM
I have the same problem, when I put your debug line my board show this:

Connecting...
start
Printer is now online.
echo:Marlin 1.1.0-RC6
echo: Last Updated: 2016-04-24 12:00 | Author: (none, default config)
Compiled: Jul 20 2016
echo: Free Memory: 11390  PlannerBufferBytes: 1168
echo:Hardcoded Default Settings Loaded
echo: Steps per unit:
echo:  M92 X80.00 Y80.00 Z4000.00 E500.00
echo:Maximum feedrates (mm/s):
echo:  M203 X300.00 Y300.00 Z5.00 E25.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X3000 Y3000 Z100 E10000
echo:Accelerations: P=printing, R=retract and T=travel
echo:  M204 P3000.00 R3000.00 T3000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
echo:Home offset (mm):
echo:  M206 X0.00 Y0.00 Z0.00
echo:Material heatup parameters:
echo:  M145 S0 H180 B70 F0
echo:  M145 S1 H240 B110 F0
echo: PID settings:
echo:  M301 P22.20 I1.08 D114.00 C100.00 L20
echo:Filament settings: Disabled
echo:  M200 D3.00
echo:  M200 D0
echo:enc=2
echo: SD card ok

the "enc=2" appear whitout touching anything.

Do you know how can I detect the issue?

Tkz in advance.
Re: Marlin and LCD issue ( FULL_GRAPHIC_SMART_CONTROLLER)
July 20, 2016 09:44PM
Quote
ArielRi
I have the same problem, when I put your debug line my board show this:

Connecting...
start
Printer is now online.
echo:Marlin 1.1.0-RC6
echo: Last Updated: 2016-04-24 12:00 | Author: (none, default config)
Compiled: Jul 20 2016
echo: Free Memory: 11390  PlannerBufferBytes: 1168
echo:Hardcoded Default Settings Loaded
echo: Steps per unit:
echo:  M92 X80.00 Y80.00 Z4000.00 E500.00
echo:Maximum feedrates (mm/s):
echo:  M203 X300.00 Y300.00 Z5.00 E25.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X3000 Y3000 Z100 E10000
echo:Accelerations: P=printing, R=retract and T=travel
echo:  M204 P3000.00 R3000.00 T3000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
echo:Home offset (mm):
echo:  M206 X0.00 Y0.00 Z0.00
echo:Material heatup parameters:
echo:  M145 S0 H180 B70 F0
echo:  M145 S1 H240 B110 F0
echo: PID settings:
echo:  M301 P22.20 I1.08 D114.00 C100.00 L20
echo:Filament settings: Disabled
echo:  M200 D3.00
echo:  M200 D0
echo:enc=2
echo: SD card ok

the "enc=2" appear whitout touching anything.

Do you know how can I detect the issue?

Tkz in advance.

Solved, 2 encoder pins were connected.
Sorry, only registered users may post in this forum.

Click here to login