MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.32k stars 19.25k forks source link

BIGTREETRECH SKR V1.1 32bit LPC1768 mcu #12632

Closed weed2all closed 5 years ago

weed2all commented 5 years ago

Good morning!another question/new board for marlin... After a search on Google I cross upon this board that in my vision has identical footprint as a MKS GEN L board only new is that have an LPC 1768 mcu as a Sbase and Smoothieboard.. Can marlin run this board?

https://s.click.aliexpress.com/e/ckQ3MWVS

gloomyandy commented 5 years ago

Hmm looks like another variation on a smoothieboard. It is different from the MKS Sbase as it seems to be using the same SPI channel for the LCD and the LCD SD card (unlike the SBase which uses different channels and instead shares an SPI channel between the two SD card connectors). This same SPI channel is bought out on to the LCD/SPI/SD header and is likely to be used when talking to TMC SPI devices. This may cause problems with some LCD displays. I'm not sure if there is a good pins.h file for this configuration so it may need a new one.

weed2all commented 5 years ago

Yeah...but in my opinion this is better because of swapable drivers...i know that you can add external drivers to Sbase...but is not the same thing...

gloomyandy commented 5 years ago

I wasn't saying if it was better or worse, just pointing out that it is different from what is probably the closest match in terms of existing pins files and some of the changes that will probably be needed if anyone wants to get one working.

dot-bob commented 5 years ago

I have one sitting here I plan on installing on a corexy. I just need to find time to get around to it. It should be simple to get up and running. If I get to it before someone else I will submit a pull request to add a new board type and a pins file.

weed2all commented 5 years ago

That will be awsome!

bipsendk commented 5 years ago

