Welcome! Log In Create A New Profile

Advanced

New experimental firmware: all kinematics in host

Posted by KevinOConnor 
Re: New experimental firmware: all kinematics in host
June 07, 2017 10:44PM
Wasn't heating. Or shouldn't have been at least. Only booted it and tried to show endstops
Re: New experimental firmware: all kinematics in host
June 08, 2017 11:25AM
Quote
kdodman
I just flashed to the latest marlin and end stops are working, other stuff isnt at the moment tho lol

I don't see anything in the config that looks unusual. Can you cut-and-paste the output from "make flash":
sudo service klipper stop
make flash FLASH_DEVICE=/dev/ttyACM0
sudo service klipper start

(FYI, your previous log shows a temperature out of range error, but I'm guessing that was just due to the thermistor line being jostled as the history of temperatures in the log otherwise look fine.)
Re: New experimental firmware: all kinematics in host
June 08, 2017 03:18PM

pi@octopi:~/klipper $ sudo service klipper stop
pi@octopi:~/klipper $ make flash FLASH_DEVICE=/dev/ttyACM0
  Build Kconfig config file
  Creating symbolic link out/board
  Compiling out/src/sched.o
  Compiling out/src/command.o
  Compiling out/src/stepper.o
  Compiling out/src/basecmd.o
  Compiling out/src/debugcmds.o
  Compiling out/src/gpiocmds.o
  Compiling out/src/endstop.o
  Compiling out/src/adccmds.o
  Compiling out/src/spicmds.o
  Compiling out/src/pwmcmds.o
  Compiling out/src/avr/main.o
  Compiling out/src/avr/timer.o
  Compiling out/src/avr/gpio.o
  Compiling out/src/avr/watchdog.o
  Compiling out/src/avr/serial.o
  Building out/compile_time_request.o
Version: v0.4.0-32-g3af87e1-20170608_191807-octopi
  Linking out/klipper.elf
  Creating hex file out/klipper.elf.hex
  Flashing /dev/ttyACM0 via avrdude

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801
avrdude: reading input file "out/klipper.elf.hex"
avrdude: writing flash (13838 bytes):

Writing | ################################################## | 100% 2.48s

avrdude: 13838 bytes of flash written
avrdude: verifying flash memory against out/klipper.elf.hex:
avrdude: load data flash data from input file out/klipper.elf.hex:
avrdude: input file out/klipper.elf.hex contains 13838 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.80s

avrdude: verifying ...
avrdude: 13838 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

pi@octopi:~/klipper $ sudo service klipper start

Re: New experimental firmware: all kinematics in host
June 09, 2017 10:54AM
Quote
kdodman

pi@octopi:~/klipper $ sudo service klipper stop
pi@octopi:~/klipper $ make flash FLASH_DEVICE=/dev/ttyACM0
...

Alas, nothing looks unusual. I can confirm that the Klipper pullup and endstop support is working on a number of boards. I don't have a good explanation for the discrepancy on your board.

If it was my board, I'd do some low-level debugging:
sudo service klipper stop
~/klippy-env/bin/python ~/klipper/klippy/console.py /dev/ttyACM0 250000
and then fully disconnect the endstop pin, attach the multimeter, and issue the low-level commands:
PINS arduino
set_digital_out pin=ar2 value=1
Verify the voltage is at 5V on the pin and then:
set_digital_out pin=ar2 value=0
And verify the voltage is at 0V on the pin.

If all that works, I'd manually reset the micro-controller, rerun console.py, and try:
PINS arduino
allocate_oids count=1
config_end_stop oid=0 pin=ar2 stepper_count=1 pull_up=1
And then verify the pin goes from 0V to 5V once the config_end_stop command is issued.
Assuming it does, then:
end_stop_query oid=0
should report a value of 1 when nothing is attached to the pin and a value of 0 when the pin is grounded.

-Kevin
Re: New experimental firmware: all kinematics in host
June 09, 2017 10:22PM
Thank for the help. I'm an idiot tho, I was assuming the coreXY config example was based on Ramps 1.4 and I didnt double check all the pins. Xmin is ar3, Ymin is ar14 and Zmin is ar18. I set printer config for the proper pins and thermistors just waiting for the bed to warm up to do the first test print.
Sorry that really my fault for not taking the time to fully understand things. This is my first printer, still learning

Edited 1 time(s). Last edit at 06/10/2017 02:09AM by kdodman.
Re: New experimental firmware: all kinematics in host
June 10, 2017 02:47AM
Got a couple successfull prints, however, I'm getting this error now "Firmware shutdown: Rescheduled timer in the past"
The only thing I changed was to dial in my extruder by setting step_distance: .00091666

EDIT: Looks like the code cant handle an extruder at 1/32, I set it to 0.0018 (for 1/16) and it works ok

Edited 1 time(s). Last edit at 06/10/2017 03:19AM by kdodman.
Re: New experimental firmware: all kinematics in host
June 10, 2017 08:17AM
Quote
kdodman
Got a couple successfull prints, however, I'm getting this error now "Firmware shutdown: Rescheduled timer in the past"
The only thing I changed was to dial in my extruder by setting step_distance: .00091666

EDIT: Looks like the code cant handle an extruder at 1/32, I set it to 0.0018 (for 1/16) and it works ok

In order to report an issue, please attach (not cut-and-paste) the /tmp/klippy.log file containing the event.

-Kevin
Re: New experimental firmware: all kinematics in host
June 10, 2017 05:27PM
Little update.
I am struggling with my printer. I have had some issues with bed levelling and my extruder's. All non firmware related. In retrospect it would probably have been easier to disassemble my printer to just add simple z-end stop switch than getting the capacitive distance sensor working. Now where is the fun in that? I know we all rather bang our heads against a wall for a week. Well it seems I do anyway...

I have high hopes that finally tomorrow I am printing, yet again, with my pimped up Tarantula. I have dual colour test print planned and sliced, so we can see how the FW will handle it.
I wait, with great anticipation and pure joy, that I can finally get to calibrating the two print heads relative to each other. If it's going to go as smoothly as the build has been this far, it's going to be a bloody nightmare! Lol.

I'll keep you posted!
Re: New experimental firmware: all kinematics in host
June 12, 2017 03:46PM
Well got my first dual extruder prints today. I have still some calibrating, setting fiddling to do, but the firmware seems to work good. My temperatures are all over the place tough and the printer stops quite often to wait for the printhead to get to the temperature. At least that's what I think is happening. I suspect that my temperature pid values are crap. I have to try tuning them. I have a suspicion that there is no autotune available?

I need to finish my coding for my 3D scanner and I then may have some time to take a look at the klipper code.
Re: New experimental firmware: all kinematics in host
June 12, 2017 03:56PM
Quote
mdm63
Well got my first dual extruder prints today. I have still some calibrating, setting fiddling to do, but the firmware seems to work good. My temperatures are all over the place tough and the printer stops quite often to wait for the printhead to get to the temperature. At least that's what I think is happening. I suspect that my temperature pid values are crap. I have to try tuning them. I have a suspicion that there is no autotune available?

I need to finish my coding for my 3D scanner and I then may have some time to take a look at the klipper code.

The M303 command is implemented.

Also, if you have tuned parameters in Marlin it should be possible to copy the Kp, Ki, and Kd values directly into Klipper.

-Kevin
Re: New experimental firmware: all kinematics in host
June 16, 2017 11:06AM
Just to update you guys, I'm loving klippy, after my self-induced issues got resolved. My prints are faster, smoother, and more amazing then they ever have been.
Re: New experimental firmware: all kinematics in host
June 21, 2017 09:07AM
Kevin, you seem to have great talent in making me look incompetent. winking smiley I know I really will need to familiarize my self better with your code and gcode, so I don't constantly look like a total noob.

I am having issues with the PID tuning. If I give the command PID_TUNE E0 S200 or PID_TUNE E1 S200, it just sits there printing temperatures, but does not heat the hot ends. Am I doing something wrong? M303 makes no difference as it should not if I understand the code right.

It just sits on get_temp() and prints the temperatures. The cmd_PID_TUNE() seems to send correct values to heater.start_auto_tune() (heater = E0 or E1, temp = 200), so I think the issue is somewhere in start_auto_tune(). I have not yet debugged it further, as I have not had the time. It wont accept any other commands afterwards and just sits there, printing temps, until I restart the klipper service.

Here is the output I get from terminal. I added couple of lines for debug purposes using
self.respond("Starting PID_TUNE of heater E%i for %iC..." % (heater_index, temp))
to the cmd_PID_TUNE(). The behaviour is not effected by my modifications. It just sits there doing nothing with or without them.

Quote
Terminal
Send: PID_TUNE E1 S200
Recv: Starting PID_TUNE of heater E1 for 200C...
Recv: Tuning...
Recv: T0:23.2 /0.0 T1:22.3 /0.0 B:22.9 /0.0
Recv: T0:23.2 /0.0 T1:22.6 /0.0 B:22.5 /0.0
Recv: T0:23.1 /0.0 T1:22.4 /0.0 B:22.6 /0.0
Recv: T0:23.0 /0.0 T1:22.6 /0.0 B:22.5 /0.0

I am using the "work-multiextrude-20170429 branch" and have attached the klippy.log and my printer.cfg, if they are any help.

Single extruder prints come out fine and the temperatures seem to stay quite level, but with dual extruder it drops the not printing hot end temperature, I guess for purposes of anti-oozing, and it sits long time (30-60s roughly) getting the temps up again when it's time to print a layer with that hot end.
Attachments:
open | download - klippy.log (551 KB)
open | download - printer.cfg (1.6 KB)
Re: New experimental firmware: all kinematics in host
June 22, 2017 12:32PM
Quote
mdm63
I am having issues with the PID tuning. If I give the command PID_TUNE E0 S200 or PID_TUNE E1 S200, it just sits there printing temperatures, but does not heat the hot ends.

Unfortunately, a recent code change broke the M303 command in Klipper. I've uploaded a fix to the master git branch. (You should no longer need to use the multiextrude branch as all the key commits on that branch are now on master.)

The command you used above should work now. Once the test completes the pid values can be extracted by running "grep Autotune /tmp/klippy.log" on the command-line. It is necessary to update the printer.cfg file with the found Kp, Ki, and Kd values and RESTART for them to take effect (generally, one will use the values from the last Autotune report found in the log, but they should all be similar after the first report).

Making this feature more user friendly would be great if anyone is interested in doing some development work.

-Kevin
Re: New experimental firmware: all kinematics in host
July 01, 2017 07:17PM
Thanks, I can confirm the PID_TUNE works for both hot ends. I am still unable to dual print, because of a extruder failure. I have parts ordered from the "big rock candy mountain Mao's pound land" so it will take couple of weeks, until I am back and running with dual extruder's.
In mean time I decided to take a whack at the "user friendliness" of the PID_TUNE. I was thinking just using ConfigParser.set() to write the values to the printer.cfg. Would it be preferred that the software auto restarts (or just a reload of printer.cfg?) to utilize the new pid values or should we prompt user to do a manual restart? I will make a effort to test the code out Monday, before I leave for short work trip, or at least at the end of the week.

Edited 1 time(s). Last edit at 07/01/2017 07:17PM by mdm63.
Re: New experimental firmware: all kinematics in host
July 02, 2017 03:46PM
Quote
mdm63
In mean time I decided to take a whack at the "user friendliness" of the PID_TUNE. I was thinking just using ConfigParser.set() to write the values to the printer.cfg. Would it be preferred that the software auto restarts (or just a reload of printer.cfg?) to utilize the new pid values or should we prompt user to do a manual restart?

Unfortunately, writing printer.cfg using the ConfigParser stuff results in all of the user's config file comments being eliminated. I think that would be more surprising to a user then requiring them to edit their config file and restart.

-Kevin
Re: New experimental firmware: all kinematics in host
July 02, 2017 03:54PM
Quote
KevinOConnor
Quote
mdm63
In mean time I decided to take a whack at the "user friendliness" of the PID_TUNE. I was thinking just using ConfigParser.set() to write the values to the printer.cfg. Would it be preferred that the software auto restarts (or just a reload of printer.cfg?) to utilize the new pid values or should we prompt user to do a manual restart?

Unfortunately, writing printer.cfg using the ConfigParser stuff results in all of the user's config file comments being eliminated. I think that would be more surprising to a user then requiring them to edit their config file and restart.

-Kevin

So it needs to be:
  1. read the user modified "printer.cfg"
  2. replace the PID setting lines with the new values.
  3. write the result to "printer.cfg"
If I remember correctly it is a "ini" file format, so that should be doable. Finding the correct file might be an issue, but maybe the running klipper knows where it read the data from,..
Re: New experimental firmware: all kinematics in host
July 02, 2017 09:08PM
Quote
KevinOConnor
Quote
mdm63
In mean time I decided to take a whack at the "user friendliness" of the PID_TUNE. I was thinking just using ConfigParser.set() to write the values to the printer.cfg. Would it be preferred that the software auto restarts (or just a reload of printer.cfg?) to utilize the new pid values or should we prompt user to do a manual restart?

Unfortunately, writing printer.cfg using the ConfigParser stuff results in all of the user's config file comments being eliminated. I think that would be more surprising to a user then requiring them to edit their config file and restart.

-Kevin

Correct me if I am wrong or missing something, but looking this plainly from "user friendlessness" standpoint would it not be easier for the end user, if we made like a configure web page, where they set the correct settings, with help/explanatory texts (i.e. mouse over pop ups or some i or ? icons), then we could write it out to the printer.cfg and keep it as pure configuration file (ini?) and have no need for the comments? We already have Octoprint running, so it should not be a issue to stick another webpage in there.(i.e. http://"octopi-ip"/klipper/config.html) This way we would improve usability and avoid inventing the wheel again and could simply use the ConfigParser to what it was intended.

It should be reasonable easy to implement other functions as well, so users would not need to rely on the terminal. Not saying that I myself dislike using it, but for some it probably feels at least awkward.
What are your thoughts of making Klipper a plug-in for Octoprint in some point? I have no idea what this would require exactly, but how hard can it be? IMHO the integration would improve the user friendlessness and make it more seamless experience over all.

I can volunteer to tackle these improvements, if you see them worthy. Otherwise I will do it like @JustAnotherOne suggested, it will work, but IMHO it is not the best way to solve this.

Edited 2 time(s). Last edit at 07/02/2017 09:13PM by mdm63.
Re: New experimental firmware: all kinematics in host
July 02, 2017 09:41PM
I like the Idea of making this a Octoprint plugin.

A "Klipper"-PlugIn for octoprint might also be able to make the whole connect to the printer thing easier.

But I fear that it would be a lot of work,...
Re: New experimental firmware: all kinematics in host
July 05, 2017 11:14AM
Quote
mdm63
What are your thoughts of making Klipper a plug-in for Octoprint in some point? I have no idea what this would require exactly, but how hard can it be? IMHO the integration would improve the user friendlessness and make it more seamless experience over all.

I don't know enough about Octoprint plugins to say whether it is a good idea or not. If you want to work on it, then I will look forward to seeing the results.

-Kevin
Klipper on Beaglebone PRU
July 05, 2017 02:45PM
Klipper now has experimental support for running on the Beaglebone PRU hardware. The Klipper host software runs on the main ARM processor and the Klipper micro-controller software runs on the PRU.

I'm interested in feedback from any users with this Beaglebone hardware. See the https://github.com/KevinOConnor/klipper/blob/master/docs/beaglebone.md document for installation instructions.
Re: New experimental firmware: all kinematics in host
July 05, 2017 06:16PM
Hi Kevin,
I hope to try Install today on the BBB/Replicape.

cheers
Re: New experimental firmware: all kinematics in host
July 05, 2017 09:44PM
Quote
crow
I hope to try Install today on the BBB/Replicape.

Great! Take a look at the config/generic-replicape.cfg file as a starting point on the config.

Note that the Replicape uses an external chip for the heaters, fans, and possibly the current control of the stepper drivers. Klipper doesn't yet support this external chip, but you should be able to confirm that the installation, thermistors, and endstops work. Once you have that up, we can tackle adding support for the external PWM chip.

-Kevin
Re: New experimental firmware: all kinematics in host
July 06, 2017 09:41AM
I installed today on the BBB/Replicape and installation went well.
I could not find serial port in Octoprint and found I had to change to this in the config and it worked after that
[mcu]
serial: /dev/rpmsg_pru30

Endstops seem to do as expected when using the M119 command in the terminal in Octoprint
I will check thermistors tomorrow then it will need the TMC2100 stepper driver support to check stepper movement

all seems good so far

cheers
Re: New experimental firmware: all kinematics in host
July 06, 2017 09:10PM
just hooked up a thermistor to the BBB/Replicape
Recv: ok T0:19.7 /0.0
Send: M105
Recv: ok T0:26.7 /0.0
Send: M105
Recv: ok T0:32.6 /0.0
Send: M105
Recv: ok T0:33.5 /0.0
Send: M105
Recv: ok T0:33.9 /0.0
Send: M105
Recv: ok T0:33.6 /0.0
Send: M105
Recv: ok T0:29.6 /0.0
Send: M105
Recv: ok T0:27.0 /0.0
Send: M105
Recv: ok T0:25.0 /0.0
Send: M105
Recv: ok T0:23.8 /0.0
Send: M105
Recv: ok T0:22.8 /0.0
Send: M105
Recv: ok T0:22.3 /0.0
Send: M105
Recv: ok T0:21.5 /0.0
Send: M105
Recv: ok T0:21.3 /0.0
Send: M105
Recv: ok T0:20.9 /0.0
Send: M105
Recv: ok T0:20.7 /0.0
Send: M105
Recv: ok T0:20.5 /0.0

temp rise as thermistor held between fingers ....thats a worker
Re: New experimental firmware: all kinematics in host
July 12, 2017 08:46AM
Hi!

I had quick look at Octoprint plugin tutorial, so how hard can it be? I will take a crack at it, as it seems to me that plugin would be best option to make configuring klipper user friendly. I am simply thinking a tab in octoprint settings menu to setup the printer.cfg with some simple fields and explanations/help texts to go with them. I have finally some free time next week, so I can commit my self to this fully.

The Beaglebone support sounds very interesting, maybe now I can convince myself to purchase one. Is there any ready made middle HW to connect Beaglebone to the stepper motors etc.?
Re: New experimental firmware: all kinematics in host
July 12, 2017 09:33AM
Quote
mdm63
Is there any ready made middle HW to connect Beaglebone to the stepper motors etc.?

I only know Replicape but haven't tested it.

I run a delta printer using Klipper. If you need help with testing please let me know.
Re: New experimental firmware: all kinematics in host
July 13, 2017 06:43PM
Quote
mdm63
Hi!

I had quick look at Octoprint plugin tutorial, so how hard can it be? I will take a crack at it, as it seems to me that plugin would be best option to make configuring klipper user friendly. I am simply thinking a tab in octoprint settings menu to setup the printer.cfg with some simple fields and explanations/help texts to go with them. I have finally some free time next week, so I can commit my self to this fully.

The Beaglebone support sounds very interesting, maybe now I can convince myself to purchase one. Is there any ready made middle HW to connect Beaglebone to the stepper motors etc.?


Capes that run on the BBB are
Replicape
[www.thing-printer.com]

Cramps
CRAMPS is a cape for the Beagle Bone computer, designed by Charles Steinkuehler.
[reprap.org]
[pico-systems.com]

I have no affiliation with either board.

mdm63
It would be great if you could get a Octoprint Plugin for Klipper working as you said to configure straight from Octoprint would be a sweet addition

Cheers

Edited 1 time(s). Last edit at 07/13/2017 06:51PM by crow.
Re: New experimental firmware: all kinematics in host
July 18, 2017 01:40PM
Been loving Klipper, however on occasion, I'm getting a firmware crash with "no next step" Seems to happen alot when printing rafts from Simplify3d. Seems to always happen in the first layer and hotend temp reading drops to 0. Firmware restart brings it back to life, but on trying again fails exact same spot.

I'm sure its an issue with the slicer gcode, but not knowing what "no next step" means I cant really diagnose the issue very well.
Re: New experimental firmware: all kinematics in host
July 18, 2017 02:58PM
Quote
kdodman
Been loving Klipper, however on occasion, I'm getting a firmware crash with "no next step" Seems to happen alot when printing rafts from Simplify3d. Seems to always happen in the first layer and hotend temp reading drops to 0. Firmware restart brings it back to life, but on trying again fails exact same spot.

I'm sure its an issue with the slicer gcode, but not knowing what "no next step" means I cant really diagnose the issue very well.

Please post the full klippy.log file containing the error and I'll take a look. (Or, alternatively, open an "issue" on github with the full log file.)

-Kevin
Re: New experimental firmware: all kinematics in host
July 24, 2017 07:28AM
Little update. I am progressing with the plugin, but it takes some time, because I have very little experience in HTML, CSS and Java script. I will make an effort to get a working alpha release at end of the week to my git. It probably won't have all the features of klipper supported from the get go, but at least we have something that others can chip in if they want.

At this stage it's going to be just a single page at Octoprint settings, where one can set up their klipper printer.cfg. If there is need and demand for other features. (ie. klipper control page to restart klipper) I am open to suggestions. Oh, and also by installing the plugin python package, it will install klipper from the master repository.

I will keep you update with my progress.

Edit: I forgot to mention. I have finally received the parts that I was waiting, so I can get back to dual-extruder printing.

Edited 1 time(s). Last edit at 07/24/2017 07:32AM by mdm63.
Sorry, only registered users may post in this forum.

Click here to login