Can't Get Spindle Working on RPI CNC Hat

Post Reply
anewsome
Posts: 2
Joined: Fri Mar 08, 2019 4:32 pm

Can't Get Spindle Working on RPI CNC Hat

Post by anewsome » Sat Mar 09, 2019 1:06 am

Hey guys. New to the forum here. Looking at previous threads here on the forum, I noticed a few folks haven't been able to get their spindle working and I also noticed those threads didn't have any answers that would fix what I'm seeing on my board.

I just got board a few days ago and after snapping the stepper drives on and wiring up to my CNC machine, all of the steppers are working great. I just used the bCNC program that came on the raspberrypi image. Honestly, it'll probably be fine for what I'm doing so I'll probably keep it. So yeah, steppers work great.

However, I'm unable to get anything out of the "spindle enable" pin. As far as I can tell from the documentation, I should see a constant 5V on the spindle enable pin if I set "S1000" and "M3". I measure 0V on my voltmeter, so I'm confused why there's no voltage at all. S1000 should bypass PWM and set spindle enable to constant 5V right? Am I missing something here?

I did notice that the "Coolant" pin was working properly. If I set M8, then I see a constant 5V on the coolant pin. Since I was anxious to use my new board, I simply wired to the coolant pin instead and then changed all my M3 commands to M8 in my Gcode and also changed my M5 commands to M9 to turn off the spindle. This all works fine and would even probably be fine permanently, but what I did actually need to use the coolant pin for, you know, coolant.

I'd like to figure out what's going on with the spindle enable pin. If anyone has any advice, please advise. Thanks, Aaron

Bertus Kruger
Site Admin
Posts: 1562
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Can't Get Spindle Working on RPI CNC Hat

Post by Bertus Kruger » Tue Mar 12, 2019 6:42 pm

anewsome wrote:
Sat Mar 09, 2019 1:06 am
However, I'm unable to get anything out of the "spindle enable" pin. As far as I can tell from the documentation, I should see a constant 5V on the spindle enable pin if I set "S1000" and "M3". I measure 0V on my voltmeter, so I'm confused why there's no voltage at all. S1000 should bypass PWM and set spindle enable to constant 5V right? Am I missing something here?

I did notice that the "Coolant" pin was working properly. If I set M8, then I see a constant 5V on the coolant pin. Since I was anxious to use my new board, I simply wired to the coolant pin instead and then changed all my M3 commands to M8 in my Gcode and also changed my M5 commands to M9 to turn off the spindle. This all works fine and would even probably be fine permanently, but what I did actually need to use the coolant pin for, you know, coolant.

I'd like to figure out what's going on with the spindle enable pin. If anyone has any advice, please advise. Thanks, Aaron
S1000
M3

Should do it....

Have you changed any of the GRBL settings?
https://github.com/grbl/grbl/wiki/Confi ... o-defaults

anewsome
Posts: 2
Joined: Fri Mar 08, 2019 4:32 pm

Re: Can't Get Spindle Working on RPI CNC Hat

Post by anewsome » Thu Mar 14, 2019 3:39 am

Thanks for the reply Bertus. I have no explanation for this but the spindle enable pin just started working. I did not rewire anything, I didn't change any connections or switch power supplies or really change anything at all. The only GRBL settings that I can recall changing were the commands used to set the steps/mm for my stepper motors.

You can chalk this one up as one of the great mysteries of our times because I can't figure out what happened here.

I've run a BUNCH of CNC since I got the board working. So much CNC that I burned out cheap spindle on my DIY CNC, well it wasn't really a spindle anyway. It was a cheap Dremel and pretty underpowered. I also burned out my cheap 1.7W laser board controller attempting to cut through 3mm plywood. None of this being the fault of the RPI CNC hat. The hat is working great and GRBL is so much easier to work with compared to the crappy board I was using before I bought the CNC HAT.

Bertus Kruger
Site Admin
Posts: 1562
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Can't Get Spindle Working on RPI CNC Hat

Post by Bertus Kruger » Sun Mar 17, 2019 6:08 pm

anewsome wrote:
Thu Mar 14, 2019 3:39 am
Thanks for the reply Bertus. I have no explanation for this but the spindle enable pin just started working. I did not rewire anything, I didn't change any connections or switch power supplies or really change anything at all. The only GRBL settings that I can recall changing were the commands used to set the steps/mm for my stepper motors.

