Home › Forums › TinyG › TinyG Support › Quiet Cut Spindle On ChiliPeppr with TinyG
Tagged: Chilipeppr, Quiet Spindle, TinyG
- This topic has 9 replies, 5 voices, and was last updated 8 years, 12 months ago by cmcgrath5035.
-
AuthorPosts
-
May 26, 2015 at 3:24 pm #7747akfreakMember
Quiet Cut Spindle On ChiliPeppr with TinyG
I am helping a friend build an OX CNC kit from smw3d.com (terrible instructions and horrific post sale support) $1,500 bucks worth of parts, and no info on how to set up any of the electonics. Anyways…
His kit came with a Quiet Spindle upgrade (on a 48V supply). This spindle uses the PWM connection on the TinyG via a motor controller.
I found some information in an Inventables Blog post (blog post here https://www.inventables.com/projects/quiet-cut-spindle-upgrade-tinyg ) where it shows a similar Speed Controller, ours has a built in Pot next to the PWM jumper so it cant be removed, again Zero support from where it was purchased Boo..smw3d.com. Also the blog post offers some information on how to add PWM code to configure the spindle. However its all done in TgFX. They say to input the PWM settings one at a time into the G Code entry window ($p1frq=5000 $p1csl=0 $p1csh=10000 $p1cpl=0 $p1cph=1 $p1pof=0) I think I did it wrong…
Now for some questions. First off will that same code be used to set up the spindle in ChiliPeppr? Also I dont have a G code entry window. I have a Serial Port Console window. See the ChiliPeppr GUI that I see here —> http://gyazo.com/9f18533aa9a5dbdbad728441e70efc61
Since the quiet spindle upgrade (from smw3d.com) comes with a motor controller that’s different than the one shown on the inventables website. I dont know if the jumper position is right or not. Jumper on one way I get no spindle movement, on the other its always on, and with limited code control. You see, when I power the machine the spindle starts to turn, and I can’t use M code to shut it down completely. M3 is supposed to turn it on (but its always on), M03 it actually speeds up the spindle. M05 Is supposed to shut it down, but it slows it to the slowest speed that I have observed, but not off. S2000 should offer up a slow spindle speed, but it does not. However S8000 does ramp the speed up to the highest rpm observed. When the motor is running at 8,000 rpm via the S8000 command, if I type M05 I get the slowest speed (again not off)
In ChiliPeppr there is no Spindle control at all. So I assume you are supposed to control it via Gcode or M and S commands. Since the M and S controls dont work as they should, I think I must have not config’d the PWM spindle correctly. Any and all information or advice is greatly appreciated.
Sorry for the long and drawn out first post. I spent 11 hours yesterday trying to get this machine up and running, but its just not right. However it is a live https://youtu.be/YvVN43GgR-A
May 26, 2015 at 6:26 pm #7751akfreakMemberNoone has any input on thus topic?
May 26, 2015 at 8:09 pm #7752cmcgrath5035ModeratorReview this, it may answer some of your general questions:
I think it safe to assume that one position of the jumper should make the pot control the speed, the other position would enable tinyG PWM control. Experiment. Be aware that tinyG only outputs 3.3V logic signals, may or may not be enough for your controller.
Neither tinyG nor Chilipeppr have spindle control commands aside from Gcode commands which tinyG will follow, e.g. M03 S10000 to turn on spindle at 10K rpm, M05 to turn it off.
As far as tinyG is concerned, anything entered on the Serial port console that cannot be interpreted as a tinyG command is passed to the Gcode interpreter.
May 26, 2015 at 10:09 pm #7755akfreakMemberThe controller in the link is exactly the controller that’s on the OX I am building. I don’t think I have configured the tinyG to work with the PWM controller correctly. I tried to load Ll of the settings art one time instead of a line at a time. Thanks for the link,, T
August 1, 2015 at 12:49 am #8154Dave3QMemberCmcgrath, thanks for the post.
Seems tinyg only understands M03, M04, M05.
I think I have it down now. I could not directly find all the info I needed in one place, so here is my attempt to help future readers. Feel free to comment to correct me where needed.
The 10 Standard spindle related settings in tinyg as of Tinyg8 firmware ver 0.97 build 440.16 with comments:
[p1frq] pwm frequency 100 Hz
I do not see this having any effect.[p1csl] pwm cw speed lo 1000 RPM
[p1csh] pwm cw speed hi 2000 RPM
These work and should be set to 1000/12000 (match your spindle)[p1cpl] pwm cw phase lo 0.125 [0..1]
not sure if adjusting is required. Seems good at 0.125[p1cph] pwm cw phase hi 0.200 [0..1]
I found I had to go to 1.0 to get a high RPM
I have no idea what this really means, or if setting to 1.0 is good or bad for the motor/speed controller. I just know it makes my ‘hi’ RPM go up to about where I can get them under potentiometer control.[p1wsl] pwm ccw speed lo 1000 RPM
[p1wsh] pwm ccw speed hi 2000 RPM
[p1wpl] pwm ccw phase lo 0.125 [0..1]
[p1wph] pwm ccw phase hi 0.200 [0..1]
The ccw settings work as above, except that the spindle does not seem to want to rotate in reverse as intended.
Is there any setting for this?[p1pof] pwm phase off 0.100 [0..1].
This one confused me the most. Not wanting to play with any settings I did not understand, I tried to get the M5 command to turn off my spindle as it should, but would not work with factory settings on the tinyg. I finally found a ref somewhere that setting this to 0 will do it. It does, not sure why this would be factory set to anything other than zero.Note, to change parameters type, for example,→ {“p1csh”=10000} sets CW speed to 10,000 rpm
Also, M05 seems to be the same as M5 for the tinyg. Both are excepted.
Another thing, I read somewhere that you need to reset the Tinyg after any PWM setting changes. I did not find this. I found all the above changes were seen with the next command issued.
The command M3 S10000 should turn your spindle on to 10000 rpm with the above settings.
Funny thing with mine, With the above settings, (10000 rpm on hi) the spindle would not turn on unless I sent the M3 S command with a value of 9325 or lower. Similar results for any p1csh setting. Maybe it has something to do with the p1cph setting. I do not know yet.
That’s it. Please add or correct if needed.
Dave.
August 1, 2015 at 8:59 am #8157cmcgrath5035Moderator$p1frq :
A. This is the one parameter that (as of 440.14FW, may have changed) requires a tinyG reset to take effect. (Reset not required for tinyG2).
B. There are many different PWM controllers, some work better at different frequencies than others.
C. You may also find that “phase settings” for a particular frequency will vary as you change $p1frq.M5, M05
A. Correct, similar behavior G1 X10 and G01 X10.
B. Not sure what other M codes you are looking to support. The list is here:CW/CCW
To reverse the spindle direction, you need to reverse the DC drive polarity to the spindle motor. Most of the inexpensive controllers I have seen do not support this. A few do, you need to connect the Spin/Dir lead on tinyG to the appropriate direction port on the controller.$p1pof
A. I am not sure why value = 0.10 is the default, likely because it is compatible with a standardized test program used for production testing.
B. There are many different types of controllers out there, keep in mind tinyG runs some robots too, not just CNC spindles.
C. Setting $p1pof = 0.00 Is generally the right solution for “Quiet Cut” class controllers.M3 S9325 anomaly
A. I too find that setting $p1cph = 1.0 does not always turn on the spindle, but $p1cph=0.97 does.
B. You may find that if you set $p1frq=3000, then reset so the controller changes frequency, that $p1cph = 1.0 works. That seems to vary among the different controllers.Phase, speed, etc.
Keep this general description in mind:
The PWM signal is a curve fit, really linear interpolation, between two points on a plot of desired speed vs phase; speed min,phase min and speed max, phase max. If you request an S value between min and max, the PWM phase (a.k.a. duty cycle) will be linearly interpolated between phase min and phase max.
The “correct” values are a function of your specific controller, your spindle and the frequency of PWM operation ($p1frq)There are no standards, you must determine by experimentation
August 15, 2015 at 10:39 pm #8245gwandadMemberThanks for the post. You saved me a lot of time & effort.
My OX & I are friends again.November 14, 2015 at 9:51 pm #8940bubbzie1967Memberhello all…im new to this cnc tinyg thing .. but anyways i bought the same kit as akfreak and have the same problem .. the spindle stays on all the time.. my question is to akfreak did all of this info that u got from here fix your problem with it …would be great to hear back from u.. like i said very new to this and little upset i cant fix the problem… ty for your time
November 14, 2015 at 9:52 pm #8941bubbzie1967Memberhello all…im new to this cnc tinyg thing .. but anyways i bought the same kit as akfreak and have the same problem .. the spindle stays on all the time.. my question is to akfreak did all of this info that u got from here fix your problem with it …would be great to hear back from u.. like i said very new to this and little upset i cant fix the problem… ty for your time
November 17, 2015 at 2:02 pm #8949cmcgrath5035ModeratorSorry, missed your post.
To understand PWM spindle setup have a look at this:A quick answer, set $p1pof=0.0, then issue an M5 Gcode command.
You spindle should spin down to orpm- This reply was modified 8 years, 12 months ago by cmcgrath5035.
-
AuthorPosts
- You must be logged in to reply to this topic.