Tag Archives: Panelolu

LCD and Encoder controls (Panelolu) – – – – – – – Part 1, Software

I’d like to first thank the people over at think3dprint3d.com for all the hard work they’ve done in providing most of the work in connecting an LCD and encoder to the PrintrBoard. I’m re-posting this information using the code that works for my PrintrBoard I use on my MendelMax. If this helps you with your machine then please leave a comment.

This code should work with any PrintrBoard connected to either a MendelMax, Printrbot or any 3D printer where you’re using Marlin firmware.

This post has 2 parts, this, the Software part and part 2, the Hardware part which will show the wiring diagrams for the LCD and controls.

The examples given will be using the latest version (at the time of writing) of the Marlin firmware.  Download it HERE

You must first prepare the files Configuration.h and pins.h within the firmware to access the LCD and encoder.

Configuration.h

line 48-50

#ifndef MOTHERBOARD
  #define MOTHERBOARD 81
#endif

line 78-81

#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 -1
#define TEMP_SENSOR_BED 1

line 216-218

const bool X_ENDSTOPS_INVERTING = false; //set to true to invert the logic of the endstops
const bool Y_ENDSTOPS_INVERTING = false; //set to true to invert the logic of the endstops
const bool Z_ENDSTOPS_INVERTING = false; //set to true to invert the logic of the endstops

line 275 – Obviously change these values to your own printers configuration.

#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200*8/3,760*1.1}

line 279-283 – Not necessary but I like to slow down the acceleration for less ringing when changing direction.

#define DEFAULT_ACCELERATION 1500 //X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 //X, Y, Z and E max acceleration in mm/s^2 for r retracts
#define DEFAULT_XYJERK 12.0

line 302-307

//LCD and SD support
//#define ULTRA_LCD //general lcd support, also 16x2
#define SDSUPPORT // Enable SD Card Support in Hardware Console
#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
//#define ULTIPANEL //the ultipanel as on thingiverse
pins.h

line 961

#define FAN_PIN            22  // Fan

line 973 – To enable SD card support you must move the Y-endstop to the E-endstop pins (see previous post)

#define Y_STOP_PIN         37

line 989-994

#ifndef SDSUPPORT
  // these pins are defined in the SD library if building with SD support
    #define SCK_PIN          21  // 9
    #define MISO_PIN         22  //11
    #define MOSI_PIN         23  //10
  #endif

line 995 add the following

#ifdef ULTRA_LCD
 #ifdef NEWPANEL
  //we have no buzzer installed
  #define BEEPER -1
  //LCD Pins
  #define LCD_PINS_RS        41
  #define LCD_PINS_ENABLE    1
  #define LCD_PINS_D4        11
  #define LCD_PINS_D5        9
  #define LCD_PINS_D6        6
  #define LCD_PINS_D7        4

  //The encoder and click button
  #define BTN_EN1 2  //must be a hardware interrupt pin
  #define BTN_EN2 3  //must be hardware interrupt pin
  #define BTN_ENC 0  //the click

  //not connected to a pin currently
  #define SDCARDDETECT -1

  //from the same bit in the RAMPS Newpanel define
  //encoder rotation values
  #define encrot0 0
  #define encrot1 2
  #define encrot2 3
  #define encrot3 1

  #define BLEN_C 2
  #define BLEN_B 1
  #define BLEN_A 0
 #endif //Newpanel
#endif //ULTRA_LCD

Upload this firmware to your PrintrBoard (how-to).

Once updated restart your PrintrBoard. If you have the LCD connected then it should display data about your printer. If you haven’t connected the LCD to your PrintrBoard yet then it’s worth attempting to connect your computer to the PrintrBoard to make sure everything is still working correctly.

Advertisements
Tagged , , , ,

It’s a Post-PC world

It talks

Whilst I was waiting for printer parts to arrive I’ve been playing around trying to get a display and encoder to work with my chosen printer control board, the Printrboard.  The Printrboard was designed to be used with the Printrbot but isn’t limited to it.

Fortunately very shortly after I purchase the Panelolu kit Tony who builds the kits had written a post about interfacing with the Printrboard.  Unfortunately in his haste to tell the world there were a few pin & code errors found and after a few emails back and to the LCD displayed data from the Printrboard. SUCCESS!

There is a MicroSD slot built on to the Printrboard where you can load G-Code using the rotary encoder and the display and print without an attached computer.

Tagged , ,