You can chalk this one up as one of the great mysteries of our times because I can't figure out what happened here.

I've run a BUNCH of CNC since I got the board working. So much CNC that I burned out cheap spindle on my DIY CNC, well it wasn't really a spindle anyway. It was a cheap Dremel and pretty underpowered. I also burned out my cheap 1.7W laser board controller attempting to cut through 3mm plywood. None of this being the fault of the RPI CNC hat. The hat is working great and GRBL is so much easier to work with compared to the crappy board I was using before I bought the CNC HAT.
Good to hear... could have been a loose cable. ;)

russdog63
Posts: 1
Joined: Thu Feb 06, 2020 12:18 am

Re: Can't Get Spindle Working on RPI CNC Hat

Post by russdog63 » Thu Feb 06, 2020 6:55 pm

Hi. This is my first post on the forum. I am making a rasberry pi cnc using the protoneer 2.6 shield. I have formatted my rasberry pi SD Card with the CNC hat image and have it up and working. Everything is working well as far as controlling the step motors with external drivers. I have my x,y, and z axis calibrated and the stepper motors are working great. I am now wanting to use the rasberry pi to control a water cooled spindle ran by a vfd. After scratching my head over it for the last couple of weeks I have a good understanding about how to do it using 5v relays.

Now my problem is getting the correct outputs from the SPN_DIR and SPN.EN pins. I am getting the correct output from the cooling pin but I don't think I am for the other two. I used the buttons and sliders on bCNC to turn the spindle on and off as well adjust the speed. I correspondingly checked the pin voltages with a volt meter. I had my grbl settings set for the spindle max at 24000 and the spindle min at 0.

I have never gotten any voltage out of the spin dir pin. It was always zero. Should I be getting 0v or 5v corresponding to for/reverse? If that is so that could explain my not getting any voltage because bCNC does not have a button for reverse and the setting was only at M3 and was never at M4.

For the enable pin I should be getting a voltage between 0 and 5 with zero off and zero rpms. 5 volts should be on and max(24000) rpms. For a short while I had gotten a voltage that corresponded to the slider setting but I am now not getting anything. I have also manually input M3 and S1000 but that is not getting any output for me.

The only grbl setting changes that I made to were the min and max spindle settings. I did make a change on the bCNC settings that allowed me to change my slider setting max from 12000 to 24000. Another thing I did was click the firmware scripts. I clicked the grbl v0.9 and the update to the latest firmware script. Could a change to the firmware be causing my problem? I will go back and play around with that as well manually programming M3, M4, and S1000 to check this.

Is there anyone with any ideas why I am not getting voltages on the dir and enable pins.

Bertus Kruger
Site Admin
Posts: 1562
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Can't Get Spindle Working on RPI CNC Hat

Post by Bertus Kruger » Tue Feb 11, 2020 6:44 pm

russdog63 wrote:
Thu Feb 06, 2020 6:55 pm
I have never gotten any voltage out of the spin dir pin. It was always zero. Should I be getting 0v or 5v corresponding to for/reverse? If that is so that could explain my not getting any voltage because bCNC does not have a button for reverse and the setting was only at M3 and was never at M4.
Using M3 and M4.

Yes, you should be getting PWM signals from 0-5V depending on the S command setting S1000 should give you 5V.

M5 will set the spindle pin to 0V again.

Bertus Kruger
Site Admin
Posts: 1562
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Can't Get Spindle Working on RPI CNC Hat

Post by Bertus Kruger » Tue Feb 11, 2020 6:47 pm

russdog63 wrote:
Thu Feb 06, 2020 6:55 pm
The only grbl setting changes that I made to were the min and max spindle settings. I did make a change on the bCNC settings that allowed me to change my slider setting max from 12000 to 24000. Another thing I did was click the firmware scripts. I clicked the grbl v0.9 and the update to the latest firmware script. Could a change to the firmware be causing my problem? I will go back and play around with that as well manually programming M3, M4, and S1000 to check this.
Definitely, from memory PWM was introduced after 0.9 and there were also pin changes in one of the versions.

What version GRBL are you running?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests