LCD Full smart graphic controller - not working after some time

Hello, i have got ramps 1.4 , 1 extruder heated bed and grapohic controller from reprap discount, the one with sd card reader.

I have flashed arduino with firmware configurated online,no sd support support for full graphic controller enabled.

And i have noticed strange thing. Sometimes everything works fine, and controler lcd shows things fine, sometimes when i do put sdcard works fine, but when i start print from sd, after reboot the lcd is showing total mess.

Printer works but lcd is not showing content correctly,

SOmetimes flashiung marlin and flashing back repetier helps, and after a few reboots problem occures again.

DOes anyone know about issu with full graphic smart controller ?



how to fix it ?

my config is:



#ifndef CONFIGURATION_H
#define CONFIGURATION_H



#define NUM_EXTRUDER 1
#define MOTHERBOARD 33
#include "pins.h"

// ################## EDIT THESE SETTINGS MANUALLY ################
// ################ END MANUAL SETTINGS ##########################

#undef FAN_BOARD_PIN
#define FAN_BOARD_PIN -1
#define BOARD_FAN_SPEED 255
#define FAN_THERMO_PIN -1
#define FAN_THERMO_MIN_PWM 128
#define FAN_THERMO_MAX_PWM 255
#define FAN_THERMO_MIN_TEMP 45
#define FAN_THERMO_MAX_TEMP 60
#define FAN_THERMO_THERMISTOR_PIN -1
#define FAN_THERMO_THERMISTOR_TYPE 1

//#define COMPAT_PRE1
#define BLUETOOTH_SERIAL  -1
#define BLUETOOTH_BAUD  115200
#define MIXING_EXTRUDER 0

#define DRIVE_SYSTEM 0
#define XAXIS_STEPS_PER_MM 200
#define YAXIS_STEPS_PER_MM 200
#define ZAXIS_STEPS_PER_MM 8000
#define EXTRUDER_FAN_COOL_TEMP 50
#define PDM_FOR_EXTRUDER 0
#define PDM_FOR_COOLER 0
#define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20
#define DECOUPLING_TEST_MIN_TEMP_RISE 1
#define KILL_IF_SENSOR_DEFECT 0
#define RETRACT_ON_PAUSE 2
#define PAUSE_START_COMMANDS ""
#define PAUSE_END_COMMANDS ""
#define SHARED_EXTRUDER_HEATER 0
#define EXT0_X_OFFSET 0
#define EXT0_Y_OFFSET 0
#define EXT0_Z_OFFSET 0
#define EXT0_STEPS_PER_MM 500
#define EXT0_TEMPSENSOR_TYPE 1
#define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
#define EXT0_HEATER_PIN HEATER_0_PIN
#define EXT0_STEP_PIN ORIG_E0_STEP_PIN
#define EXT0_DIR_PIN ORIG_E0_DIR_PIN
#define EXT0_INVERSE 1
#define EXT0_ENABLE_PIN ORIG_E0_ENABLE_PIN
#define EXT0_ENABLE_ON 0
#define EXT0_MIRROR_STEPPER 0
#define EXT0_STEP2_PIN ORIG_E0_STEP_PIN
#define EXT0_DIR2_PIN ORIG_E0_DIR_PIN
#define EXT0_INVERSE2 0
#define EXT0_ENABLE2_PIN ORIG_E0_ENABLE_PIN
#define EXT0_MAX_FEEDRATE 50
#define EXT0_MAX_START_FEEDRATE 25
#define EXT0_MAX_ACCELERATION 5000
#define EXT0_HEAT_MANAGER 3
#define EXT0_WATCHPERIOD 1
#define EXT0_PID_INTEGRAL_DRIVE_MAX 230
#define EXT0_PID_INTEGRAL_DRIVE_MIN 40
#define EXT0_PID_PGAIN_OR_DEAD_TIME 7
#define EXT0_PID_I 2
#define EXT0_PID_D 40
#define EXT0_PID_MAX 255
#define EXT0_ADVANCE_K 0
#define EXT0_ADVANCE_L 0
#define EXT0_ADVANCE_BACKLASH_STEPS 0
#define EXT0_WAIT_RETRACT_TEMP 150
#define EXT0_WAIT_RETRACT_UNITS 0
#define EXT0_SELECT_COMMANDS ""
#define EXT0_DESELECT_COMMANDS ""
#define EXT0_EXTRUDER_COOLER_PIN -1
#define EXT0_EXTRUDER_COOLER_SPEED 255
#define EXT0_DECOUPLE_TEST_PERIOD 12000
#define EXT0_JAM_PIN -1
#define EXT0_JAM_PULLUP 0

#define FEATURE_RETRACTION 1
#define AUTORETRACT_ENABLED 0
#define RETRACTION_LENGTH 3
#define RETRACTION_LONG_LENGTH 13
#define RETRACTION_SPEED 40
#define RETRACTION_Z_LIFT 0
#define RETRACTION_UNDO_EXTRA_LENGTH 0
#define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
#define RETRACTION_UNDO_SPEED 20
#define FILAMENTCHANGE_X_POS 0
#define FILAMENTCHANGE_Y_POS 0
#define FILAMENTCHANGE_Z_ADD  2
#define FILAMENTCHANGE_REHOME 0
#define FILAMENTCHANGE_SHORTRETRACT 5
#define FILAMENTCHANGE_LONGRETRACT 50
#define JAM_STEPS 220
#define JAM_SLOWDOWN_STEPS 320
#define JAM_SLOWDOWN_TO 70
#define JAM_ERROR_STEPS 500
#define JAM_MIN_STEPS 10
#define JAM_ACTION 1

