Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical UI support? #2

Closed
mhv-shared opened this issue Apr 16, 2017 · 256 comments
Closed

Physical UI support? #2

mhv-shared opened this issue Apr 16, 2017 · 256 comments

Comments

@mhv-shared
Copy link

Do you plan to add support for LCD + encoder? Or will control always be done through octoprint?

@KevinOConnor
Copy link
Collaborator

Do you plan to add support for LCD + encoder? Or will control always be done through octoprint?

My personal opinion is that new hardware designs would be better off talking directly to the host and use octoprint. For existing hardware, I think it would make sense for Klipper to support common lcd panels.

I don't have an immediate plan to add support. Contributions are welcome.

-Kevin

@brunofporto
Copy link

Please, I would like to contribute with this - just to have very simple functions (like show status, homing, change filament commands, etc) and use the card reader. What do you recommend as a starting point? I do know the (very) basics but not sure where to start besides your documentation.

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Aug 1, 2017 via email

@brunofporto
Copy link

brunofporto commented Aug 1, 2017

Thank you!

I have the http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller connected to the RAMPS.

The src/spicmds.c example should solve the data sent to the LCD part witch is already nice.

What about the other way around? Reading the encoder and push button to execute simple commands like change filament, move axys, etc.?

Would be simpler to run this code directly from the MC or would be interesting the have MC sending messages back to the host and process the request there?

Other interesting enhancement would become able to read the SD card :D

@ghost
Copy link

ghost commented Aug 2, 2017

Wouldn't it be better to attach the LCD to the RPi?
Since the host benefits from running Octoprint + klipper,I added a cheap $9 ILI9340C lcd with TouchUI plugin enabled. https://learn.adafruit.com/3-dot-5-pitft-octoprint-rig/overview

Though I do understand that one of the primary goals of Klipper is drop-in replacement.

@brunofporto
Copy link

TunaLatte... I can't argue with that.... Even the 3.5" LCD TFT is no more than US$ 16....

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Aug 4, 2017 via email

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Aug 4, 2017 via email

@ghost
Copy link

ghost commented Aug 4, 2017

I see now, it made sense to me at first since in my case I had to add a host (rpi) to my existing setup due to the nature of how klipper works, same story with LCD.
Would be also good to have MCU stats/debug info (like klippy log info) running in realtime on LCD (without host communication) as preliminary support for MCU LCD.

@andreq
Copy link

andreq commented Nov 21, 2017

is there any CPU concern to run Klipper, a browser with octoprint and driver for one of those : https://www.waveshare.com/3.2inch-rpi-lcd-b.htm ?

Edit :
Scratch that SPI screen, might be better off using an HDMI one. Should add less stress on the CPU.

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Nov 21, 2017 via email

@Bobblejot
Copy link

I have been looking at using a Nextion display recently with Marlin and just came across your firmware. I like what you have done a lot and think i will give it a try but was wondering if you think a Nextion display would be difficult to integrate? as even though i do use octoprint i still like to have local control of my machines.

@lenne0815
Copy link

I dont think for the nextion any integration is needed at all, it just works as a display for the pi and thereby should work with octoprint just fine.

@Bobblejot
Copy link

The Nextions are small HMI panels so you need to upload your own interface designs to them. I have plenty of displays i could just use with Octoprint and the Pi directly but i do like the idea of just a custom solution for my own machine, Plus i have a 4.3" Nextion sitting doing nothing that i want to play with :-)

@rafaljot
Copy link

rafaljot commented Dec 4, 2017

RepRap Full Graphic Controller is the worst option due to slow communication. Now Marlin 2 32bit has trouble with it.

@dragonnn
Copy link

dragonnn commented Dec 4, 2017

I think we should more concentrate on getting UI connected to Rassberry Pi, on it even a slow LCD won't be any problem (just run the UI in separate thread).

@rafaljot
Copy link

rafaljot commented Dec 4, 2017

Exactly

@hg42
Copy link

hg42 commented Dec 10, 2017

Hi, I'm new to Klipper and it seems to fit ideal to my own plans. In fact, from what I read in the forum, most things are already solved by you, even problems I didn't think of, really nice, Kevin...

now on the topic:

I don't really get why everyone wants some LCD. I bet everyone here has a Smartphone?
Simply take the touch UI plugin of octoprint and use it. It couldn't get better.
Touch UI is a lot faster and much more convenient than scrolling through menus and clicking.

This also has the advantage to be able to take it with you, say when cooking coffee or on the toilet (or use another device). And you can see the printers webcam...
Full control everywhere.

