PDA

View Full Version : Arduino CNC Shield Power Routing



AcrimoniousMirth
26-06-2017, 09:21 PM
Hi,
New to the forum, came from the 3D Printing world having conquered it and have to say... the open source software, firmware and hardware for 3D Printing is WAY more advanced than for CNC machines.

Anyway, as such I'm used to my motherboard shield powering the Arduino it sits on. However when I send power to the CNC shield (this being the name as well as description) the Arduino doesn't come alive. I've buzzed out the PSU-shield with no issues, tried shield positive to Arduino jack plug positive, which gave me a reading but the negatives didn't.

So, to clarify (as there doesn't seem to be much user friendly information out there)... does the CNC shield power the Arduino or does the Arduino use its host computer's power through the USB to power it?

Thanks for any help :)

AndyGuid
27-06-2017, 02:54 AM
Afraid I can't answer your question and I suspect that most on this forum have not yet delved into the world of Arduinos and open source software/firmware, but hopefully someone does have the knowledge to come along and help.

Welcome to the forum though :-)

Desertboy
27-06-2017, 06:03 AM
Hi,
New to the forum, came from the 3D Printing world having conquered it and have to say... the open source software, firmware and hardware for 3D Printing is WAY more advanced than for CNC machines.

Anyway, as such I'm used to my motherboard shield powering the Arduino it sits on. However when I send power to the CNC shield (this being the name as well as description) the Arduino doesn't come alive. I've buzzed out the PSU-shield with no issues, tried shield positive to Arduino jack plug positive, which gave me a reading but the negatives didn't.

So, to clarify (as there doesn't seem to be much user friendly information out there)... does the CNC shield power the Arduino or does the Arduino use its host computer's power through the USB to power it?

Thanks for any help :)

