Show Posts
Pages: 1 2 [3] 4
31  Topics / Robotics / Re: Non blocking steppor motor control on: April 11, 2012, 01:28:05 pm
Does it look like this one?
http://www.anf.nildram.co.uk/beebcontrol/arms/atlas/index.html

Looks like the gripper hold a cardboard sign pretty well. You could get some chuckles making it 'flag' messages with it. (Like "Wiley Coyote" from the road runner cartoons.)
32  Topics / Robotics / Re: Non blocking steppor motor control on: April 10, 2012, 07:53:14 pm
A long time ago I saw some controllers that were similar in an old' school DIP-package auto-insertion machine that I had to nurse along from time to time. But I was just the night-shift operator of the machine and would read the tech manuals for it between cycles. I got to know that machine better than the maintenance crew did. In fact they unofficially called on me for light-duty repairs. (It was always wearing out a few segments of ribbon cable by flexing them to death.)

It sounds like you have the basis for a really killer toy CNC project.

I posted some files that allow people with an Arduino and a free copy of LinuxCNC to make there very own CNC machines. If your interested it can be found at http://emc2arduino.wordpress.com/
33  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: April 09, 2012, 09:53:48 pm
Emc2Arduino has been released! (As well as a new Homepage)

Added support for:
  • Spindle control, On/Off, Direction, RPM control.
  • Coolant options, flood and mist.
  • Power Supply control.
  • Power and E-Stop indicator output for LEDs and such.

Were accepting feature requests on our poll.
Cast your vote and be heard by the development team.

Come and check us out at http://emc2arduino.wordpress.com/
34  Using Arduino / Motors, Mechanics, and Power / Re: EMC-2-Arduino CNC/Robotics control firmware. on: April 09, 2012, 09:48:38 pm
Emc2Arduino has been released! (As well as a new Homepage)

Added support for:
  • Spindle control, On/Off, Direction, RPM control.
  • Coolant options, flood and mist.
  • Power Supply control.
  • Power and E-Stop indicator output for LEDs and such.

Come and check it out at http://emc2arduino.wordpress.com/
35  Using Arduino / Interfacing w/ Software on the Computer / Re: Secret to serial communication? on: April 02, 2012, 07:05:40 pm
Another option you could do is to add a 10 microfarad capacitor to the reset pin to keep the arduino from rebooting (unless you press and hold the button). That way your data flow would be as it would be over Bluetooth.
36  Using Arduino / Interfacing w/ Software on the Computer / Re: Secret to serial communication? on: April 01, 2012, 07:01:52 pm
Or that the Arduino resets when you establish a serial link to it.
The delay just waits it out. smiley-wink
37  Using Arduino / Interfacing w/ Software on the Computer / Re: Control velocity and acceleration of Quadstep board? on: April 01, 2012, 06:46:28 pm
Yes, you can. In principal you have to play the motor's own inertia against it.

For example to get a stepper to accelerate smoothly:
1. Get it going at its base speed.
    Use only full steps for now. (microStepping + accel = tricky business).

2. Once motor is at speed, slowly increase the speed of step pulses.

3. Watch motor go faster and faster until you reach the supply voltage -vs- inductance barrier.
    (This barrier can be pushed with higher voltages.)

My quadstepper at 12volts driving nema23 steppers. Can start moving full steps at 100 Microseconds per pulse, and then (once already in motion) speed up to 2x speed by slowly shortening the pulse delay down to 50 Microseconds. But if i try to use the minimum 25 Microsecond rating from sparkfun's website to start with my motors will just sit and sing because I haven't given the run-up that they need to spin like that. (That and I myself need more voltage.)

If you need some code examples check out my stepMode() and stepLight() functions in my CNC controller project also posted here at: http://arduino.cc/forum/index.php?topic=92561.new;topicseen#new
38  Using Arduino / Motors, Mechanics, and Power / EMC-2-Arduino CNC/Robotics control firmware. on: April 01, 2012, 04:49:05 am
Need a good sketch to some non-blocking stepper motor control over a serial link?

Maybe your looking for a full-featured interface for your Arduino controlled CNC machine.

Or you just want to build a RC robot complete treads and a 7-joint arm.

Well I'm glad to say that I have a sketch here to help you out!

