Settings for rotary encoder sensitivity?

Discussions about firmware/slicing software, tweaks and settings
Post Reply
andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Settings for rotary encoder sensitivity?

Post by andrewsi » Mon Jan 13, 2014 8:27 pm

I find that the sensitivity of the encoder knob on the control panel is extremely high - the tiniest little bump will cause the flow rate setting to change by 1%. Anyone know if there's a setting in configuration.h or elsewhere that could be used to desensitize it slightly so that a little more rotation would be needed to get the first change in value? If not, this may have to become my first open source firmware contribution. :-)
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

satoer
Posts: 436
Joined: Mon Oct 01, 2012 8:00 pm
Location: Netherlands

Post by satoer » Tue Jan 14, 2014 7:01 pm

Yes, those cheap Chinese rotary encoders have more steps than clicks. I don't think you need to do a lot of hacking. You probably need to adjust the firmware file ultralcd.cpp and adjust this sub routine:

Code: Select all

#if !defined(LCD_I2C_VIKI)
  #define ENCODER_STEPS_PER_MENU_ITEM 5
  #ifndef ENCODER_PULSES_PER_STEP
    #define ENCODER_PULSES_PER_STEP 1
  #endif
#else
  #define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
  #ifndef ENCODER_PULSES_PER_STEP
    #define ENCODER_PULSES_PER_STEP 1
  #endif
#endif
(haven't tried it myself)

If this doesn't work, you always can take a look at the hardware implementation in: ultralcd_implementation_hitachi_HD44780.h

Code: Select all

////////////////////////
// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
// These values are independent of which pins are used for EN_A and EN_B indications
// The rotary encoder part is also independent to the chipset used for the LCD
#if defined(EN_A) && defined(EN_B)
    #define encrot0 0 //0
    #define encrot1 1 //2
    #define encrot2 2 //3
    #define encrot3 3 //1
#endif 

#endif //ULTIPANEL

////////////////////////////////////
Please let us know your experience :)
My Felix 1.5 printed designs on Thingiverse
E3D V6 Hot end upgrade for your Felix
Tweezer bracket for your Felix
Led bar upgrade for your Felix

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Tue Jan 14, 2014 8:09 pm

Think I've figured out the answer to my question: At some point between the current drop of the Felix-specific version on the downloads folder and the latest Marlin source, someone has already fixed this by adding a "dead zone for feedrate 100%" feature to ultralcd.cpp. The steps-per-menu item divisor only works for menu items and is ignored by the federate modifier that works on the info screen. So there's two potential fixes:
1) Download the latest Marlin source, integrate the Felix specific changes (of which there appear to be few other than the config files, having just diffed the trees against each other), or
2) Wait for Guillaume to take a later version from github and release a new drop. :-)

I may try doing 1) myself just for fun, and for some of the firmware bugs that have been fixed recently.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Tue Jan 14, 2014 8:47 pm

Even more interestingly, it appears that the feature in question was added to the Marlin build something like 8 months ago, so even the recent "single head 3.0" firmware put up on this site last month must have been built from a pretty out of date copy of the source. This adds some motivation for me to do the merges with the current branch to see how it performs - there's another feature in there which looks really interesting called "babystepping" which allows the user to use the panel to make small adjustments to Z while printing, e.g. tweak Z-height during the first layer to really dial it in.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Wed Jan 15, 2014 2:41 am

Mission accomplished. Merged Felix-specific settings from configuration.h, configuration_adv.h, and language.h, and pins.h into the latest Marlin codebase and recompiled/uploaded. Looks like it's working fine. It also now has a very nice little deadzone in the info screen so I'm not constantly bumping the feedrate, and when a print is in progress there's a new "tune" menu that includes the ability to tweak most of the current parameters, as well as a babystepping submenu for the Z axis.