The Arduino should power up from USB socket (It's 5v) and then wire your 24v power supply directly to the cnc shield, if you don't have a 24v power supply get one. If you are using 4 motors (2 for the lower axis) use all 4 axis on the cnc shield and set one of the axis as a clone so you can get the maximum out of your nemas.

First question is have you tried the uno without the cnc shield on it?

Arduino can only handle 5v if you pump 12v or above into the Uno you will fry it! The CNC shield is designed to pass power from the onboard power socket to the stepper drivers bypassing the Arduino. The arduino is powered by the USB socket or optionally the 5v plug on the Arduino board which is more for standalone arduino operations.

grbl is actually very good

Check out this page
http://www.instructables.com/id/3020-CNC-Arduino-GRBL-CNC-Shield-V3/

I found it useful although a lot doesn't apply to me.

Clive S
27-06-2017, 08:05 AM
Hi and welcome to the forum. What is a CNC shield? Its hard to answer questions without links to what you are trying to do. We don't tend to use Arduino's to run cnc machines.



Hi,
New to the forum, came from the 3D Printing world having conquered it and have to say... the open source software, firmware and hardware for 3D Printing is WAY more advanced than for CNC machines.


Not sure I understand this statement have a look at LinuxCnc and see if you change your mind about advanced open source.

There are many people on here running 3D printers as well as cnc machines.

Desertboy
27-06-2017, 08:14 AM
Hi and welcome to the forum. What is a CNC shield? Its hard to answer questions without links to what you are trying to do. We don't tend to use Arduino's to run cnc machines.



Not sure I understand this statement have a look at LinuxCnc and see if you change your mind about advanced open source.

There are many people on here running 3D printers as well as cnc machines.

It's true on here most people have bigger machines so no one seems to use an arduino but the arduino cnc community is bigger than you think mainly because of shapeoko and xcarve.

At the moment it's really only good for 3 axis but you can actually wire up much better stepper drivers to the cnc shield and run the power directly bypassing the shield and get very acceptable performance for very little money.

It's not a as good as a linuxcnc solution of course but it's really not bad at all, they worked very hard to sort usb issues out and have a very decent light production solution grbl is a project to watch out for as they migrate to more powerful ARM based controllers. They have a working 4 axis solution but it doesn't all fit in the arduino uno.

I'm going to use an arduino, cncshield, 24v power supply & nema 23's with cheapo 2amp steppers for now but will get proper drivers and a breakout board relatively soon.

I see the Arduino as a very powerful cnc platform but overshadowed by better commercial solutions but at the price point it cannot be beaten.

AcrimoniousMirth
27-06-2017, 09:32 AM
The Arduino should power up from USB socket (It's 5v) and then wire your 24v power supply directly to the cnc shield, if you don't have a 24v power supply get one. If you are using 4 motors (2 for the lower axis) use all 4 axis on the cnc shield and set one of the axis as a clone so you can get the maximum out of your nemas.

First question is have you tried the uno without the cnc shield on it?

Arduino can only handle 5v if you pump 12v or above into the Uno you will fry it! The CNC shield is designed to pass power from the onboard power socket to the stepper drivers bypassing the Arduino. The arduino is powered by the USB socket or optionally the 5v plug on the Arduino board which is more for standalone arduino operations.

grbl is actually very good

Check out this page
http://www.instructables.com/id/3020-CNC-Arduino-GRBL-CNC-Shield-V3/

I found it useful although a lot doesn't apply to me.

Hi,
As I mentioned I'm coming from the 3D printing world. The motherboards I use feed the Arduino via a built in step-down; that's why I couldn't be too sure and couldn't find a decent PCB trace schematic.
But thank you, that answers my question!
My shield is already set up like so, I've already loaded up GRBL and was just connecting up everything for a first test.

Compared with 3D printing (and keeping in mind I built my own printer) I find the mechanics on CNC more challenging due to the greater forces involved but the electronics tend to be easier! (Mainly because they're less developed at this point, sadly).

AcrimoniousMirth
27-06-2017, 09:44 AM
Hi Clive, nice to be here, thank you :)
Here's a CNC shield: http://ooznest.co.uk/Premium-Arduino-CNC-Shield
I'm designing and building a basic budget machine from some scraps I have and this system is open source and let's me run a basic CNC on a £15 system!
I've seen linuxCNC and it does seem good! I think I will try it if Fusion 360's CAM environment lets me down.
Why I say it's less advanced?
Firmware - on a 3D printer you modify the firmware as code and upload it as a very powerful and intuitive system with inbuilt support for autolevelling, LCD screens, SD cards and much much more. The most decent CNC firmware I can use is GRBL which uploads in a weird way and has very few settings.
Hardware - now here I am talking about open source and affordable, not the awesome professional machines you use!! With a 3D printer almost every single motherboard can very easily attach to a screen, SD and can be set up for many different forms of machine. With the CNC it only has axis, spindle controls and endstops. If I want to run it headless I have to attach a separate Arduino to relay instructions!
On top of that, on my printer I use "Octoprint" which allows me to control it over the web from anywhere in the world securely. The best for CNC seems to be "GRBLweb" which is also less developed. I may be able to edit octoprint for the CNC though.
Software - there are many clean and easy to use printer softwares that have a very nice and intuitive gui as well as much deeper controls. As a professional 3D technician I use Simplify-3D, one of the few paid slicers. I'm struggling to find anything on-par for CNC but Fusion 360's CAM may help!

Also the documentation is horrendous!

Please note I'm just talking about the entry level open source machines and not the professional ones, which I only dream of owning. For various reasons I'm having to go opensource.
Thanks!

Desertboy
27-06-2017, 02:21 PM
Hi Clive, nice to be here, thank you :)
Here's a CNC shield: http://ooznest.co.uk/Premium-Arduino-CNC-Shield
I'm designing and building a basic budget machine from some scraps I have and this system is open source and let's me run a basic CNC on a £15 system!
I've seen linuxCNC and it does seem good! I think I will try it if Fusion 360's CAM environment lets me down.
Why I say it's less advanced?
Firmware - on a 3D printer you modify the firmware as code and upload it as a very powerful and intuitive system with inbuilt support for autolevelling, LCD screens, SD cards and much much more. The most decent CNC firmware I can use is GRBL which uploads in a weird way and has very few settings.
Hardware - now here I am talking about open source and affordable, not the awesome professional machines you use!! With a 3D printer almost every single motherboard can very easily attach to a screen, SD and can be set up for many different forms of machine. With the CNC it only has axis, spindle controls and endstops. If I want to run it headless I have to attach a separate Arduino to relay instructions!
On top of that, on my printer I use "Octoprint" which allows me to control it over the web from anywhere in the world securely. The best for CNC seems to be "GRBLweb" which is also less developed. I may be able to edit octoprint for the CNC though.
Software - there are many clean and easy to use printer softwares that have a very nice and intuitive gui as well as much deeper controls. As a professional 3D technician I use Simplify-3D, one of the few paid slicers. I'm struggling to find anything on-par for CNC but Fusion 360's CAM may help!

Also the documentation is horrendous!

Please note I'm just talking about the entry level open source machines and not the professional ones, which I only dream of owning. For various reasons I'm having to go opensource.
Thanks!

3d printing is mainstream so lots of development has been done for it and a lot of money has been made by people in the process. CNC is still niche for the home user Mach 3 offers excellent value, linuxcnc even better. Open source tools are only just starting their development cycle and not had tme to mature like 3d printing has.

The big thing is you can't use an arduino with those you need breakout board and suitable steppers a more expensive but more professional setup.

When I've spent a month with grbl and a month with linuxcnc working I'll be able to make a better conclusion.

grbl is very powerful there's little reason for many firmware settings as you do everything with gcode, you can't run headless with grbl I remember reading it's just too much for the uno so it won't be coming to the Uno version at least but you can use a PI to control the Uno to create a nice all in one solution.

AcrimoniousMirth
27-06-2017, 04:20 PM
3d printing is mainstream so lots of development has been done for it and a lot of money has been made by people in the process. CNC is still niche for the home user Mach 3 offers excellent value, linuxcnc even better. Open source tools are only just starting their development cycle and not had tme to mature like 3d printing has.

The big thing is you can't use an arduino with those you need breakout board and suitable steppers a more expensive but more professional setup.

When I've spent a month with grbl and a month with linuxcnc working I'll be able to make a better conclusion.

grbl is very powerful there's little reason for many firmware settings as you do everything with gcode, you can't run headless with grbl I remember reading it's just too much for the uno so it won't be coming to the Uno version at least but you can use a PI to control the Uno to create a nice all in one solution.

From what I've seen the open source CNC stuff has been around a good deal longer but yeah, as a niche area has had much less development by able bodied parties.
My CNC only exists because I inherited an old RapMan printer (made in like 2008) so it's very outdated and practically useless nowadays, especially compared to my own-design machine. So I took it apart and am reusing a good portion of the parts. Including the NEMA23's.
Having run some calculations my CNC shield and the drivers I'm using (DRV8825) will be adequate for the power requirements. The spindle I decided first off to modify from an old cordless drill, stripping down to the motor, epicyclic gearbox and added an ER-11 collet. Tests show that's running adequately but I may upgrade to a proper spindle if needs be...
I'm currently getting started with the higher level control electronics for the spindle, again reusing stuff as much as possible and in theory it'll work without a hitch. Planning to make that "in practice" tomorrow!

So basically, what are my goals with this thing? To make a cheap and reasonably good CNC out of scraps I have lying around and other cheap materials where needs be. So far so good.


And yes, I'm aware. Again, in many ways the CNC has been relatively straightforward compared to 3D Printers because they're less demanding on the code and setup front. The mechanics are more demanding because of the forces involved but hey, it balances out. Naturally the Pi would control the Arduino separately (much like the Octoprint setup I use on my printer); it's basically running as a computer to replace your laptop/desktop and receiving files over the web. I wouldn't dream of trying to get the uno running that on its own, it's a microcontroller and not a computer, so not designed for that sort of processing.

m_c
27-06-2017, 04:59 PM
The problem with CNC machining, is it usually requires far faster and more accurate motion than 3D printing, and an Arduino is not really up to the task.
Even an ARM processor isn't ideal, as getting jitter free motion needs good clock scaling, which can be handled far better in an FPGA, which is why you'll find nearly all CNC motion controllers use an FPGA for motion generation, often paired with some form of microprocessor which handles communication and the maths for generating the motion paths, before passing the required motion to the FPGA.
LinuxCNC and Mach running via a parallel port also have the same issue, however they ultimately rely on using a sledgehammer to crack a nut, by throwing enough processing power at the problem, you can get it to work well enough it's not a problem.

And then you have the available hardware. Nearly all shields I'm sure have been designed with 3D printing in mind, where speed and acceleration requirements aren't that great, so 24V is acceptable. If you were to use those same speeds on any reasonably sized router or mill, it would be painfully slow.
Hardware really is a case of, you get what you pay for.

Desertboy
27-06-2017, 05:23 PM
The problem with CNC machining, is it usually requires far faster and more accurate motion than 3D printing, and an Arduino is not really up to the task.
Even an ARM processor isn't ideal, as getting jitter free motion needs good clock scaling, which can be handled far better in an FPGA, which is why you'll find nearly all CNC motion controllers use an FPGA for motion generation, often paired with some form of microprocessor which handles communication and the maths for generating the motion paths, before passing the required motion to the FPGA.
LinuxCNC and Mach running via a parallel port also have the same issue, however they ultimately rely on using a sledgehammer to crack a nut, by throwing enough processing power at the problem, you can get it to work well enough it's not a problem.

And then you have the available hardware. Nearly all shields I'm sure have been designed with 3D printing in mind, where speed and acceleration requirements aren't that great, so 24V is acceptable. If you were to use those same speeds on any reasonably sized router or mill, it would be painfully slow.
Hardware really is a case of, you get what you pay for.

The CNCshield is designed for grbl which is cnc router firmware not 3d printing! It can pass up to 36v to steppers (It's designed for a hobby machine after all) but if you need 60v to the drivers you can do that easily as well. Most people use cheap ass Polou steppers which are not suitable for 36v but you can get a lsightly more expensive driver than will push 36v fine or wire a real driver to replace the cheap chip drivers the cncshield is designed to take on board.

Of course it's not as good as much more expensive solutions but it's very powerful for the price (£25 including 4 stepper drivers!) and not as useless as you might think but I will move to a breakout board solution relatively soon I consider it the least essential purchase right now in getting the thing built and cutting.

Ardunio and cncshield are also very good for testing nema's so when I do upgrade I will have a simple test bed for the recovered motor's I collect.

grbl is very stable these days, maybe not the quickest of course but they are rock solid stable.

"The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses."

AcrimoniousMirth
27-06-2017, 05:59 PM
The problem with CNC machining, is it usually requires far faster and more accurate motion than 3D printing, and an Arduino is not really up to the task.
Even an ARM processor isn't ideal, as getting jitter free motion needs good clock scaling, which can be handled far better in an FPGA, which is why you'll find nearly all CNC motion controllers use an FPGA for motion generation, often paired with some form of microprocessor which handles communication and the maths for generating the motion paths, before passing the required motion to the FPGA.
LinuxCNC and Mach running via a parallel port also have the same issue, however they ultimately rely on using a sledgehammer to crack a nut, by throwing enough processing power at the problem, you can get it to work well enough it's not a problem.

And then you have the available hardware. Nearly all shields I'm sure have been designed with 3D printing in mind, where speed and acceleration requirements aren't that great, so 24V is acceptable. If you were to use those same speeds on any reasonably sized router or mill, it would be painfully slow.
Hardware really is a case of, you get what you pay for.


The other guy who replied makes some good points.
We are advised to use the latest uno as the clock is designed for faster rates. I can't say it requires "faster and more accurate" motion than 3D printing honestly, especially not at a hobby scale. My 3D printers has travel moves of 400mm/s happily, can print at a good 100mm/s and maintains accuracy on the micrometer scale without an issue. I haven't had much experience with CNCs but in general they seem slower than my printer and the bits larger than my nozzle, rendering certain forms of accuracy less reliable.
Naturally if I wanted to invest several hundred in a CNC I would so and the quality would be much better. However I don't. This is a hobby build from scraps and cheap pieces that'll get used for sure, but not that much, I'm guessing.
Ah, many shields ARE designed for 3D printing, but that's why you make sure to get a CNC shield, designed for higher power throughput. My RAMPS board is designed for 12V but I easily modified it to 24V. However I still wouldn't use it for CNC work as half the stuff on it isn't needed. The CNC shield is capable of up to 36V, adequate for a hobby machine, and plenty for what I need.
I should note again, this isn't an industry scale or quality machine I'm aiming for. I just had a fun idea to reuse some old scraps lying around and it'll be an entry point for if I do want to create something more professional! 3D printing is my real joy but there's nothing wrong with expanding my skills, knowledge and tool bank :)



Honestly, what I really would need guidance on is the homing sequence. If I'm understanding what I've read correctly; the XY are homed to the 0 corner on the machine in "machine coordinates" and the Z (spindle) to its upper limit, also 0.
As the machine knows the maximum cutting depth (Z max) once you've put in your cutting bit you then jog the tool down till it touches the top of the material you plan to cut. This then gives the machine the "cutting coordinate" offset 0 from world coordinate 0.
Knowing the maximum depth and that this new machine coordinate = cutting coordinate 0 it knows the new range in which to cut.

Correct?

So in practicality, the machine is homed to a designated corner with the spindle at its highest, material is clamped, cutting bit inserted and jogged down to touch the material and that then registered by the machine, then cutting may begin.

This is my one true sticking point, the rest I'm comfortable with now that I know the shield isn't feeding the Arduino too.
Thanks for all the help :)

