Arduino Stepper Shield

hi Peter

the Atmega driver idea is just a suggestion...you have to design it yourself! My shield uses the Arduino to generate control logic signals for the L298.

D

@Hoeken, I already have several versions of a stepper shield PCB, I'll post them in the next few days under CC so you can use them.
You might find that using the L297 makes the board very expensive, it's about $9 per chip. At that rate your board will cost about $75 in parts; If you want ohters to use your design, you might want to be aware that you can get a non-arduino commercial solution for les than that.

If you want to include driver logic, you would be much better off using an Atmega168 programmed in Arduino ( 4$) to generate the stepper pulses, rather than than three $9 chips. I don't know why that driver is so expensive, but with a single Atmega generating the control pulses, you could serially control each shield.

Daniel

Hey Daniel,

Thanks, I'd love to look at those designs. Hopefully we can come up with something that does what I want it to do, and is also useful for the rest of the community. The L297 is a bit pricey, but you can find it at decent prices. Jameco has it for $5.00: http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=288067

Also, I've looked up commercial 3 axis boards that use the L297/L298 combo and they generally run about $150, so this kit would still be cheaper. If I got it manufactured, it would still be competitive, and probably less than that as I'd be doing it under the not-for-profit RRRF corp. see: http://www.xylotex.com/3axBoard.htm and Technological Arts – Technological Arts LLC

As for using an atmega, one of the reasons i've read about using the L297 is because it gives you the 'chopper' style stepper driving by sensing the voltage through the coils, and adjusting it appropriately. this gives you the best possible performance for your steppers, as well as making controls super simple (step/direction). Also, I'm not much of an electronics person and the L297/L298 combo is very well documented, as well as tested. I'm intending to use this board as a base for the RepRap project, so I'd prefer to go with something tried and true. Also, I'd rather not have to write more firmware than i have to to drive the steppers... the L297 just does it all for me.

The open source part is also a big deal to me. Sure there might be commercial systems, but the stepper controller is the core of the RepRap system, and having that core be open source and modifiable is very important. I'm sure you folks at Arduino can understand :wink:

Finally, I really like the idea of an arduino shield, because once you build/buy the board, then you just insert it into the arduino board, and you're ready to go. having that full solution, ready to plug and play makes it very attractive. alot of the people involved in this project aren't especially electronically savvy, so it would be nice to have that packaged solution ready to go. for example, we have materials engineers who might be playing with different materials, or mechanical engineers playing with different positioning systems, and to be able to provide them with a solid 3 axis stepper driver would be awesome. Especially if its combined with the excellent Adruino programming environment.

This is all really exciting. I can't wait until I have the first board in my hands!!

hey

that's all very cool. I will post my files in the next days; they're licensed CC-BY-SA, so you can manufacture them if you want. Eventually I will post the gerbers, parts list and supplier info too. All open :slight_smile:

My design is stacking, so you can put as many shields as you want on top of each other... theoretically you could have a stack of eight motor shields without any problems.

Sorry I don't have the time to help you with your design, but maybe these files will give you some ideas!

Another price item you might want to check out are the Schottky diodes: you'll need 24 of them, and they are not cheap: count on 50 cents each in small quantities. You have to buy in quantity 500 or 100 to get a good price.

I think you could do the Atmega instead of L297 route quite easily, using the Analog in pins (2 for each motor) to watch the motor current and calculate the chopping. In fact it seems like the Atmega 168 has pretty much the same functions as the L297, except that it's programmable and the code can be open-sourced if you go that route.

D

PS: BTW I am not one of the folks "at Arduino".... :slight_smile: I guess you haven't read the threads under the news section!
I'm one of the folks at Freeduino :smiley:

hey

that's all very cool. I will post my files in the next days; they're licensed CC-BY-SA, so you can manufacture them if you want. Eventually I will post the gerbers, parts list and suppliers info too.

My design is stacking, so you can put as many shields as you want on top of each other... theoretically you could have a stack of eight motor shields without any problems.

Sorry I don't have the time to help you with your design, but maybe these files will give you some ideas!

Another price item you might want to check out are the Schottky diodes: you'll need 24 of them, and they are not cheap: count on 50 cents each in small quantities. You have to buy in quantity 500 or 100 to get a good price.

I think you could do the Atmega instead of L297 route quite easily, using the Analog in pins (2 for each motor) to watch the motor current and calculate the chopping. In fact it seems like the Atmega 168 has pretty much the same functions as the L297, except that it's programmable and the code can be open-sourced if you go that route.

D

PS: BTW I am not one of the folks "at Arduino".... :slight_smile: I guess you haven't read the threads under the news section!
I'm one of the folks at Freeduino :smiley:

fantastic! i'll keep my eyes peeled. i also feel the manufacturability is important for open source hardware. i've read a bit of that discussion, but i prefer to keep out of things like that. i do agree with you on quite a few things though =)

stacking is good. with my 3 axis design, i'm not sure what use it would be... all the pins are taken. i am bringing out headers for the remaining pins though.

no worries on the help... your suggestions are good, and looking at other designs is also good, as it helps me to see any errors i might have made by comparing them.

yeah, there are a couple expensive parts in the circuit, but any way you slice it you have to pay a decent amount to get good quality stepper drivers. i'll be doing a full price analysis once i get the board design finalized, which i will definitely post here once its done. i think that this route is a good enough compromise between cost and quality for me.

~Zach

try Future electronics for the L298's....

The Schottky's can be cheap ones if you don't foresee large motors.

You really might want to investigate the Atmega solution; in a sense it just means that instead of plugging into the Arduino baord itself to get the control signals, you put the Arduino chip on the stepper shield itself.

With the L297 you need enable, dir and step pins for each motor (9 Arduino pins), all of which could be boiled down to one pin: Serial RX. That makes your Arduino relatively free to do other things. The L297 code is not that big of a deal.

D

PS: what is the license on your files?

try Future electronics for the L298's....

The Schottky's can be cheap ones if you don't foresee large motors.

You really might want to investigate the Atmega solution; in a sense it just means that instead of plugging into the Arduino baord itself to get the control signals, you put the Arduino chip on the stepper shield itself.

With the L297 you need enable, dir and step pins for each motor (9 Arduino pins), all of which could be boiled down to one pin: Serial RX. That makes your Arduino relatively free to do other things. The L297 code is not that big of a deal.

D

PS: what is the license on your files?

i've been using www.octopart.com for part lookups... they give a nice overview of prices.

unfortunately i just dont know enough at this point to attempt the Atmega solution, but maybe i'll look at that for round 2. this is really a side project, and i dont want to get too side tracked, or go off on some exploratory path. i want to go with a known-good solution that is guaranteed to work. the l297/l298 does that exactly. i appreciate the suggestion though.

the license we've been using so far for reprap stuff is GPL, which i think serves us well. as long as the design remains free, we think you should be able to do whatever you want with it. if you want to manufacture it, great. all we ask is that any changes you make, you contribute back to the project. it worked for linux, and i think it will work for us. thats what this design is/will be licensed under.

thanks,

I asked about the license because it seems to be a good policy to ask before helping, just to be sure whatever one contributes to will be open for others :slight_smile: What you said goes for my stuff as well: help yourself, just keep it open.

D

a google search for "avr gcc stepper motor" found two good links about controlling a stepper motor on the cheap with an atmega on the first result page: Low-cost Stepper Motor Controller http://www.instructables.com/id/Drive-a-Stepper-Motor-with-an-AVR-Microprocessor/

still looking forward to the arduino shield design. Can the existing DC motor shield be used to drive two stepper motors?

peter

a google search for "avr gcc stepper motor" found two good links about controlling a stepper motor on the cheap with an atmega on the first result page: Low-cost Stepper Motor Controller http://www.instructables.com/id/Drive-a-Stepper-Motor-with-an-AVR-Microprocessor/

still looking forward to the arduino shield design. Can the existing DC motor shield be used to drive two stepper motors?

peter

