Tronxy P802M: Controller Upgrade to 32 bits

Psst! Looking for more? Check out the Tronxy P802M page with links to other articles about modifying and improving the Tronxy P802M 3D printer.

Inspired by a YouTube video I decided to upgrade the controller on my Tronxy P802M from the Melzi 2.0 8 bit controller to a 32 bit BIGTREETECH SKR V1.3 controller. Below is a guide for anyone else looking to upgrade the controller on their Tronxy P802M to the SKR V1.3.

BIGTREETECH SRK V1.3 32 bit 3D printer controller

Hardware

Remove Old Controller

Tronxy P802M controller to be removed

Before removing the old controller label all the wires to avoid having to trace the connections later. You will also want to cut any cable ties holding down the wires near the old controller since the wire routing will have to change to match the layout of the new controller.

Label connectors and wires before removing from the old controller

Disconnect the wires from the old controller and completely remove it from the printer. We don’t need anything on the old controller so it is available to use in a new project.

Read New Controller User Guide

It is helpful to read the user manual and look at the documentation provided by the manufacture of the SKR V1.3 before proceeding. The manufacture of the SKR V1.3 has uploaded a user guide and some useful diagrams to their GitHub repository:

https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3

This repository will be helpful if you chose to use slightly different hardware then outlined in this guide.

Installing the Stepper Drivers

Before mounting the SKR V1.3 controller you will need to install the stepper drivers. I got A4988 drivers when I ordered my board so my hardware and software setup will be for using those drivers. If you got different drivers you will have to set them up differently then what is outlined in this guide.

It is important to set the jumpers that will be hidden by the stepper drivers before installing the stepper drivers on the SKR V1.3. These jumpers set the microstepping resolution of the stepper motor. Your board probably shipped with all the jumpers installed so the first step is to remove all the jumers except for the one shown in the photo below. This jumper sets the 5V bus power to be derived from the onboard 5V regulator or from the USB connector. Set this jumper to INT for now as shown in the photo.

Remove all jumpers except for jumper highlighted by the bright pink box, set this to INT as shown.

The jumpers to set a microstepping resolution of 1/16 are shown below and are what this guide will assume you set your jumpers to. If you want a different microstepping resolution set the jumpers according the the table below but you will have to adjust the controller firmware for your step resolution.

Microstepping resolution jumpers set to 1/16th for the A4988
MS1MS2MS3Microstep Resolution
LowLowLow1/1
HighLowLow1/2
LowHighLow1/4
HighHighLow1/8
HighHighHigh1/16

*Install jumper to set it as high.

Next let’s install the stepper drivers. Be sure to note the pinout of the stepper drivers and the pinout of the SKR V1.3 to make sure you get the orientation right. The photos below are for reference but check the pinout before you install them. The SKR V1.3 has all the pins labeled on the bottom of the board to make confirmation of orientation quick and easy. Don’t forget to install heatsinks on the driver ICs, these will get hot and need all the cooling they can get. Install the heatsinks oriented as shown since the controller will be mounted in a later step with the heatsink fins vertically to increase cooling.

A4988 stepper drivers installed with heatsinks

Now is a good time to set the current limiting of the stepper drivers. Without connecting stepper motors to the SKR V1.3 power the board using a 12V power supply. The current limiting is set by adjusting the potentiometer on top of each stepper driver which sets Vref.

Current limiting potentiometers on each stepper driver

Vref is related to the maximum current by the following equation:

Vref = 8 * Imax * Rcs

Rcs is the resistance of the current sense resistors installed on the stepper driver PCB, this is 100mΩ on the drivers shown here. The stepper motors on the Tronxy can handle up to 1.68A of current but to be safe we will set the current limit to 1A. Therefore Vref should be set to 0.8 volts. Vref is measured by touching the multimeter probe to the top of the potentiometer as shown. This will require you to measure Vref, adjust the potentiometer slightly and then measure again. Aim for close to 0.8 volts but dont go crazy, 0.818 volts is close enough.

Measure Vref by probing the top of the potentiometer

Mount Controller to the Tronxy Frame

Time to mount the SKR V1.3 to the Tronxy P802M frame. This is simple since some of the pre existing holes on the Tronxy P802M frame line up nicely with the mounting holes on the SKR V1.3. Missing holes can be easily drilled into the acrylic frame. The following mounting was accomplished using all but one pre existing hole, the lower left hole was added. Use the same mounting hardware as used to mount the old controller you just removed, M3 bolts with nylon spacers. Orient the board as shown so that the USB port and microSD card can be easily accessed.

SKR V1.3 mounted using all but one pre existing hole

Connect Wires

Wiring the board up is simple and requires little modifications of the existing Tronxy wire connectors. The below diagram provided by the manufacture outlines the available connections. We will go step by step though where to install each wire below.

SKR V1.3 wiring diagram from BIGTREETECH GItHub Repository
  1. Connect 12V power from the power supply to the DC12/24V POWER IN terminal. Observe correct polarity, the top pin of the terminal block is +.
  2. Wire the bed heater leads to the terminal labeled BED, polarity is not important.
  3. The hot end heater is wired to E0 Heater
  4. Connect the x stepper motor to X-Motor
  5. Connect the y stepper motor to Y-Motor
  6. Connect one of the z stepper motors to Z-Motor, connect the other z stepper motor to E1-Motor
  7. Connect the extruder stepper motor to E0-Motor
  8. Plug the bed terminster into the connector labeled BED Thermistor shown at the bottom right corner of the diagram
  9. The hot end thermistor connects to E0 Thermistor
  10. The x axis endstop connect to the upper left 4 pin connector that is labeled as End Stop in the connection diagram. The silkscreen label next to this connector is X-
  11. The y axis endstop connects directly below the x axis endstop. The silkscreen label next to this connector is labeled Y-.
  12. Finally the z axis endstop connection is below the y axis endstop and is labeled Z- on the silkscreen.

The polarity of the extruder fan and the layer cooling fan connectors need to be swapped before they are installed. Use a sharp object such as an exacto knife to remove the pins from the connector housing and then reinsert them in the opposite polarity. If you need help on how to swap pins watch this helpful and quick YouTube video from user Ilia Brouk.

Incorrect polarity of the fan connector

Connect the fans as follows. The layer cooling fan plugs into the connector labeled CNC FAN. The extruder cooling fan plugs into the 12V/24V OUT connector at the top left of the wiring diagram.

Correct fan connector polarity

The below picture shows the controller fully wired after a little cable management.

SKR V1.3 mounted and all wires connected

Last we need to address the LCD and user input buttons. I was unable to get the original Tronxy display and buttons to work with the SKR V1.3, the new controller doesn’t have a connector that matches that LCD. The easiest thing to do is to purchase a cheap LCD and the RepRapDiscount Smart Controller is the lowest cost LCD with user input that I could find from the usual suspects. The LCD connects to the SKR V1.3 connectors labeled LCD-EXP1 and LCD-EXP2. The RepRapDiscount Smart Controller has connectors labeled EXP1 and EXP2 on the back of the display that are a pin for pin match the the connectors on the SKR V1.3. As an added bonus the display has an onboard SD card connector so we can load the files to print using this easier to access SD card.

After the printer is fully assembled we will print a case to hold and mount the new LCD but for now it can be left sitting next to the printer. The old LCD can be removed and repurposed.

RepRapDiscount Smart Controller connected

With the SKR V1.3 connected to the printer hardware it is now time to setup the firmware of the controller to work with the Tronxy P802M hardware. Don’t turn on your printer just yet.

Firmware

Don’t want to compile your own firmware? You can download a compiled version for the Tronxy P802M as long as you are using the exact same hardware from my GitHub repository. Copy the firmware.bin file included in that repository to the microSD card that came with the SKR V1.3. On powerup of the SKR V1.3 the firmware will be updated. Jump to the Testing section of this guide since you don’t need to know how to compile firmware.

Installing Required Software

The SKR V1.3 uses Marlin 2.0 as the firmware. The manufacture of the SKR V1.3 does supply in their GitHub repository a copy of Marlin 2.0 but it will not be setup to run the Tronxy P802M hardware configuration. We will start with a fresh copy of Marlin 2.0 which is bugfix-2.0.x at the time of writing this guide. First we will have to install an IDE that will allow us to edit and compile the code for the SKR V1.3.

If you don’t have Visual Studio Code (VSC) installed do so using the link below. VSC runs on most operating systems including Windows, Mac, and popular distros of Linux.