Additionally, many people have older smartphones laying around and doing nothing.
Just install one of them on the printer. In fact I do this since I have octoprint on my printer.
You can even use a big tablet.

Additionally an old monitor and any kind of keyboard or mouse can be used.
On linux you may find solutions to run a web browser fullscreen (easiest will be using F11).

Do you need any more?

I do not think it is worth to invest time in simple LCD screens. I have two laying around and didn't have any need for them for years.

@andreq
Copy link

andreq commented Dec 11, 2017

^This, so much!

I plan on using this over the RPI https://shop.pimoroni.com/products/hyperpixel and from my initial test, it's gonna work great as a replacement from my old Graphical LCD running Marlin. One could use a cheaper screen sold in many size from China.

I'm not sure there should be much time invested in getting those old graphical/character LCD running on the arduino anymore. It will take a good chunk of the processing power for sub-part user experience.

The only thing I'll be missing (for now) is a physical rotary encoder/buttons with some macro, but it might be from many years of using the graphical LCD ;)

Edit : Btw, there's a script to launch TouchUI at boot time : https://github.com/BillyBlaze/OctoPrint-TouchUI-autostart

@marcio-ao
Copy link
Contributor

If this is for basic lcd support, then what I would do is add a pass-through mechanism in the micro-controller code that would allow the host code to bit-burst out data to the lcd controller. See the src/spicmds.c code for an example of how this was done to communicate with the ad5206 chip.

Not all displays use a SPI protocol. A lot of printers use the RepRapDiscountFullGraphicsSmartController, for example, which uses a pain-in-the-ass non-SPI protocol that is extremely sensitive to timing.

Perhaps this could be solved by defining a command called "send x bytes to LCD" and the firmware would know how how to send bytes to the specific type of LCD that was configured, either using SPI, or something else, as in the case of the RepRapDiscountFullGraphicsSmartController.

@marcio-ao
Copy link
Contributor

The biggest downside I see in having host send raw bytes is that the graphics protocol would need to be re-implemented on the host side, which is Python. I can see two disadvantages to that:

  1. It may be slow. Python would be a poor language to implement graphics code.
  2. It would not be possible to make use of Arduino code that was already written to support the various LCD modules out there -- everything would have to be ported to Python, which would make adding support for different displays a very laborious process.

An alternative would be to have the FW be compiled for specific displays, like in Marlin. The FW would generate all the screens, but the host software would simply tell it what values to draw on the screen. For example, it may say "show the temperature as 220C", or "show a status message of Print Failed", or even, "show a menu with the following items and notify me when the user made a selection". This would have the advantage that the FW could pretty much borrow graphics code from Marlin and use Arduino graphics libraries such as U2G as is, but it would require the definition of a higher level API and add hardware dependencies to the FW. I can see why this would go against the spirit of Klipper.

@jakep82
Copy link

jakep82 commented Jan 8, 2018

I've been using Printoid for a couple years now. I have the Pro version, but they also offer a free version. It's actively developed, and offers an attractive, touch screen optimized experience for OctoPrint. It gives me full remote control of my printer on my phone from anywhere in my house (or the world if I wanted to set up WAN access, but not worth the hassle for me). It also streams my webcam so I can monitor my prints from the couch. In other words I'm not sure it's worth the effort to develop a new interface unless someone really wants to use one of the crappy RepRap LCD screens from RAMPS and their ilk. If you really want to attach a screen to your printer, get a 7" Nook tablet for $50 and install Printoid. That's a million times better than a RepRap LCD, and not very expensive either.

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Jan 9, 2018 via email

@rafaljot
Copy link

rafaljot commented Jan 9, 2018

What I expect from LCD is:

  1. preheat
  2. manual bed leveling, move x,y,z
  3. Z offset
  4. interrupt with halt button

during printing "printing..." is enough, so it is not a problem for uC.

Next idea I like is LCD connected to rPi with simple text interface and dialer. or left/right/up/down/enter keypad. For instance on ncurses
With normal options, wifi status, etc.

I have Printoid Premium but for me it is not professional solution for everyday printing.

@marcio-ao
Copy link
Contributor

@KevinOConnor : Just to clarify, the reason I am pushing for a RepRap LCD is that I am running Klipper on an TAZ USB printer that is hooked up to PC - there is no Raspberry Pi in the loop. While in your documentation, you stress that Klipper is to be run on a Raspberry Pi or a BeagleBone Black, I would be happy with an arrangement where Klippy.py could be made into a Cura module and be made to talk directly to the Klipper FW from the PC -- no need for a single board computer or OctoPrint. This is one of the reasons I like Klipper better than Redeem: Redeem is tied directly to the BeagleBone Black, while Klipper can be used on hundreds of PC connected printers (although I fully realize that is not your intent!).

Of course, at that point a good question might be why I need an LCD if I have a PC hooked up to my printer. Well, I suppose that it a good question, though I tend to use the LCD quite a lot even though I could do the same by hitting buttons on Cura -- old habits die hard :)

-- Marcio

@marcio-ao
Copy link
Contributor

Python on an RPi is going to be faster than C on a micro-controller.
Python on an RPi is going to be dramatically faster than C on an 8 bit
micro-controller.

I suppose you're right. I'm suffering from flashbacks from the days in which 14kbps modems were a thing, nevermind the fact that 250000 baud is 17x faster and 124x64 pixels is way less than even the smallest animated GIF from the 90s.

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Jan 9, 2018 via email

@marcio-ao
Copy link
Contributor

marcio-ao commented Jan 9, 2018

@KevinOConnor : Good point about real-time requirements, this is something I had not considered.

Is there any possibility of having Klipper FW run using data from an SD card? I understand from some of your previous posts that you explained that some of the functionality, such as the PID loop, required involvement from the host, so I realize this would not be possible currently, but assuming the control loop could be added to the FW, is there anything else standing in the way of an unattended print?

I understand that what I am proposing is midway between what Klipper currently does and what Marlin does. I guess I am thinking of using your existing serial protocol as a much more low-level alternative to GCODE that could be written to the card by the host and interpreted by the microcontroller, and still be used offline, but free the FW from having to compute kinematics. Aside the point you've already made about a SBC being cheap (which is true), are there any other reasons you chose not to have the FW do enough work on the microcontroller to support an unattended print?

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Jan 9, 2018 via email

@danilovdorin
Copy link

@danilovdorin - if the board follows the RAMPS pin convention, then you'd also use the pins found in the config/generic-ramps.cfg file:

[display]
lcd_type: st7920
cs_pin: ar16
sclk_pin: ar23
sid_pin: ar17

it's not work for me, because MKS MINI 12864 has some changes to the pin definitions.
http://reprap.org/mediawiki/images/f/ff/MKS_MINI12864_LCD_controller_pin_out_-_signal_names.jpg

I do not understand how to make an analogy between the pins that are in the marlin config file and ramps.

@KevinOConnor
Copy link
Collaborator

KevinOConnor commented Apr 9, 2018 via email

@KevinOConnor
Copy link
Collaborator

We have basic UI support now. I'm going to close this issue. I understand more work could be done (in particular, menu support), but I don't think it makes sense to leave this issue open.

vertigo235 pushed a commit to vertigo235/klipper that referenced this issue Jun 11, 2018
lorf added a commit to lorf/klipper that referenced this issue Dec 28, 2018
lorf added a commit to lorf/klipper that referenced this issue Feb 3, 2019
# This is the 1st commit message:

tmc2208: Report register field values in DUMP_TMC

Report values of TMC2208 register fields in DUMP_TMC command to help in
tuning and diagnostics.

This also adds functions to refer to register fields by name for TMC drivers
and register mappings for TMC2208.

Based on Kevin O'Konnor's <kevin@koconnor.net> prototype.

Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>

# The commit message Klipper3d#2 will be skipped:

# tmc2208: Select IOIN register mapping on init
#
# Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>

# The commit message Klipper3d#3 will be skipped:

# tmc2208: Fix prev commit to pass tests
#
# get_register(): Skip HW access when not connected to real HW

# The commit message Klipper3d#4 will be skipped:

# Revert "tmc2208: Select IOIN register mapping on init"
#
# This reverts commit 665fc88.

# The commit message Klipper3d#5 will be skipped:

# Revert "tmc2208: Fix prev commit to pass tests"
#
# This reverts commit 347600b.
JYKeith123 added a commit to JYKeith123/klipper that referenced this issue Dec 9, 2019
…3d#2

Signed-off-by: JaeYoung Kim <jykeith123@gmail.com>
JYKeith123 added a commit to JYKeith123/klipper that referenced this issue Mar 11, 2020
theopensourcerer pushed a commit to theopensourcerer/klipper that referenced this issue Jan 31, 2021
…eads-20200121

Add configuration description of DS18B20 to Config_Reference and add …
julianschill added a commit to julianschill/klipper that referenced this issue Sep 15, 2021
meteyou pushed a commit to meteyou/klipper that referenced this issue Sep 21, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests