1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

Homemade microcontroller USB Stepper

Discussion in 'General Talk Forum' started by gasmasher, Aug 5, 2009.

  1. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I was playing around with some PIC chips and came up with a low power USB bipolar stepper driver and I thought some of you might be interested in seeing it.

    I didn't bother trying to emulate a parallel port and treat it as a simple HID instead. This is handy because it doesn't require any special drivers and Windows just loads the default HID driver. That is the same one used for keyboards, mice, etc..

    [​IMG]

    There is a video of it in action here.

    The board on the left (blue) is a Microchip USB demo board with an 18F14K50 microprocessor and the breadboard on the right holds three drivers but four are supported. Each driver consists of a 16F684 and a TI sn754410 (quad half H driver). All the processors are powered over USB and the battery pack feeds the motor output stage of the driver.

    Right now it operates in full or half step and can drive just about any small stepper motor or solenoid. I have some L298 drivers on order to replace the TI parts that will triple the power output and add a set of sense pins so that "infinite" micro stepping could be achieved in software.

    I'm also working on two add-on modules that communicate with the USB processor. The first is a keypad for jog control and the other is a two line character display LCD. I'll probably have to go with a higher pin count USB processor since I want to add support for limit switches.

    If anyone is interested in the firmware code I don't mind sharing. I will post the schematics once I get around to drawing them.
     
  2. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Awesome Tim!
    I couldn't get the vid to work though.

    Looking forward to what else you come up with.
     
  3. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Sorry about the video. It isn't that exciting, but I uploaded the original file here. Try right clicking and saving it locally before playing.
     
  4. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    That did the trick.
    Looks very promising.
     
  5. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Look interesting, Tim. You just seeing if you can do it or got plan to use it to control a bigger project?
     
  6. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I am eventually going to use it to run my flat bed CNC machine. The higher power driver chips should be here next week and then I can write the micro stepping code. It's been a fun project so far.
     
  7. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Hey Tim, if you like and when you are ready, draw up a PCB and I will run a cut for you. I just picked up some new very small router bits designed to cut PCB, and the 1/16 bit I had, gave very promising results that are more then workable. (I need to update the PCB project thread). But the MKI will cut a PCB like butter.
     
  8. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Thanks for the offer, I'm going to take you up on it. I'm still working on the layout and getting everything to work on breadboard. I'm still waiting on the new ICs and then I'll draw out the board.
     
  9. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    The bit diameters I have are 1/32 and 1.25mm I would expect both to work fine, but that is my current limitation on "how thin" the gap between tracks can go... As long as you aren't doing surface mount it shouldn't be a problem.

    btw, I like the LEDs showing the step changes.
     
  10. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    A USB stepper controller! Phenomenal! I hope you can get it to scale up to drive 5+ Amps per channel, 'cause you'll let the world get away from parallel-port driver cards! :cool:
     
  11. 66tbird

    66tbird Moderator Staff Member

    Offline
    Messages:
    431
    Trophy Points:
    18
    Location:
    Deserts of Arizona
    A USB stepper controller! Phenomenal!,, got that right :D

    When the weather cools I'd gladly help out with any pcb fab. I've got a few years of high density single side design, and my overhead cnc would do a really precise job. I know I have .7mm pcb bits around and some .06 scribes that worked well on a SMT TCXO project.
     
  12. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    Wow, I'm happy to see that you guys are interested in it. I'm definitely going to be asking for some help when it comes time to make a board and I appreciate the offers.

    I am really having a tough debate with myself about one design goal. I am thinking about writing a gcode interpreter to run directly on the microprocessor. Writing the interpreter could be very time consuming but I've written a couple of compilers and it shouldn't be a problem. Part of the reason I am leaning towards this option is I will need the interpreter anyway for another project.

    The other option is to setup a FIFO buffer with the step and dir signals determined by the CNC software (MACH). I believe the second method is how the Smooth Stepper works, but I'm not sure. This would be much easier to implement and would still work with EMC2 or MACH.

    The nice thing is the hardware will be exactly the same for either method. It just comes down to the programming on the ICs. Does anyone else have experience with designing a motion controller or have any ideas/suggestions?
     
  13. meistertek

    meistertek Member

    Offline
    Messages:
    318
    Trophy Points:
    16
    Location:
    Chicago, IL
    Wow! This is awesome! Can't wait to see the high power version in action, the low power one works perfectly! My opinion is to get the MACH and EMC2 versions going first and then flip over to completing the code for the gcode interpreter.
     
  14. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    I agree with meistertek. Make the easiest first and then tackel the more complcated one.
     
  15. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    tvcasualty, please do update the thread and maybe 66tbird can add to it too. I'm very interested in the bits that you two use and the results. I'd like to ask questions about it but not in this thread.
     
  16. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I got a few parts but I'm still waiting for the last box. Dorsal, is 3450 Watts scaled up enough for you? ;)

    Attached files [​IMG]
     
  17. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    gasmasher, When do I send my deposit for the first production model? :D
     

Share This Page