Motor Stepper Example


Closed Thread
Results 1 to 40 of 135

Hybrid View

  1. #1
    DougB's Avatar
    DougB Guest


    Did you find this post helpful? Yes | No

    Unhappy Stepper pulser

    Hi all,

    I am still working on the stepper tilt project,
    I am looking to do the following:

    1) recieve an ascii string (similar to nmea) on a port pin serially from
    a signal conditioning board, the string loks loke this in hyperterminal:

    $ 0.00,16112.95,21.96,N6374

    2) I need to parse this string and keep only the 16112.95 value or whatever value it happens to be.

    3) I need to take this value and compare it to a stored value and if it is less
    it sends the appropriate count to a port pin as pulses to a stepper driver

    4) I also need it to determine the sign of the number and output a high for + and a low for -.

    Currently I am using a 16F627A, There are a few more things needed but this is the main parts.

    Help!!!!

  2. #2
    Join Date
    Aug 2005
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi Doug

    Am in the middle of this myself but have NOT gone down to the level of energising each coil as per example.

    I opted for a dedicated controller board to run the motors so the controller box could be ran using popular software for CNC such as Kcam and Mach2 etc via the parallel port, but also so people could use the processor board for controlling the motor circuit direct.

    By using this method, all your Pic has to do, is supply 2 pins to control each motor.
    One for direction High/Low and the other for Pulses using PWM from the Pic or simple toggle high and low with a pauseus in between each step.

    On the CNC machine I have built, the motors along with the thread on the shaft work out at 533 pulses per 1 MM in eight step mode and decrease as you step up.

    If interested, please check out http://www.cncdudez.com and under the development link you will see the protocol I have gone with to control the motors via USB or Serial using a 18F4550 chip.

    The commands shown at the moment are for Jog mode, but am working on taking raw G-code and feeding it straight into the Pic, which is going well.

    The huge difference between using a Pic to control the pulses and using a PC Parallel port is incredible. There is too much going on in windows that disturbs the pulses and the motors run so noisey.
    Using a Pic lets you hit incredible speeds and hardly any noise of the motors.

    Regards

    Sean.

  3. #3
    hansknec's Avatar
    hansknec Guest


    Did you find this post helpful? Yes | No

    Smile Update - new microstepping chip

    I must first correct myself from an earlier comment. One can digitally microstep using a pic using fast comparator inputs triggering interrupts and such. There is an application note about this at the microchip website, but the code is assembly and rather complex.

    Now that I know better, I would also steer away from the simple code driving 4 FET's, because the resulting torque you get from your motor is poor. (unless you don't care about torque).

    There is a new DMOS Microstepping driver with translator chip available from Alegro MicroSystems that can perform up to 1/16th microstepping precision and drive up to 2.5Amps/phase right from the chip.

    The chip is the A3979.
    http://www.allegromicro.com/datafile/3979.pdf

    The chips are only about $5 ea in single quantity.

    Now you can write your pic code to simply count steps and give a direction bit. With the code space you save, you have more room available for cool things like trapazoidal acceleration/deceleration curves and speed control.

    Enjoy

Members who have read this thread : 5

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts