MKS SGen L V1.0
December 07, 2019 03:04PM
Just wondering what the motherboard definition would be for this.

I have flashed other boards in the past that have had documented or existing board defs in marlin (mks base, anet, ramps etc) but I am not sure if the the mks sgen is still regarded as ramps 1.4 pin compatible.

Thank you.
Re: MKS SGen L V1.0
December 07, 2019 03:27PM
I just bought one and I noted it uses the LPC1768 chip, Mine is not working under RAMPS Pin that I know of but I'm having issues too so I may have overlooked that.
Re: MKS SGen L V1.0
December 07, 2019 05:40PM
I found a pins definition here:

[github.com]

Will give this a go soon and see if it flashes.
Re: MKS SGen L V1.0
December 07, 2019 07:12PM
Wow, thanks. At least I can see pin assignments now, unfortunately, I had tried the E0 line for enabling heat fan to come on above 50 degrees and it just didn't work for some reason. I have a MKS GEN L board coming with the ATMEGA 2560 onboard and I think I am just going to use that and if it works, I'll be sending the MKS SGEN_L board back because this is just a headache for me with the issues I am having, mostly my EZABL not working on Z_MIN or Z_MAX. Banging my head on my desk over here lol. I really don't care to be up until 3am again tonight.
Re: MKS SGen L V1.0
December 07, 2019 08:10PM
Info for this board can be found here [github.com]

motherboard should be set to #define MOTHERBOARD BOARD_MKS_SGEN_L

The pinouts are here [github.com]
Re: MKS SGen L V1.0
December 07, 2019 10:22PM
Quote
commo81
Wow, thanks. At least I can see pin assignments now, unfortunately, I had tried the E0 line for enabling heat fan to come on above 50 degrees and it just didn't work for some reason. I have a MKS GEN L board coming with the ATMEGA 2560 onboard and I think I am just going to use that and if it works, I'll be sending the MKS SGEN_L board back because this is just a headache for me with the issues I am having, mostly my EZABL not working on Z_MIN or Z_MAX. Banging my head on my desk over here lol. I really don't care to be up until 3am again tonight.

On the mks base boards I have flashed I had to specify the pin for the fan that I was using for the extruder cooling fan.

On the mks base that would have been d10 or d7 depending on which I was using.

Since I haven't dug into flashing the sgen yet I am not sure what pin it would be.

I can tell you that the above 50 degree auto fan turn on and off works. It's just a matter of finding the right pin.
Re: MKS SGen L V1.0
December 08, 2019 05:40PM
I'm having issues trying to build the mks source so the next step is to take the pins definitions and drop it into the original marlin branch and see if that takes.

Also I had to setup the sublime environment so there was another relearn step. I had arduino ide building down now have to change :rolleyes:
Re: MKS SGen L V1.0
December 08, 2019 06:07PM
It Is already in marlin 2.0 [github.com]

You just need to select MOTHERBOARD BOARD_MKS_SGEN_L

Its a 32 bit board , you need to make it under platformio, in vscode

Edited 1 time(s). Last edit at 12/08/2019 06:09PM by Dust.
Re: MKS SGen L V1.0
December 08, 2019 08:44PM
Thanks Dust.

Gonna give it another go.
Re: MKS SGen L V1.0
December 09, 2019 06:27AM
Ok so after failing with atom and sublime I removed everything that was done/installed for atom/sublime and installed platformio for vscode.

Build completed on the first try and then upload hit a snag. Sorted that out by editing the platformio.ini for the proper env.

Now the board is flashed and the reprap full graphic controller works. However, I am getting a tmc connection error.

So far, my tmc2209 drivers are installed per direction for uart mode and I specified tmc2209 in configuration.h for x,y,z,e0 motors.

This is my first time with a 32bit board and trying uart. Any tips on the next step to get the tmc working?
Re: MKS SGen L V1.0
December 09, 2019 06:46AM
You just need the Uart jumpers on foe each stepper driver that has a uart, no other jumpers under the stepper drivers
Re: MKS SGen L V1.0
December 09, 2019 06:48AM
Quote
Dust
You just need the Uart jumpers on foe each stepper driver that has a uart, no other jumpers under the stepper drivers

This is how it is currently configured as far as jumpers are concerned.
Re: MKS SGen L V1.0
December 09, 2019 07:01AM
You sure the stepper modules are in correctly?

with mks the pins are color coded black to black and green to green
Re: MKS SGen L V1.0
December 09, 2019 07:46AM
Quote
Dust
You sure the stepper modules are in correctly?

with mks the pins are color coded black to black and green to green

Steppers are in correctly.

Maybe it was a bad initial flash.

I did as the wiki suggested and deleted the files from the sdcard of the board. Then I powered down, disconnected all connections (only had the graphics controller connected) and waited 30 seconds instead of 10. Reconnected the controller and powered up, then rebuilt and uploaded the firmware and the error is now gone.

Weird. But now moving on again.

Thanks so far Dust for your responses thumbs up
Re: MKS SGen L V1.0
December 09, 2019 01:22PM
I can't seem to get my motors to move.

I am using the mks tmc2209 v1 that came with the sgen L.

I removed the diag jumpers that were installed for sensorless homing since I read that the mks v1 2209 doesn't support it.

When I try to home any axis no motors move and the board halts with a "homing failed" message.

Any ideas? Here is the output from M122.

13:15:49.358 : X Y Z Z2 E
13:15:49.358 : Address 0 0 0 0 0
13:15:49.389 : Enabled false false false false false
13:15:49.389 : Set current 800 800 800 800 800
13:15:49.436 : RMS current 795 795 795 795 795
13:15:49.483 : MAX current 1121 1121 1121 1121 1121
13:15:49.483 : Run current 25/31 25/31 25/31 25/31 25/31
13:15:49.483 : Hold current 17/31 17/31 17/31 17/31 17/31
13:15:49.529 : CS actual 17/31 17/31 17/31 17/31 17/31
13:15:49.578 : PWM scale 20 20 20 20 20
13:15:49.625 : vsense 1=.18 1=.18 1=.18 1=.18 1=.18
13:15:49.656 : stealthChop true true true true true
13:15:49.703 : msteps 16 16 16 16 16
13:15:49.750 : tstep max max max max max
13:15:49.750 : pwm
13:15:49.750 : threshold 79 79 641 641 263
13:15:49.796 : [mm/s] 100 100 3 3 30
13:15:49.843 : OT prewarn false false false false false
13:15:49.890 : off time 0 0 0 0 0
13:15:49.937 : blank time 24 24 24 24 24
13:15:49.937 : hysteresis
13:15:49.984 : -end -1 -1 -1 -1 -1
13:15:50.015 : -start 1 1 1 1 1
13:15:50.015 : Stallguard thrs 0 0 0 0 0
13:15:50.015 : DRVSTATUS X Y Z Z2 E
13:15:50.062 : stst * * * * *
13:15:50.109 : olb
13:15:50.156 : ola
13:15:50.203 : s2gb
13:15:50.250 : s2ga
13:15:50.281 : otpw
13:15:50.328 : ot
13:15:50.375 : 157C
13:15:50.421 : 150C
13:15:50.468 : 143C
13:15:50.515 : 120C
13:15:50.515 : s2vsa
13:15:50.515 : s2vsb
13:15:50.515 : Driver registers:
13:15:50.515 : X 0xC0:11:00:00
13:15:50.531 : Y 0xC0:11:00:00
13:15:50.531 : Z 0xC0:11:00:00
13:15:50.546 : Z2 0xC0:11:00:00
13:15:50.562 : E 0xC0:11:00:00
13:15:50.562 : Testing X connection... OK
13:15:50.578 : Testing Y connection... OK
13:15:50.578 : Testing Z connection... OK
13:15:50.593 : Testing Z2 connection... OK
13:15:50.593 : Testing E connection... OK
Re: MKS SGen L V1.0
December 12, 2019 11:37AM
So to update anyone curious.

Marlin 2.0 release on 1 Dec 2019.

So far I have motor movement. I have sensorless homing working on the x and y axis. The y axis though seems hit or miss but the fact that others have stated they couldn't get it to work on this setup just makes me keep pushing.