m_c
27-06-2017, 06:02 PM
The CNCshield is designed for grbl which is cnc router firmware not 3d printing! It can pass up to 36v to steppers (It's designed for a hobby machine after all) but if you need 60v to the drivers you can do that easily as well. Most people use cheap ass Polou steppers which are not suitable for 36v but you can get a lsightly more expensive driver than will push 36v fine or wire a real driver to replace the cheap chip drivers the cncshield is designed to take on board.
That CNC shield is just a glorified header board, with pinouts optimised for grbl. You could just as easily use it for 3D printing.
Regardless, what I was highlighting was the more stringent requirements for CNC.


Of course it's not as good as much more expensive solutions but it's very powerful for the price (£25 including 4 stepper drivers!) and not as useless as you might think but I will move to a breakout board solution relatively soon I consider it the least essential purchase right now in getting the thing built and cutting.

Ardunio and cncshield are also very good for testing nema's so when I do upgrade I will have a simple test bed for the recovered motor's I collect.
Just for clarity, I never said an Arduino is not a useable option, it's just not an ideal one.


grbl is very stable these days, maybe not the quickest of course but they are rock solid stable.

"The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses."

And if you have a look at the grbl source, you'll see it's using a similar smoothing algorithm to Repetier (which incidentally has a nice explanation on how it works). It may be jitter free, but in order to achieve the jitter free, you have to compromise accuracy. And then to achieve the higher pulse rates, it starts scaling steps, so you loose even more accuracy, and introduce a certain amount of jitter.

If I didn't have as much work to do just now, I'd try connecting an arduino to a datalogger, and see just how jitter free the output really is.

P.S. the technobabble may impress your average arduino coder, but all they're ultimately doing is handling pulse generation in native AVR C, and relying on ISRs for timing. The only thing optimised other than good coding technique, is avoiding using C++ and the arduino compiler, which is inherently bloated.

AcrimoniousMirth
27-06-2017, 06:03 PM
The CNCshield is designed for grbl which is cnc router firmware not 3d printing! It can pass up to 36v to steppers (It's designed for a hobby machine after all) but if you need 60v to the drivers you can do that easily as well. Most people use cheap ass Polou steppers which are not suitable for 36v but you can get a lsightly more expensive driver than will push 36v fine or wire a real driver to replace the cheap chip drivers the cncshield is designed to take on board.

Of course it's not as good as much more expensive solutions but it's very powerful for the price (£25 including 4 stepper drivers!) and not as useless as you might think but I will move to a breakout board solution relatively soon I consider it the least essential purchase right now in getting the thing built and cutting.

Ardunio and cncshield are also very good for testing nema's so when I do upgrade I will have a simple test bed for the recovered motor's I collect.

grbl is very stable these days, maybe not the quickest of course but they are rock solid stable.

"The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses."

Well said! I'd like to add that it's even cheaper than £25 now! CNC shield and Arduino UNO coming to about £10-15 total now including the cheap pololus.
I knew I'd be using NEMA23s (part of the limitation of me recycling old bits) so I reused some old DRV8825 drivers which as you say are capable of 24-36V and higher currents, so are suitable for the NEMA23s. Those back in the day would've cost me about £7 so you're right, cheap as dirt for hobbyists :)

AcrimoniousMirth
27-06-2017, 06:09 PM
That CNC shield is just a glorified header board, with pinouts optimised for grbl. You could just as easily use it for 3D printing.
Regardless, what I was highlighting was the more stringent requirements for CNC.

True that! But you wouldn't as you'd have to add thermistor control, heated bed, heated nozzle... and to be in line with today's cheapest printer motherboard (the RAMPS) you'd also need to add on extra for servo control, LCD and SD integration etc.
If you had one already it'd be interesting turning it into a printer driver but you wouldn't purchase one for printing, especially as said RAMPS is about £18 including the necessary drivers and LCD/SD :)

m_c
27-06-2017, 06:26 PM
The other guy who replied makes some good points.
We are advised to use the latest uno as the clock is designed for faster rates. I can't say it requires "faster and more accurate" motion than 3D printing honestly, especially not at a hobby scale. My 3D printers has travel moves of 400mm/s happily, can print at a good 100mm/s and maintains accuracy on the micrometer scale without an issue. I haven't had much experience with CNCs but in general they seem slower than my printer and the bits larger than my nozzle, rendering certain forms of accuracy less reliable.
Naturally if I wanted to invest several hundred in a CNC I would so and the quality would be much better. However I don't. This is a hobby build from scraps and cheap pieces that'll get used for sure, but not that much, I'm guessing.
Ah, many shields ARE designed for 3D printing, but that's why you make sure to get a CNC shield, designed for higher power throughput. My RAMPS board is designed for 12V but I easily modified it to 24V. However I still wouldn't use it for CNC work as half the stuff on it isn't needed. The CNC shield is capable of up to 36V, adequate for a hobby machine, and plenty for what I need.
I should note again, this isn't an industry scale or quality machine I'm aiming for. I just had a fun idea to reuse some old scraps lying around and it'll be an entry point for if I do want to create something more professional! 3D printing is my real joy but there's nothing wrong with expanding my skills, knowledge and tool bank :)

At least you're aware of the limitations.


Honestly, what I really would need guidance on is the homing sequence. If I'm understanding what I've read correctly; the XY are homed to the 0 corner on the machine in "machine coordinates" and the Z (spindle) to its upper limit, also 0.
As the machine knows the maximum cutting depth (Z max) once you've put in your cutting bit you then jog the tool down till it touches the top of the material you plan to cut. This then gives the machine the "cutting coordinate" offset 0 from world coordinate 0.
Knowing the maximum depth and that this new machine coordinate = cutting coordinate 0 it knows the new range in which to cut.

Correct?

So in practicality, the machine is homed to a designated corner with the spindle at its highest, material is clamped, cutting bit inserted and jogged down to touch the material and that then registered by the machine, then cutting may begin.

This is my one true sticking point, the rest I'm comfortable with now that I know the shield isn't feeding the Arduino too.
Thanks for all the help :)

That sounds fine.
I would recommend learning a bit about G-codes though, and how they work on whatever controller you're using, as there can be slight differences in how they're implemented.

The machine home does not have to be 0,0,0, however it depends on if grbl supports it not being at 0,0,0. Depending on machine layout, home can be at the opposite travel limit i.e. to keep the gantry at it's furthest away point to improve access for loading/clamping.
Once homed, you would then normally define a work offset. For changeable repeatable tools, you'd also use tool offsets, but I don't think you really need to worry about tool offsets.

Alternatively, as this sounds like not that powerful a machine, use the KISS option. Don't bother with homing switches, set home at 0,0,0 for the work piece, and ignore offsets.
This is how I use my digitising machine, as it removes complexity and it just stalls if it does run out of travel. I certainly wouldn't use this technique on my mill of lathe.

AcrimoniousMirth
27-06-2017, 09:07 PM
At least you're aware of the limitations.


That sounds fine.
I would recommend learning a bit about G-codes though, and how they work on whatever controller you're using, as there can be slight differences in how they're implemented.

The machine home does not have to be 0,0,0, however it depends on if grbl supports it not being at 0,0,0. Depending on machine layout, home can be at the opposite travel limit i.e. to keep the gantry at it's furthest away point to improve access for loading/clamping.
Once homed, you would then normally define a work offset. For changeable repeatable tools, you'd also use tool offsets, but I don't think you really need to worry about tool offsets.

Alternatively, as this sounds like not that powerful a machine, use the KISS option. Don't bother with homing switches, set home at 0,0,0 for the work piece, and ignore offsets.
This is how I use my digitising machine, as it removes complexity and it just stalls if it does run out of travel. I certainly wouldn't use this technique on my mill of lathe.

Thanks for the advice!
I'm familiar with Gcode (again having come from the 3D Printing world) but respect that it may be implemented slightly differently in CNC.
I personally would have it at 0,0 given my machine layout!
So what's the precise difference between the work and tool offset? If I were to manually change a tool I would expect to home again, swap tools and then set the offset with the new tool. That way it takes into account the different length of bit.
I got endstops from the scrapped Rapman and I don't see any reason why not to make it as good as I can while maintaining the budget approach! It's a bit of a quandary, I know, but though I'm keeping costs minimal I do want to do the best I can with what I have :)

m_c
27-06-2017, 09:55 PM
One is for where the work piece is, and one for the size of tool ;-)

I'm sure the work piece offset doesn't need explained.

Whether tool offsets are any use, depends on if/how the controller implements them. For mills/routers, the two offsets are tool length compensation, and tool diameter/radius compensation.
Tool length is only really much use if you have some way to switch tools and reliably repeat the previous tool length I.e. something with a tool changer.

Diameter/radius compensation is more important, as it allows g-code to be used that doesn't rely on a certain size tool being used. In a nutshell, with diameter compensation, you can produce G-code that simply traces the outline of what you want to cut, the controller then applies a suitable offset based on the set tool diameter, and cuts on the inside or outside of the g-code line. If you want to use a different diameter tool, you just change the set tool diameter and the controller adjusts to suit the new offset.
Without the compensation, you need to produce G-code that already follows the offset cutting path based on the diameter of the tool you plan to be using. If you want to swap tool diameter, you would need to re-generate the G-code to have the correct offset for the new tool.

It can be argued what method is better. Using cutter compensation makes the g-code more versatile, but is reliant on the correct tool offsets and modes being set in the controller. Without compensation, eliminates the issue of having to set tool offsets and simplifies using the machine.
With any decent CAM, there's minimal difference in producing the G-code for either. Regenerating for a different tool diameter is usually a case of just setting the new diameter, and clicking a button, so not using compensation is hardly a major problem given how often you're likely to need to alter tool diameter.
The hardest part, is making sure the post processor is producing the correct codes and format for your controller.

Neale
27-06-2017, 10:19 PM
If you've got your head around machine coordinates and work coordinates, that's great. A lot of people struggle at that point! Tool offsets are not really needed a lot of the time. In fact, they are most useful if you are using a toolchanger where each tool will go back in the spindle at the same precise position every time. You set work coordinates by touching off the work in X, Y, and Z as described using a reference tool; then the software can use the preset tool offsets to, in effect, reset the Z work coordinate based on the new tool's projection from the spindle every time you change tools. Like a lot of people, I use a slightly different approach. I use a touchplate to set the Z coordinate for the first tool I am going to use. I run a macro which first touches off the movable touchplate (maybe on the top surface of the work, maybe off the spoil board or bed, depending on what I am using as a reference) and then touches off a fixed touchplate set into the bed. The software stores the difference between the Z coordinates. When I switch to the second (or third, etc) tool, another macro touches the tool off the fixed touchplate and can use the stored offset to, in effect, translate this into referencing off the original surface. Which might have be machined away by this point. It's not quite the same as using tool offsets, but it is more suited to a machine like mine where the tool is held in a collet and I cannot control "stickout" very accurately when I change tools.

Which brings me to my problem with open source software for CNC as it stands at the moment - the commercial software lets me do these kinds of things very easily, both in terms of writing macros and modifying control screens to add or change functionality. I had a play with grbl a while ago for another project as I needed motion control software that I could get inside and modify reasonably easily and grbl fitted the bill. However, there is a big difference between adding functionality via macros that give direct access to "CNC functionality" and working out how to do that while grubbing about with a C compiler. It's a bit like asking why I should bother with using a database package when I could write the same thing in assembler! Well, that's a bit of an exaggeration but it's a bit like that. The other problem is that I ended up using Universal Gcode Sender to sit between PC and grbl. UGS seemed to be the best option at the time I was looking. While it had some machine control features, it was a bit clumsy to use and somewhat limited. That might have changed by now - I haven't needed to look. The commercial options are much better in this respect. LinuxCNC is a halfway house - pretty much the same functionality as things like Mach3 but a full open-source "product". But you do then need to cart around a PC or similar with you, which is why I was looking at grbl. Maybe RPi is the way to go but my aim at that time was to get something working rather than spend ages researching options. I'm sure that this is a developing area, although I have to say that as the open-source aspect is driven mainly by lower-power machines which make less demand on the control system, it may be that the priorities for development will be different in the same way that a desktop skate-bearing machine with a router as spindle differs from a full-sheet router with 3HP spindle. I'm not knocking the former option BTW - my first CNC router was MDF with skate bearing guides and I used that (with LinuxCNC) for the best part of 5 years.

I shall continue to watch the open-source area with interest as I'm sure that there will be some useful developments. For example, there is the stmbl open-source hardware development for servo drivers, and there are a lot of creative "amateurs" out there.

BTW, on the subject of Arduino power - I'm pretty sure that the Uno spec says that it is happy with 7-12V as it has onboard regulation to give 5V for the Atmega chip, etc. I think my Sanguinololu 3D printer controller (that dates me...) uses 12V. I'm in the process of developing an Arduino-based controller for a different kind of machine at the moment, which is why I was looking this up on the Arduino site a couple of nights ago. It may be that the shield does not pass its power to the Arduino purely because its acceptable input voltage range exceeds what is acceptable by the Arduino.

Desertboy
27-06-2017, 10:26 PM
BTW, on the subject of Arduino power - I'm pretty sure that the Uno spec says that it is happy with 7-12V as it has onboard regulation to give 5V for the Atmega chip, etc. I think my Sanguinololu 3D printer controller (that dates me...) uses 12V. I'm in the process of developing an Arduino-based controller for a different kind of machine at the moment, which is why I was looking this up on the Arduino site a couple of nights ago. It may be that the shield does not pass its power to the Arduino purely because its acceptable input voltage range exceeds what is acceptable by the Arduino.

Not sure the specs but you cannot use 12v inductive sensors on a ramps board directly you need to wire some resistors to drop the voltage as it will fry the arduino so I would err on the side of caution.

Neale
27-06-2017, 10:43 PM
Not sure the specs but you cannot use 12v inductive sensors on a ramps board directly you need to wire some resistors to drop the voltage as it will fry the arduino so I would err on the side of caution.

I can believe that - most of the motion control boards have the same limitation. The basic electronics is 5V and won't handle more than that on any digital input. With the Arduino, the digital input pins go direct to the Atmega chip and that is rated at 5V on all inputs. However, the power supply via the Vin pin should be happy with 12V as this goes to a voltage regulator to give 5V for the rest of the board. In fact, if you are not supplying 5V via the USB connector, the recommendation is to run the Arduino on at least 7V as the regulator needs a bit of headroom to work correctly.

