Upgrade K8200 Controller Board
Sep 8, 2016
[Huy Le]
9 minute read
PROJECT LAYOUT

I realized it takes a very long time for the heated-bed to get up to temperature and start printing. This was one of the main reason why I did not use it as often as I originally intended.

With a slew of difficulties, e.g. Z-wobble and first layer not adhering to the board. The K8200 soon became a project of it’s own. In short, this is the start to making the K8200 be usable, as an everyday tool.

If you want to skip the details, jump to the [integration part][integration-header].

Objective #

Before actually getting to update the K8200, I had to update the controller board. This is my fault for burning the Sanglougini board that came with the K8200.

This post will concentrate on understanding the make up of a controller board and its role in a 3D printer. Changed controller board to ([RAMPS 1.4][]) and [Arduino Mega 2560].

Background #

A controller for a 3D printer is a microcontroller with special circuitries to handle specifics of controller stepper motors.

Controller Board #

There are many different version of controller boards that can be used for 3D printing and a couple of different configurations:

  1. Integrated microcontroller and stepper circuitries on one board
  2. Dedicated microcontroller and a shield that has all the circuities needed

The Sanglougini, chosen by Velleman for its K8200 printer, is the first of the two. It has the advantage of being small, integrated and ‘production’ ready. This is not as much of a hackable solution of the two. The second configuration is something akin to an Arduino board that attaches to controller shield, like the RAMPS 1.4.

Due to the budget, time constraint (not really, can’t get away from Amazon Prime), and the hack-ability, I went with the second option.

The Firmware #

The 3D printing community is very large and very active, therefore, we have countless of combinations and type of hardware that can drive a 3D printer, 3D cutter, bio-printer, etc. But in order for these controller to be able to send out meaningful signals that move the printhead to an exact location, it is dependent on the firmware.

Not ‘hardware’ or ‘software’, but ‘firmware’; somewhere in the middle that allows the software to interact with the hardware.

From searching around, it seems to me that the Marlin firmware for 3D printing is a popular and widely supported option. Maybe thats why K8200 and almost all other 3D hobbyist 3D printer use it. [*And because it supported this hardware configurations*][marlin-hardware-support]. For the sake of time and drive to get K8200 to be a tool rather than a project, I stuck with the Marlin firmware for this upgrade. By doing so, it allows me to reuse some of the calibration constants and configurations that has already been defined by the K8200 original firmware.

The Final Setup #

Controller Board - [RAMPS1.4][amazon-ramp] + [Arduino Mega 2560][amazon-mega] (cheapest option on Amazon) Firmware - [Marlin][marlin-github]

Putting it All Together #

As with any project, this section of the post only shows you the smooth path to project completion.

Firmware for Arduino Mega 2560 #

Using Git T

Hardware #

Summary #

of hardware out there. But how do you know what hardware works with what firmware. In order for you to have a working product, the

Digging into it, I found that Marlin is a widely used firmware

The original K8200 uses the Marlin firmware on Sanglougini controller board.

  • could have chosen a different firmware with the new RAMPS 1.4 board, the the Marlin seems l

Final Setup #

Upgrading to 300W #

Learnings #

IDE for Arduino #

The RAMPS 1.4 Board #

K8200 uses the Marlin #

k8200 using the Marlin Firmware. Supports RAMPS 1.4 boards

Parts #

  • Then there is Amazon

Schematics and Layout #

Dig around for configuration Constants Found this

  • baudrate at 250,000 due to clock frequency at 16Mhz

  • new E3D V6 Hotend

    • Settings here are to be updated in the firmware
  • Thermal Settings options for temp sensors

  { '0': "Not used"
  '1':"100k / 4.7k - EPCOS"
  '2':"200k / 4.7k - ATC Semitec 204GT-2"
  '3':"Mendel-parts / 4.7k"
  '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!"
  '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)"
  '6':"100k / 4.7k EPCOS - Not as accurate as Table 1"
  '7':"100k / 4.7k Honeywell 135-104LAG-J01"
  '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT"
  '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1"
  '10':"100k / 4.7k RS 198-961"
  '11':"100k / 4.7k beta 3950 1%"
  '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)"
  '13':"100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'"
  '20':"PT100 (Ultimainboard V2.x)"
  '51':"100k / 1k - EPCOS"
  '52':"200k / 1k - ATC Semitec 204GT-2"
  '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)"
  '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950"
  '66':"Dyze Design 4.7M High Temperature thermistor"
  '70':"the 100K thermistor found in the bq Hephestos 2"
  '71':"100k / 4.7k Honeywell 135-104LAF-J01"
  '147':"Pt100 / 4.7k"
  '1047':"Pt1000 / 4.7k"
  '110':"Pt100 / 1k (non-standard)"
  '1010':"Pt1000 / 1k (non standard)"
  '-3':"Thermocouple + MAX31855 (only for sensor 0)"
  '-2':"Thermocouple + MAX6675 (only for sensor 0)"
  '-1':"Thermocouple + AD595"
  '998':"Dummy 1"
  '999':"Dummy 2" }