Also looking at this board (actually just ordered one). Having it supported, hopefully also with support for 12864 RepRap Full Graphics LCD and MksMini would be awesome .... As far as I can see, some pins are not the same as on the Smoothieboard (source: [https://www.biqu.equipment/collections/control-board-kits/products/bigtreetech-skr-v1-1-motherboard-32-bit-smoothieboard-arm-cpu-control-board-open-source-for-tft3-5-printer-pannel])

bipsendk commented 5 years ago

I just noticed, there are some minor issues regarding the picture with the pin assignments. Both EXP connectors are shown as EXP1 .... And 0.15 is apparently connected on both EXP1 and EXP2, and 0.16 only exists on the LCD/SD/SPI pin array (which I think is a bug in the picture)...

XneddyX commented 5 years ago

Hello i orderd some one to.... I'm in contact with The Dealer and i ask him about the Problems .. i will Report You...

bipsendk commented 5 years ago

I am not so familiar with the LCP1768 - but would it be possible to use e.g. the Y_MAX (P1_26) as (software) PWM output to control a BLtouch probe ?

bipsendk commented 5 years ago

Seems like some work already is in progress: #12689

hectori4502 commented 5 years ago

other good board for marlin...? REMRAM https://youprintin3d.de/elektronik/open-source/1029/remram-v1.5-first-edition.html

bipsendk commented 5 years ago

other good board for marlin...? REMRAM https://youprintin3d.de/elektronik/open-source/1029/remram-v1.5-first-edition.html

Also more than 4 times the cost of SKR, and not with replacable stepsticks. According to the description, that board is already supported by Marlin 2.0:

"Zur Zeit nur Marlinunterstützung V2.0"

XneddyX commented 5 years ago

This is the answere from BIQU BQ: "Hello friend. The pin out photo is right. You can see this video. It can work with 12864LCD. https://www.facebook.com/echo.li.520562/videos/226299174934140/?t=37"

bipsendk commented 5 years ago

This is the answere from BIQU BQ: "Hello friend. The pin out photo is right. You can see this video. It can work with 12864LCD.

Well, checking with the pinout of the RepRap Discount Full Graphics LCD, it would mean that the LCD4 pin on EXP1 is connected to the SCK pin of EXP2.. Also, they pinout shown designates EXP1 and EXP2 on the PCB - but the descriptive text states 2 connectors named EXP1 - so some sort of typo definitively exists on their pinout reference...

I will check up on it once I receive the board, that I have ordered...

gloomyandy commented 5 years ago

As I said above I think this board shares a single SPI bus between the LCD display and the SD card attached to the LCD so it is probably correct that LCD4 (EXP1) and SCK(EXP2) are connected to the same pin.

Nuttavoot commented 5 years ago

I am not so familiar with the LCP1768 - but would it be possible to use e.g. the Y_MAX (P1_26) as (software) PWM output to control a BLtouch probe ?

I ask to Aliexpress store about how to connect a BLtouch, this is the answer "they can not be connected to use, because SKR does not have the appropriate port."

If someone can connect a BLtouch then I would like to order it.

b0ssman commented 5 years ago

According to the smoothieboard bltouch wiring you wire can wire the servo to 1.23, 2.4, 3.25 or 3.26 http://smoothieware.org/zprobe#bltouch-or-servo-retractable-touch-probe on the SKR 3.25 and 3.26 are on the LCD/SD/SPI header so in theory it should work.

b0ssman commented 5 years ago

a i didnt see that they are using 3.25 and 3.26 for the lcd as well. but 1.26 is also hardware pwm capable. http://smoothieware.org/pwm-capable

b0ssman commented 5 years ago

i just ordered a SKR board. the price is unbeatable

Nuttavoot commented 5 years ago

a i didnt see that they are using 3.25 and 3.26 for the lcd as well. but 1.26 is also hardware pwm capable. http://smoothieware.org/pwm-capable

That smoothie board in the above link uses LCP1769, will it be same as LCP1768 ?

gloomyandy commented 5 years ago

The LPC1769 is just a carefully selected version of the LPC1768 that can run at a faster clock speed. So yes the pins are the same.

Nuttavoot commented 5 years ago

i just ordered a SKR board. the price is unbeatable

Keep us posted for progress.

talldonkey commented 5 years ago

Check out this branch from BIQU directly for the SKR:

https://github.com/Msq001/Marlin-bugfix-2.0-biqu

Source: https://www.facebook.com/groups/505736576548648/permalink/604785386643766/

bipsendk commented 5 years ago

Personally I prefer native support in the main branch - but as far as I can see from the commits, it is more or less already done. I am still waiting for my board, will test the bugfix-2.0 as soon as I can put it on the board (I have already tried to test-compile it in VScode without issues).

040medien commented 5 years ago

I was able to get the latest Marlin 2.0 running on the SKR, but my REPRAP_DISCOUNT_SMART_CONTROLLER is not working. The backlight is coming on, but it's blank. It's not the contrast, so I'm wondering if the pins.h is correct for this combination. Did anyone manage to get the same combination to work?

gloomyandy commented 5 years ago

@040medien it is not the same board but this one is pretty similar to the Sbase in many respects, so you may want to check out this thread (if you have not done so already) https://github.com/MarlinFirmware/Marlin/issues/12796

040medien commented 5 years ago

Thanks for the pointer @gloomyandy - I made a mistake in my post - I'm actually trying to use the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, but no luck so far. According to the post you linked to, this should work.

Edit: Never mind, the display was broken. I tried it with an otherwise identical display and it worked.

Miroslav57 commented 5 years ago

Hello 040 medien . I bought a skr v1.1 to and I have a reprap discount lcd from my Anet A6 but I can't made it work. The backlight isn't coming.

040medien commented 5 years ago

Is that a standard RRD GLCD? If so, try flipping the cables 180 degrees. It's easiest if you carefully pull off the black plastic receptacles on either the board or the LCD.

Miroslav57 commented 5 years ago

Standard I thinks .It is a model 12864 with the scroll button and the reset button on the right of the screen . I already have turn th cable in.every way possible

040medien commented 5 years ago

I just checked, it's not standard: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/config/examples/Anet/A6/Configuration.h

Use ANET_FULL_GRAPHICS_LCD instead.

kAdonis commented 5 years ago

I used this display before You need a custom cable or change the pins in the firmware, its not trivial. You may consider buying a different display, the RRD GLCD is quite cheap

Miroslav57 commented 5 years ago

Ok thanks a lot . I will buying a new screen . Maybe an mks tft35

040medien commented 5 years ago

Just know that these TFTs work compelely differently. Last I checked you couldn't even see the current printing status on them.

Miroslav57 commented 5 years ago

Ok so I have purchase a rrd glcd . Another questions did you succeed to install the driver for windows ? My computer didn't recognize the board

040medien commented 5 years ago

Sorry, I'm using OS X.

gloomyandy commented 5 years ago

What version of Windows do you have? The driver is already there for Windows 10. For other versions you can find it here: https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x/Marlin/src/HAL/HAL_LPC1768/win_usb_driver

Others have reported that this driver works fine for them.

Miroslav57 commented 5 years ago

It is for windows seven

gloomyandy commented 5 years ago

So did you try the driver I gave a link to? What happens?

Miroslav57 commented 5 years ago

No sorry tomorrow i will

Miroslav57 commented 5 years ago

I change the usb cable and now it work fine

myseg commented 5 years ago

I have just received this board over the mail, and right after unboxing I realized what you were discussing here, that most of the pins are not broken out, they are just copies of aux1 and 2... Still, I am planning to hook it up with 3x tmc2130s and a bed leveling sensor, I will post some updates if I make any progress. If nothing helps, I might just hack some wires to the tiny pads of the microcontroller IC itself, as BIQU somehow failed to do so.. If I am mistaken, please correct me, I'd rather not hack into it unless I have to.

040medien commented 5 years ago

If you look at bigtreetech's Facebook page, they posted a few videos running TMC2130 and Marlin 2.0 on it. What's interesting is that they seem to have connected the drivers' CS pins to the enable pin next to each driver on the board. I've never seen that before, but it seems to work. Not sure which pins they use for SPI. There are no servo pins for a bltouch, so I'll try to use ZMAX for that when I got some time.

myseg commented 5 years ago

Yes, that is what I am concerned about, I have no idea how it could possibly work but ill give it a try today. If this works, the tmc2130 could work like that on other boards too, making less wire bulk altogether. I don't have too high hopes though. Still, it was 16 bucks, it's worth it to buy just for experiments

kAdonis commented 5 years ago

they seem to have connected the drivers' CS pins to the enable pin next to each driver on the board.

Probably the drivers are enabled through SPI, so the EN pins are no longer needed, its a feature @teemuatlut is working on AFAIK it is currently only supported for TMC2660 in mainstream Marlin, but its on the list for all smart drivers https://github.com/MarlinFirmware/Marlin/pull/11998#issue-220185771 @myseg it could work with Bigtreetech's Marlin fork, But that is just a guess

040medien commented 5 years ago

I checked and Bigtreetech's Marlin fork doesn't add more than pins_BIQU_SKR_V1.1.h - so it should work in mainline as well if it works at all.

myseg commented 5 years ago

Right now I am trying to hook up an lcd controller first, with no luck. BIQU completely screwed up the pins on exp1, rotating the outermost 4 pins 180° and leaving the 6 midde ones. I hope I did not fry my lcd. Here is the code I have modified, all the other lcd code has been deleted before this. The screen turns on but it's blank white, but the beeper and rotary works. No idea about the sd card yet. I had to modify the parallel cables a bit, here's a pic of them: link I am starting to approach a dead end about the lcd, what could be possibly missing?

Code:

#if ENABLED(MKS_MINI_12864)
  #define MISO_PIN            P0_18   // (50)  system defined J3-10 & AUX-3
  #define MOSI_PIN            P0_17   // (51)  system defined J3-10 & AUX-3
  #define SCK_PIN             P0_15
  #define BEEPER_PIN          P1_30
  #define BTN_EN1             P3_25   // (31) J3-2 & AUX-4
  #define BTN_EN2             P3_26   // (33) J3-4 & AUX-4
  #define BTN_ENC             P2_11
  #define SD_DETECT_PIN       P1_31   // (49) not 5V tolerant   J3-1 & AUX-3
  #define KILL_PIN            P1_22   // (41) J5-4 & AUX-4
    //#define LCD_PINS_RS         P0_16   // (16) J3-7 & AUX-4
  #define LCD_SDSS            P1_23   // (16) J3-7 & AUX-4

  #define DOGLCD_CS           P0_15   // (16)
  #define DOGLCD_A0           P0_16   // (59) J3-8 & AUX-2
  #define DOGLCD_SCK          SCK_PIN
  #define DOGLCD_MOSI         MOSI_PIN
  // GLCD features
  //#define LCD_CONTRAST   190
  // Uncomment screen orientation
  //#define LCD_SCREEN_ROT_90
  //#define LCD_SCREEN_ROT_180
  //#define LCD_SCREEN_ROT_270

#endif // MKS_MINI_12864
myseg commented 5 years ago

Also, here is the corrected pinout for it ( exp2 is upside down for better visualization) link

myseg commented 5 years ago

Alright, got the sd card working, that's someting I guess

kAdonis commented 5 years ago

The LPC1768 hardware SPI pins are:

  #define MISO_PIN            P0_17
  #define MOSI_PIN            P0_18
  #define SCK_PIN             P0_15

your MISO and MOSI pin definitions are swapped Are you sure you see the external SD card and not the internal?