Browse Source

Add Einstart-S support (#11219)

Indeed the HAL does not need to be mucked around with to expose ATmega2560 pins not available as numbers on the MEGA board, I'll need to update the wiki with that tidbit and a reference to the pin-mapping comment in `fastio_1280.h`.
pull/1/head
Lee Olivares 6 years ago
committed by Scott Lahteine
parent
commit
094e6d81a5
  1. 1945
      Marlin/src/config/examples/Einstart-S/Configuration.h
  2. 1728
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  3. 152
      Marlin/src/config/examples/Einstart-S/readme.md
  4. 1
      Marlin/src/core/boards.h
  5. 12
      Marlin/src/inc/Conditionals_LCD.h
  6. 2
      Marlin/src/lcd/thermistornames.h
  7. 3
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  8. 98
      Marlin/src/module/thermistor/thermistor_666.h
  9. 5
      Marlin/src/module/thermistor/thermistors.h
  10. 2
      Marlin/src/pins/pins.h
  11. 122
      Marlin/src/pins/pins_EINSTART-S.h

1945
Marlin/src/config/examples/Einstart-S/Configuration.h

File diff suppressed because it is too large

1728
Marlin/src/config/examples/Einstart-S/Configuration_adv.h

File diff suppressed because it is too large

152
Marlin/src/config/examples/Einstart-S/readme.md

@ -0,0 +1,152 @@
## Einstart S Machine Notes
The Einstart S is a commercial machine that ships with a proprietary firmware and "licensed" slicer program which requires the original SD card or license file (.lic/.reg) from support in order to function. The impetus for the port was that I acquired the machine on the weekend when tech support was closed.
## Specifications:
- Powder coated, formed steel enclosure
- Machined Aluminum internal axis support frame
- Genuine matched HIWIN rails on all axis
- Genuine Minebea NEMA17 motors (200 steps/rev)
- THC7128 3A Stepper Drivers (configured for 16 microsteps, loud)
- 160x160 magnetically coupled non-heated bed
- PLA Only Direct Drive extruder
- SH1106 OLED Display w/ Cardinal navigation
- 9533 I2C PWM RGB LED Chassis illumination
- Onboard SD-Card Support
## Initial modifications
### Bootloader/Marlin installation
This machine probably doesn't ship with the arduino boot loader, so unless you reflow a 2560 on there to replace the atmega1280 like I did (to preserve the original firmware), you'll need to use ISP to do an initial firmware load and/or bootloader flash!
It's not that bad though, you can just buy an ISP programmer with the appropriate header, or build an ISP programmer using the Arduino ISP sketch (wiring is easier if you use the "old style wiring" which utilizes the following pinout: (see the comments in the ArduinoISP sketch).
I used an arduino Nano and a header I had lying around, but you could do the same with a nano and some dupont headers cut and soldered to the board, and taped/glued into a header.
Triple check your pinouts, it shouldn't fry if connected backwards but if your pinout is wrong you're going to struggle for sure.
#### ArduinoISP Sketch pinout for 10pin ISP header using "old style wiring":
See the comments in the ArduinoISP sketch under File:Examples:ArduinoISP
1 MOSI D11
2 5v Vcc
3 N/C
4 GND
5 RES D10
6 N/C
7 SCK D13
8 N/C
9 MISO D12
10 GND GND
#### Einstart Motherboard ISP Header Pinout
The 10 pin ISP Header is located to the right of the ATMEGA chip, just above the long LCD header.
#### ISP Diagram
<--- Face of chassis
MOSI ( 1 ) ( 2 ) Vcc
N/C ( 3 ) ( 4 ) GND
RST ( 5 ) ( 6 ) GND
SCK ( 7 ) ( 8 ) GND
MISO ( 9 ) (10 ) GND
Component Plugs --->
### Motherboard Diagram
|1234|1234|1234|1234|12|12|12|12|12|12|12|12|12|12|123|12|1234|
---------------------------------------------------------------
| XMOT YMOT ZMOT EMOT EF HB HE PF ZS YS XS PS BT ET PT1 TC VBRG |
| ===== ====== [DC|
|====== ====== ____ ISP IC1__ ___|
| |1280| ::::: | | |USB|
| |____| 1 |__| |___|
| BUTTON |SD |
| GDLRUO LCD |___|
|________________________[......][....................]_________|
Legend:
XMOT X-Motor
YMOT Y-Motor
ZMOT Z-Motor
EMOT E-Motor
EF Extruder Fan
HB Heated Bed (PWM)
HE Hot End (PWM)
PF Part Fan (PWM)
ZS Z-Endstop (Max)
YS Y-Endstop (Min)
XS X-Endstop (Min)
PS SPST Switch to enable DC 24v
BT Bed Thermistor (header not populated)
ET Extruder Thermistor
PT1 PT100 Thermocouple (not populated)
TC Thermocouple (not populated)
VBRG LED Output from PCA5933
BUTTONS
G GND (buttons are pulled low on activation)
D DOWN
L LEFT
R RIGHT
U UP
O OK (MIDDLE)
## Uploading Marlin firmware to a stock Einstart S
### Summary:
Make, buy or steal a 10 pin ISP programmer and select the appropriate programmer option via Tools:Programmer in Arduino IDE, use the Sketch:Upload Using Programmer command or Shift-Ctrl-U (vs Ctrl-U to upload via serial).
### Detailed procedure:
You can either load Marlin directly via ISP programmer (easiest, but requires opening the chassis every time you want to change/update firmware) or, just program the bootloader which will enable later uploads via USB. HOWEVER, to actually upload the sketch you will need one of the following:
- ISP programming header (ArduinoISP sketch, pinout below)
- OR
- Install bootloader on atmega1280 to enable native USB uploads (also requires ISP).
- AND
- Connect button between RESET and GND on ISP header, release post compile just before upload starts.
- OR
- Install permanent modification described below, requires no button press during upload.
### Permanent modification to enable USB uploads via Arduino IDE
As a permanent modification to enable direct USB upload from the arduino IDE, you would need to flash the boot loader using ISP first; but then you can solder a wire or 100n capacaitor between the DTR line on the FTDI to the reset line, which is conveniently located in several places on the board.
#### FTDI Chip Diagram (IC1)
______
TXD --|1 28|--OSCO
DTR --|2 27|--OSCI
RTS --|3 26|--TEST
VCCIO--|4 25|--AGND
RXD --|5 24|--N/C
RI --|6 23|--CBUS0
GND --|7 22|--CBUS1
N/C --|8 21|--GND
DSR --|9 20|--Vcc
DCD --|10 19|--RES
CTS --|11 18|--GND
CBUS4--|12 17|--3V3
CBUS2--|13 16|--USBDM
CBUS3--|14 15|--USBDP
|______|
#### Arduino Reset Circuit
DTR-----||----GND----/\/\/\/----Vcc
100nf 10k
With this modification you no longer need the reset button and you can program directly from the Arduino IDE.
### Power notes during flashing.
You do NOT need power connected when flashing via ISP.
You DO need power when flashing via USB Serial but you MUST time the release of the reset line to allow the upload unless you've performed the permanent modification.

1
Marlin/src/core/boards.h

@ -104,6 +104,7 @@
#define BOARD_SCOOVO_X9H 321 // abee Scoovo X9H
#define BOARD_GT2560_REV_A 74 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)
#define BOARD_EINSTART_S 666 // Einstart retrofit
//
// ATmega1281, ATmega2561

12
Marlin/src/inc/Conditionals_LCD.h

@ -201,6 +201,18 @@
#endif
#endif
/**
* SPI PANELS
*/
// Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
#if ENABLED(U8GLIB_SH1106_EINSTART)
#define ULTRA_LCD
#define DOGLCD
#define ULTIPANEL
#define NEWPANEL
#endif
/**
* I2C PANELS
*/

2
Marlin/src/lcd/thermistornames.h

@ -94,6 +94,8 @@
#define THERMISTOR_NAME "PT100 4K7"
#elif THERMISTOR_ID == 110
#define THERMISTOR_NAME "PT100 1K"
#elif THERMISTOR_ID == 666
#define THERMISTOR_NAME "Einstart S"
// High Temperature thermistors
#elif THERMISTOR_ID == 66

3
Marlin/src/lcd/ultralcd_impl_DOGM.h

@ -181,6 +181,9 @@
// The MINIPanel display
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_MINI12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
#elif ENABLED(U8GLIB_SH1106_EINSTART)
// Connected via motherboard header
U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS);
#else
// for regular DOGM128 display with HW-SPI
//U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 // 8 stripes

98
Marlin/src/module/thermistor/thermistor_666.h

@ -0,0 +1,98 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* This file was generated by tltgen on Thu Jul 5 15:46:43 2018.
* tltgen was created by Pieter Agten (pieter.agten@gmail.com).
*/
//#include "output_table.h"
/*
* Parameters:
* A: -0.000480634
* B: 0.00031362
* C: -2.03978e-07
*/
#define NUMTEMPS 61
const short temptable_666[NUMTEMPS][2] PROGMEM = {
{ OV( 1), 794 },
{ OV( 18), 288 },
{ OV( 35), 234 },
{ OV( 52), 207 },
{ OV( 69), 189 },
{ OV( 86), 176 },
{ OV(103), 166 },
{ OV(120), 157 },
{ OV(137) ,150 },
{ OV(154), 144 },
{ OV(172), 138 },
{ OV(189), 134 },
{ OV(206), 129 },
{ OV(223), 125 },
{ OV(240), 121 },
{ OV(257), 118 },
{ OV(274), 115 },
{ OV(291), 112 },
{ OV(308), 109 },
{ OV(325), 106 },
{ OV(342), 103 },
{ OV(359), 101 },
{ OV(376), 99 },
{ OV(393), 96 },
{ OV(410), 94 },
{ OV(427), 92 },
{ OV(444), 90 },
{ OV(461), 88 },
{ OV(478), 86 },
{ OV(495), 84 },
{ OV(512), 82 },
{ OV(530), 80 },
{ OV(547), 78 },
{ OV(564), 76 },
{ OV(581), 74 },
{ OV(598), 72 },
{ OV(615), 70 },
{ OV(632), 68 },
{ OV(649), 67 },
{ OV(666), 65 },
{ OV(683), 63 },
{ OV(700), 61 },
{ OV(717), 59 },
{ OV(734), 57 },
{ OV(751), 55 },
{ OV(768), 53 },
{ OV(785), 51 },
{ OV(802), 49 },
{ OV(819), 47 },
{ OV(836), 44 },
{ OV(853), 42 },
{ OV(871), 39 },
{ OV(888), 37 },
{ OV(905), 34 },
{ OV(922), 30 },
{ OV(939), 27 },
{ OV(956), 23 },
{ OV(973), 18 },
{ OV(990), 11 },
{ OV(1007), 2 },
{ OV(1023),-25 }
};

5
Marlin/src/module/thermistor/thermistors.h

@ -100,7 +100,7 @@
#if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Maker's Tool Works Kapton Bed"
#include "thermistor_60.h"
#endif
#if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5 MOhm, Pull-up = 4.7 kOhm, "DyzeDesign 500 °C Thermistor"
#if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5 MOhm, Pull-up = 4.7 kOhm, "DyzeDesign 500 °C Thermistor"
#include "thermistor_66.h"
#endif
#if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100 kOhm, Pull-up = 4.7 kOhm, "Personal calibration for Makibox hot bed"
@ -118,6 +118,9 @@
#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup
#include "thermistor_147.h"
#endif
#if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)"
#include "thermistor_666.h"
#endif
#if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup
#include "thermistor_1010.h"
#endif

2
Marlin/src/pins/pins.h

@ -183,6 +183,8 @@
#include "pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
#elif MB(GT2560_REV_A_PLUS)
#include "pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
#elif MB(EINSTART_S)
#include "pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
//
// ATmega1281, ATmega2561

122
Marlin/src/pins/pins_EINSTART-S.h

@ -0,0 +1,122 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Einstart S pin assignments
* PCB Silkscreen: 3DPrinterCon_v3.5
*/
#if ENABLED(TARGET_LPC1768)
#error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
#elif defined(__STM32F1__)
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#if DISABLED(IS_RAMPS_SMART) && DISABLED(IS_RAMPS_DUO) && DISABLED(IS_RAMPS4DUE) && DISABLED(TARGET_LPC1768)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
#endif
#endif
#ifndef BOARD_NAME
#define BOARD_NAME "EINSTART_S"
#endif
//
// Limit Switches
//
#define X_STOP_PIN 44 // 2560 PIN 40
#define Y_STOP_PIN 43 // 2560 PIN 41
#define Z_STOP_PIN 42 // 2560 PIN 42
//
// Steppers
//
#define X_STEP_PIN 76 // 2560 PIN 68
#define X_DIR_PIN 75 // 2560 PIN 67
#define X_ENABLE_PIN 73 // 2560 PIN 66
#define Y_STEP_PIN 31 // 2560 PIN 59
#define Y_DIR_PIN 32 // 2560 PIN 58
#define Y_ENABLE_PIN 72 // 2560 PIN 65
#define Z_STEP_PIN 34 // 2560 PIN 56
#define Z_DIR_PIN 35 // 2560 PIN 55
#define Z_ENABLE_PIN 33 // 2560 PIN 57
#define E0_STEP_PIN 36 // 2560 PIN 54
#define E0_DIR_PIN 37 // 2560 PIN 53
#define E0_ENABLE_PIN 30 // 2560 PIN 60
//
// Temperature Sensors
//
#define TEMP_0_PIN 0 // Analog Input
#define TEMP_BED_PIN 1 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 83 // 2560 PIN 49
#define HEATER_BED_PIN 38 // 2560 PIN 50
#define FAN_PIN 82 // 2560 PIN 48
//
// Misc. Functions
//
#define SDSS 53 // 2560 PIN 19
#define LED_PIN 4 // 2560 PIN 1
//////////////////////////
// LCDs and Controllers //
//////////////////////////
//
// LCD Display output pins
//
// Requires #define U8GLIB_SH1106_EINSTART in Configuration.h
// u8glib constructor
// U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS);
#define LCD_PINS_DC 78 // 2560 PIN 4
#define LCD_PINS_RS 79 // 2560 PIN 8
// DOGM SPI LCD Support
#define DOGLCD_CS 3 // 2560 PIN 7
#define DOGLCD_MOSI 2 // 2560 PIN 6
#define DOGLCD_SCK 5 // 2560 PIN 5
#define DOGLCD_A0 2 // 2560 PIN 6
//
// LCD Display input pins
//
#define BTN_UP 25 // 2560 PIN 75
#define BTN_DWN 26 // 2560 PIN 74
#define BTN_LFT 27 // 2560 PIN 73
#define BTN_RT 28 // 2560 PIN 72
// 'OK' button
#define BTN_ENC 29 // 2560 PIN 71
// Set Kill to right arrow, same as RIGID_PANEL
#define KILL_PIN 28 // 2560 PIN 72
Loading…
Cancel
Save