turn on Power supply with PS_ON M80 - Turn on power supply M81 - Turn off power supply

The output is inverted Using a relay can be used to switch the power supply on and off.

default -> atx power supply pull down to turn on.. in configuration code POWER_SUPPLY was set to 2, invert from original

now initialize G-code turn on the power supply automatically, want this to turn on cant do it just yet

tried to three-way sync with working config and example configuration

Testing motor #

before hooking everything online, need to test the with s2sw

  • make sure all your com ports are closed!!! Arduino IDE, or any terminal that might have a lock on the comm port

High pitch frequency, everything receive signal except for y motor

  • problems
    • Y motor not working. switched y with x motor

      • it looks like y-driver board is broken.
    • looks like the acceleration for the y is wayyy too fast when delievering a 10mm move

      • all configurations for acecleration matched with v1 and v2 of k8200 for marlin firmware
    • tried uninstalling 1.6.10 and installed on 1.0.6 got info here note one bad driver can cause the board not to be detected on the serial ports

testing heaters #

bed keep having errors because of slow heating - connected 15v back, and time from room temp to 60 deg

Testing with Cura 2.1.3

  • Setting up printer profile for Cura

    Nice to know that Cura 2.1.x doesnt have K8200 Supported. Advance configuration is needed using JSON config files. Read more here This is not play nice with Cura v15.

    Some more digging… Cura Wiki in German here -> translated to English. And it is.. for 15.0.2 Cura

    Problem with JSON is no comments -> had to dig around for unit on parameters. I think all units are in mm

    json is inheriting from ‘fdmprinter.json’ ‘machine_start_gcode’ and ‘machine_end_gcode’ are not the same as the fdmprinter.json

    what worked before was my original starting and ending gcode the travel_speed was set to 150.0 mm/s in my previous code ```start.gcode = ; M190 S60 ;Uncomment to add your own bed temperature line ; M109 S200 ;Uncomment to add your own temperature line G21 ;metric values G90 ;absolute positioning M107 ;start with the fan off G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops G1 Z15.0 F{travel_speed} ;move the platform down 15mm G92 E0 ;zero the extruded length G1 F200 E3 ;extrude 3mm of feed stock G92 E0 ;zero the extruded length again G1 F{travel_speed};Put printing message on LCD screen M117 Printing…

    end.gcode = ;End GCode M104 S0 ;extruder heater off M140 S0 ;heated bed heater off (if you have it) G91 ;relative positioning G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way M84 ;steppers off G90 ;absolute positioning

    
      This is what the CuraProfileMaker generated
    

    “machine_start_gcode”: { “default”: “G21 ;metric values G90 ;absolute positioning M82 ;set extruder to absolute mode M107 ;start with the fan off G28 X0 Y0 ;move X/Y to min endstops G28 Z0 ;move Z to min endstops G1 Z15.0 F9000 ;move the platform down 15mm G92 E0 ;zero the extruded length G1 F200 E3 ;extrude 3mm of feed stock G92 E0 ;zero the extruded length again G1 F9000 ;Put printing message on LCD screen M117 Printing…” }, “machine_end_gcode”: { “default”: “M104 S0 ;extruder heater off M140 S0 ;heated bed heater off (if you have it) G91 ;relative positioning G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way M84 ;steppers off G90 ;absolute positioning” }

    
    
      ##### G-Code
      oh yeah.. start looking at the G-Code to see what is the difference [Marlin G-Code][gcode_ref]
    
      #### Setting up Printing profiles for PLA
      Need to setup printer profiles
      - found print profile online awhile ago [here][id]
    
      ### Connecting it up!
      plugging in Arduino board to raspberry-pi for the first time to initiate communication with Octoprint
    
      MAXTEMP error for Heater_ID: bed
    
      Went back to configuration to change
      ```c
      #define HEATER_0_MINTEMP 5
      #define HEATER_1_MINTEMP 0 // changed from 5 -> 0
      #define HEATER_2_MINTEMP 0 // changed from 5 -> 0
      #define HEATER_3_MINTEMP 0 // changed from 5 -> 0
      #define BED_MINTEMP 5
    

Printing #

Manually adjusted -> filament to 3mm and not 1.75mm

Z-homing was off… the stepper did not stop

To be added later #

  • Powerhold?

    Marlin_main.cpp, one of the first few functions is to setup the powerhold

      void setup_powerhold() {
        #if HAS_SUICIDE
          OUT_WRITE(SUICIDE_PIN, HIGH);
        #endif
        #if HAS_POWER_SWITCH
          #if ENABLED(PS_DEFAULT_OFF)
            OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
          #else
            OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE);
          #endif
        #endif
      }
    

    The ps_on is needed to move motors and everything around. only kick on the high power if needed for turn bed or extruder

    will be useful to control heated-bed and hot-ends later

Suicide Switch #

use to shut of Marlin until next print see here



comments powered by Disqus