thanks for the link, but i dont think i'm going to use that. for two reasons:

  1. i want to harness the sweet toolchain that arduino has developed. being able to plug the board into a computer and program it in one easy step is a HUGE deal. moving away from arduino to a custom design means i'd have to essentially re-invent that wheel. been there, done that. no thanks.

  2. the circuit i am designing uses the L297/L298 combo which means it can handle stepper voltages from 12-36v, meaning you can drive your stepper motors at their optimum performance, as well as making the controls much easier: from the microcontroller you only need to send pulses when you want a step, and tell it which direction to step. so easy!

as for the DC motor shield, to the best of my knowledge it can only be used to drive DC motors. i dont know enough about it to tell you conclusively though.

~Zach

Another price item you might want to check out are the Schottky diodes: you'll need 24 of them, and they are not cheap: count on 50 cents each in small quantities. You have to buy in quantity 500 or 100 to get a good price.

I don't know much about motor drivers, but I think the 293D already includes the diodes.

Tony:

the 293D has the diodes, but the L298 doesn't.. which is too bad, because they're eeeexpeeeensive :slight_smile:

D

Tony:

the 293D has the diodes, but the L298 doesn't.. which is too bad, because they're eeeexpeeeensive :slight_smile:

D

true, but the L298 can handle up to 2 amps per coil, vs 1 amp per coil on the 293D. is there a different chip in the 293 family that can handle higher current? that would be really cool.

yes
"the different chip in the same family" is the L298 :slight_smile:

just wanted to ping the group and let you know that i finished the first-go of routing this board. 4.5" x 6", which isnt too bad for a big board like this. its in the subversion repository above, so please check it out and let me know what you think.

thanks,
Zach

First of all, thank you so much for all the information provided in this post. I'm just getting started in electronics so I'm as green as they come. I appreciate your patience.

I am also currently developing a L297/L298 based motor controller. According to the schematic provided in the L279 Datasheet;

http://www.st.com/stonline/books/pdf/docs/1334.pdf

...the 8 x 2A Fast Diodes can be packaged as a L6210. I've found this part;

https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&productId=1986060&catalogId=10001&storeId=10001&krypto=CMF4gzkADQxxj3r9%2BdbaPdGAfPQ%2F9w5y5mHx6WVfh4md%2Fp4psayu5P%2BllAkXr9zm&ddkey=https:StoreCatalogDrillDownView

It's reletively cheap and I want to use it for my application.

However, the diagram is for a "Two Phase Bipolar Stepper Motor Control Circuit." My question is, can I use this same circuit in a Four Phase Unipolar application? More specifically, are the motors connected to the L298N in the same configuration, allowing me to use the L6210 for the diode bridge?

If not, can someone please suggest a proper diode to be used in this application? I'm looking at this part;

https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=177990&

...but I simply don't know if this will work.

Just in case you didn't already know, there's a kit available for a stepper/servo shield. If your interest is more in doing stuff with the steppers than learning how to design drivers, that will get you running faster.

I don't have a suggestion for the diode array, since I've always used the L293D (which has built-in diodes) for small motor driving. For loads like relays, I just grab whatever 1N4000-series diode is handy. Not as convenient when you need several, of course.

Ran

Thank you for the link. I'm looking for documentation on that kit to see what components they are using.

This is a, "Teach a man to fish" kind-of-thing. Unfortunately, I have to learn everything the hard way.

Thanks again for the help!

@Hoeken Hey, What is the status of this thing now? I know that you have got the MakerBot going, which looks great- Does it run off this, or did this get somewhat abandoned?

I was thinking about making an open source stepper driver, one that would have a bit better performance than the easydriver (also cheaper if possible). I was looking at allegro all in one chips, as opposed to the L297/L298 combo, but I was having a tough time picking between them.

That said, am I right in thinking that you opted for easydrivers in the end?

Anyway, I'd love to know what the status of this is. Thanks!

I've been doing so much stepper driver webbing today, that I've almost lost my mind! After re-browsing quite a bit, I realize that makerbot uses the reprap stepper drivers, presumably, the ones hoeken developed?