PCB CNC mill

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
Hi,

after a long time of trying to work out the photo and toner methods for making PCBs, I decided to create a CNC mill. I know there are programs which transform eagle boards into tooling routes for the mill, so this should be the smallest of my problems.

The x and y axis will be each driven by a stepper motor which in turn will be driving the screw that moves the plate. Instead of using rods and bearings to guide it, I decided to use drawer slides like this, which should give superb precision and least amount of play.

Now my problems start with the steppers, as I never actually used one. The pair I have are 4-pole unipolar steppers for I think 24V, but I will have to investigate the remains of the fax machine they came from to be sure about that, nevertheless they have written 90ohm on them. They are the same as these, but they are about 20 years old so I have no clue what voltage they are for.

I found a neat project which does about the same and is controlled by an AtMega16 through BD243 transistors, but unfortunately (for you ;) )it is in Czech. In case you want to have a look, it´s here.

So, in order to stop this rant I have to ask a question,
do you think I should use bipolars or mosfets for the driver stage? Or some driver IC?

Also any other suggestions etc. are welcome :rolleyes:
 

John P

Joined Oct 14, 2008
2,025
If they are truly 90 ohms and your power supply is 24V, you don't have much current flow and you could easily use an IC like the ULN2003, or 4 cheap transistors like the 2N2222.

But is your motor powerful enough to run your device, and how will you drive the slides from the motor? Screws? Belts?
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
If they are truly 90 ohms and your power supply is 24V, you don't have much current flow and you could easily use an IC like the ULN2003, or 4 cheap transistors like the 2N2222.

But is your motor powerful enough to run your device, and how will you drive the slides from the motor? Screws? Belts?
The motors are quite small so the small current makes sense. I don´t think I will need much power to move the plate around.

I plan to drive it with screw rods, my fist try will likely be 6mm diameter which gives 1mm per revolution, the motors have 48 steps so if all goes well I could get up to 0.02mm precision. Or 0.01mm with half-step drive :rolleyes:
It will likely be much worse because of other problems, but hopefully still good enough to do SMT boards. As I think about it the spindle play will probably give me more trouble than the x-y precision.
 

BMorse

Joined Sep 26, 2009
2,675
UDN2998W's are really easy to implement as stepper drivers, as a matter of fact, any dual h-bridge that can handle the current draw of your steppers should work good..... as for steppers, I spent a couple of years messing around with steppers from large copy machines and printers, and these are usually too weak to get any decent working speed out of them..... try to locate some steppers slightly larger, perhaps NEMA 23 size ones, these are usually available as surplus all over the place, and usually have pretty decent holding torque.... I use 3 NEMA23 size steppers for my home made CNC / PCB mill/Drill >>> http://www.morse-code.com/id18.htm. I use the UDN2998W's as drivers but may switch to the SLA7062/63 Stepper Driver IC's here in the near future (just because I have 4 just sitting here collecting dust)..... You can also order ACME rod and nuts from online distributors such as McMaster Carr, don't know who that would be in your area though...... as for mine I used the 3/8-12 ACME rod, but ended up designing my own lead screw nut to compensate for the screw rods being slightly warped, which could cause the gantry to bind up and miss a step, which is not good when milling PCB's with SMD components.....
 

BMorse

Joined Sep 26, 2009
2,675
and as for a spindle, I use a Dremmel tool Flexible attachment for routing PCB's, and I barely get any wobble or play from the flex tool.....
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, Kubeek has unipolar steppers, not bipolar - so if he were going to operate them as bipolars, then he'd need >48v and a chopper driver. Really, those 24v steppers won't be much good unless you have LOTS of patience.
 

SgtWookie

Joined Jul 17, 2007
22,230
Why is that? You mean they will be too slow?
They will have very little torque, so you will have to operate them very slowly in an attempt to prevent skipping steps. Also, since they operate at such high voltage, the windings will have LOTS of inductance, which means that you will either have to use a (somewhat sophisticated) "chopper" driver and much higher voltage supply to get the current flowing quickly, or settle for a very low maximum step rate using their rated voltage.
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
Thanks for the input. I guess I will first build the mechanical setup with the motors I have and see how fast I can get it to work. Then if the setup is too heavy for the motors I will buy some better ones.

Remember I am still not sure what voltage are the motors designed for, but from the wikipedia article on stepper motors I got the idea that I can run them faster with for example triple the rated voltage with series limiting resistors, even though I would burn a lot of power in them.

Or will this not affect the problems with low torque?
I think that since it is a screw drive and everything should be light and smooth the torque required would not be that high? Also using finer screw and/or gearing would help?
 

shortbus

Joined Sep 30, 2009
10,045
This is how to figure the optimum voltage for a stepper motor, but it is limited by the voltage your driver will support. Taken from the Gecko stepper driver web page;
http://www.geckodrive.com/ark-2/support.html


The voltage of your power supply is entirely dependent on the inductance rating of your motor, which we learned is translatable to the number of turns of wire in the stator. Every motor model will have a different inductance rating and will therefore have a different maximum voltage. To figure out what the maximum power supply voltage should be, use the following formula with the motor’s inductance in millihenries (mH) used for the L value.

32 * vL = VMAX
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
What is the V on the left side?
Also, I measured the inductance and got 40 and 47 mH, which value should I use?
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
Ok I found that´s actually a square root of L, so this equation gives me Vmax 200V.
From the datasheet it looks like the static current is 200mA. Let´s assume this motor is for 18V. If I didn´t want to use resistors for current limiting, do you think a constant current source for each leg would work? The typical setup with LM317 won´t hold for these voltages, is there some simple current source with a transistor?
 
Last edited:

shortbus

Joined Sep 30, 2009
10,045
If you are going to use an existing CNC software such as Mach3 or ECM2 your really better off getting different motors. The reason I say this is that all of the software is set up for motors that have a 200 step per rotation of the motor shaft. That is 1.8 degree per step instead of 7.5 degree. Using your motor(7.5*) you would have to reprogram every thing to get the motors to move the correct amount. The process of learning CNC is hard enough let alone having to make up your own software. :)

As far as drivers go personally I would use dedicated driver ICs. Again while it can be done using PICs or other uC methods, by using a dedicated driver you don't have to write any code that the CNC software has to interact with. The driver IC does all that for you. Again makes things easier.
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
The project I am copying uses an Atmega16 to convert HPGL commands coming from serial port to actual motor pulses, so there should be no problem with the number of steps.
 

THE_RB

Joined Feb 11, 2008
5,438
This is how to figure the optimum voltage for a stepper motor, but it is limited by the voltage your driver will support. Taken from the Gecko stepper driver web page;
http://www.geckodrive.com/ark-2/support.html
...
I will argue that point a bit! That is by no means the "optimum" voltage to run a stapper driver, it is the "voltage required to get good torque at VERY HIGH motor RPM".

It's like saying your car motor's "optimium" RPM is at redline.

Many stepper motors give significantly better performance at low RPM (the RPMs they actually see in use) when the PSU voltage is relatively low as this lowish PSU voltage decreases resonant excitation energy and provides smoother low speed performance which can give significant torque gains at low RPM due to reduced resonance.

The OP's stepper motors were not designed for very high RPM and that formula is pretty much counter productive and unusable.

To Kubek, you can make a decent low speed CNC machine using your 24v motors and threaded rods, and get maybe 5 RPS so about 5mm to 10mm a second traverse speeds. That is all ok for a CNC engraving machine that needs low speeds anyway.

Have a look at the open-source Linistepper motor drivers;
http://www.piclist.com/techref/io/stepper/linistep/index.htm
you can buy cheap kits there or just make your own PCBs and use the open source firmware.

The Linistepper will give you microstepping performance and includes linear current smoothing so it can be tuned for your old motors to work quite well. :)
 

BMorse

Joined Sep 26, 2009
2,675
The project I am copying uses an Atmega16 to convert HPGL commands coming from serial port to actual motor pulses, so there should be no problem with the number of steps.
What I have done is built a stepper motor controller for each axis based on a Pic16F84A which controls all the phase sequences for forward and reverse via the UDN2998W Dual H-Bridge IC, the pic takes a standard direction and step bit which is compatible with any of the software available on the market for actual Numerical Control of CNC machines..... most of these software basically just output a step pulse to the controller for each step and direction for that step.... by designing a system that is compatible with industry standards, makes it much easier to find tooling, software, control boards, etc. for use with hobby CNC's. Most software just requires you to input how many steps per inch your axis' move and the software takes care of all the movement, I am using standard NEMA23 80oz Bipolar Steppers with 200 steps per rev. directly coupled to the 3/8-12 ACME rod, so 200 steps * 12 turns per inch = 2400 steps per inch, which gives it a very high resolution for doing some really small footprint SMD's :D
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,794
Today I built the driver and made the atmega work, and the results are pretty good so far. I tried 500 pulses per second with 24V supply and this current limiting driver (uses negative logic) which limits at cca 200mA.


From trying to stop the motor by hand I think that the torque will be more than enough even if the plattform gets heavy.
 

Attachments

BMorse

Joined Sep 26, 2009
2,675
So, after a almost two months, the CNC is in working condition. I just felt like I should share some photos of it with you guys :)

I´m still refining the controller and communication programs, but it´s almost ready.
nice work, can't wait to see the first PCB you are going to mill with that....
 
Top