I'm willing to upload this version for people to experiment with, but frankly I'd rather if Guillaume gave it the thumbs up, or better yet, created and submitted an official set of Felix changes in the Marlin source tree at github (i.e. #ifdefs for the appropriate settings and pins, rather than maintaining a separate fork which will require repeated merges everytime a new feature gets added to Marlin.)
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

seaton
Posts: 291
Joined: Tue May 14, 2013 9:04 am
Location: Bunbury, Western Australia
Contact:

Post by seaton » Mon Feb 17, 2014 4:33 pm

do you have this available in a git repository?
Stephen...

Felix 2.0 -> Felix 3.0 dual
Simplify3D Slicer, Kisslicer
Have you added your Felix to the Map? http://goo.gl/maps/HajnZ

http://blog.strobotics.com.au

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Tue Feb 18, 2014 6:15 pm

Local to my machine, yes, and I've kept it merged to latest Marlin sources as they come out, but I haven't pushed it to github to make a separate branch. I'm willing to do so if others want to get at it, but I don't want to represent my fork as an "official" Felixprinter release. (And there are no changes other than to the config files, so it's really nothing that can't be done by copying Guillaume's original settings to the base config files, which is just tedious but not rocket science.)

I've also made very minor tweaks to some of the values based on Guillaume's more recent Repetier config, like for some reason Guillaume had 169 steps per mm in Marlin for the E axis but 164 in Repetier. I haven't bothered to measure the outer diameter of the extruder toothed insert to do my own calculation, but the difference is pretty slight in either case.
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

seaton
Posts: 291
Joined: Tue May 14, 2013 9:04 am
Location: Bunbury, Western Australia
Contact:

Post by seaton » Wed Feb 19, 2014 12:23 am

Yes I most definitely want to use it.

It looks as though the official version is now repieter


Thanks
Stephen...

Felix 2.0 -> Felix 3.0 dual
Simplify3D Slicer, Kisslicer
Have you added your Felix to the Map? http://goo.gl/maps/HajnZ

http://blog.strobotics.com.au

andrewsi
Posts: 130
Joined: Mon Dec 23, 2013 1:26 am

Post by andrewsi » Wed Feb 19, 2014 1:03 am

For that reason I switched to Repetier and went through the same exercise, so I have a private repository of that one too which is up to date with the latest Repetier changes. After comparing the two for a while, I found it to be a little bit of a six-of-one/half-a-dozen-of-the-other kind of situation since I only have a single extruder, but even Marlin appears to have completed its multiextruder support capability at this point. The LCD UI has a few nice features on Repetier that aren't in Marlin, and the feature set doesn't entirely overlap, but for the most part they're extremely similar and appear to produce prints with essentially equal reliability and quality. Marlin does seem to have more active development going on in the few weeks I've been watching it, so whether that says anything about its long term ability to stay on the cutting edge relative to Repetier, I really couldn't say.

You can pretty much switch back and forth with impunity if you have a reason to do so, but in the end (at least for now) I decided to go back to Marlin and stick with that one for the time being. The electronics feature set of Felix is such a subset of what's going on at the bleeding edge that most of the new development work is going into areas that will never matter on the current Felix design (e.g. Delta mechanics support, Z-probing and auto levelling, digipots for stepper current, etc.)
__________________________________________
Andy Silverman, Technogeek in Seattle
Felix Tec4 Single-head

seaton
Posts: 291
Joined: Tue May 14, 2013 9:04 am
Location: Bunbury, Western Australia
Contact:

Post by seaton » Wed Feb 19, 2014 4:55 am

Thanks Andy,

Yes I tried to the official Felix over the weekend, which highlighted endstop issues that only affects Repieter firmware, so until I rectify that I'll be staying on Marlin.

That aside I do feel that there should be a public repository for both versions and is something that Felix as a company should maintain/support the repository at a higher level, but we as the community would be able to contribute, much like yourself, it would take a load off them not having them to maintain the source directly and hopefully could get a firmware release inline with the Repieter and Marlin releases.

I'm happy to help in any way

Stephen...
Stephen...

Felix 2.0 -> Felix 3.0 dual
Simplify3D Slicer, Kisslicer
Have you added your Felix to the Map? http://goo.gl/maps/HajnZ

http://blog.strobotics.com.au

Post Reply