https://code.visualstudio.com/Download

Download and install Visual Studio Code

We will now need to add an extension to VSC to be able to open the Marlin 2.0 firmware and compile it for the SKR V1.3, PlatformIO. This link below will take you to an installation guide for adding the PlatformIO extension to VSC. The image below is a screenshot of that page for quick reference.

PlatformIO installation guide

Marlin 2.0

Now we are ready to download and configure Marlin 2.0. Do so using the link below. The current version of Marlin at the time of writing this guide is bugfix-2.0.x but a newer version maybe available so check the Marlin download page.

Unzip the file you just downloaded and open VSC if you have not done so already. Now we are going to open up the Marlin 2.0 project file, click the PlatformIO: Home icon in the lower left of VSC if PlatformIO did not pop up when you opened VSC. Chose Open Project and navigate to the Marlin 2.0 folder that you just unzipped and open it.

Open Marlin firmware project in PlatformIO

With the Marlin 2.0 firmware opened in PlatformIO we are now prepared to modify the configuration files so that we can compile firmware that will work with the Tronxy P802M hardware and the SKR V1.3 controller.

I have setup a GitHub repository that will contain the configuration files so you do not have to modify them yourself. I suggest looking through the files since it will be helpful if later on you want to modify the Tronxy P802M hardware but it is not necessary. You can just copy and paste and be done with it. Download the modified configuration files at the link below.

https://github.com/sdp8483/Tronxy_P802M_SKR_V1-3

Replace the following files in the Marlin 2.0 project folder with the files downloaded from the Tronxy_P802M_SKR_V1-3 repository:

platformio.ini
/Marlin/Configuration.h
/Marlin/Configuration_adv.h
Merge the configuration files of the Tronxy_P802M_SKR_V1-3 repository with the Marlin 2.0 project folder

Open platformio.ini in VSC and make sure that default_envs = LPC1768

Finally we are ready to compile the code. Press the PlatformIO: Build check mark at the bottom of VSC. A console will popup and after awhile should end with a succeeded message as shown.

Compilation Successful

Remove the microSD card installed in the SKR V1.3. Insert the card into your PC and wait for confirmation that it has been read by your computer. In VSC next to the check mark we used to compile the code is an arrow pointing right, the PlatformIO: Upload button. Clicking this should upload the code to the microSD card. If this doesn’t work you can navigate to /.pioenvs/LPC1768 in the Marlin 2.0 project folder and manually copy the firmware.bin file to the microSD card

The microSD card will then contain two files, firmware.bin is the new firmware we just compile and FIRMWARE.CUR is the firmware that is currently installed on the SKR V1.3. Remove the microSD card from your computer and insert it into the SKR V1.3. On powerup the new firmware will be loaded onto the controller.

Testing

Power up the Tronxy P802M. Jog all three axis to make sure that their direction is correct. Then home all three axis to make sure that the homing switches are working. Be ready to quickly power off the printer is something goes wrong.

Check the hotend and bed temperature readings and make sure that they are reading a reasonable temperature for your current room temperature, somewhere around 23°C.

If any of the above tests result in a failure then you hardware is not exactly like the hardware on my Tronxy P802M printer. You will have to read through the configuration file /Marlin/Configuration.h and make the appropriate changes. It’s a large file but should contain everything needed to configure your printer correctly. If you cannot find the setting there then /Marlin/Configuration_adv.h contains even more settings.

Now print something! Try a calibration cube to make sure the steps/mm for all three axis is correct.

Test print of a 20mm calibration cube

LCD Case

The LCD used for the Prusa I3 Mk3 is the same as the RepRapDiscount Smart Controller LCD that we upgraded to. Therefore the case designed for the Prusa I3 Mk3 will work perfectly to house the LCD for the Tronxy P802M. Download the files from Prusa at this link. Print the LCD-cover-ORIGINAL-MK3.slt and lcd-supports.stl files. To mount the LCD will reqire a few new holes be drilled in the frame at the place of your choosing. The cables that came with my LCD were to short so I had to make up two longer cables to reach my mounting position.

New LCD installed

Want more? Check out the Tronxy P802M page with links to other articles about modifying and improving the Tronxy P802M 3D printer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.