Building Bipolar stepper motor driver from scratch

Discussion in 'Embedded Systems and Microcontrollers' started by Muhammad Nour Elmogy, Mar 21, 2016.

  1. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    Hi, I am a electronics hobbyist and a I would like to build a CNC machine to do small and average volume parts.
    The machine will be desktop size, say max 1 by 1 meter and I am planning on using various spindles sizes and masses.
    that's for the machine

    I am planning to use this motor
    http://www.tme.eu/en/details/103h7823-1741/electric-motors/sanyo-denki/
    I am planning to have feed rate from 0.5/minute up to 20/minute.
    I am expecting the over all mass of the moving parts to reach 6 KG

    I want to make the driver my self for several reasons
    -I have already a lot of components so I wouldn't need to buy new parts almost
    -I have time and patience and I want to learn something new in the process

    I want to decide about the main parts that I will use. In general I have arduino due, I have IRFZ44Z and other glue parts(analog and digital)
    for now I will support the following feature in my driver
    -Full step
    -Half Step
    -Constant current (or may be constant current but be able to change the level of the current)
    -ramping up and down (if possible and easy to do in the first release)

    later I will try to add new features like microstepping or sinusoidal current drive, I don't know yet.

    My first question
    can I actually be able to build a good driver to drive the motor that I have mentioned above?
     
  2. ISB123

    Well-Known Member

    May 21, 2014
    1,239
    527
    Yes,although that stepper motor is overkill for such small loads.
     
  3. hp1729

    Well-Known Member

    Nov 23, 2015
    1,939
    218
    Well, do you have the unipolar or bipolar version of the motor? The motor is rated at 100 V and the IRFZ44 is rated at 50 V.
    Looking at the data sheet for the motors you see examples of motor drivers. You want to make the equivalent with parts on hand???
    The sons of the Prophet are, in deed, quite unaccustomed to fear. :)
    It would be difficult to suggest a design not knowing what parts you have on hand.

    (edited to add ...)

    A picture of an example of bipolar and unipolar stepper motors.

    A controller is a certain requirement. Do you have a preference for a microcontroller?
     
    Last edited: Mar 21, 2016
  4. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,522
    The price of ready made stepper motor drivers is so low these days that it wouldn't be economically worth doing a DIY driver. Even if you had the parts on hand you would still need to design a circuit and then make a PCB board and then troubleshoot the circuit. And it still wouldn't have all of the needed things to work with a CNC. Not trying to put your idea down, but to be practical. It would be more advantageous to put the time into building a better more accurate mechanical part of the machine.
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,507
    2,367
    You realize that is rated as a 100v AC stepper, these are normally designed to work on AC supply using a phase shift capacitor, typically these AC rated ones as opposed to the DC stepper rated do not make for good variable rpm motors, they are designed for a fixed frequency (synchronous motor) and rpm, 72 rpm on 60hz and 60rpm on 50Hz. 'Instant' stop/start.
    The DC steppers designed for CNC are typically between 2v & 8v.
    Max.
     
    Last edited: Mar 21, 2016
  6. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    First of all I would like to thank everyone that responded.

    First things first
    -We are talking here about 2 phases bipolar stepper motor not unipolar.
    -The motor that I have mentioned is rated for 100 ACV or 24-36 DCV.
    -The driver that I am willing to make will drive the motors using DCV, max 48 DCV (the proposed mosfets maximum Vds is 55V).

    Yes I am willing to do my best to make one like in the picture, I have time and I want to learn everything about it anyway because I want to do more of this in the future
    Don't forgot this is for hobby not for making money so I don't have to be very concern about time and resources for now
    Thanks god, I have full job software engineer so this is not going to affect my income(I am not depending on this for living)

    For the microcontroller, I have 2 options
    First Arduino due
    Second ATSAM3S2C, I have like 4 of this one
    But for now I am not Actually concerned about the microcontroller, I am now concerned about the motors and the mosfets

    As I a have mentioned, this motor can be driven using both ACV or DCV.
    Here is a discussion about this motor on stackoverflow.
    http://electronics.stackexchange.com/questions/223552/can-i-drive-stepper-motor-with-ac-voltage

    I have read on SanyoDenki website about this series that this motor belongs to that it can be driven from 100-240 VAC or 24-36 VDC.

    So I think If I am going to apply around 48 volts with current limits I think I can manage to drive it.

    The question now is that motor suitable for using in CNC machines or not?
    Some people suggested that I should get motor that is rated for less than 5 volts so I can smoothly drive it with higher voltage
    But actually the motor winding has 0.65 ohm resistance and rated for 4 amps, if we said 2 amps for per phase that will give us 1.3v nominal rated voltage
    If I am wrong please correct me!
     
  7. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    This is actually initial numbers not exact, also I want later after succesfully finishing this (hopefully not in the far future) to make may be bigger machine.
    Anyway the motors that I have mentioned is not actually that expensive :rolleyes:, it is still in the range of hobbyist :D
     
  8. hp1729

    Well-Known Member

    Nov 23, 2015
    1,939
    218
    It sounds like you are well on your way to success on this project.
    Your motor drivers might be as simple as a latch and the MOSFETs. The patterns you put out will determine speed and smoothness of the motors. I have never built such a thing. Perhaps others here can give more specifics. It looks to me like "Keep it simple" applies.
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,507
    2,367
    Most of those answers there do not convey correct information.
    see http://www.geckodrive.com/support.html
    Max.
     
  10. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    So what do you think Max, do you think this motor is not suitable for my application because I will not be able to run it smoothly using DCV?
    If so what do you recommend for general specs. I want to have a good torque over speed that's on thing I have to keep in mind when choosing the motors because I want to have a reasonable feed rate when cutting through the materials.
     
  11. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    I think I have to mention the materials that I may want to cut:
    Wood, Aluminum, Plastic, PVC, Acrylic, Foam, Mild Steel, Copper, brass, extra

    but basically the most common materials would be
    Wood, Plastic, PVC, Acrylic, Aluminum
     
  12. BR-549

    Well-Known Member

    Sep 22, 2013
    1,981
    388
    Your not in a hurry and you have a little play money. Contact motor manufacturer for recommended controller. Buy it. Study it, but don't use it. Then see if you can fashion one with your parts.

    Read Max's link.
     
  13. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    I just have got new Idea and I want to discuss it here

    I have found this driver here
    http://www.tme.eu/en/Document/9dd3f3aa8dc3cbe14f97c4b3a7ab0eb2/A4989.pdf
    Basically this integrated circuit would allow me to connect external Mosfet H bridge to it and have all the power that I would have from external discrete mosfets and also the advantage of small one package that can do current limiting, microstepping and other stuff
    So by doing this I will be able to have a good driver for under 10$
    so what do you think?

    Can someone evaluate this chip!
     
  14. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,522
  15. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    I don't understand do you mean that's a good idea or bad idea and why?


    the very cheap drivers in ebay wouldn't hold more than 4 amps max the more expensive drivers may give you more power
    The chip that I have mentioned has this feature that you can connect external Mosfet H Bridge to it and the limit is almost the mosfets
    So why are you pointing me to those cheap drivers ?? what is the point ?
    also making stuff from scratch :D doesn't mean making My PC From Scratch:confused:

    I have mentioned that I would like to learn in the process of building them
    I have already learned a lot of things about mosfet since I have began like 1 month ago..
    So please don't dishearten me :(
     
  16. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,522
    Just like the chip you linked to, the drivers can have their mosfets replaced by ones with a higher rating. A working stepper motor driver is much more than buying a chip and adding some mosfets. and in the end they still need to work with an existing CNC software, that is written for the drivers that are normally built and available. I'm not trying to "dishearten" you, just trying to give you the advantage of getting a "working" CNC in the least amount of time and easiest possible way. I've been in your position and learned the hard way.
     
  17. Muhammad Nour Elmogy

    Thread Starter New Member

    Mar 20, 2016
    8
    0
    First thanks for your reply

    ok, I think you are totally right but the thing is that real good driver will cost over 100$ (at least) for one driver, and I am totally unconvinced about putting my money in cheap driver that would fail sooner or later
    I want to try to do it myself first before totally surrender and go and buy drivers, I know there is a possibility for that to happen, but at least at the moment I will decide to buy ready made driver I am sure that I would have learned a lot of things even if I may fail to make it
     
Loading...