To reiterate:

I am using the MKS SGEN-L 32 bit with the bundled MKS TMC2209 V1.0 drivers. Marlin 2.0 works on the board and the sensorless homing can at least be achieved on this bundle. Now I believe I have to tune my currents and speeds to get my y axis homing to be more reliable.

EDIT:

It was a good struggle but I have succeeded. Sensorless homing on MKS SGEN-L with MKS TMC2209 v1.

Edited 1 time(s). Last edit at 12/12/2019 08:57PM by jaded.
Re: MKS SGen L V1.0
January 17, 2020 08:12PM
I have the MKS SGEN L motherboard as well. I have a rudimentary skill level. This is a brand new board I picked up to replace the 8 bit board. I followed the basic marlin 2.0 instructions on their site and got an error free compile and got it to put the files on the SD card that was iin the motherboards reader. The compiler can see the SD card in the motherboard. None of my slicer apps can connect to the motherboard.

I also noticed that the connection on the motherboard for the bed temp appears to be dead. The sensor reads 0 for the temp. I swapped the temp lead connectors between the e0 and bed temp and the e0 is showing the temp of the heated bed while the heated bed still reads 0.

The steppers are working, still have to verify current direction of travels.

The online guide mentions needing to change the "red jumper pins" may need to be switched to USB after motherboard is updated and reloaded. My board does not have "red jumper pins".
Re: MKS SGen L V1.0
January 17, 2020 09:04PM
You need to set #define SERIAL_PORT -1

-1 means use the usb port for serial communications.
Re: MKS SGen L V1.0
January 18, 2020 10:28AM
Quote
Dust
You need to set #define SERIAL_PORT -1

-1 means use the usb port for serial communications.

Thank you, that fixed my connection from laptop. I found the setting that was making the heated bed not work, it was the #define TEMP_SENSOR_BED 0 that should have been #define TEMP_SENSOR_BED 1 . Don't know how I missed that the first 4 or 5 times I looked for it. Just have to configure the offsets and endpoints I think in order to set limits for x,y, and z axis.

Edited 1 time(s). Last edit at 01/18/2020 10:28AM by doug_scott.
Re: MKS SGen L V1.0
January 19, 2020 10:45AM
I have 3 of my mks sgen-L boards set serial port to -1 and serial port 2 set to 0.

This allows my raspberry pi (print server) to mount the sdcards when the printers are connected and still have control separately.

On the off chance I need to upload new firmware I don't remove the sdcard. I just send it to the proper location via smb and then reset the printer.

So much more convenient than the arduino method I used to use for updating through the raspberry pi. Octoprint supports it but I use repetier server free and have to do that task manually.
Re: MKS SGen L V1.0
February 11, 2020 04:33PM
Quote
jaded
So to update anyone curious.

Marlin 2.0 release on 1 Dec 2019.

So far I have motor movement. I have sensorless homing working on the x and y axis. The y axis though seems hit or miss but the fact that others have stated they couldn't get it to work on this setup just makes me keep pushing.

To reiterate:

I am using the MKS SGEN-L 32 bit with the bundled MKS TMC2209 V1.0 drivers. Marlin 2.0 works on the board and the sensorless homing can at least be achieved on this bundle. Now I believe I have to tune my currents and speeds to get my y axis homing to be more reliable.

EDIT:

It was a good struggle but I have succeeded. Sensorless homing on MKS SGEN-L with MKS TMC2209 v1.

Hi,

could you elaborate how you got sensorless homing working. Ik have the sgen-l with mks tmc2209 drivers. I compiled Marlin 2.0 firmware with senorless homing enabled, but I am not getting any movent on homing.
Re: MKS SGen L V1.0
February 12, 2020 10:32AM
Quote
bartolomeus

Hi,

could you elaborate how you got sensorless homing working. Ik have the sgen-l with mks tmc2209 drivers. I compiled Marlin 2.0 firmware with senorless homing enabled, but I am not getting any movent on homing.

I will take a stab at possible issues.

Send M119 and check your endstop status before attempting homing. I'm guessing they will be TRIGGERED.

