Updating Firmware to GRBL V1.1 / Phoenix CNC Controller

Ok I’ve just complied and uploaded the original firmware that I was using on my cnc machine – and that was 0.9j. I’ll just open the config.h file in the library. So the thing that I’ve changed in this config file are line 112, 254, 255, 261, 271 and I’ll write those down in the description. Now when I turn the controller on, and go to bcnc I can turn the spindle on and use variable speed. You could hear the pitch of the spindle changing as the speed was increasing or decreasing. So I went through the two different config files to see whether I could change the same thing to make sure the controller and CNC machine operate in the same way. The only thing I could find were line 155, 350, 360. I made the noticeable changes and flashed GRBL version 1.1, but the variable spindle had stopped working. This was despite line 399 #define VARIABLE_SPINDLE // being uncomment to enable. So the problem I had before was when the slider bar was didn’t work it also correlated with a problem in which the spindle speed set in the gcode wouldn’t work either. And I only solved that problem in the previous version of GRBL – V0.9 by making the changes to the PWM which for some reason I set to 0 and that still worked, and setting the min and max RPM. In the end I found line 592 which was enabled piecewise_linear_spindle and set line 599 and 600 to the max and minimum RPM. This looks a lot more complicated than the previous version and below this there are a few more setting that I don’t understand. I managed to open a file called fit nonlinear spindle which is a script in notepad++ and that had some information about how to calibrate the spindle RPM to the PWM. I have subsequently bought a tachometer to fine tune the speed. I think what I am meant to do is input the speed into the array using the script on Python, correlating the PWM to the actual speed the spindle is going read by the tachometer.  The only problem is this isn’t well documented so I really don’t know what I am doing.

I also don’t understand why the max PWM at 255 doesn’t equal 400 Hz on the VFD. I’m pretty sure I set this correctly on the VFD.

That little butter where my finger is, is the reset button. I’m going to show you how I upload the firmware to the controller and when I press the reset. It’s just compiling. I’m a bit confused with what I had done with the piecewise linear spindle enable setting. I’ve just deactivated it and things are still working so maybe that wasn’t something – or someone knows what the hell that is for, could tell me? Ok so I’m just going to press the upload button and wait for two flashes on the red light, and then you press. And it’s pretty hard to tell but you get two lights. And it turns off and it tells me that it’s done uploading on arduino IDE. I began to suspect I may not need to use the enable piecewise spindle parameter, so I re- uploaded the edited version of the firmware and went about making changes to the config.h file all over again. This time I changed line 88, 124, 155, 350, 360 and I also loaded the default.h files and updated the settings to the ones I had in the previous version of GRBL. Thankfully I took a photograph of the settings on bCNC using my phone. Again I’ll list all those in more detail in the description bellow.

I set the PWM to 106 which I worked out as a percentage of the spindle speed to equal 10000 rpm  as the minimum and this is it working, but I’ll only know if this is all set correctly when I get the tachometer. That seems to be working now. I don’t think I need to do anything to the piecewise spindle enable setting. I might have done two changes at the same time, and assumed that made a difference – I am not sure. Or maybe there was a setting I changed in bCNC which actually aligned the RPM to the PWM – I am still not sure. I thin what I will do is, create a screen capture of the controller information – the default and also the config information –  from bCNC. And also a copy of the firmware which I’ve got saved in the library with all the changed I got made. And I’ll make that available on my Patreon page for now. Although it would be interesting to find out if the margin scan works. And that still doesn’t work. Anyway cut.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s