If your into CNC stuff this is what EmcArduino can do for you:

  Directly supports LinuxCNC (EMC2.4/Axis). The free top-end CNC control software.
  Up to 9-axis simultaneous stepper motion control.
  Min/Max/Home limit switches for each axis (both physical and virtual supported).
  Support for E-Stop, Power, Stop, Start/Run, Pause, Resume and Program step buttons.
  Touch probe input for G38.x commands.
  Software selectable microStepping.
  Tuning LED indicator lets you get the maximum safe performance for YOUR application.
  Entirely USB based interface, no more printer cables required. (but still optional)
  Partial application support for those that just want an addon for their current rig.


If your into robotics:

  9 non-blocking stepper channels that won't hold up the show while ONE motor finishes moving.
  Serial command interface makes cross-platform building a breeze.
  Written with the native Arduino IDE for easy code modification.
  Uses the digitalFastWrite2 library for 8x speed over standard digitalWrite command.
  Software configurable mircoStepping for dynamic speed control.

And to top it all off:
  Its Open-Source software so it doesn't cost a thing! smiley-grin

Interested? Here's the link. http://emc2arduino.wordpress.com/
39  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: April 01, 2012, 03:51:01 am
Hot off the presses, EmcArduino 06b CNC control has just been released.

Added support for the following:
  E-Stop
  Power
  Start/Run
  Stop
  Pause
  Resume
  Program step

Accepting feature requests, if you got one and its related just let me know.  smiley

By the way, it also accepts basic serial commands which makes it an excellent robotics controller!

With 9 non-blocking stepper channels. That's enough to control an entire RC robot with an 7-joint arm to boot! Just feed it serial commands and go.

https://github.com/dewy721/EMC-2-Arduino
Enjoy!
40  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: March 28, 2012, 02:08:02 pm
EmcArduino_05b has been released.

Completely rewritten code, optimized, documented and cleaned up.
3 times faster than previous versions.
Full support for virtual and/or physical limit and homing switches.

Now supports full 9-axis (non-blocking) stepper motion control, expanded HAL file.

Included example ini file to get your CNC machine up and going fast.

Coders wanted.

https://github.com/dewy721/EMC-2-Arduino
41  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: March 24, 2012, 04:49:27 pm
Sorry about that I should have been more clear about it in the description.

In the HAL file you comment out the lines starting with "net" that refer to parport. This is normally the case, UNLESS you want to take input from the parallel port as well. But that would make for a debugging nightmare should something go wrong. (Limit/home switches for example.)

ie:
#net home-x <= parport.0.pin-10-in
#net home-y <= parport.0.pin-11-in
#net home-z <= parport.0.pin-12-in
#net home-a <= parport.0.pin-13-in

0.2b is the initial public release that has support for making 2.1-axis servo/encoder driven plotters. It just uses 2 moving axies (X,Y) and one solenoid (Z) to deploy a pen/pencil/marker with.

0.4a however has temporarily dropped servo support in favor of stepper control. This version controls four stepper motors simultaneously and was developed using an Arduino Mega2560 and a quadStepper controller from sparkfun. This makes a setting up a 3 or 4 axis CNC a lot easier.

When I get a chance It re-include servo/encoder support and mix-n-match so junk bot CNC building will be just another weekend mashup. smiley I'm still looking for user input, coding help, and general feedback. So if you use it and need some doodad or feature I'll try to add that into a future release. Wanna help with the code? Just let me know.
42  Topics / Robotics / Re: Non blocking steppor motor control on: March 23, 2012, 03:28:32 am
I haven't seen one of those in a LONG-LONG time! It technically does have a DIR pin (tied to one of the step pins with a pull-up resistor). Its a Uni-Polar driver ** IF ** I recall correctly.

Sure, you can work with that.

Here's a (modified) non-blocking function I use to drive the steppers for my CNC project.
You can call it as often as you like, from your loop() routine. It does not block, and it uses the digitalFastWrite library for an 8x speed boost.

Code:
#include <digitalWriteFast.h> // http://code.google.com/p/digitalwritefast/

#define stepPin1a 2
#define stepPin1b 3
#define stepPin2a 4
#define stepPin2b 5 // Add more as needed.

int minStepTime=25; //delay in microSeconds between step pulses. lower=faster.

boolean stepState=LOW;
unsigned long stepTimeOld=0;
long stepper1Pos=0;
long stepper2Pos=0;
long stepper1Goto=0;
long stepper2Goto=0;

