Stepper Motors for CNC control

rodmcm

Member
I wish to use picaxe (one master and one for each motor) to control 3 stepper motors for a CNC machine. At full speed rates the clock frequency could be up to 18kHZ. The distance moved is dependent on clock cont. Is there a reliable way to accurately count and stop the PWM output?
 

inglewoodpete

Senior Member
PWM is probably not the way you should go if you are trying to accurate position a stepper motor with a PICAXE.

To answer your question, the bottom and top chips in the range can count PWM pulses (08, 08M, 28X2 and 40X2). Have a look at command manual 2 page 137: command "pwm". The command, however, does not give you any control of the frequency.

A recent thread discussed using an external hardware counter and gating control to output a predetermined number of pulses. However, the thread originator's enthusiasm seemed to wane when hardware design became involved.

If you want to control the stepper motors from a PC, have a look at phidgets
 
Last edited:

Rickharris

Senior Member
There are lots of not too expensive DIY solutions to CNC work out there PC based as to be realistic you need to interface to a CAD package or it all gets very difficult trying to decode G code.

Cheapest in the UK I have seen is a 3D printer at £700. works though.
 

rodmcm

Member
Yes I am aware of parallel output control and the heaps of software to convert G code to parallel out. However, the clock pulses still have to be counted and the frequency of multiple pulses ( 3 off) via parallel ports is iffy. Hence the desire for a serial interface to the PC and use of PWM outputs. the command PWM does not work as the frequency is fixed and hence you cannot control speed. Can you direct me to the other reference on external counters... I cannot find it
 

BCJKiwi

Senior Member
Have you considered why these systems use the parallel port instead of serial - i.e. the speed required?
 

rodmcm

Member
Yes There are only three or four variables at any time the x/y/z /(a) posn, usually these are stacked, I think the Kelly unit has 39 memory locations. I must admit that while I am purchasing hardware the use of a picaxe for this control is an intellectual exercise as well, mainly because it has all the elements, controllable pulses, serial in etc. The main item is to count the pulses accurately which I could do on a second pic...maybe I will try this. When you consider that you need 4000 pulses/inch then +/- 1 pulse is proably accurate enough
 
Top