Makerbase MKS Sbase

Hi Jeffe,

I just recieved my MKS Sbase board!
I followed a tutorial to setup Marlin 2.0, but I can’t find the ‘firmware.bin’ anyhere.

I installed Atom, but I think PlatformIO is not working (not sure).
I see a drop down menu PlatformIO, but I don’t have the toolbar on the left.
When I choose ‘upload’ from the PlatformIO drop down menu, it doesn’t do anything.

It also didn’t ask me to install ‘Clang’ like in the tutorial.

It’s this tutorial:

Marlin doesn’t support atom anymore. I don’t know why. You can use platformio through visual studio code, which is cross platform.

1 Like

Thanks! I installed VsCode and PlatformIO.

I copied the firmware.bin so I hope it will work…

Which program is best to use to control the MPCNC?
I tried pronterface and that worked, I also tried CNC Gcode controler, which doens’t work (yet)

There are some choices on the software workflow page. I use a v1pi.

1 Like

Hi Jeffe,

I will have a look at it.
My first drawing is a complete fail :frowning:

E0 and E1 are not working, while I’m using the Rambo Dual Branch.

When I only connect the Y-axis it works, but when I only connect E1, it doesn’t do anything.
Do I need to do something with jumpers?

I also set the jumper to 1/32 microstepping, so do I need to change anything else?

Also I need to reverse the Z-axis, how is this done? I could simply turn the connector, but can I do it in software also?

Don’t mess with gcode until you have all the axis driving the right direction. There’s no reason to think playing a gcode file will fix things when a manual move is broken.

Are you sure you successfully flashed it? Send an M119 and see that there are X2 and Y2 in the report.

You might want to unset the digipot current, and change the driver type, but those changes would be subtle. Be sure to adjust the driver current with the little trim pot.

You can, I think it is in the advanced and it is something about “INVERT_Z_AXIS” or something.

I don’t understand everything you are saying, but I would like 1 thing verified.
I did the follwing steps:

  • Install VsCode
  • Install Platformio
  • Open the folder ‘Marlin-1CNC_Rambo_Dual’
  • In the platformIO.ini I changed to ‘default_envs = LPC1768’
  • I pressed the ‘thick’ icon to build it
  • Then I copied the ‘firmware.bin’ file from this folder ‘Firmware MKS Sbase\Marlin-1CNC_Rambo_Dual.pio\build\LPC1768’ to my SD drive

Then the firmware is flashed to the board right?

After that I tried some other things:

  • in the cofiguration.h it changed this: #define MOTHERBOARD BOARD_MKS_SBASE
  • I removed the ‘//’ in front of the #define X_DRIVER_TYPE DRV8825
    and also for Y - Z - E0 - E1

Please understand. I am trying to help you. I am not in the room. I don’t have an mks board. I am doing what I can, but you have to meet me halfway.

I do not know if it flashed. There is a lot that can go wrong. My suggestion is to verify it with M119.

Yes I know Jeffe, I really appreciate it!
I will try some things tomorrow and get back to you.

One other thing I can mention.
I copied the firmware.bin file, but then it didn’t change the extention to .CUR (firmware.cur)
Maybe it’s not flashed properly?

Jeffe, I think I know what’s the problem.
firmware.bin should turn into firmware.cur after flashing, but it doesn’t.

What I tried is taking out the micro SD card and put it in my laptop. Format it and insert it into the board again. Copy the firmware.bin from the folder to the SD drive. But it stays firmware.bin

Oke, I did another test. I removed the firmware.bin from the SD card and put nothing on it. I can still control the X - Y - Z axis. So I’m almost sure it’s not flashing.

I read some things about ‘Bootloader’ what does this mean?

Some info about my SD card: it’s micro SD from Kingston 64GB.
I formatted it as eFAT and as NTSF and I also read it should be a primary partion