#define RETRACT_DURING_HEATUP true
#define PID_CONTROL_RANGE 20
#define SKIP_M109_IF_WITHIN 2
#define SCALE_PID_TO_MAX 1
#define TEMP_HYSTERESIS 0
#define EXTRUDE_MAXLENGTH 160
#define NUM_TEMPS_USERTHERMISTOR0 0
#define USER_THERMISTORTABLE0 {}
#define NUM_TEMPS_USERTHERMISTOR1 0
#define USER_THERMISTORTABLE1 {}
#define NUM_TEMPS_USERTHERMISTOR2 0
#define USER_THERMISTORTABLE2 {}
#define GENERIC_THERM_VREF 5
#define GENERIC_THERM_NUM_ENTRIES 33
#define HEATER_PWM_SPEED 0

#define DEFAULT_PRINTER_MODE 0

// ################ Endstop configuration #####################

#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_X_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_X true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_Y_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Y true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_Z_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Z true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_X false
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Y false
#define ENDSTOP_PULLUP_Z_MAX true
#define ENDSTOP_Z_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Z false
#define max_software_endstop_r true

#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true
#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 2
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_X_BACK_ON_HOME 10
#define ENDSTOP_Y_BACK_ON_HOME 10
#define ENDSTOP_Z_BACK_ON_HOME 10
#define ALWAYS_CHECK_ENDSTOPS 0

// ################# XYZ movements ###################

#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define DISABLE_X 0
#define DISABLE_Y 0
#define DISABLE_Z 0
#define DISABLE_E 0
#define INVERT_X_DIR 0
#define INVERT_Y_DIR 1
#define INVERT_Z_DIR 0
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
#define X_MAX_LENGTH 190
#define Y_MAX_LENGTH 190
#define Z_MAX_LENGTH 170
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define DISTORTION_CORRECTION 0
#define DISTORTION_CORRECTION_POINTS 5
#define DISTORTION_CORRECTION_R 100
#define DISTORTION_PERMANENT 1
#define DISTORTION_UPDATE_FREQUENCY 15
#define DISTORTION_START_DEGRADE 0.5
#define DISTORTION_END_HEIGHT 1
#define DISTORTION_EXTRAPOLATE_CORNERS 0
#define DISTORTION_XMIN 10
#define DISTORTION_YMIN 10
#define DISTORTION_XMAX 190
#define DISTORTION_YMAX 190

// ##########################################################################################
// ##                           Movement settings                                          ##
// ##########################################################################################

#define FEATURE_BABYSTEPPING 1
#define BABYSTEP_MULTIPLICATOR 0

#define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
#define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
#define EXACT_DELTA_MOVES 1

// Delta settings
#define DELTA_HOME_ON_POWER 0

#define DELTASEGMENTS_PER_PRINTLINE 24
#define STEPPER_INACTIVE_TIME 360L
#define MAX_INACTIVE_TIME 0L
#define MAX_FEEDRATE_X 300
#define MAX_FEEDRATE_Y 300
#define MAX_FEEDRATE_Z 2
#define HOMING_FEEDRATE_X 50
#define HOMING_FEEDRATE_Y 50
#define HOMING_FEEDRATE_Z 2
#define HOMING_ORDER HOME_ORDER_XYZ
#define ZHOME_MIN_TEMPERATURE 0
#define ZHOME_HEAT_ALL 1
#define ZHOME_HEAT_HEIGHT 20
#define ZHOME_X_POS 999999
#define ZHOME_Y_POS 999999
#define ENABLE_BACKLASH_COMPENSATION 0
#define X_BACKLASH 0
#define Y_BACKLASH 0
#define Z_BACKLASH 0
#define RAMP_ACCELERATION 1
#define STEPPER_HIGH_DELAY 0
#define DIRECTION_DELAY 0
#define STEP_DOUBLER_FREQUENCY 12000
#define ALLOW_QUADSTEPPING 1
#define DOUBLE_STEP_DELAY 0 // time in microseconds
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 3000
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 3000
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 25
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 3000
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 3000
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 25
#define INTERPOLATE_ACCELERATION_WITH_Z 0
#define ACCELERATION_FACTOR_TOP 100
#define MAX_JERK 20
#define MAX_ZJERK 0.3
#define PRINTLINE_CACHE_SIZE 16
#define MOVE_CACHE_LOW 10
#define LOW_TICKS_PER_MOVE 250000
#define EXTRUDER_SWITCH_XY_SPEED 100
#define DUAL_X_AXIS 0
#define FEATURE_TWO_XSTEPPER 0
#define X2_STEP_PIN   ORIG_E1_STEP_PIN
#define X2_DIR_PIN    ORIG_E1_DIR_PIN
#define X2_ENABLE_PIN ORIG_E1_ENABLE_PIN
#define FEATURE_TWO_YSTEPPER 0
#define Y2_STEP_PIN   ORIG_E1_STEP_PIN
#define Y2_DIR_PIN    ORIG_E1_DIR_PIN
#define Y2_ENABLE_PIN ORIG_E1_ENABLE_PIN
#define FEATURE_TWO_ZSTEPPER 0
#define Z2_STEP_PIN   ORIG_E1_STEP_PIN
#define Z2_DIR_PIN    ORIG_E1_DIR_PIN
#define Z2_ENABLE_PIN ORIG_E1_ENABLE_PIN
#define FEATURE_THREE_ZSTEPPER 0
#define Z3_STEP_PIN   ORIG_E2_STEP_PIN
#define Z3_DIR_PIN    ORIG_E2_DIR_PIN
#define Z3_ENABLE_PIN ORIG_E2_ENABLE_PIN
#define FEATURE_DITTO_PRINTING 0
#define USE_ADVANCE 0
#define ENABLE_QUADRATIC_ADVANCE 0


