Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Easydriver stepper driver class


  • Please log in to reply
9 replies to this topic

#1 Marius

Marius

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationCenturion RSA

Posted 09 November 2010 - 07:15 PM

Has anybody written a class for the Sparkfun Easydriver stepper driver board? It uses the A3679 chip. Second question, how much effort is it to convert a Arduino c++ class to a Netduino class? (there is a stepper class available)
If at first you don't succeed, then try and try again.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 November 2010 - 10:04 PM

Second question, how much effort is it to convert a Arduino c++ class to a Netduino class? (there is a stepper class available)


It depends on the class. If it's high-level, it's usually a pretty easy translation process. If it's a timing-critical class, you might need to use native code to take advantage of the ARM's speed.

Chris

#3 freds

freds

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 09 November 2010 - 11:15 PM

Has anybody written a class for the Sparkfun Easydriver stepper driver board? It uses the A3679 chip.

Second question, how much effort is it to convert a Arduino c++ class to a Netduino class? (there is a stepper class available)


Depending on your application you should be able to use a netduino and C# programming, though if you need high speed and consistent timing then you will need to do more complex native code.

For example a non-critical task of driving a stepper to move something from one place to another, probably ok.

Not ok, moving an extruder that is outputting a material at a constant rate or a laser engraver, everything will come to a halt when garbage collection is ongoing for a few milliseconds so you will wind up with blobs or a deeper cut, etc.

#4 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 10 November 2010 - 03:33 AM

Has anybody written a class for the Sparkfun Easydriver stepper driver board? It uses the A3679 chip.

Second question, how much effort is it to convert a Arduino c++ class to a Netduino class? (there is a stepper class available)

Hi Marius,
Incidentally, I've been playing with my first stepper motor. The EasyDriver really make it easy. I'm not sure if you really need a class. All you have to do is send a bunch of pulses to step the motor. Full solution is attached to this post.

//-- Step, step, step... ---
for (int i = 0; i < 2000; i++)
{
    stepPort.Write(false);
    stepPort.Write(true);
    Thread.Sleep(1);
}

http://www.youtube.com/watch?v=LonWg5Yp6cY

Attached Files



#5 Marius

Marius

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationCenturion RSA

Posted 10 November 2010 - 04:05 AM

Thanks to all who replied. As usual, lots of good advice. The first project is not timing critical so I will use the Netduino. The second one is timing critical so I will go for the Arduino solution. Thanks for the code sample Hari.
If at first you don't succeed, then try and try again.

#6 zraju

zraju

    New Member

  • Members
  • Pip
  • 4 posts

Posted 09 October 2012 - 01:32 AM

Hi, I am using easydriver without dip switch, how I can speedup motor? Please help me. Thanks for help Raj

#7 Marius

Marius

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationCenturion RSA

Posted 09 October 2012 - 06:59 AM

Raj The micro step settings will influence the speed but more important is the Motor Voltage. The higher the voltage the more speed you will get. Also if you use steppers with a high coil inductance, the speed will be lower. Th motor will alias much quicker under high step rates. So to summarize: Use motors with low inductance Use the highest possible motor voltage that the driver can handle. Look at your micro stepping settings.
If at first you don't succeed, then try and try again.

#8 zraju

zraju

    New Member

  • Members
  • Pip
  • 4 posts

Posted 09 October 2012 - 12:31 PM

Marius, Thanks a lot for response, I am using 28BYJ-48 5V stepper motor, I will get high voltage motor. Thanks, Raj

#9 Marius

Marius

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationCenturion RSA

Posted 09 October 2012 - 06:36 PM

Raj, It does not work that way. The motor is rated at 5v continues but you are stepping it so it can handle up to 80v in some cases. Just put the 35v that the drivers can handle on that same motor and you will have the speed. To clarify a bit. The stepper drives makes use of a PWM method of driving the coils of the motor. The PWM is modulated with a sine wave that is rotated or phase shifted as you step the drive. This phase shifting causes the motor to turn. The more micro steps you use the smoother the rotation. Hope this makes some sense to you :)
If at first you don't succeed, then try and try again.

#10 zraju

zraju

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 November 2012 - 04:55 PM

Hari, I am using exact same stepper motor; problem I am facing is I can not set the direction motor goes in one direction only. Appreciate help. Thanks Raj




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.