Upgrading a Marlin 1.1 MKS Base Burly on a mac: help!

Hi all. I hope this is the right subforum for my question.

I recently bought a used Burly setup with an MKS Base 1.2 board running Marlin 1.1. Unlike the previous owner, I need to drive it from a mac (2016 Macbook Pro). My hope is to use CNSJS to drive it.

The CNCJS app recognizes the printer when plugged in via USB (a USB-C to USB-B adapter), and can connect to it via its console. However, I can’t get anything I do in CNCJS to result in any motion by the printer (jogs, etc). Driving the motors etc. via the LCD control panel however works. (i.e. the mill is fine, it’s just the remote control that isn’t working).

I figured maybe the problem was that CNCJS states it supports Marlin 2.x and the board is running 1.x, so I tried to upgrade it.

Using PlatformIO, I was able to build Marlin 2.x for the LPC1768 environment (which is what I believe the MKS Base board requires), but am unable to upload. I figure it’s because maybe the board doesn’t have a bootloader so can’t take a new firmware.

So I buy a USBtinyISP Programmer to do said bootloader install. But I can’t get it to upload from Arduino IDE because of a “verification error”, which the internet has me guess is an issue with a specific version of avrdude which Arduino IDE uses under the hood. So I install avrdude directly (brew install avrdude) and do a direct command line invocation:

$ avrdude -p m2560 -c usbtiny

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9801 (probably m2560)

avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

avrdude done.  Thank you.

and that looks great. Now the board clearly had some brain surgery because when restarted the LCD shows nothing (all blank). I figure I guess now I need to install the actual firmware.

But I can still not find any configuration, including various USB cables and adapters, that lets me do a firmware upload to this (now braindead) board.

Any advice? I am going to look through drawers from a powered USB hub as apparently sometimes the problem is driving a USB board from a USB-C host, but any other bits of wisdom appreciated.

–david

Mks base 1.2 looks like it is a mega 2560, not the LPC1768. I think the v2.0 is the LPC board. More evidence is that it was running marlin 1.x, which didn’t ever support 32 bit boards.

If you successfully flashed the arduino bootloader with avrdude, then that is more evidence that it isn’t a 32 bit board.

Can you post a detailed pic of the board so we can confirm that?

That’s good. But you need to configure marlin for this board instead of the mks base 2.

I would still use platformio, because arduino is fickle right now. But the set up should be closer to flashing a ramps board. IIRC, @jamiek has this same board.

Thanks for the input. Here’s the pic of the board.

So if it is a ramps board what env and what MOTHERBOARD settings should I use?

Clearly it is a 1.3, not a 1.2, not sure if that makes a difference.

It probably does. It looks like MKS Base is 8 bit and MKS SBase is 32 bit. There are a lot of hits for kos sbase 1.3. so that is adding to the confusion. Let me see if I can find more info.

1 Like

Looks like you can set the motherboard to BOARD_MKS_BASE and that should cover MKS_BASE up to 1.4.

It has integrated drivers, but not digipots. The current on the drivers are set with those little potentiometer screws on the board. You’ll want to make sure those are set.

https://github.com/V1EngineeringInc/MarlinBuilder/releases/download/506/V1CNC_Ramps_Dual-2.0.7-src.zip

This firmware is a bit bleeding edge, but I think it should work for you if you just change the motherboard.

I would start with the V1CNC_Ramps firmware. Are you running dual endstop or serial wiring?

The most relevant rep rap info:

https://reprap.org/wiki/MKS_BASE_1.0

How can I tell? (Someone else built it). It has two switches on each of X and Y axes, I just don’t know how they’re wired in.

That firmware w/ BOARD_MKS_BASE as a board config built and uploaded beautifully! Thanks for helping me get the board updated!

It doesn’t respond to CNCJS still, though, but maybe that’s a question for the CNCJS community?

It sounds like you have dual endstops.

Can you communicate with it at all? You should set the baud rate to 250000 and pick the right port. It needs to be set to Marlin, not grbl.

In the past, some versions of cncjs needed a little kick. Sending G1 in the command line would be enough.

I have had it have trouble parsing the status from Marlin before, but I thought the recent versions were compatible enough, even with EXTRUDERS=0.

Can you send M115 on the console? That should print some stuff that makes sense.

1 Like

Alas, M115 doesn’t return anything either.

What version of cncjs?