// ################# Misc. settings ##################

#define BAUDRATE 250000
#define ENABLE_POWER_ON_STARTUP 1
#define POWER_INVERTING 0
#define KILL_METHOD 1
#define ACK_WITH_LINENUMBER 1
#define WAITING_IDENTIFIER "wait"
#define ECHO_ON_EXECUTE 1
#define EEPROM_MODE 1
#undef PS_ON_PIN
#define PS_ON_PIN ORIG_PS_ON_PIN
#define JSON_OUTPUT 0

/* ======== Servos =======

#define FEATURE_SERVO 0
#define SERVO0_PIN 11
#define SERVO1_PIN -1
#define SERVO2_PIN -1
#define SERVO3_PIN -1
#define SERVO0_NEUTRAL_POS  -1
#define SERVO1_NEUTRAL_POS  -1
#define SERVO2_NEUTRAL_POS  -1
#define SERVO3_NEUTRAL_POS  -1
#define UI_SERVO_CONTROL 0
#define FAN_KICKSTART_TIME  200

        #define FEATURE_WATCHDOG 0

// #################### Z-Probing #####################

#define Z_PROBE_Z_OFFSET 0
#define Z_PROBE_Z_OFFSET_MODE 0
#define UI_BED_COATING 1
#define FEATURE_Z_PROBE 0
#define Z_PROBE_BED_DISTANCE 10
#define Z_PROBE_PIN -1
#define Z_PROBE_PULLUP 0
#define Z_PROBE_ON_HIGH 0
#define Z_PROBE_X_OFFSET 0
#define Z_PROBE_Y_OFFSET 0
#define Z_PROBE_WAIT_BEFORE_TEST 0
#define Z_PROBE_SPEED 2
#define Z_PROBE_XY_SPEED 150
#define Z_PROBE_SWITCHING_DISTANCE 1
#define Z_PROBE_REPETITIONS 1
#define Z_PROBE_HEIGHT 40
#define Z_PROBE_START_SCRIPT ""
#define Z_PROBE_FINISHED_SCRIPT ""
#define Z_PROBE_REQUIRES_HEATING 0
#define Z_PROBE_MIN_TEMPERATURE 150
#define FEATURE_AUTOLEVEL 1
#define Z_PROBE_X1 20
#define Z_PROBE_Y1 20
#define Z_PROBE_X2 160
#define Z_PROBE_Y2 20
#define Z_PROBE_X3 100
#define Z_PROBE_Y3 160
#define BED_LEVELING_METHOD 0
#define BED_CORRECTION_METHOD 0
#define BED_LEVELING_GRID_SIZE 5
#define BED_LEVELING_REPETITIONS 5
#define BED_MOTOR_1_X 0
#define BED_MOTOR_1_Y 0
#define BED_MOTOR_2_X 200
#define BED_MOTOR_2_Y 0
#define BED_MOTOR_3_X 100
#define BED_MOTOR_3_Y 200
#define BENDING_CORRECTION_A 0
#define BENDING_CORRECTION_B 0
#define BENDING_CORRECTION_C 0
#define FEATURE_AXISCOMP 0
#define AXISCOMP_TANXY 0
#define AXISCOMP_TANYZ 0
#define AXISCOMP_TANXZ 0

#ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
#define SDSUPPORT 0
#undef SDCARDDETECT
#define SDCARDDETECT -1
#define SDCARDDETECTINVERTED 0
#endif
#define SD_EXTENDED_DIR 1 /** Show extended directory including file length. Don't use this with Pronterface! */
#define SD_RUN_ON_STOP ""
#define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
#define ARC_SUPPORT 1
#define FEATURE_MEMORY_POSITION 0
#define FEATURE_CHECKSUM_FORCED 0
#define FEATURE_FAN_CONTROL 1
#define FEATURE_FAN2_CONTROL 0
#define FEATURE_CONTROLLER 11
#define ADC_KEYPAD_PIN -1
#define LANGUAGE_EN_ACTIVE 1
#define LANGUAGE_DE_ACTIVE 1
#define LANGUAGE_NL_ACTIVE 1
#define LANGUAGE_PT_ACTIVE 1
#define LANGUAGE_IT_ACTIVE 1
#define LANGUAGE_ES_ACTIVE 1
#define LANGUAGE_FI_ACTIVE 1
#define LANGUAGE_SE_ACTIVE 1
#define LANGUAGE_FR_ACTIVE 1
#define LANGUAGE_CZ_ACTIVE 1
#define LANGUAGE_PL_ACTIVE 1
#define LANGUAGE_TR_ACTIVE 1
#define UI_PRINTER_NAME "NANO"
#define UI_PRINTER_COMPANY "SmartControll"
#define UI_PAGES_DURATION 4000
#define UI_ANIMATION 1
#define UI_SPEEDDEPENDENT_POSITIONING 0
#define UI_DISABLE_AUTO_PAGESWITCH 1
#define UI_AUTORETURN_TO_MENU_AFTER 30000
#define FEATURE_UI_KEYS 0
#define UI_ENCODER_SPEED 1
#define UI_REVERSE_ENCODER 1
#define UI_KEY_BOUNCETIME 10
#define UI_KEY_FIRST_REPEAT 500
#define UI_KEY_REDUCE_REPEAT 50
#define UI_KEY_MIN_REPEAT 50
#define FEATURE_BEEPER 0
#define CASE_LIGHTS_PIN -1
#define CASE_LIGHT_DEFAULT_ON 1
#define UI_START_SCREEN_DELAY 1000
#define UI_DYNAMIC_ENCODER_SPEED 1
        /**
Beeper sound definitions for short beeps during key actions
and longer beeps for important actions.
Parameter is delay in microseconds and the secons is the number of repetitions.
Values must be in range 1..255
*/
#define BEEPER_SHORT_SEQUENCE 2,2
#define BEEPER_LONG_SEQUENCE 8,8
#define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
#define UI_SET_PRESET_EXTRUDER_TEMP_PLA   220
#define UI_SET_PRESET_HEATED_BED_TEMP_ABS 110
#define UI_SET_PRESET_EXTRUDER_TEMP_ABS   240
#define UI_SET_MIN_HEATED_BED_TEMP  30
#define UI_SET_MAX_HEATED_BED_TEMP 120
#define UI_SET_MIN_EXTRUDER_TEMP   170
#define UI_SET_MAX_EXTRUDER_TEMP   260
#define UI_SET_EXTRUDER_FEEDRATE 2
#define UI_SET_EXTRUDER_RETRACT_DISTANCE 3