AcrimoniousMirth
27-06-2017, 11:33 PM
One is for where the work piece is, and one for the size of tool ;-)

I'm sure the work piece offset doesn't need explained.

Whether tool offsets are any use, depends on if/how the controller implements them. For mills/routers, the two offsets are tool length compensation, and tool diameter/radius compensation.
Tool length is only really much use if you have some way to switch tools and reliably repeat the previous tool length I.e. something with a tool changer.

Diameter/radius compensation is more important, as it allows g-code to be used that doesn't rely on a certain size tool being used. In a nutshell, with diameter compensation, you can produce G-code that simply traces the outline of what you want to cut, the controller then applies a suitable offset based on the set tool diameter, and cuts on the inside or outside of the g-code line. If you want to use a different diameter tool, you just change the set tool diameter and the controller adjusts to suit the new offset.
Without the compensation, you need to produce G-code that already follows the offset cutting path based on the diameter of the tool you plan to be using. If you want to swap tool diameter, you would need to re-generate the G-code to have the correct offset for the new tool.

It can be argued what method is better. Using cutter compensation makes the g-code more versatile, but is reliant on the correct tool offsets and modes being set in the controller. Without compensation, eliminates the issue of having to set tool offsets and simplifies using the machine.
With any decent CAM, there's minimal difference in producing the G-code for either. Regenerating for a different tool diameter is usually a case of just setting the new diameter, and clicking a button, so not using compensation is hardly a major problem given how often you're likely to need to alter tool diameter.
The hardest part, is making sure the post processor is producing the correct codes and format for your controller.

Thanks mate, that's been very clarifying. I do most of my CAD in fusion 369 which has an inbuilt CAM tool patching and code generator, I'm not sur elle if you're familiar, but that's what I plan to use!

AcrimoniousMirth
27-06-2017, 11:42 PM
BTW, on the subject of Arduino power - I'm pretty sure that the Uno spec says that it is happy with 7-12V as it has onboard regulation to give 5V for the Atmega chip, etc. I think my Sanguinololu 3D printer controller (that dates me...) uses 12V. I'm in the process of developing an Arduino-based controller for a different kind of machine at the moment, which is why I was looking this up on the Arduino site a couple of nights ago. It may be that the shield does not pass its power to the Arduino purely because its acceptable input voltage range exceeds what is acceptable by the Arduino.

Yeah, the most likely reason is the variable input. While the RAMPS is designed specifically for 12V without modding, this board takes 12-36V so it's not a simple matter stepping down the voltage for the Arduino. Saying that... I've previously bought a whole load of really cheap £0.99 tiny little boards that take 5636V and transforms it into 5V then through a USB socket. These boards are about the size of a postage stamp and do the job. So actually building one into the board wouldn't cost much...
I think therfore that it's just not been upgraded as both that and SD and screen support should be decently simple for someone with the know-how.

I really love the open source market in some ways, I'm just not able to contribute to that in any meaningful way... yet. I try to think outside the box and take different approaches with my machines for the sake of expanding the database and share that information where I can though :)

Desertboy
28-06-2017, 10:02 AM
Well said! I'd like to add that it's even cheaper than £25 now! CNC shield and Arduino UNO coming to about £10-15 total now including the cheap pololus.
I knew I'd be using NEMA23s (part of the limitation of me recycling old bits) so I reused some old DRV8825 drivers which as you say are capable of 24-36V and higher currents, so are suitable for the NEMA23s. Those back in the day would've cost me about £7 so you're right, cheap as dirt for hobbyists :)

I'm going to buy 4 AM882H and a 60v power supply when I finish my build but at moment finishing the Z axis and mounts seem to be more important.

But now you can buy 5*DRV8825 for £7 from china delivered which is crazy.

shoeswith
01-07-2017, 09:23 AM
On the software side had you looked at Estlcam It is primarily a hobbyist CAM package with 2D and 3D machining including carving lots of functionality and apparently it can control the CNC directly through grbl. We've been using it for a year now in an educational setting.Its not perfect but it's amazing value for money £43.00 and it's much better than the shapeoko stuff like easel. It definitely doesn't have all the fusion 360 stuff but its free to try and would offer a simpler workflow.

Desertboy
03-07-2017, 07:37 AM
These look cool
http://wiki.protoneer.co.nz/Raspberry_Pi_CNC

Pair with a touchscreen lcd and you have an all in one solution for a desktop mill.

Not worth it for me though as I have a spare dell laptop which has a flip touchscreen to work as a pseudo tablet which should be ideal to build into the machine and gives me a much bigger screen to work on and a very neat solution and if I do need the proper keyboard and I flip it back round.