-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Servo support added (switchable) #153
base: master
Are you sure you want to change the base?
Conversation
@cprezzi : Thanks Claudio! Looks nice and clean. I'll test it over the weekend. |
+1 @chamnit did you see @cprezzi 's video at https://plus.google.com/+ClaudioPrezzi/posts/Hwvz8LhkbvZ |
@cprezzi : Wasn't able to get to this over the weekend, but do have a question. Is this code particular to your eggbot servo? If so, what would be required to provide a more generic and universal servo support? I don't have any experience with servos and what they need. |
@chamnit looks like it would work with most servos, though it'll be rather coarse because of the limitation of the timer. regular servos need a pulse between ~0.5ms and ~2.5ms repeated every ~20ms to set the position |
@chamnit This should be working with most rc servos. For limiting the range of the servo movement, it could make sense to let the user also define the minimum and maximum values for the PWM, but that would probably need some more explanation (calculation sample). Optional: It would probably be a nice option to invert the servo direction with a config param. |
Is there a schedule for merging the changes? I need it for my 4xidraw (Axidraw-clone, http://www.thingiverse.com/thing:1444216). |
@Mad-Onion : My bad. Totally forgot about this. I'll get to it very soon. Can't say when exactly. My spring honey-do list seems to get longer no matter how many things I cross off. |
This is also useful for RC motors and ESC as spindles, which is very useful and is already being done. I think it would be a great feature. |
dang it .. should have checked here before doing the exact same thing .. i used these values: your define is active by default, intentionally? 👍 |
Hi claudia, would you take a look and tell me what you think: |
@cprezzi have thought about adding a delay after each call that alters the servo position? I see that sometimes lines aren't drawn completely due to high feed and "slow" servo speed. |
@ kolja add some G4 Dwells to play catchup in your gcode
…On Aug 27, 2017 2:27 PM, "Kolja Windeler" ***@***.***> wrote:
@cprezzi <https://github.com/cprezzi> have thought about adding a delay
after each call that alters the servo position? I see that sometimes lines
aren't drawn completely due to high feed and "slow" servo speed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#153 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHVr2-PUb0NwvYpo5_1pp_su79mibNZaks5scWDIgaJpZM4MZhgn>
.
|
the machine origin at bottom left.
@cprezzi Can the servo direction be inverted in your fork? |
@neilferreri Unfortunately not. We just swapped the servo mechanically. |
Thanks for the reply. Flipping the servo is not an option right now, so I'll have to work around it. |
+1 on this I'd love to have servo support along with the ugs cli. |
If someone is interested, I have added the servo support by DWiskow to the latest version of grbl 1.1h |
Why didn't you start with a fork of gnea/grbl and just made your changes? Instead you copied the whole code so nobody can reproduce which code is from you. This is the WRONG WAY to do it, because it doesn't document where the original code came from and what you changed. Starting with a fork has many advantages:
|
@cprezzi it makes sense. I'll try my best to do it! thank you very much! |
@lavolpecheprogramma |
Hi @Piramidowy, |
A rebase, testing and merge would be really appreciated after all this time. |
@cprezzi I am using your firmware grbl_v1.1f_Servo.hex on a elekslaser plotter with LaserGRBL app. |
Hi Sonny
I have implemented support for servo instead of spindle (for EggBot). It's switchable by
#define SPINDLE_IS_SERVO
in config.h.This defines a prescaler of 1/1024 (61Hz) and min/max PWM values for a pulse duration between 0.5 and 2.5ms in cpu_map.h.
In spindle_control.c I modified the function spindle_compute_pwm_value: If SPINDLE_IS_SERVO is defined, don't calc spindle override and use min PWM instead of stop_spindle.
I have tested it with an EggBot and LaserWeb3 and 4.
Hope this is usefull for you.
Regards Claudio