Welcome! Log In Create A New Profile

Advanced

LPC1768/1769 Port of RepRapFirmware v3.1.x

Posted by gloomyandy 
LPC1768/1769 Port of RepRapFirmware v3.1.x
July 06, 2020 04:14PM
The original 3.0 thread was getting a little old (and long) so we have decided to create a new thread for V3.1.x (which includes the current 3.1.1 versions). We have also included a number of links to information which will hopefully help anyone trying to use this port.

History
The original LPC port of RRF firmware was created by Sdavi and details of that can be found here [reprap.org] and here [reprap.org], a huge thanks for this and continuing work. The LPC port of RRF is based upon the Duet3D source which can be found here [github.com] many thanks to DC42 for his help and support.

Released files
Version 3.1.x binary versions can be found here: [github.com] there are currently 4 different builds for different hardware configurations...
firmware-wifi.bin for users with add-on ESP8266 WiFi boards
firmware-nonet.bin for users that do not need networking support - this is the only build that has support for RepRap style displays.
firmware-eth-notmc.bin for users that have hardwired Ethernet networks (typically smoothieboard, or MKS SBase boards), this version does not have TMC driver support.
firmware-sbc.bin for users that wish to attach an external Raspberry Pi SBC.
Unfortunately due to memory limitations it is not possible to include all features in a single build.

The source code for the above builds is provided in a set of github repositories, the builds are usually tagged with the release version:
[github.com] Hardware support framework for the LPC version
[github.com] Main RRF source modified for use with LPC
[github.com] Additional libraries
[github.com] RRF ESP 8266 WiFi Module source
[github.com] Modified versions of the ESP8266 Arduino build system for the WiFi Module

Getting started
For information on how to use and configure the LPC version please see the Wiki pages: [github.com]
For details of which boards and drivers are currently supported please see: [github.com]
There is an LPC specific version of the online configuration tool that will help you build the needed gcode files used to setup the firmware for your machine. You can find it here: [jaysuk.github.io]
All of the above has been provided by Jay_S, thanks Jay!

For users who would like to attach a WiFi module or Raspberry Pi SBC to their LPC board, user PCR has created adaptor boards see: [www.tindie.com]

Support
To make it easier to provide support to users of this firmware we have created a discord server which can be found here: [discord.gg] This is probably the best place to get help if you need it.

Further information
There is a huge amount of useful information available about RRF as part of the Duet3D documentation: [duet3d.dozuki.com]
in particular a complete list of available gcodes can be found here: [duet3d.dozuki.com]
The Duet3D forum is also a great place to find information: [forum.duet3d.com]

The links provided here are up to date as of 6-July-2020, but it is not possible to modify this post, so please check for further updates in the thread.

Edited 1 time(s). Last edit at 07/06/2020 04:22PM by gloomyandy.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 11, 2020 06:19AM
Just tried 3.1.1 Ethernet, no TMC.
No change regarding DWC load speed, takes around 16 minutes. Most probably MKS SBASE 1.3 shitty work. Recently I noticed that instead of a Ferrite Bead they use a FUSE in the 3.3V line going to the Eth chip ! Makes sense isn't ? They are both labelled F on the schematic !

These morons can't even copy properly ! Although I put a real FB instead of the F, no change. I am pretty sure there must be other errors or out of specs chips they collected from the garbage bins outside the factory.

Anyway it is dirt cheap because it is just dirt ! I bought it just to try a 32bit board and didn't have much expectation.

One thing regarding this firmware version compared to the last one from sdavi, the T° spikes for hot end and bed are still there. sdavi implemented some filtering to avoid these.

I am back to RRF 2.0 and eventually will buy a decent 32bit board. May be rob the kids piggy bank and buy a DC42 Duet.

Edited 1 time(s). Last edit at 07/11/2020 06:20AM by MKSA.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 11, 2020 07:28AM
@MKSA we have had a few folks try the SBase board now and it seems that for virtually everyone the DWC load time is approx 80 seconds (as is mine), not fast but nowhere near as slow as you get. So there must be something different about your board/network/whoknowswhat that is triggering the extra slow download. The extra ADC filtering is present in this build but it is off by default, there is a setting in board.txt for it.

I'm currently in the process of merging some of the new changes from SDavi into this version and will probably post a link to a test build in the next day or so. It has an updated Ethernet driver and a slightly different (more efficient) ADC filter and a few other changes, but I suspect it will not fix your download speed.

If WiFi is an option for you that seems to work much better for most folks, or if you have a spare rPi you could go that route (but I understand it is not for everyone).
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 11, 2020 10:11AM
Here is my network part in config.g

; Network

;M111 S0 ; Debug off

M540 P00:1F:11:02:04:20 ; set custom MAC address
M552 S1 P192.168.2.2 ; enable network and set IP address
M553 P255.255.255.0 ; set netmask

M550 P"My Printer" ;set printer name

M554 P192.168.2.1 ; set gateway
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet


My PC is 192.168.2.1 Fixed IP, separate network interface from my main net which is via Wifi. I tried different PC, just wired Eth no Wifi interface, , direct via cable, cross cable too, via the router ... All this to no avail.
May be the guy who designed this board is called Sum Thing Wong.

No way I buy a WiFi board from MKS, besides it connects to the TFT32 not the SBASE 1.3

DWC should load in second, so 80 s others see is not correct either although I could live with.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 11, 2020 10:54AM
The WiFi is not MKS. it is a separate nodemcu module (ESP8266) that you hook up either using and adaptor board or make up your own wiring loom. It connects to the main board using SPI and the connection is pretty fast. The details are here: [github.com] not for everyone, but at least a couple of folks (in addition to me) have it working with the SBase.

Yep the download should take less than 80 seconds over WiFi it is only a couple of seconds or so (if that). SO I'm pretty sure that there is something not right, but your case seems much worse than others but I can't see anything wrong with how it is set up. I have my board hooked up to a router that supports 10/100/1000Mbit and it claims to have connected at 100Mbit.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 11, 2020 03:09PM
Quote
gloomyandy
The WiFi is not MKS. it is a separate nodemcu module (ESP8266) that you hook up either using and adaptor board or make up your own wiring loom. It connects to the main board using SPI and the connection is pretty fast. The details are here: [github.com] not for everyone, but at least a couple of folks (in addition to me) have it working with the SBase.

Yep the download should take less than 80 seconds over WiFi it is only a couple of seconds or so (if that). SO I'm pretty sure that there is something not right, but your case seems much worse than others but I can't see anything wrong with how it is set up. I have my board hooked up to a router that supports 10/100/1000Mbit and it claims to have connected at 100Mbit.

I see but for for a few dollars more, I would prefer a SKR 1.4 turbo with Wifi module. The MKS in addition to be a pain with the Ethernet, uses 8825 stepper drivers soldered in place.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 14, 2020 07:34AM
Quote
MKSA
The MKS in addition to be a pain with the Ethernet, uses 8825 stepper drivers soldered in place.
And the slow / fast decay pin is fixed and not externally accessible. Which leads to all kinds of problems.

From what I learnt in the github wiki the SPI pins are not externally accessible but through a level shifter. Only solution to get this working is to unsolder an RC lowpass on some other header and use that.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 08:33AM
Tried latest 3.1.1 version and it seems to work quite well. I have MKS SBase 1.3 and I'm using ethernet, at least for now. Might try SBC and Wifi later, although my ESP8266 doesn't have USB port so flashing it might be interesting (its MKS tft Wifi-module).

Couple of issues though:
- at first the board kept resetting itself and it was impossible to get connected with DWC. The board got an IP address, but right after trying to connecti with wget or browser, the board would reset itself. It seems the problem was that I had enabled 12864-display support as the LPC-configurator offered. Disabling that seems to fix that and now it seems to be quite stable. A couple rests have happened, but at that time I had two connections to DWC.
- FAN0 doesn't start when issuing M106 S255. Nudging the slider to 95 and back to 100 in DWC starts the fan. Not sure if this is due to the fan or something else. I had to reduce the frequency from 500 to 50 get the fan to turn with speeds below 100.

The single HTTP connection is a bit of an issue since occasionally I want to control the printer through my phone instead of my PC. So maybe setting up a nginx reverse proxy to limit the connection to DWC to single connection would overcome that problem.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 08:39AM
spegelius

good to hear another user with it working on the MKS Sbase.
What are your loading times like on the first load of DWC?

And you won't be able to use the MKS tft Wifi-module as thats an ESP-01 and doesn't have enough pins etc.
The NodeMCU or Wemos Mini are the recommended type


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 08:52AM
Loading times are fine, no excessive waits. File upload is a bit slow, about 90kB/s average so with bigger files it takes a while, but not a big problem.

Ok, good to know about the Wifi-module. I'll probably try the SBC route at some point, with raspi I could use a webcam. For now ethernet is fine.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 02:11PM
The fan is definitely working in a weird way and it doesn't seem to be about the fan as I tried with another fan and it shows the same behaviour. It seems that if the fan frequency is below 500Hz (tried 400Hz and below), issuing M106 S255 as the first command after boot or M950 doesn't start the fan. However, if the fan frequency is 500Hz or more, M106 S255 works as expected.
When frequency is 400Hz or lower, to get the fan to spin issue M106 S0-254, i.e. something else than 255 and then M106 S255. As a quick fix I tried adding M106 S0 to the end of config.g, didn't help and to start script of my slicer, didn't help either. Maybe there's a command that resets something when print is starting?

Not an huge issue, then only reason for frequencies lower than 500 is the current part cooling fan on my printer, which I need to replace anyways as it is an axial fan and inadequate with Volcano. The other fan I tried starts happily with lower speeds even at 500Hz frequency so I don't need to use a lower frequency.

