Microstepper controller


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825

    Default Microstepper controller

    I have been thinking for a while, how to put togeter a simple microstepper controller without using a ready made commercial driver.
    At the end, I came up with this simple project capable to drive unipolar stepper motor in three different modes

    FULL STEP

    HALF STEP

    MICRO STEP

    The Pic micro used in this work is a Pic 16F628 a powerfull small micro with PWM capability. With this MCU plus a 74HC04 and a74HC86 the controller will produce 20 microsteps out of a nominal motor step.

    An additional improvement of this controller, is the capability to accept travel commands of 24 Bits, wich gives to the user the possibility to send positioning profile of over 16 millions steps.

    Controller accept commands via TTL serial port @ 9600,n,8,1 and return an (Ack) once the positioning profile has been completed.

    Download the zipped file which contains schematic + software + user manual

    Enjoy

    Al.
    Attached Files Attached Files
    All progress began with an idea

  2. #2
    Join Date
    May 2009
    Location
    Northeastern USA
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Thanks -
    I loved your stepper project, and this just as helpful. My students are very motivated by projects with possible robotic uses.

    Thanks again - Fiz

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Fiz,

    Check out our Micro-Bot projects section; http://web.archive.org/web/201301160...-Bot/index.htm

    If your ship to address is a school, I'll send you a couple of our Micro-Bot circuit
    boards - with a few additional components for experiments - gratis.
    Last edited by Archangel; - 4th January 2015 at 04:15.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Thank you Fiz, you are welcome.

    Al.
    All progress began with an idea

  5. #5
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Seems like a nice way of driving steppers, really a clever solution with gate logic.
    (long live gates, gates are[n't] dead)

    One question:

    The hex file included is version compatible with the 16F628A?

    Just asking because sometimes compiled hexs for different versions just don't work
    Last edited by El_AMPo; - 18th October 2010 at 22:25.
    "If at first doesn't work, kicking it wont help either"

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    The hex file included is version compatible with the 16F628A?
    You should have no problem.

    Cheers

    Al.
    All progress began with an idea

  7. #7
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Nice project! four questions:

    1) Can this driver be used with 4 or 8 wire motors?
    2) Can the microstepping be changed to 1/10?
    3) Can the driver be modified to be used with step/direction signals?
    4) What is the maximum Current/Voltage the circuit can handle?


    Thanks!

  8. #8
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Can this driver be used with 4 or 8 wire motors?
    The project as per the schematic posted, uses a unipolar stepper motor. An 8 leads stepper can be used both as unipolar or bipolar depending how you connect the wires.
    The 4 wires one is only bipolar and cannot be used with the circuit as shown in the project.
    If you replace the four power darlingtons with two hbridges then you can drive bipolar stepper.

    Can the microstepping be changed to 1/10
    No. The code posted will accept only three modes: Full step - Half step and micro step (1/20)

    Can the driver be modified to be used with step/direction signals?
    No with the code posted.

    What is the maximum Current/Voltage the circuit can handle?
    This will depend from the size of the power transistor or mosfet and thermal dissipator that you will use.


    Cheers

    Al.
    Last edited by aratti; - 20th November 2010 at 17:21.
    All progress began with an idea

  9. #9
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    thanks for your replies, I hope in the future you post an hex with step/dir so I can control it using mach3 software. Thanks!!

  10. #10
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Working fine on the 16F628A

    In my design I upgraded the power stage to an ULN2068 (1.5A max per output) and put an embedded FTDI usb to USART chip. All on a 100x50mm single sided PCB (I'll share the PCB as a sign of gratitude once I finish debugging it a little on the usb part).
    Also i'm planning to put a safety stop serial command with another pic sniffing the serial commands, because if you make a mistake on the instruction it will execute completly before you regain control of the motor, and that on my aplication is critical.

    I got a problem anyhow but i don't know if it's software related or from my "squeeze pcb components to the max to reduce pcb size" techniques.

    Works fine on a half an full step mode, but on microstepping sometimes works and sometimes starts making a strange noise on the coils making them hum and jitter untill I reset the whole driver. It's probable that the pic or the gates gets a little dizzy from emi noise because all kinds of lab equipments are connected to the same line so i'm working on that.

    One doubt i had is if driving the stepper motor by limiting to a fixed current won't reduce torque in half step modes? (2 coils at 50% current vs 1 coil at 100% current)
    Then why is better to drive them this way?. I know constant curent means that is aproximately constant in torque independant of the coils activated, but wouldn't be better with full current on every coil at expense of more current?
    Last edited by El_AMPo; - 22nd November 2010 at 19:00.
    "If at first doesn't work, kicking it wont help either"

  11. #11
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peu View Post
    thanks for your replies, I hope in the future you post an hex with step/dir so I can control it using mach3 software. Thanks!!
    You can build up an interpreter for the serial stream with another pic, no so pretty but is a simple and fast solution.
    "If at first doesn't work, kicking it wont help either"

  12. #12
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Microstepper

    Here is the device which brought me to PICs. I bought 3 kits from them, they work great and microstep.

    http://www.piclist.com/techref/io/st...step/index.htm
    http://www.piclist.com/techref/io/st...p/lini_use.htm
    http://www.piclist.com/techref/io/st...570.4504050926
    He was selling kits on the web site and eBay
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  13. #13
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peu View Post
    thanks for your replies, I hope in the future you post an hex with step/dir so I can control it using mach3 software. Thanks!!
    Name:  QUARTER.jpg
Views: 6877
Size:  91.9 KB
    Here's a single chip commercial grade solution A3984 - DMOS Microstepping Driver

    The A3984 is a complete microstepping motor driver with built-in translator for easy operation. It is designed to operate bipolar stepper motors in full-, half-, quarter-, and sixteenth-step modes, with an output drive capacity of up to 35 V and ±2 A. The A3984 includes a fixed off-time current regulator which has the ability to operate in Slow or Mixed decay modes.
    The translator is the key to the easy implementation of the A3984. Simply inputting one pulse on the STEP input drives the motor one microstep. There are no phase sequence tables, high frequency control lines, or complex interfaces to program. The A3984 interface is an ideal fit for applications where a complex microprocessor is unavailable or is overburdened.
    The chopping control in the A3984 automatically selects the current decay mode (Slow or Mixed). When a signal occurs at the STEP input pin, the A3984 determines if that step results in a higher or lower current in each of the motor phases. If the change is to a higher current, then the decay mode is set to Slow decay. If the change is to a lower current, then the current decay is set to Mixed (set initially to a fast decay for a period amounting to 31.25% of the fixed off-time, then to a slow decay for the remainder of the off-time). This current decay control scheme results in reduced audible motor noise, increased step accuracy, and reduced power dissipation.
    Internal synchronous rectification control circuitry is provided to improve power dissipation during PWM operation.
    Internal circuit protection includes: thermal shutdown with hysteresis, undervoltage lockout (UVLO), and crossover-current protection. Special power-on sequencing is not required.

  14. #14
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Aratti,
    i've found a glitch in the microstepping mode, maybe you can confirm if it's software related.

    If you enummerate the coils from A to D, then when changing from coil D to A the transition it's not in microsteps but a full step. Maybe an end loop thing?

    I've attached a video (check the green leds, the transition between the one down and the left one)



    Happy holidays (the ones that have some)
    Last edited by Archangel; - 2nd April 2012 at 10:08. Reason: fix link
    "If at first doesn't work, kicking it wont help either"

  15. #15
    Join Date
    Jan 2015
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: Microstepper controller

    Hello there, im interested in designing as microstepper controller via a pic, using everything that its needed (as i have been investigating, it uses pwm and other functions). The thing is that the only programming language i know well is picbasic pro. is it possible to do such thing with this compiler?, lets say using a pic like 16f877a or a 18fxx?, can somebody help me out with a code in this language?, tis for controlling a bipolar stepper motor. i only want to know how it works and undersand it because i dont have it very clear, and of course in basic language.

    Thanks everybody, Regards.

Similar Threads

  1. Temperature Controller using PIC16F628A
    By bentech4u in forum mel PIC BASIC
    Replies: 34
    Last Post: - 14th March 2010, 20:44
  2. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 21:33
  3. Fridge controller
    By nomad in forum General
    Replies: 4
    Last Post: - 23rd February 2008, 08:13
  4. Graphics controller for the Sitronix ST7549
    By ttease in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th May 2007, 22:45
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 15:44

Members who have read this thread : 1

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