Hiya all!I made a post in a different forum about an idea i have for an arduino shield. (see here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1189567413)To bring you up to speed, I decided to use the L297 / L298 combo to drive the stepper motors. In the setup I'm trying to do, each motor will have 2 wire control: direction and step. Full/half stepping will be selected by a jumper, and the vref is controlled by a potentiometer.Here is the datasheet I've been working off of that details about how to use the circuit: http://www.st.com/stonline/books/pdf/docs/1334.pdfI've read through it a few times, but I still have a couple questions:1. on L297 pin 3 (home) what do i connect this to? can i leave it unconnected? i dont think i need to know when its at home. datasheet says: Open collector output that indicates when the L297 is in its initial state (ABCD = 0101). The transistor is open when this signal is active. 2. on L297 pin 1 (sync) do i connect this to the other L297's on the board? i'm a bit hazy on what it means to sync them. one of the main uses i have in mind for the stepper shield is to control a 3 axis CNC machine / 3D printer. i'm guessing i'm supposed to connect them, but i'm just not sure. datasheet says: Output of the on-chip chopper oscillator. The SYNC connections The SYNC connections of all L297s to be synchronized are connected together and the oscillator components are omitted on all but one. If an external clock source is used it is injected at this terminal. 3. on L297 pin 20 (reset) i dont think i'm going to use this. do i leave it unconnected? connect it to ground? vcc? data sheet says: Reset input. An active low pulse on this input restores the translator to the home position (state 1, ABCD = 0101).4. is the potentiometer wired up correctly? also, what is the value i should use for it? i specified 10K, but somewhere else i saw they used 2K. any suggestions?5. on L297 pin 10 (enable) i want the stuff to always be on. i hooked this directly up to vcc. is this the right way? is there any reason why i would want to have the arduino control it?6. are there any things you see that might be wrong about the design? this is my first time in Eagle, although i've spent alot of time in kicad.I dont know how to attach files to the forum (or if you even can), so heres the link where you can download it: http://www.osotite.com/stepper-shield.schThanks in advance guys!
I did some research and here are the answers I cam up with to my questions. I'm somewhat confident in them, but please let me know if you notice any mistakes.1. i'm just leaving the home pin unconnected. i dont need it.2. i'm connecting all the sync lines together. i found a circuit someone had made for a 3 axis machine (which is what I want this for...) and he had them all connected.3. i added a 10k resistor inline with it to Vcc.4. i'm going to use a 1k pot. hopefully this is the right value.5. added a 10k ohm resistor in series to Vcc.6. i sure would love it if someone looked over my design... i'm going to upload version 2, you can download it here: you can download it here: http://www.osotite.com/stepper-shield-v2.schthere are a few things i still need to do:* add molex power connector for 12v in.* add 7805 power circuit to create Vcc* add analog header so one can use the unused analog arduino pins (0-6)any other suggestions of things to add to this board? input is welcome.
It looks great. I have a few small suggestions from the interface / software point of view, but I've asked the rest of the team (that knows more about hardware than I do) to take a look too. Again, I think this could be a great Arduino shield, and we'd like to work with you to get it made. Did you consider putting two of the limit switches onto the pins with external interrupts (2 and 3)? That could allow a more fail-safe stop. Maybe the limits for the Z-axis, since doing only X or Y seems somewhat asymmetric?What about making it possible to set all three steppers to half or full steps from a single digital pin of the Arduino, with the ability to override them individually with the jumpers? Other than that, it looks good to me (with my limited knowledge of electronics). Any thoughts on the layout?
@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
heythat'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. DPS: BTW I am not one of the folks "at Arduino".... I guess you haven't read the threads under the news section!I'm one of the folks at Freeduino
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. DPS: what is the license on your files?