Arduino Uno running a CNC PCB drilling and routing

Hi, I am new to this forum and relatively new to the Arduino Micro controller but having watched a lot of YouTube videos I want to create a CNC platform using X and Y axis using Stepper motors and either compressed air cylinders for the Z axis or another stepper motor.

I think I can get the X and Y drive running from various programs that are available BUT my main question is the initial input of information for hole positions via a joystick, which would be done from a camera with a cross hair for accuracy. i.e a USB camera or similar.

I was wondering if 2 seperate sketch programs would be required for the operations of programming and then drilling.

So is there code out there which I can program the X and Y hole positions into memory say up to 1000 hole positions and then save the positions to a file and then use that file to operate a drillhead to drill a PCB.

I think chillipeppr would be the program to run the drilling operation but I got to get the hole positions first.

I hope someone may be able to help and sorry if I picked the wrong section of the form

Regards John

I would generate the information for the hole positions using a program on a PC implemented in C++, C#, VB, etc
this data could then be transmitted to the Arduino when complete

John40131: So is there code out there which I can program the X and Y hole positions into memory say up to 1000 hole positions and then save the positions to a file and then use that file to operate a drillhead to drill a PCB.

That is the sort of thing that you would record as GCode. There are lots of PC programs that can convert CAD drawings to GCode.

Then you can either create an Arduino controlled system that can work with the GRBL program (which can read GCode) or write your own GCode interpreter than can control your Arduno system.

If you are going the DIY route my recommendations is to write a PC program to interpret the GCode and send simple instruction to the Arduino with the numbers of steps for each move.

...R

Thanks for replies, yes I think I need program to generate positions of holes not sure how yet as the picture of the blank PCB has to be seen on a screen then those points have to be saved, not really done any C++ programming but learning from other videos.

Can anyone suggest a program to create the positional Gcode, I think once saved can then use chillipeppr to run final process.

Many thanks

John

You have not told us what software you are using to design the PCB.

...R

Hi, learnt quite a lot today trawling through Google and YouTube, I am using Eagle PCB design BUT I could also have PCB designs that are just a Negative image which I would have to plot manually via a camera Hmm that will be fun, but lets stick with Eagle I found that I can output drill files in gerber and then there is Flatcam which can convert these gerber files to G-Code after installing with WinPython and there is also an Eagle plugin called PCB G-code, I have not tried yet, another days trial, I have yet to build a CNC machine but got a great design off NYC - CNC off You Tube.

Thanks for help and any other ideas will certainly help

Regards john

John40131: with Eagle I found that I can output drill files in gerber and then there is Flatcam which can convert these gerber files to G-Code after installing with WinPython and there is also an Eagle plugin called PCB G-code,

That's the sort of thing I had in mind - without being aware of those specific programs.

Or, if you can get the XY coordinates for the hole centres from the Eagle program you could probably create the GCode with a spreadsheet.

...R

Yeh thats a thought as Eagle gives XY position in top Left and could transfer reading to Excel and then convert to G-Code would have to do hole by hole but OK for small board, have to use surface mount less holes LOL

Found Eagle convertion to G-Code works well but cant fine a way of running WinPython and Flatcam but there is a PDF to Eagle software if I can get that to work.

John

John40131: Found Eagle convertion to G-Code works well but cant fine a way of running WinPython and Flatcam but there is a PDF to Eagle software if I can get that to work.

If you can get GCode from Eagle then don't look any further.

Just find some means to use the GCode to control your Arduino. We have got sidetracked from that and you have not commented on what I said about it in Reply #2

If you use GRBL there is a PC program called (I think) gcodesender

...R

Be sure to have a good assortment of sizes and quantities of carbide bits. Not all holes are the same and the bits are real easy to break. X Y moves before -Z.

Paul

Hi Robin2, relating to what I am using did you mean hardware, I will use a Uno board and a CNC Shield I already have them plus a drill kit which I got off E-Bay, the sketch program I will adapt from what I have found on Youtube as my programming knowledge of C++ is almost zero but will learn as I go along.

I have plenty of drill sizes no doubt a few breakages.

I used to be in the PCB industry in UK up to about 30 years ago so I have used Excellon machines etc bit more advanced these days, I am retired know so just a hobby thing inc Electronics.

All programs seem to do what I want also looking at Autocad to generate G-Code from a scanned negative in PDF format.

John

John40131: Hi Robin2, relating to what I am using did you mean hardware,

I think I was really trying to find out if you were designing your hardware so that it would work with the GRBL program. GRBL already knows how to interpret GCode.

If your hardware cannot work with GRBL then you will need software that can interpret the GCode and produce the appropriate signals to drive your stepper motors.

The Arduino system I made for driving my small lathe is not compatible with GRBL (because I am pig-headed) and I use a Python program to interpret my GCode. However I don't think I would trust my Python program to interpret the GCode that comes from your Eagle program without first doing a lot of research and testing.

...R

I am going to use the same design has John did on "DIY Cheap Arduino CNC Machine - Machine is Complete AND Accurate!" this is on Youtube and he is a professional CNC man with his own factory and it awesome can build the hardware for less than £100 to £150 few mods to his design tho. The Electronics not as cheap but need good power supplies.

He uses chillipeppr to drive the steppers from G-Code. Check it out.

John

John40131: He uses chillipeppr to drive the steppers from G-Code. Check it out.

Thanks, but I am happy with my own code.

Good luck with your project.

...R