![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| Just wondering how to control stepper motors through the dir and step line on a 1 axis microstepping driver. AlienCNC.com doesn't seem to be working at the moment (perhaps they've closed?) so i couldn't think of where else to ask. Also would it be really complicated to convert g-code to stepper movement, i want to try and control my cnc router from my mac using a USB. Cheers for any help, but i've got a feeling i've posted this in the wrong place, sorry if your moving it, i couldn't work out where to put it. http://www.chatzones.co.uk/discus/me...1axis-6045.pdf thats the driver datasheet |
|
#2
| |||
| |||
| I can't say I know anything about AlienCNC but you might want to look at these links for the Arduino Motor Shield which can control stepper motors. I just picked one up myself but have not had time to do anything with it yet. Arduino Motor Shield http://www.ladyada.net/make/mshield/index.html http://www.adafruit.com/index.php?ma...431704984583ac http://www.arduino.cc/en/Main/ArduinoShields Interfacing Forum http://www.arduino.cc/cgi-bin/yabb2/...board=hardware http://www.arduino.cc/cgi-bin/yabb2/...num=1189887306 |
|
#3
| |||
| |||
| As for using an Arduino as a controller.... Well it's really easy actually, so long as you only move one axis at a time. For that, you just need to send out a nice stream of exactly X pulses. From there, things get very complicated very fast. For a simple diagonal line, you need to move two axes simultaneously and timing is critical in order to ensure that you get a nice clean cut and not a staircase. For an arc, the math gets more involved. My gut says that you would need to code in AVR directly and get into things like registers and latching in order to get the timing anywhere close to correct. Needless to say this is way out of my league. |
|
#4
| |||
| |||
|
Lol, sounds like a challenge for a newb like me, my dad's a computer programmer so i might get his help , i just don't understand the types of pulses sent to the STEP of my stepper controller, would pwm work? and at what kind of speed or does it vary from board to board? |
|
#5
| |||
| |||
| You're getting warmer. Most stepper controllers take two signals: STEP and DIR(ection). The DIR is pulled to logic HI or LO and held there to set which way the motor spins. You just write the pin and leave it there. The STEP signal will send one logic pulse per step or microstep. Basically you set up a loop with a timer interval and turn the pin on and off. My first guess is that your drive will step on the transition from logic HI to LO, i.e., on the falling edge of the signal as it would look on a scope, but some will work the opposite way. The values for how many MS the signal is HI or LO isn't critical per se, that is, you could have it HI for 5 ms and LO for 1 or LO for 5 and HI for 1; either way you get one step every 6ms. |
| Sponsored Links |
|
#6
| |||
| |||
| y=±√(r^2 - x^2 + z) where r is the radius and z is an x axis strech of the circle to make it a fraction of it you vary the range of x. i dont know how complicated the gcode arcs are, what parameters do they use? |
|
#7
| ||||
| ||||
Imagine that you want to move the cutting point from X0 Y0 to X1 Y1. For each step sent to either the X or Y axis you will move that axis by let's say .001". So, you start by stepping both the X and Y once at the exact same instant, which will move you to X.001 Y.001. Repeat a thousand times and you're there. Now imagine that you want to move from X0 Y0 to X2 Y1. You can't step both axes at the exact same moment because that would result in moving at a 45deg angle towards X1Y1 not X2Y1. Instead, what you might do is to calculate the number of steps needed to get each axis to the right place, and then start blipping them out, only you blip the X axis twice as fast as the Y. Bear in mind that "real" controllers will also take acceleration into account since you can't go from standstill to top speed and back instantly, though at slower speeds you might be able to ignore this. This is what most controllers call "trajectory planning" IIRC and it gets progressively more complicated as the machine gets more sophisticated and is adjusted on the fly to obtain maximum performance. With an arc you do the same thing except that the rate is constantly increasing or decreasing. If you watch a CNC positioning system trace a circle you will see how one axis goes from minimum to maximum speed and back while the other axis does just the opposite. Synch the two properly and you get a nice circle. Look on Youtube if you haven't seen one in person. If you enjoy staring at breadboards and computer screens, are not easily frustrated, and have a lot of spare time on your hands, then this will keep you occupied for some time. Alternatively, I see that the www.reprap.org project recently switched to using the Arduino as the basis for their 3-axis positioning robot which is a Java/OSS system. While that does not use GCode it might be the best place to start as the basic principles are all the same.
|
![]() |
| Tags |
| aliencnc, arduino, mac, router, stepper |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HELP! Need datasheet for aliencnc 4axis stepperboard | glenngb | Linear and Rotary Motion | 2 | 06-17-2008 11:38 AM |
| Need some help please, datasheet Aliencnc 4axis board | glenngb | Controller Cards | 3 | 03-25-2008 02:23 PM |
| mach3 and aliencnc Help! | glenngb | Mach Software (ArtSoft software) | 0 | 03-07-2008 08:38 AM |
| 15i control help for (AiCC) (hpcc) high precision contour control programming | gibbsmaster | Fanuc | 2 | 12-28-2007 09:57 AM |
| Using Flashcut CNC Spindle rotate card control to control laser power | pyroplotter | FlashCut CNC | 0 | 10-15-2007 09:46 PM |