#define NUM_MOTOR_DRIVERS 0



#endif

Comments

  • Sounds like signals to lcd get corrupted. Complete unpowering and restarting should fix it, once it happens. No uploading of different firmwares needed. Typical factors for getting corrupt data is crosstalk if cables touch high current wires like bed/motor or long cables. Bad contacts would be a last reason. As it normally works you already know the firmware is sending data correctly. Firmware continues running as it only sends and does not query data from display. 
  • N37N37
    Posts: 33
    True, but wiring is fine as the board is sitting on desk aside of the prinet as for testing purposes.

    I've noticed that changing arduino board to second one , and connecting the "old" one makes the LCD working again. 

    Today i've had all day working without problems till the momment when i have disconnected the extruder stepper and connected it for testing to the X axis stepper, and "bum" LCD corrupted.

    I do always switch off all power when changing things on ramps.

    And ones again reflashing marlin and flashing back repetier fixes the issue, 

    Disconnectin any of the steppers and connecting it back makes the LCD corrupted again.



    =======


    I'll try to trace the source, i'll put EMP shielding on all wires using aluminium tape and capton tape on aluminium to prevent shorts or something and i'll post the results, if the source of the problem is interference i'll post it. Tommorow i'll get the arduino board with ARM, to check if this is connected with processing power.

    I have got one question relating to my config.

    I cannot run the stepper on extruder 0 or extruder 1 on my ramps 1.4, 

    Also my cooler is not working when connected to D9 on RAMPS 1.4



  • N37N37
    Posts: 33
    Ok, so i have shielded the connection cables from RAMPS to LCD with aluminium foil and than with capton tape.

    And problem was solved solved.

    LCD starded showing fine image.

    But than i wanted to test scenario with disconnecting connector of the stepper. So i have disconnected the stepper and the problem is back . Regardles of everything LCD is corruped again.

    I'm out of my mind.

  • N37N37
    Posts: 33
    I've tested same scenario with marlin firmware, and there is no glitch with LCD, using RC7 and swapping pins and so on, eben on clean not shilded cables without carring about interference and other things you mensioned, on the same hardware without modifications and there is no problem with LCD on ramps plus arduino duo r3 clone.

    Problem is showing only on repetoer o.92 and it stil occures after that on marlin. The solution is to disconnect everything and live it for some time and than LCD works until disconnecting or swapping stepper motor.

    And than even on marlin the problem is the same.

    But when using only marlin there is no problem.


    Maby it is a problem with software, or library that is used for smart controller ?

    No idea here.

    But second thing i want to share, if i use 4 line alphanumeric LCD and separate keypad on the same version of repetier (I do own Renkforce RF 2000) there is no problem with LCD and connecting disconnecting pins and so on.

    So my suggestion is that we should look in to code/bug or computing memory amounts on arduino duo r3 ?

    Tommorow (monday) i'm getting arduino clone based on 

    ATSAM3X8E Cortex-M3 MCU


    And new ramps shield and cables for smart controller, with better quality than the ones i have.

    I'll see if the problem is there too. and i'll post the testing results.

    Thanx for your feedback.
    Any other ideas to solve the problem ?
  • With D9 you have to watch out. By default second extruder and fan use same pin, so you may only use one of them.

    What makes no sense is connecting/disconnecting steppers having an influence. As I understand you mean simply physical removing it. I mean you use different pins for display.

    Marlin and Repetier use same u8glib for communication. The only thing I modified is setting pins which I made faster by using the WRITE macro, but it still gets same commands.
  • N37N37
    edited October 2016 Posts: 33
    I've noticed that, that's why i'm so confused.

    I've been speaking about that problem with my programist, a guy is more .net / mobile than embaded, but he pointed me to not enough memory /processing power as the source of the problem.

    I can eliminate the hardware/connection shielding problems in 100% , because with marlin it works, i've tested the hardware over the night with extensive printing  etc. problem only shows up in repetier, right now 0.92 configured as in my firs post.

    For testing I have doisconnected all external wires, clean board with stepper drivers DRV8825 and phisicaly reconnecting stepper motor connector from the ramps board, let's say from E0 to X gets those LCD problems to show.


    I have got 5 ramps shields from 2 vendors.

    4 arduino MEGA 2560 R3 from 3 different vendors.

    2 RepRapDiscount Full Graphic Smart Controller (red PCB) so genuine.

    Mixing the hardware in many ways has got same results, so it it near to impossible that problems are hardware related.



    and today i have recieved  RobotDyn DUE with Arm M3 ATSAM3X8EA AU.

    The ARM board is clone of Arduino DUE but in very fine condition, well made .
    I cannot test it yet because i cannot program it, some problems with arduino IDE and windows 10 clone assosiated,

    When I make it working we will see if the problem with LCD is related to small hardware resources on MEGA 2560.
    Because on ARM board LCD should work fine if that's the source of problem, i'll post results
     someone have told me that Arduino team is working on "eliminating" clones from supported devices, and in some way cince 1.6.6 they implemented some kind of mechanism that makes hard to get not "genuine" board to work, i do not know if that's true, but i cannot program the board, I'll try to burn the bootloader ones again by my self as fast as i'll find propper programer on my desk
  • N37N37
    Posts: 33
    One last suggestion,


    Those artefacts on GUI are parts of bootlogo and texts with website url and name that should be shown on startup before actual GUI is shown.

    It looks like some parts of memory for graphics is nod cleaned before showing the GUI.

    It might be a problem with that, the lcd is showing parialy home screen and menu, because between those artefacts i do see elemts of home screen and elements of menu when i access it with rotary encoder. I can even navigate and triger proper functions. Just those "artefacts" are not properly refreshed parts of LCD. I thought that might be a damadged LCD controller or so, but "map" / places where those artefacts are is not always the same, and it is really random.

    So maby there is a problem with pointing to a proper range of memory to be erased refreshed when showing gui ?

    I'm not sure but a friend programmer was pointing to that conclusion also.
    Maby it will help with debugging.

    Still fighting with that ARM based board to check the firmware there where we have more resources for prosessing power.
    I'll post if i'll make any progress with that DUE clone.
  • N37N37
    edited October 2016 Posts: 33
    Ok, i know how to "controll" the issue.

    LCD works everything is fine.

    image

    menu works, i can change language... (here i have found bug, bat that's not important now. when you change language the menu is changing to choosen language, but status info on bottom is still in the language you had before, the message is changin to actualy set language only afret reboot, but it is minor problem)


    And now magic, we are rebooting the board by disconnecting the usb cable from host computer, no other connections to the board except of thermistors from extruder and bed.


    and there is the glich on bootscreen and then on home screen (in my opinion time to boot up the board seems to be quite long.


    imageimage


    And now repitable controlable solution to get it back to work.

    Disconecting powersources, leaving for a few hours disconnected from everything does not work, the problem is stil after powering up the board.

    So the only solution, and 100% working time after time is just to disconnect the LCD header from RAMPS while the device is up and running (i know that we should not connect/disconnect peripherials when device is powered, but i was a bit in need of solution so i have tested this scenario.

    Disconnecting the Header is not the only way.you can just disconnect the cables from the lcd side or the header side, and it works . In short words LCD memory is not properly cleaned at the start.

    Looks like closing cleaning procedure before it do what it supposed to at boot time. and the memory is messed up with garbage... 
    Sorry i'm more mobile dev than embaded so i'm just gessing.

    Probably some kind of delay after refresh . so maby bug is in u8glib ?

    Or maby some Call funtion is not working ?.



    image

    Now Im connectin the header back (the board is still connected to power over usb, no reseting needed, no reflashing firmware whatsoever.



    and...

    imageimage


    The LCD is showing again everything as it should, you can access the menu, navigate everything works fine...

    Till nex reboot.

    After reboot you get mess on LCD and you can again disconnect header and connect it again and problem is solved.

    Tested on 4 Arduino Mega 2560 R3, two display modules and i can repeat that with 100%.


    So what disconnecting LCD header while the board is still powered on and connecting back changes that the LCD is back in good shape ?


    Maby some refreshing commands are not implemented correctly in the firmware ?



    And here after reflashing repetier with older version of u8glib for testing.

    image
    The left side of home is on right, and right on left, with artefacts as always, and as before disconnecting lcd and connecting back withowt powering off arduino board helps.

    I'm using 
    Arduino IDE 1.6.12 
    windows pro 10. 
    Arduino MEGA 2560 R3
    RAMPS 1.4
    RepRap Discount Full Graphic Smart Controller
    DRV8825 stepper drivers


    and firmware from online configurator, package with firmware here on my server for download if needed.


    I hope that it helped and we will get a solution for this, for now i'm stopping wit post because we have very long posts without solution. I'm waiting for suggestions.
  • There is no clear display memory. The output is rendered on the arduino and then the complete bitmap is send to display. Since we do not have enough memory this is done in 8 chunks. So every loop we compute 8 pixel lines and send them with software SPI to display. The display memorizes the pixel send until they get overwritten.

    As you see parts of start up logo, it is quite clear that following updates do not update all pixels. Assuming firmware does always create correct image (replugging corrects it so it is still working), the problem must be that spi communication breaks. So have here chip select, mosi pin and clock pin. If one of them gets wrong or bad timing the image gets not transferred correctly. But then parts you can see are at right positions. That might be because there need to be 3 byte transfer per 8 bit, so I guess every byte contains position for the 3rd byte.

    But why does connecting a unpowered motor change how spi is working? And why for you and not my printers. No other user complains. Have you tried a minimal firmware setup - mainly default plus display and nothing else?

    At startup you should have at least 1kb free ram. Log shows free ram. Only with deltas ram is a real issue.
  • N37N37
    Posts: 33
    Forget abot plugging and uplugging motors, as you see on photos, there are no connections to them on pictures and problem still presists. even on "naked" ramps , i have just connected thermistrors to see if LCD shows dynamic data in real time (temperature changes)

    Assuming that plugging and unplugging motors do affect LCD was wrong assumption in order that i have to switch on and off power supply to unplug motors (if I can I always change wiring on unpowered device, that is a good habbit when working with electricity :) )

    So i Assumed that unpluging/switchin motors is a cause of the LCD mess, and when i decided to eliminate all unnecesary connections to trace the source.

    ( I know exactly how annoing is a BUG notification from a user who is saing "hey i've got a bug in my phone, than I ask what kind, and she is saing, no idea it is not working, when I turn it on and off it is working so what is a problem and how do you fix it Mate ? " )

    So step by step i have figured out that problem presists on reboots. but not normal reboots, but on repowering Arduino.


    Because when i reboot the firmware using "STOP" button on That controller it still works fine.

    I do see logo and the GUI is loading properly without any problems.

    That messed up image on LCD only appears when rebooting device by turning off the power, doesnt matter if it is switching off the power supply on printer, or by unplugging USB cable from laptop.


    As I said when I press STOP button on smart controler firmware is reloading and LCD is fine.


    And it must be Repetier related, because on the same hardware i was using marlin from RC branch and from bugfix branch and it works no mather what I do wit powercycles, reseting rebooting.

    But if the problem with LCD is on repetier it can "stay" even if i will flash marlin to the board.

    But if i disconnect LCD and connect it back it is fine, and it stays fine while rebooting and disconnecting power from board.

    So Repetier is a source of that Glitch for sure. 

    I know a bit about that stuff as i'm 36 year old man who works in that kind of envinromant (software houses, hardware design, and bug tracing day by day) it's pitty that i'm starting my journey in embadded world , because i would like to help with the solution by my self, but i do not have much expierience yet and day by day i'm learning.

    Sorry for my english do better speak than write. :)

    So what solution do you suggest ?


    I do see a post here:

    and there is a mension about refreshing the lcd content, where can i experiment wit that and how to enable it in firmware (i do not trust much "online cinfigurators" sorry it is a old habbit if i do see the code i can understand it if i only witch menu options than it is harder to imagine the whole dependencies. So point to the file to mess with would be good point to start.
  • N37N37
    Posts: 33
    The problem is important for me, because I do plan to start production of printers before end of this year. Right nowe we have already prototypes ready from lasercutting i'm putting them tougether from pieces and adjusting things before final production.

    We are thinking about working with you guys and offering addons with OEM repetier server licences, and so on...
    The minimal setup is assuming using the "big LCD" :) with repetier firmware, as I'm happy with that firmware on my RF2000 (not in 100% because pause print is not working for example) but i do know that it is already fixed)

    Normaly i would choose firmware that "just works" and this is marlin as testing shows, especialy with that freaking Full graphic smart controler, i have even thought about using some OLED wit 1306 controller as it could be easyly supported.

    I just like the repetier functions and I would like to stick to one line of host/server/firmware just to make things simple for future.

    We are working on the printer based on ARM controler also, so we could help with testing in future.
    For now we just need to have working repetier version without LCD problems.

    I can Use 20x4 LCD , but i do not want. I want this big blue LCD that I have already :)


  • Ok, so to summerize if you unpower it fails. If you then unplug lcd and reconnect it works, right?

    So why would it work if we skip any initialization and does not work with?

    I had a closer look at u8g lib and compared it with Marlin. Marlin has rewritten the driver to get faster communication while I have improved the send byte function. Marlin did even distinguish different boards, also I do not understand why the same display needs different timings for different boards. It also looks like initialization differs a bit with Marlin essentially giving it a bit more time.

    Could you test the marlin timings? Go in u8glib_ex.h line 2488 which looks like this:
    static const uint8_t u8g_dev_st7920_128x64_init_seq[] PROGMEM = {
      U8G_ESC_CS(0),             /* disable chip */
      U8G_ESC_ADR(0),           /* instruction mode */
      U8G_ESC_RST(15),           /* do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
      U8G_ESC_DLY(100),         /* 8 Dez 2012: additional delay 100 ms because of reset*/
      U8G_ESC_CS(1),             /* enable chip */
      U8G_ESC_DLY(50),         /* delay 50 ms */

      0x038,                                /* 8 Bit interface (DL=1), basic instruction set (RE=0) */
      0x00c,                                /* display on, cursor & blink off; 0x08: all off */
      0x006,                                /* Entry mode: Cursor move to right ,DDRAM address counter (AC) plus 1, no shift */
      0x002,                                /* disable scroll, enable CGRAM adress */
      0x001,                                /* clear RAM, needs 1.6 ms */
      U8G_ESC_DLY(100),               /* delay 100 ms */

      U8G_ESC_CS(0),             /* disable chip */
      U8G_ESC_END                /* end of sequence */
    };

    and set the first
    U8G_ESC_DLY(100), 
    to 
    U8G_ESC_DLY(120), 

    That would be the timing marlin is using.

    Are you using long wires so that it takes a bit longer?
  • N37N37
    edited November 2016 Posts: 33
    I've tested range from 100 to 150 and only difference is that when I flashed the firmware at first time with 120 after reboot (reboot after flashing, not unpluging the powersource) LCD was fine, but it might be similar to usung STOP button.

    But nothing changed, the problem presists in the same shape.

    I have got connection wires (RAMPS <==>LCD) in two variants, i've tested on 15 cm and 30 cm, in both cases the same results, bug is still there.
  • N37N37
    edited November 2016 Posts: 33

    One more thing.

    When I do not unplug LCD connector from RAMPS and flash the Marlin  firmware on the repetier when the problem is active the LCD has got same problem with marlin on board.

    Problem ends with power reboot, and is not comming back (still marlin onboard)

    So:

    Flashing Repetier unblugging powerand rebooting = Problems with image on LCD

    Flashing then Marlin without disconecting power or disconecting LCD header before to fix LCD = Problems with LCD even with marlin flashed.

    Then rebooting board by disconnecting power (in my case USB) (marlin onboard) = No problem with LCD and MArlin works evry boot/ reboot/ power off/power on.


    SO now flashing back repetier, and when the firmware is flashed and rebooted the LCD works fine, no problems with repetier GUI .

    Now powering the board off by disconecting USB, and powering back by connecting USB  and LCD has got old issue.

    And that can be done endless times. So it is repetable in 100%.



    It looks like the problem is only when starting the board after disconecting it from powersource.
    Simple reloading firmware eg. when you use STOP button on controller or when you are flashing firmware from marlin to repetier gives fine working LCD without issue.

    Also, when repetier is actual firmware, and after reboot when the wroblem is active, when i disconnect LCD cable as described before and when it starts working fine, and then when I flash the repetier ones again and just firmware reloads/reboots after flashing the LCD is fine too.

    JUst disconecting/connectoing powersource makes the problem to show again.


    So only problem presists when unpowering board and powering back.


    What alse can I check for You ?


  • N37N37
    Posts: 33
    I was trying to test as much scenarios as I can to hep You find the differences.
  • N37N37
    Posts: 33
    Ok, so problem is solved a bit I think.

    I have downloaded firmware from configurator where i have just enabled the smart graphic controller.
    No other changes.

    And LCD works, and works fine over reboots.
    Works fine over power off and power on.

    So it must be a problem in configuration i wanted to have.

    I will start enabling things one per firmware and test it.

    I have hope, that i will find this way the source of LCD problems.

    I will post my results.

    DId you try to flash the firmware according to my setting in the same setup arduino ramps and lcd ?


    mabe You will find the problems in configuration.h faster than I.

    But as clean firmware works fine we are in hope that the problem is not a major bug, and might be not a bug at all...
  • N37N37
    edited November 2016 Posts: 33
    Ok, so I have made full configuration with same settings than before.
    I have configured everything I need right now, but i have made no changes in:

    [milliseconds]
    [milliseconds]

    And firmware works fine and LCD works fine, even over the reboots.

    Is it possible that changing those things from default was causing the problems  ?

    I just feel stupid. it's impossible that both of us could not see that at start.
    I'll be testing the firmware over the night

    Strange thing, configuration for Yaxis (this is Prusai3) is working different now.
    Homing works fine on x and Y but Z is very slow, like 1 step or 2 steps per second, but configuration file is set to differen amount.
    Srange, LCD stared working now steppers have got wrong timings, im starting to be a bit prustrated.

    What should be the valu for y axus when used m5 treated rods with 0,8 standard spacing, when steppers 1.8" 200 steps per rotation are using microstepping 1/32 ?

    200x32/0.8= 6400/0.8= 8000 ?
    Because i use that value and it was fine til 30 minutes ago.
  • Absolute speed limit is 40000hz so with 8000 steps per mm your max. speed is 5mm/s. But you should stay away a bit from this especially with glcd display.

    Look also into eeprom settings with all these switches if the steps per mm is set there correctly.
  • N37N37
    edited November 2016 Posts: 33
    I'm sorry for my frustration.

    I'm glad that LCD is working.

    I have traced the Z axis moving problems to the EEPROM.

    I was using EEPROM set1 and 2 , and those values are now messed up.

    Firmware has got by default values set in EEPROM, and is ignoring the configuration in configuration.h when flashing back "preconfigured firmware.


    Question:

    How can I clear EPROM1 and EPROM2 ?

    Is there a menu entry to clear EEPROM ?
    Because i see read from EPROM and Save to eprom but i can not see "clear EEPROM"

    That should definitely help.

  • N37N37
    edited November 2016 Posts: 33
    Hello,

    Printer works,

    X, Y, Z, works fine.

    Heated bed heats up to proper temp
    Extruder also.

    But i cannot get the extruder 0 fan to work.

    I have got  1 extruder heater and it is connected to D10 (works fine)

    one heatewd bed, connected to D8 (works fine)

    And fan on D9 (configured as extruder 1 in configuration toll) <== is it right ?

    Or if not, please advise what pin in online configuration tool should i Use , and where is the connector on RAMPS 1.4 relative to that pin you advise.

    That will close the problems with beta configuration.

    waiting for your adivise.
  • We have only one EEPROM set. EEPROM_MODE determines if we overwrite eeprom or not. Changing mode between uploads puts new values to eeprom, same keeps them.
    M502
    M500
    would also copy configuration.h values to eeprom.

    And fan on D9 (configured as extruder 1 in configuration toll) <== is it right ?
    What does that mean?
    D9 may be used by extruder 1 (0 is first extruder) heater, normal fan (M106/M107 controlled) or cooler fan. As soon as you assign more then one function to that pin, you will not get what you expect as several functions modify pin as needed. So watch out with that. Not sure what exactly you did from this.
  • N37N37
    Posts: 33
    i have definied only one extruder (extruder 0) and i use D10 connector on RAMPS 1.4 as extruder heater, so it is default configuration for that setup.

    Heated bed uses D8 in my configuration so it is also default setup.

    So D9 connector is not used at all by any hardware right now.

    I need a etruder fan (fan that is cooling the extruder radiator. And i have set in configuration tool that this fan  exactly extruder cooler pin that as i understand defines the fan for cooling extruder 0 that it should use Heater 2 normaly used for extruder 1, so I understand that this is D9 on RAMPS 1.4.

    and it is not working.

    That pin is not defined for any other accesroy than the fan.

    That's why i was asking about is it right to do what I have done, and if not or if different aproach is better then to what pin should I rediret the output to run the extruder fan.

    The board is fine, electronics are working fine. so no idea why that configuration is not working.




  • Make sure you have fan support disabled in features. That also uses D9 to control the fan. Also note that you can not explicitly control cooler can defined in extruder setup. That one is enabled by extruder temperature.
  • N37N37
    edited November 2016 Posts: 33
    " Also note that you can not explicitly control cooler can defined in extruder setup"

    That was my case.

    I assumed that setting the fan speed in % in menu wil override the automatization of fan.
    I thought that if I will set 25% manually in menu it will start spinning the fan 25% of ful speed regardless of the extruder heater temperature and power timing.

    That info should be added somewhere to claryfy the usage of that menu setting as it is not clear (i'm not so clever after all to gess the assumption properly :] )

    Fan works fine when extruder heats up. Just on cold run it was not working even when i set the let's say 25% manually for testing purposes, I've had wrong understanding of manual percentage setting in menu. I thought that it will be kind of force usage of fan regardless of the actual need (temperature)

    So now i understand the philosophy and it works fine according to the implementation of that function logic you described. So no prolem here. My fault. :)
  • Extruder cooler are a different thing then filament cooler. The first is for extruders needing a short cooling zone, the latter for fast cooling of filament extruder (PLA) which is also the one controlled in speed. Speed should be adjusted to fialment type and temperature.
  • N37N37
    edited November 2016 Posts: 33
    Ok, that makes the things crystal clear.

    So last one fast question, what is the FAN1 and FAN2 PIN in default configuration of repetier assigned ?

    Exactly where on board i can find that FAN1 pin ? *assuming default configuration using webconfig)

    And I have had same  LCD "glitch" when i have enabled the EEPROM in firmware and beeper at the same time.
    The beeper was beeping in loop and lcd was flickering.
    Disabling beeper helped, now everything works fine besides the beeper (not necessary for me so i'm not bothering with that problem now, but just pointing to potential bug.

    I'll post firmware and config after testing at the end of the week because next 3 days i'm away from the office on meetings.


  • For RAMPS fan pin is D9, second fan is not preset at all. But you can always use the digitalpin number directly if unsure.
  • edited February 19 Posts: 0
    Same issue here today with "TriGorilla" board (RAMPS compatible) and LCD2004A.
    After some minute during printing the LCD start to show random characters, and after other minutes appear two square files and nothing else, but the printer work fine with USB.
    After this event the display stops working forever, even turning off and on the power supply.
    If I try to be welded with the soldering iron again the EXP1 pin on the board the display back to work but I notice that the EEPROM parameters have been cleared, now I don't know if due to possible electrostatic discharges caused by hot solder.
    I rewrite my parameters, and after some minutes of printing same issue.
    Now it would be nice to understand why this happens, if it is caused by continuous eeprom writings or other.

    https://www.facebook.com/photo.php?fbid=10210412969432220&l=93a51cbcea
  • You mean AVR eeprom? Why should that change if display does not display correctly, so maybe in deed during soldering. Our rules for resetting eeprom is clear - eeprom mode different or checksum doe snot match any more so any changed bit would cause a reset. The display errors are just from wrong signals and then when flow is out of sync new data gets wrong meaning as it is at wrong position. I have one where it gets out of sync when bed cable comes too close. That is already enough. Also cable length and many factors can have influence.
Sign In or Register to comment.