I do have a couple of Duet boards, I'll check if this happens with those boards and this fan too.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 02:14PM
You could increase the blip time. That's the B value.


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 03:01PM
No change with B, tried 0.3
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 03:17PM
I would go for something higher like 1


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 16, 2020 06:11PM
I'm pretty sure I have a fix for the fan problem (something relate was reported the other day with thermally controlled fans). It's a little complex to describe what is going on an is related to the way that the PWM frequency is set at the same time that an initial speed is also being defined. I'll try and put together a release with the fix in it in the next few days. But for now setting a non-zero speed and then setting a different speed should have it working.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 17, 2020 12:39PM
Folks I've just upload a new release 3.1.1-14, this contains a fix that will hopefully resolve problems with fans not running. It also contains a change to the Ethernet build that disables the LCD support because of the lack of available RAM. The release can be found here: [github.com]
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 17, 2020 12:45PM
Great, thanks. I'll test it maybe tomorrow, currently doing some printing with Marlin to get some reference, I'm getting some wierd layer artifacts. Probably related to the abysmal part cooling, but I want to see if the problem manifests with Marlin too.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 19, 2020 03:27AM
The fix seems to work, the fan now starts when set to full speed, no need to set other speeds before that.

Also the layer artifacts are present with Marlin too, so nothing firmware related.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
July 19, 2020 03:50AM
@Spegelius Thanks for testing it and the feedback, good to know it fixes your fan problem.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 01, 2020 09:34AM
I want to ask (I'm still very beginner)
Can I add driver expansion to my SKR_Turbo board ?
i want to use three motors on the z axis, so i need one additional driver
In the Marlin firmware, it might be a little easy for me to do it, but in RRF I have never learned how to change the Pin function on the board

Edited 1 time(s). Last edit at 08/01/2020 09:35AM by exbal.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 01, 2020 09:37AM
The expansion board is not currently supported I'm afraid


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 13, 2020 03:25AM
Are there any plans to make this work for esp32 modules?
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 13, 2020 03:29AM
Not at the moment.
The whole firmware for the ESP would require porting.
I'm not aware of any plans for this to be done for the Duet range of boards either


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 21, 2020 05:58PM
I have another problem. The sensorless does not seem to work. Do you know if I can adjust the homing speed and the sensorless sensitivity?
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 30, 2020 02:20PM
Trying to set up SBC mode with MKS Sbase, is it supported? I have Raspi set up and connected the boards using info from SKR instructions to correct pins in MKS. However, even though Duet Web Server and Duet Control Server are alive, browsing to [duet3] keeps telling that DCS is not started.

Edited 2 time(s). Last edit at 08/30/2020 02:22PM by spegelius.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 30, 2020 03:40PM
Yes, it should work as wifi works.
You'll need to perform the hardware modification as detailed here [github.com]
Most of the settings are the same, you just don't need to include 8266wifi.espDataReadyPin or 8266wifi.espResetPin in your board.txt file

Prepare the wiring (e.g. resistors etc) as per here [github.com]

Edited 1 time(s). Last edit at 08/30/2020 03:41PM by jay_s.


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 31, 2020 01:02PM
Ah yes, forgot that one completely. Thanks, seems to be working now. Haven't printed anything yet and my Raspi just hangs by the wires at the moment, but everything seems to work so far. And network speed is way up, from ~70kb/s to 5.5Mb/s so that's an nice improvement.
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
August 31, 2020 01:08PM
That's great news. Glad you got sorted


Based in Darlington, North East
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
September 01, 2020 04:17PM
@gloomyandy and the rest! Thanks for the great opportunity to dive into reprap firmware. I am relatively new to 3d printing as I am with my first having it for 3 months, but decided to change Marlin as I had many problems with features not available on pure TFT BTT35 V2 - filament sensor, BTT Mini UPS Resume Print, etc. Thankfully, RepRap Firmware seems to work great with exception of the Mini UPS.

I set sensorless homing which works perfectly. Did a bit of calibration with pressure advance. I must say that I put some sweat to make the heater on the bed working! Being new to the RepRap I thought there is some bug or I did something bad on my SKR 1.4 turbo. But after reading the 3D Beginner's blog, I found my solution with the PID tunning.

The one thing I currently struggle to make it working is the Resume printing with the help of BTT mini UPS 24V. I have the following line in my config.g. Is it the case, that this feature is not working because of the limited memory we have on SKR boards?
M911 S23.5 R23.7 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ;enable power-loss recovery

My Setup:
COREXY Sapphire Plus
SKR 1.4 Turbo + TMC2209
TFT35 V2
BTT Mini UPS 24v
BTT Shutdown Relay (currently with hardware problem)
Re: LPC1768/1769 Port of RepRapFirmware v3.1.x
September 01, 2020 05:58PM
@fenixsz, you will almost certainly get more help if you use the LPC discord server (see the LPC Wiki for details). The M911 command you are trying to use requires that the main board is able to monitor the supply voltage, the BTT SKR boards do not have that feature. When using the BTT UPS it sends a trigger value to the board and it may be possible to configure RRF to use this trigger, but it is not something I've tried nor have I seen any posts from users that have done this and have it working. You should probably ask this question again on the discord server.
Sorry, only registered users may post in this forum.

Click here to login