If they are triggered, using your hand move your axis to your home position (perferrably x or y for safe testing) and send G92 X0 or G92 Y0 depending on which axis you are testing.

After G92 command send G0 X25 F1000 or G0 Y25 F1000 depending on your axis. If you have movement then you're good. If you don't have movement you have to check your board setup, maybe jumpers aren't set right or other issues.
Re: MKS SGen L V1.0
February 12, 2020 10:49AM
Quote
jaded
Quote
bartolomeus

Hi,

could you elaborate how you got sensorless homing working. Ik have the sgen-l with mks tmc2209 drivers. I compiled Marlin 2.0 firmware with senorless homing enabled, but I am not getting any movent on homing.

I will take a stab at possible issues.

Send M119 and check your endstop status before attempting homing. I'm guessing they will be TRIGGERED.

If they are triggered, using your hand move your axis to your home position (perferrably x or y for safe testing) and send G92 X0 or G92 Y0 depending on which axis you are testing.

After G92 command send G0 X25 F1000 or G0 Y25 F1000 depending on your axis. If you have movement then you're good. If you don't have movement you have to check your board setup, maybe jumpers aren't set right or other issues.

Thanks, I'll give it a go. But is this a workaround or a solution?
I already know I get motor movement, because I can move all axis from the menu.

Edit: M119 shows X and Y endstops are triggered
And I get movement with GO X25 F1000

Edited 2 time(s). Last edit at 02/12/2020 10:54AM by bartolomeus.
Re: MKS SGen L V1.0
February 12, 2020 11:09AM
You will have to connect the diag0 pin on the stepper driver to the endstop signal pin.
Re: MKS SGen L V1.0
February 12, 2020 12:17PM
ok, that's the middle one in the 'triangle' right?

edit: Ok, confirmed, it was the 'middle' one. I have it working now. Thanks for your help!

Edited 1 time(s). Last edit at 02/12/2020 01:00PM by bartolomeus.
Re: MKS SGen L V1.0
February 12, 2020 01:09PM
Quote
bartolomeus
ok, that's the middle one in the 'triangle' right?

edit: Ok, confirmed, it was the 'middle' one. I have it working now. Thanks for your help!

Good to hear.

It's best to find the stallguard threshold value that causes instant endstop trigger and then drop it by 5 to try to keep a reliable homing setup.

Also, if you change your speeds in marlin (or from the lcd controller) test homing again. The sensorless homing is very dependant on the homing speed.
Re: MKS SGen L V1.0
February 12, 2020 01:12PM
Quote
jaded
Quote
bartolomeus
ok, that's the middle one in the 'triangle' right?

edit: Ok, confirmed, it was the 'middle' one. I have it working now. Thanks for your help!

Good to hear.

It's best to find the stallguard threshold value that causes instant endstop trigger and then drop it by 5 to try to keep a reliable homing setup.

Also, if you change your speeds in marlin (or from the lcd controller) test homing again. The sensorless homing is very dependant on the homing speed.

Yeah, I found some values that work for now. I also dropped homing current to half of motor current in case homing fails.
Re: MKS SGen L V1.0
February 12, 2020 02:08PM
My homing currents are still marlin default 800. I dropped my rms currents. Not had issues with sensorless homing or printing.
Re: MKS SGen L V1.0
March 18, 2020 06:47AM
Could you please go into detail how you managed to get MKS SGEN L + MKS TMC2209 v1 to work with sensorless homing?
I tried setting everything correctly in Marlin and connected the "middle" pin (the one facing toward the mid of the driver) to the endstop pin, but M119 showed X and Y to be always triggered.

Could you perhaps show a picture of your setup and share your config? I would really appreciate that.

Thanks in advance and best regards
LaKi
Re: MKS SGen L V1.0
March 18, 2020 07:53AM
If you connected diag0 to the endstop pin and you still show triggered you might need to invert the endstop logic.

I am at work and don't have my config files but I believe that is all that is needed with the mks bundle.

You have to ensure also the jumpers UNDER the drivers are all removed and the uart jumper is connected.
Sorry, only registered users may post in this forum.

Click here to login