Welcome! Log In Create A New Profile

Advanced

LPC port of RepRapFirmware

Posted by sdavi 
PB
Re: LPC port of RepRapFirmware
July 26, 2019 06:51AM
I calibrated and tested nonlinear extrusion. Everything seems to work. In free-flowing nozzle I get A=0.027 (measured extraction shortage of 100mm of filament at 1 and 5 mm/s) in real printing A=0.156 (this value makes equal width of printed 70 mm long single perimeter walls at 30 mm/s (extrusion rate 1.15 mm/s) and 75 mm/s (extrusion 2.88 mm/s). B=0 in both cases.

Seems that back pressure and therefore nonlinearity in extrusion rate in heated free nozzle is much less than in real printing condition. I think back pressure is mainly from the fact that space for liquid plastic to flow just after it came from the nozzle is limited by previous layers (h=0.2 mm, nozzle=0.4 mm, print width=0.5 mm)

Also I needed to decrease extruder steps per mm as extrusion rate is increased by nonlinear correction.
PB
Re: LPC port of RepRapFirmware
July 26, 2019 12:29PM
BTW it seems that nonlinear extrusion uses segment average speed, not current speed of effector for correction. Start and end of a long segment where acceleration is not zero and actual speed is therefore decreased by frimware seem overextruded. Is it right?

Edited 1 time(s). Last edit at 07/26/2019 12:29PM by PB.
Re: LPC port of RepRapFirmware
July 26, 2019 04:19PM
Quote
PB
BTW it seems that nonlinear extrusion uses segment average speed, not current speed of effector for correction. Start and end of a long segment where acceleration is not zero and actual speed is therefore decreased by frimware seem overextruded. Is it right?

That's correct, nonlinear extrusion adjusts the extrusion rate of the move as a whole. But I would expect the effect on the start and end of a segment to be very small, unless you are using very low acceleration. OTOH, using insufficient pressure advance will result in under-extrusion at the start of the segment and over-extrusion at the end.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
PB
Re: LPC port of RepRapFirmware
July 27, 2019 03:01PM
Quote
dc42
Quote
PB
BTW it seems that nonlinear extrusion uses segment average speed, not current speed of effector for correction. Start and end of a long segment where acceleration is not zero and actual speed is therefore decreased by frimware seem overextruded. Is it right?

That's correct, nonlinear extrusion adjusts the extrusion rate of the move as a whole. But I would expect the effect on the start and end of a segment to be very small, unless you are using very low acceleration. OTOH, using insufficient pressure advance will result in under-extrusion at the start of the segment and over-extrusion at the end.
Good to know!
Another thing, are M201, M203, M204 and M566 parameters (speeds, accelerations, jerks) on delta geometry apply to cartesian axes of effector or to tower motors? In other words, what are X Y and Z in this case?
PB
Re: LPC port of RepRapFirmware
July 29, 2019 08:27AM
I have LPC1769 and M122 shows me it is still at 100MHz. Where in sources (or in config) I can specify frequency of 120MHz which is available for my chip?
Re: LPC port of RepRapFirmware
July 29, 2019 03:08PM
Quote
PB
Quote
dc42
Quote
PB
BTW it seems that nonlinear extrusion uses segment average speed, not current speed of effector for correction. Start and end of a long segment where acceleration is not zero and actual speed is therefore decreased by frimware seem overextruded. Is it right?

That's correct, nonlinear extrusion adjusts the extrusion rate of the move as a whole. But I would expect the effect on the start and end of a segment to be very small, unless you are using very low acceleration. OTOH, using insufficient pressure advance will result in under-extrusion at the start of the segment and over-extrusion at the end.
Good to know!
Another thing, are M201, M203, M204 and M566 parameters (speeds, accelerations, jerks) on delta geometry apply to cartesian axes of effector or to tower motors? In other words, what are X Y and Z in this case?

To Cartesian axes.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: LPC port of RepRapFirmware
July 29, 2019 08:46PM
Quote
PB
I have LPC1769 and M122 shows me it is still at 100MHz. Where in sources (or in config) I can specify frequency of 120MHz which is available for my chip?

I think the SBase boards have a LPC1768. Have you checked what's printed on top of the chip on your board?


The speed is configured in system_LPC17xx.c, which reads the "Part ID" from the chip to determine if it's a 1768 or 1769, and sets the speed to 100MHz or 120MHz respectively.
Re: LPC port of RepRapFirmware
July 30, 2019 01:09AM
Would it be possible for somebody to compile this for me with paneldue enabled on the serial port. I would compile it myself but it is a bit beyond me.
Thank you in advance.

AUX serial now defaults to running as a standard serial console. Messages will go though the compatibility emulation. If you want it to operate as it does in RepRapFirmware (PanelDue style) download the source code and change the NO_PANELDUE define in Pins_LPC.h to 0 and recompile.

Edited 1 time(s). Last edit at 07/30/2019 01:10AM by Micktol.
PB
Re: LPC port of RepRapFirmware
July 30, 2019 06:31AM
Quote
sdavi
I think the SBase boards have a LPC1768. Have you checked what's printed on top of the chip on your board?
Thank you! Re-checked and found that the chip in Sbase 1.3 is actually LPC1768 although in BOM specified LPC1769.
Re: LPC port of RepRapFirmware
July 30, 2019 08:04AM
Quote
Micktol
Would it be possible for somebody to compile this for me with paneldue enabled on the serial port. I would compile it myself but it is a bit beyond me.
Thank you in advance.


I had actually made this a configurable option in board.txt for RRF3 a while ago, so i just copied those changes back to the V2 branch and just uploaded an updated binary here. (Only quickly tested with a FTDI cable on the aux serial)

Add the following line to board.txt to enable Panel Due Mode (disabled by default):
lpc.uartPanelDueMode = true; //Enable PanelDue Support

Non-Linear extrusion is also now enabled as well.

Edited 1 time(s). Last edit at 07/30/2019 09:12AM by sdavi.
Re: LPC port of RepRapFirmware
July 30, 2019 09:38AM
Thank you for your reply,
I found that to enable the paneldue the line needs to be at the start of the list.
Working now.

Edited 3 time(s). Last edit at 07/30/2019 11:38AM by Micktol.
Re: LPC port of RepRapFirmware
July 30, 2019 11:12AM
Micktol:

Which Panel Due are you using? Did you buy the preassembeld module or are you assembling your own?

sinneD
Re: LPC port of RepRapFirmware
July 30, 2019 11:24AM
I have a paneldue which I purchased direct from dc42, it is the separate controller so not the new i model.
Re: LPC port of RepRapFirmware
July 30, 2019 01:21PM
I was trying to figure out if/how to make it work instead of LCD.
I will try the new binary.
Re: LPC port of RepRapFirmware
July 30, 2019 01:40PM
You can verify if the paneldue support is enabled with the M122 P200 command.
Re: LPC port of RepRapFirmware
August 01, 2019 04:21PM
I get some random flakiness from DWC - the browser window will say "Lost Connection" but wont re-establish until I reset the board. The browser will not reconnect, but the webcam feed still displays in the background. Prints seems to complete without any apparent affect, Its really disconcerting though.

Here is my M122 outputs from the last time it happened- [pastebin.com]

Anyone else get this?

I am on ReArm with Ethernet adapter, no LCD or PanelDue. I am also connected to the PC via USB to be able to be able to reset or read M122 via Pronterface.

I re-imaged the SD card with fresh binary and cleaned up configs.

What is curious is that it says that there are 2 HTTP Responder states, no HTTP sessions, but a whole bunch of dropped packets.

Anyone have any ideas?

thanks

Dennis
PB
Re: LPC port of RepRapFirmware
August 02, 2019 09:25AM
Quote
sinned
I get some random flakiness from DWC - the browser window will say "Lost Connection" but wont re-establish until I reset the board. The browser will not reconnect, but the webcam feed still
Me too. Sometimes. Got no system in this and prints finish sucessfully anyway.
Here is my M122 in working condition. Of course I can not say in advance when it will stop working and make M122 just before fault. But anyway it may be helpful.
M122
=== Diagnostics ===
RepRapFirmware for LPC176x based Boards version 2.03+2 running on LPC176x at 100Mhz
Used output buffers: 3 of 16 (8 max)
=== RTOS ===
Static ram: 2884
Dynamic ram: 29248 of which 0 recycled
Exception stack ram used: 344
Never used ram: 260
Main SRAM         : 32476/32768 (292 free, 260 never used)
RTOS Dynamic Heap : 39936/46792 (6856 free, 6312 never used)
=== LPC PWM ===
HWPWM:500Hz T1:10Hz T2:0Hz T3:250Hz
Tasks: EMAC(blocked,56) NETWORK(ready,572) IP-task(blocked,68) HEAT(blocked,1356) MAIN(running,2012) IDLE(ready,160)
Owned mutexes: RTOSPlusTCPEthernet(NETWORK)
=== Platform ===
Last reset 03:06:20 ago, cause: [power up]
Flash Slot[55]: 
Last software reset at 2019-07-29 02:50, reason: User, spinning module GCodes, available RAM 260 bytes (slot 0)
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0xe000ed38 SP 0x00000000 Task 0x2007cfc0
Stack: 00000000 00000002 000186cd 2009c000 2007c310 00000000 100033d8 10004220 10003418 00000001 00018867 00000000 100033d8 10003d60 00000050 00000007 10003d60 100033d8 2007eb8c 00000001 a5a5a5a5 000003e7 a5a5a5a5
Error status: 0
Free file entries: 3
SD card 0 detected
SD card longest block write time: 10.8ms, max retries 0
Date/time: 2019-08-02 17:23:16
Slowest loop: 151.49ms; fastest: 0.05ms
=== Move ===
Hiccups: 2347, FreeDm: 76, MinFreeDm: 52, MaxWait: 3905442ms
Bed compensation in use: mesh, comp offset 0.000
=== DDARing ===
Scheduled moves: 62086, completed moves: 62066, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
=== Heat ===
Bed heaters = 0, chamberHeaters = -1 -1
Heater 0 is on, I-accum = 0.2
Heater 1 is on, I-accum = 0.2
=== GCodes ===
Segments left: 1
Stack records: 2 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
file is doing "G1 X-51.45 Y33.75 E2623.64256" in state(s) 0
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
lcd is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Slowest loop: 154.80ms; fastest: 0.00ms
Responder states: HTTP(1) HTTP(0)
HTTP sessions: 1 of 2
Interface state: active
NetBuffers: 3 lowest: 1
IP Event Queue lowest: 9
EthDrv: Rejected packets by IPStack (timeout or full): 0
EthDrv: RX IntOverrun Errors: 0
EthDrv: Dropped packets (no buffer): 2
EthDrv RX Errors: none

M122 P200
== Configurable Board Settings ==
leds.diagnostic = 1.18 
lpc.internalSDCard.spiFrequencyHz = 10000000 
stepper.enablePins = [ 0.4 0.10 0.19 4.29 NoPin ]
stepper.stepPins = [ 2.0 2.1 2.2 2.8 NoPin ]
stepper.directionPins = [ 0.5 0.11 0.20 2.13 NoPin ]
stepper.hasDriverCurrentControl = true 
stepper.digipotFactor = 113.33 
endstop.pins = [ 1.25 1.27 1.29 NoPin NoPin NoPin ]
zProbe.pin = 1.24 
zProbe.modulationPin = NoPin 
heat.tempSensePins = [ 0.24 0.23 0.25 ]
heat.heatOnPins = [ 2.5 2.6 NoPin ]
heat.spiTempSensorCSPins = [ NoPin NoPin ]
fan.pins = [ 2.4 2.7 ]
fan.tachoPins = [ NoPin ]
atxPowerPin = NoPin 
lpc.slowPWM.frequencyHz = 10 
lpc.slowPWM.pins = [ 2.5 NoPin NoPin ]
lpc.fastPWM.frequencyHz = 250 
lpc.fastPWM.pins = [ 2.7 2.6 2.8 ]
lpc.servoPins = [ NoPin NoPin NoPin ]
specialPinMap = [ NoPin NoPin NoPin NoPin NoPin NoPin NoPin NoPin NoPin NoPin ]
lpc.externalInterruptPins = [ NoPin NoPin NoPin ]
externalSDCard.csPin = 0.28 
externalSDCard.cardDetectPin = 0.27 
lpc.externalSDCard.spiFrequencyHz = 4000000 
lcd.lcdCSPin = 0.16 
lcd.lcdBeepPin = 1.31 
lcd.encoderPinA = 3.25 
lcd.encoderPinB = 3.26 
lcd.encoderPinSw = 1.30 
lcd.lcdDCPin = NoPin 
lcd.panelButtonPin = 2.11

Edited 1 time(s). Last edit at 08/02/2019 09:27AM by PB.
Re: LPC port of RepRapFirmware
August 04, 2019 06:11PM
I have a SKR V1.3 and spent 3 days trying to get Marlin 2.0 to run on it but had a ton of issues with Z that are still unresolved so I am looking for different controlling software. Is there a place to see what I need to do to get this to run on my system with a RRD GLCD?


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: LPC port of RepRapFirmware
August 05, 2019 07:50AM
Now updated to RRF v2.04 RC1, binary available here

LPC Changes:
  • Networking - Added timeout for connected sockets that don't send/receive data for a period of time.
  • SDCard - Allow SPI channel selection for the External SDCard.
  • Experimental: Initial Software SPI to work with SharedSPI has been implemented - only mode 0 and no settable frequency yet. Works OK with the RepRapDiscount Full Graphic LCD I have here. This is to support boards that have the LCD SPI pins wired to GPIO pins.
New board.txt options for softwareSPI and SPI channel selection:
//setup the Software SPI Pins
lpc.softwareSPI.pins = {NoPin, NoPin, NoPin}; //Set to GPIO pins to use as SCK, MISO, MOSI

//SDCard and Display now support a spiChannel option
// 0 = SSP0, 1 = SSP1, 2 = SoftwareSPI
lpc.externalSDCard.spiChannel = 0; 
lcd.spiChannel = 0;

Since we are only using HTTP, I've added in a timer that gets reset every time the socket receives or sends data successfully. If there is no activity for a number of seconds, it will close the socket. I've also added the socket states to M122 to assist with debugging.
Re: LPC port of RepRapFirmware
August 05, 2019 10:53AM
Sigh.

Will this be made for Platform.io so we can use Atom to compile it?

Edited 1 time(s). Last edit at 08/05/2019 11:08AM by Dark Alchemist.


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: LPC port of RepRapFirmware
August 05, 2019 11:29PM
Quote
Dark Alchemist
Sigh.

Will this be made for Platform.io so we can use Atom to compile it?

Most people don't need to compile the firmware as the configuration is stored on the SDCard. Just copy the firmware.bin and config files to the SDCard, and reboot.

Currently, the LPC port does not support drivers that are configured by SPI or UART for current control, etc. I've just uploaded an example SKR v1.3 board config to github. I don't have a SKR1.3 and have just based it on the pinout by SKR, the board values should be checked. I have included the new config options to use the experimental software SPI for the LCD to hopefully avoid making a new cable - also untested. There was some talk of SKR1.3 few page back too.

RepRapFirmware is configured using GCodes in various files in /sys/ on the SDCard. Using the RepRapFirmware configurator is the quickest way to get all the config files (just select duet 0.8.5 as the board) and edit the resulting files afterwards if needed. In order to support the different boards, the LPC port uses an additional file /sys/board.txt which holds the extra config options that are not settable via GCode (examples are here). The LCD also requires the menu files to be stored on the SDCard - they aren't compiled into the firmware and can easily be edited to suit your needs.

@sinned wrote some notes on the process of switching to RepRapFirmware on a ReArm and may be helpful.
Re: LPC port of RepRapFirmware
August 06, 2019 12:35AM
Quote
sdavi
Quote
Dark Alchemist
Sigh.

Will this be made for Platform.io so we can use Atom to compile it?

Most people don't need to compile the firmware as the configuration is stored on the SDCard. Just copy the firmware.bin and config files to the SDCard, and reboot.
I tried that with the Smoothieware (which is 100% compatible with SKR V1.3) and not a single hiccup until it came to the LCD because the Smoothieboard has 2 pins reversed (Exp 1 and Exp 2) and need to be swapped or you get nothing on the screen.

Marlin 2.0 was an absolute nightmare and refused to work on my printer's Z reliably. I mean even the max feedrate it would sometimes ignore so a G1 Zxx F6000 (with max feedrate of 5 mm/s for Z) would screech the motors and lock them up. It had a lot of issues but only for Z. Not sure if it was the board but I did change Z from Z on the board to E1 and exactly the same nonsense. I reported this on their github but the admin closed the thread (as one person told me they are more wanting to get this finished and a final release than to fix some of the stuff I mentioned). Ahhh well the board went back to Amazon today and the replacement was due here tomorrow but UPS lost it so they refunded me. The SKR V1.3, for me, simply will not work so was a nice brick. I almost even broke my 50 dollar Boroglass as it slammed into the nozzle and pushed it so hard into it that the framed flexed but luckily no damage that I could find was done.

I just wanted a 32bit board that works without breaking the bank but not happening.

Oh, I plugged everything back up to the Melzi 2.0 board (1284p based) and tried my gcode file and perfect with no issues so I am at a loss as to why 8bit works but 32bit board was a horrible mess and only for the one axis too.


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: LPC port of RepRapFirmware
August 06, 2019 01:17AM
@Dark Alchemist

I do have an SKR 1.3 running RRF on it as well.
I have not tried the latest binary on it yet though. I am making some hardware mods to that printer right now.

LCD may work natively with latest binary. Else, you might have to make a few jumper wires.
What stepper drivers are you using?
If you scroll back a page or two you will see the discussion with 4lathe in getting his going. Last i heard from him, things were working well for him.
Post you questions and I am sure we can help you get out worked out.



What
Re: LPC port of RepRapFirmware
August 06, 2019 01:42AM
Quote
sinned
@Dark Alchemist

I do have an SKR 1.3 running RRF on it as well.
I have not tried the latest binary on it yet though. I am making some hardware mods to that printer right now.

LCD may work natively with latest binary. Else, you might have to make a few jumper wires.
What stepper drivers are you using?
If you scroll back a page or two you will see the discussion with 4lathe in getting his going. Last i heard from him, things were working well for him.
Post you questions and I am sure we can help you get out worked out.



What
TMC2208 and we shouldn't need to be so barbaric with jumper wires if we have a pins definition file. Since Marlin 2.0 worked with the LCD then it should be as simple as swamping 3 pins over and the pins that need to be swapped are 0_18 with 1_18, 0_15 with 1_20 and 0_16 with 1_19.


_______
I await Skynet and my last vision will be of a RepRap self replicating the robots that is destroying the human race.
Re: LPC port of RepRapFirmware
August 06, 2019 02:47AM
Quote
Dark Alchemist
TMC2208 and we shouldn't need to be so barbaric with jumper wires if we have a pins definition file. Since Marlin 2.0 worked with the LCD then it should be as simple as swamping 3 pins over and the pins that need to be swapped are 0_18 with 1_18, 0_15 with 1_20 and 0_16 with 1_19.

Not quite as simple as just swapping the pins. The issue was, most other boards had the LCD and SDCard connected to the Hardware SPI pins, so that is what was supported. Then the SKR1.3 has them connected to pins that aren't capable of Hardware SPI, so they needed a Software SPI implementation.
Re: LPC port of RepRapFirmware
August 06, 2019 02:47AM
I have a SKR 1.3 with the latest firmware and the software spi, the screen and external sd card work without any extra wiring. I have an inductive z probe which needed to be configured in two places, boards.txt and config.g

I am now able to control my machine with the panel due or esp3d. I have set up a few macros in esp3d to mount and read the external sd card, stop and pause. I can print from the external sd card with a M32 command from the command line.

@ dark alchemist, you have not written as far as I can see, which type of Z probe you are using.

@sdavi, is it possible and planned to support the control of the stepper drivers via spi or uart?

Edited 3 time(s). Last edit at 08/06/2019 07:21AM by Micktol.
Re: LPC port of RepRapFirmware
August 06, 2019 03:45AM
Quote
Micktol
I have a SKR 1.3 with the latest firmware and the software spi, the screen and external sd card work without any extra wiring.

Thank you for testing this with the SKR1.3, good to hear this is now working.

Quote
Micktol
@sdavi, is it possible and planned to support the control of the stepper drivers via spi or uart?

The new softwareSPI code is a step towards this, as the stepper SPI pins are also not on H/W SPI pins. It looks as though the UART pins will also need a software version as well. However, I don't have a SKR board, or even any drivers that use SPI/UART, which as you can imagine makes testing/debugging rather difficult.
Re: LPC port of RepRapFirmware
August 06, 2019 03:57AM
Quote
sdavi
Quote
Micktol
I have a SKR 1.3 with the latest firmware and the software spi, the screen and external sd card work without any extra wiring.

Thank you for testing this with the SKR1.3, good to hear this is now working.

Quote
Micktol
@sdavi, is it possible and planned to support the control of the stepper drivers via spi or uart?

The new softwareSPI code is a step towards this, as the stepper SPI pins are also not on H/W SPI pins. It looks as though the UART pins will also need a software version as well. However, I don't have a SKR board, or even any drivers that use SPI/UART, which as you can imagine makes testing/debugging rather difficult.



Sorry I cannot help on the programming side, the skr 1.3 has all the connections to be able to use spi or uart control and it works in marlin.
I can test any new features if required.

Edited 1 time(s). Last edit at 08/06/2019 03:58AM by Micktol.
Re: LPC port of RepRapFirmware
August 06, 2019 06:59AM
Sdavi,
I have been looking on the duet3d site and it states "Additional Motor Support: Headers for two external stepper drivers with step/direction/enable interface and optional configuration via single wire UART (TMC2208 or TMC2224). "
Does this mean that the code is available?
Re: LPC port of RepRapFirmware
August 06, 2019 07:42AM
Quote
Micktol
Sdavi,
I have been looking on the duet3d site and it states "Additional Motor Support: Headers for two external stepper drivers with step/direction/enable interface and optional configuration via single wire UART (TMC2208 or TMC2224). "
Does this mean that the code is available?

Yeah RRF has code for TMC22xx.cpp, TMC51xx.cpp and TMC2660.cpp.
Sorry, only registered users may post in this forum.

Click here to login