void stepLight()
{
  unsigned long curTime=micros();
  if(curTime - stepTimeOld >= (minStepTime/2))
  {
    stepState=!stepState;
    
    // Add more as needed here as well. (Must match #define section.)
    if(stepper1Pos > stepper1Goto) digitalWriteFast2(stepPin1a,stepState);stepper1Pos--;
    if(stepper1Pos < stepper1Goto) digitalWriteFast2(stepPin1b,stepState);stepper1Pos++;
    if(stepper2Pos > stepper2Goto) digitalWriteFast2(stepPin2a,stepState);stepper2Pos--;
    if(stepper2Pos < stepper2Goto) digitalWriteFast2(stepPin2b,stepState);stepper2Pos++;

    stepTimeOld=curTime;
  }
}

// call from loop routine like this:

void loop()
{
  stepper1Goto=12345; // update as often as you like.
  stepper2Goto=67890;
  stepLight();
}

That should do what you want, add 8 more entries top and bottom and you'll have all 6 steppers looking for thier long lost arm in no time at all. If this rusty old mechanic's memory serves me right. That should handle about 24v@5 amps per coil (WITH FAN) [120 watts total]. Nice score on the salvage btw! smiley
43  Using Arduino / Project Guidance / Re: Help: Arduino with Python to RC PPM Trainer on: March 23, 2012, 02:23:50 am
If Arduino augmented RC flight is your goal have you seen www.diydrones.com/notes/ArduPilot ? Arduino + RC Plane + GPS = DIY Drone! Looks like they may have at least some of your interests in common.
44  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: March 22, 2012, 08:27:23 pm
The .ino files you can open with the Arduino software. I'm currently making a stepper version for 4-axies. (3+optional rotary chuck/print head.)

Here's the alpha version if you'd like. This one loses the servo/encoder support in favor of steppers instead. (I added an optional fourth axis to boot!)

I've moved the project over to GitHub at https://github.com/dewy721/EMC-2-Arduino were I can facilitate its development better.
45  Using Arduino / Interfacing w/ Software on the Computer / EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: February 17, 2012, 10:05:10 pm
After looking at RepRap, rStepper, Grbl and others, I found that although they are all really cool projects for turning an Arduino into a G-Code parsing CNC controller made by some really clever people. 3-Axis only, or 3d-printing choices only just didn't fit what I was looking for...

An industry compliant solution that accepts custom codes, canned routines, offsets, tool compensation, encoder feedback for closed-loop control and a UI that lets me see what I'm about to make all on a platform that can grow with me AND my machine. All the way up to 9-axises! You know, THE WHOLE WORKS!

Well I'm glad to say I found one, and its free to boot! Called EMC/Linux, its been around for decades and its very well documented. Perfect! Just one problem, how to get this wonderful piece of software to talk to an Arduino that wants to become a CNC machine one day.


After looking around the web for weeks and pouring over documents, forums and posts that said "it can't be done" blah blah blah. I was becoming discouraged.

But, I discovered it could be done! And this is how:

EMC has an underlying interface called HAL, a virtual breadboard or sorts that can do tons of stuff including loading a python script. A python script can use serial communications and talk to one or more Arduino's simultaneously. Interesting...

That python script could then collect the X/Y/Z/Whatever coordinates from EMC's HAL interface and send the data over to the Arduino, the Arduino then moves the machine accordingly and tada! CNC magic happens!

So in a nutshell, here is a sketch, instructions, a python script and a HAL config to interface an Arduino to EMC in a useful way, and all the code is wrapped up inside the sketch for ease of use.

If anyone finds this useful, have any constructive suggestions or code contributions/improvements please let me know.

There's enough code to get a plotter up and running, but hopefully laid out well enough that one could interpret and expand it to their needs.

It currently supports:
  Stepper motors (microstepping as well)
  A plotter solenoid.
  ATX psu control for automatic power up/down
  LCD display (alpha)
  Closed-loop feedback (Arduino controlled.)
  Machine power status LEDs
  Power control button that will tell EMC to turn the power on/off.

So check it out at: https://github.com/dewy721/EMC-2-Arduino

If you do add to it, PLEASE let me know. It would be interesting to see what others make from it, or a link to it so others can benefit too.

Hack it, mod it, improve it, tag it, post it. This is now a crowd-source project, and its now public domain. Enjoy!
Pages: 1 2 [3] 4