There is a regex that is looking for a specific signature of text coming back from the controller. Marlin reports some string with the bed and hot end temperatures. Since we don’t have a hot end, and we set EXTRUDERS=0, I suspect that regex isn’t catching our print out correctly.

I would open an issue with cncjs. You could also try the previous release to see if that is any different.

Interesting. CNCjs 1.9.22 [Marlin] is the version I’m using.

Where can I find logs for the traffic? regexes are a thing I can maybe fix.

I’ll file an issue on CNCJS esp. if I can confirm that there’s traffic coming back that isn’t parsed properly. Shouldn’t I be able to make the motors move even if the return codes aren’t parsed properly, or is CNCJS not reading the initial handshake?

Here is the issue I thought was tracking it:

I made another issue, but then my build fixed itself:

It’s been a while since I poked at those lines.

Thanks for the pointers to the issues.

Looking at the output of cncjs -vvv doesn’t show anything being returned (at least at the level of this logging):

2020-10-19T22:24:28.938Z - debug controller:Marlin Add socket connection: id=N4BH5dUcKYyT7AmxAAAB     at MarlinController.addConnection (/Users/da/.nvm/versions/node/v8.0.0/lib/node_modules/cncjs/dist/cncjs/server/index.js:11598:28)
2020-10-19T22:24:28.953Z - debug controller:Marlin Connected to serial port "/dev/tty.usbserial-AL00WZH5"     at SerialPort.<anonymous> (/Users/da/.nvm/versions/node/v8.0.0/lib/node_modules/cncjs/dist/cncjs/server/index.js:11532:30)
2020-10-19T22:24:30.027Z - silly controller:Marlin < echo:start
2020-10-19T22:24:30.030Z - silly controller:Marlin < Marlin 506D 2.0.7
2020-10-19T22:24:30.033Z - silly controller:Marlin < echo: Last Updated: 2020-09-29 | Author: (V1 Engineering, Ryan, 506D)
2020-10-19T22:24:30.045Z - silly controller:Marlin < echo:Compiled: Oct 19 2020
2020-10-19T22:24:30.047Z - silly controller:Marlin < echo: Free Memory: 3466  PlannerBufferBytes: 1472
2020-10-19T22:24:36.905Z - silly controller:Marlin < echo:V81 stored settings retrieved (641 bytes; crc 45999)
", {"__sender__":"df03173b-600b-403a-88e5-bfff885b5ff3"}): id=N4BH5dUcKYyT7AmxAAAB     at Socket.<anonymous> (/Users/da/.nvm/versions/node/v8.0.0/lib/node_modules/cncjs/dist/cncjs/server/index.js:18379:25)
2020-10-19T22:24:39.947Z - silly controller:Marlin > M115

I’'ll poke a bit later.

That first issue seems to indicate that one workaround is to fix Marlin: https://github.com/cncjs/cncjs/issues/581#issuecomment-603253963

I have no opinion whether that is more “correct”. I’m willing to give that a shot if you think it’s reasonable.

If that fixes it, then it is more information. I would really like to not have to drag that change with us through the Marlin edits we make though. It seems like cncjs should be able to do a reasonably general handshake with Marlin at this point.

I worry about cncjs. It seems like great software, but the 130+ issues and infrequent updates aren’t great. I know it is a project that is probably more popular than the maintainer had time for. But it is a worrying trend.

It’s one of the few projects I have donated to. I want it to thrive. And Marlin support is key to that, IMO.

Yeah, looking further, the latest version (which I’m running) should have the right regex in there. After work I’ll see if I can get more detailed logs.

I’m not wedded to CNCJS, but I haven’t seen a lot of options from a Mac.

Fixed it! I had enabled hardware flow control, which was clearly not helping. I can now jog from CNCJS! Thanks again @jeffeb3!

2 Likes

One weird thing I’m noticing with this firmware is that the scale seem off. The X/Y coordinates seem to be roughly in percentages of the bed size, not in mm. The prior firmware had X and Y going from 0 to 320 (it’s a 320mm x 320mm bed). With this latest firmware X and Y seem to go only to 100 or so. Also, the Y axis seems to be inverted compared to what CNCJS thinks anyway. Are these settings I can fix in the firmware through the LCD panel, do I need to rebuild the firmware? (I’m happy to take these sub-questions to another thread if that’s what people prefer, just let me know).

Upon reading, I realize that the answer is likely a firmware config. This machine has Nema 23 steppers for X/Y and a Nema 17 for the Z axis. I suspect I need to do some reading about firmware configuration. I’ll search the docs, but pointers are welcome.