The software that runs on the chip first is the bootloader. It does some different things, but basically it sets up the microcontroller to run your program (which is Marlin). Every time you turn on the board, the bootloader runs. One of its jobs is to look at the micro sd card and see if there is a new program to load. If there is, then it will copy that firmware.bin into the microcontroller and delete the old program. It never overwrites itself, so it is a good safety measure. You can put complete junk in the firmware.bin and still be able to flash it, because the bootloader is fine.

I don’t have the mks base board, but in an skr, I do what you’re describing. I put a firmware.bin on the card, put the card in, power up the board, and it takes a few seconds to flash and it renames the bin to cur. It runs the new program right away. If I power down and take out the card, I can see the filename has changed. After it flashes itself, it doesn’t need the sdcard anymore. The program is stored in the microcontroller, unlike a raspberry pi, where it is ran from the sd card.

The only part about that sd card that seems wrong is the size. You might try formatting it a lot smaller, like 1GB. Or finding a smaller 8GB or less card.

One trick I’ve used to make sure I am flashing a new version is to change the steps/mm in the firmware. If I set it to 401 instead of 400. Then when it is running I can restore the steps from the firmware and see the current values with this:

M502
M92

I think it worked!
I made a partition of 1GB first as NTSF but that didn’t work. Now I tried FAT32 and it works.
Now when I put the SD card back in my laptop, the firmware.bin file changed to firmare.cur
Also the LED’s on the board where differtent this time.

I didn’t know that after the flash you can take out the SD card, thanks for the tip.

I’m going to test it out in a few min. but I thought I would first right you this reply and thank you.

Oke the flahsing works now, but I can’t flash the firmware.bin I build from PlatformIO. Then not all then lights are on and it doesn’t show the SD drive on my laptop.
When I flash it with the firmware.bin from the MKS Sbase Github it seems to work.

So something in my firmware.bin is wrong from the Rambo Dual

Oke I started over… I unpacked the Rambo Dual zip again and the only thing I changed is ‘default_envs = LPC1768’ in the PlatformIO
Then I press the ‘tick box’ to build.
Then it says: 1 failed, 0 succeeded in 00:02:08:072

What now? Should I read the ‘RED’ lines?

You also need to change the board setting in configuration.h.

Yes, I did that. Then the build is succesfull. But When I try to flash it, it doesn’t work for some reason. I have no qlue why it shouldn’t work…

Would it be easy to take the build from the MKS_Sbase which seems to work an configure it to dual stepper motors and dual endstops?

It is not possible to reverse the firmware.bin into code you can edit.

If you compile their marlin configuration into a firnware.bin and that mostly works, you can edit their configuration.

For useful problem reporting, instead of saying, “it doesn’t work”, describe what you did, what you expected to see, and what you saw instead.

Yes you are right.
I can’t reverse the firmware.bin, but there’s also a complete Marlin folder which I loaded into PlatformIO

When I put the MKS_Sbase firmware.bin onto the SD card and insert it in the board it starts up with eventually 5 yellow LED’s and I can see the SD card as a drive on my laptop. And when I start Ponterface I can connect.

When I do the same with the firmware.bin from Rambo Dual (with changing the env and the motherboard name) only 2 LED’s are on and I can’t see the SD card as a drive on my laptop.
When I start Ponterface it doens’t connect.

I just opened the MKS_Sbase folder in PlatformIO

The first thing I notice in the ‘configuration.h’ is
#define BAUDRATE 250000

When I open Ponterface I select 115200

I’m not surprised the sd card mount doesn’t work. That takes some finagling.

You will need 250k in pronterface to connect to Ryan’s firmware. But it may also need a different serial port number.

Can you give me a link to the mks firmware in github?

Yes It needed a different port, I saw what

Looks like they set the serial port to -1.

Looks like they didn’t set the driver type. You’ll want to set that. This has DVR8825s, right?

I suspect, in Ryan’s firmware, the trick to getting the SD card to mount is in this line, which I think should be set to ONBOARD: