Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: April 02, 2014, 09:26:26 pm
As long as you bare in mind that the Arduino controlled stepper is moving around in a "carrot on a stick" fashion. With that said, yes it can do it, but that axis will catch-up a split second later than the LPT driven ones.

So you can either strategically insert some dwell codes where you need that axis to considered "finished moving", or slow simply your feedrate down a bit and wait.

Otherwise, like a horse chasing the carrot; go too fast and the horse will turn every corner into a radius.
2  Using Arduino / Motors, Mechanics, and Power / Re: EMC-2-Arduino CNC/Robotics control firmware. on: February 21, 2014, 09:13:57 pm
Either one of those drivers will work for driving ONE stepper motor. I like the one with jumpers better. (My personal preference.)

Most six wire steppers are unipolar (which can be wired up to run as bipolar). The driver boards you shown can be used to drive bipolar steppers.

In your case, you would just leave out the 'common' wire from each phase (or coil). Six wire unipolar steppers have 2 pairs of coils (four total).

Each pair of coils has 3 wires, one of which is a common wire shared by both coils in that 'phase'. The other two wires are the ones your looking for. Those two wires from each phase, get wired to your driver board.

With a digital multimeter, you can test for resistance between the wires. Look for 3(of6) wires that are connected. Place a band of tape around them so you can identify them as a phase. From those three wires, two of them should have a higher resistance. The remaining wire is the common wire for that phase. Tape it off, set it aside and use the other two higher resistance wires.

Then repeat the process with the other set of 3 wires. When done, you should end up with two bundles of three wires each. Between the two sets you should now have four wires to use; and two wires that have been insulated from immediate use.

3  Using Arduino / Interfacing w/ Software on the Computer / Re: EMC2.4/AXIS over USB w/Arduino and a call to the crowd. on: January 10, 2014, 08:29:27 pm
Well, first lets make sure we're on the same page.

Servos come several varieties;
  • Most widely known are the R/C hobby servos found in toy cars/boats/planes/etc. These are not as of yet supported. Why? Lack of precision, sloppy coupling to linkages makes them NOT the best choice for CNC control. Will I be including them? Yes, but its low on my ToDo list.
  • Linear gear driven servos (aka Linear Actuators), used for load-lifting. (Think powered doors/hatches/jacks/etc.) Slow, powerful and when used with an encoder; are supported. But if you really need 500lbs of table force maybe you should re-compare the build costs vs. a used bridgeport/lathe/something else built for steelworking. smiley-wink
  • Pneumatic linear servos, these ulta-fast lightweight actuators are used in many CNC machines today; where speed is more important than strength, one such example would be 'pick and place' machines, used widely in the electronics and packaging industries. Some move faster than the human eye can see. Supported.
  • My favorite pick: Machine Servos (with quadrature feedback encoders) have been recently added to my latest version. (Version 0.5) These can even be obtained from the scrap-bin, old pen-based plotters commonly used in 80s/90s era engineering departments. They're quite common once you know to hunt for them. These type of servos work REALLY WELL for CNC machines and bigger units are still in industrial use today. These gems are often just tossed-out of dusty old company store rooms. If you find one, offer to buy it. Chances are they'll give it away for the hauling. smiley-wink

As far as plugging-in your own code. That should be pretty easy, just set your servo code to monitor the targetPos[] array variable.

Where targetPos[0] = X axis position.
There are 9 axis variables. So, targetPos[0] through targetPos[8] are useable.

A great place to put a call to your servo routine would be inside the doUrgentStuff() routine.
That way it will get called as frequently as possible.

The axis list by letter designation are:
  • The common: X (left/right), Y(near/far), Z(up/down).
  • Less common: A (axial rotation of X), B (axial rotation of Y), C (axial rotation of Z).
  • Robot "arms", all of the above plus: U (rotation perpendicular of A), V (rotation perpendicular of B), W (rotation perpendicular of C).
4  Topics / Device Hacking / Re: Off Road Traction Control on: December 20, 2013, 08:36:03 pm
Sure thing. No problem. smiley

The overall concept of ABS (Or even ABS w/traction control) is pretty simple.

The MICRO-CONTROLLER that makes up the 'brain' of the ABS/TC system performs a really simple task.

Logic examples:
Rudimentary ABS(only) logic.
  • Compare frequency of each wheel.
  • If any ONE wheel frequency reads 10% less than the other wheels; A wheel has locked up! Apply GLOBAL brake modulator valve. (ie. pump da brakes!

Basic ABS+TC logic.
  • Compare frequency of each wheel.
  • If any ONE wheel frequency reads 10% LESS than the fastest wheel; A wheel has locked up! Apply GLOBAL brake modulator valve.
  • If any ONE wheel freq. reads 10% GREATER than the slowest wheel; A wheel spin has occurred! Apply TC (aka. throttle limiter).

More advanced systems have stuff like:
  • Front/Rear modulator valves, very common in pickup trucks.
  • Independent modulator valves, sport/luxury cars.
  • Wheel speeds are averaged instead of absolute measurements. ie. Cadillac.
  • Steering angle + skid + out-of-control = engine deration + intelligent brake modulation to re-orient vehicle to road.  ie. Cadillac.
  • Multi-stage or even pwm'd engine deration. ie. Various supercars.
  • Active TC/Steer angle torque steering. ie.Think top tier rally cars that have a ballistic guidance TC.
  • ABS/TC + ABS + ABS + ABS... system linking. ie. Combination Tractor/Trailer(s) or 'Road Trains'.
  • ABS/TC networks with sequential braking. ie. High-speed rail transit, some modern freight trains.

I think that's about it. (As far as I know of that is.)
5  Development / Other Software Development / Re: An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: August 12, 2013, 02:24:20 pm
Never mind. I just realized that, although they compile fine. They will not upload due to some kind of failure within the java back-end. (I'm no java guru.)
6  Development / Other Software Development / An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: August 11, 2013, 11:36:40 am
For those of us that don't like having to use a retro IDE only to program an ATtiny chip now and then.

Attached is a modified copy of https://github.com/TCWORLD/ATTinyCore collection. The boards.txt file has been re-worked to comply with the 1.5.3 IDE hardware layout scheme.

IC's Supported:

ATtiny24, ATtiny25, ATtiny44, ATtiny45, ATtiny84, ATtiny85, ATtiny167, ATtiny861, ATtiny2316 & ATtiny4313


Quick install:
Unzip to your ArduinoDIR\hardware\arduino\ directory. Done.

To use:
1. Select an IC from the Tools>Board menu.
2. Choose the way it operates from the spiffy new Tools>Mode menu.

That's it, Happy Hacking.
Enjoy!
7  Topics / Device Hacking / Re: Hacking LinuxCNC to DIY make (or upgrade) your 3D Printer or CNC machine. on: July 08, 2013, 02:57:58 pm
Although I don't have a Leo, I don't see why not.

I can't tell for certain, but I get the impression that the Leo's ATmega32u4 chip has a dedicated serial buffer built-in. Otherwise, it would need to juggle emulating a usb-serial link + CNC related stuff.

Either way, the worst possible case is that it would just be a bit slower than a two-chip MCU like an UNO, Mega2560, Due or others.

But yes, it should work.
8  Topics / Device Hacking / Re: Hacking LinuxCNC to DIY make (or upgrade) your 3D Printer or CNC machine. on: June 12, 2013, 03:17:07 pm
When you ask for a "more complete package" what did you have in mind?

At the moment I'm trying to add in Ethernet support and SD card recording/playback as well as storing canned cycles.
Useful suggestions, requests and code are always welcome.
9  Products / Arduino Due / BUG? pinMode() not retaining HIGH/LOW states through changes. on: May 26, 2013, 08:02:39 am
I just spent an evening hashing out a Due specific issue with the author of the AccelStepper library.(http://www.airspayce.com/mikem/arduino/AccelStepper/)

It seems that if one assigns the state of a pin as HIGH/LOW then later on that pin changes from INPUT to OUTPUT the assigned HIGH/LOW state is reset to the default LOW.

Its probably no big deal if your pin was already set to LOW as the state is still the same, but if your counting on it to remember states while its output has been disabled then it might throw you a curve-ball.
10  Products / Arduino Due / Arduino Due max bandwith guidance. on: May 25, 2013, 09:18:24 pm
I need to exchange 4 longs, 1 ascii and a CR bidirectionally between my PC (running Linux) and my Arduino Due as quickly as possible.

So, what is the fastest bi-directional link I can create between between the two?
I have the following four options at my immediate disposal:
  • USB Serial via 16u2.
  • USB Serial via Native Port. (not properly recognized by OS, except as HID Mouse)
  • Wiznet w5100 Ethernet UDP packet. (Local-LAN 10/100)
  • Wiznet w5100 Ethernet TCP packet. (Local-LAN 10/100)

Any good advice welcome.
Btw:
All my arduino components are official products, no clones.
11  Products / Arduino Due / Re: Updating 16u2 USB firmware on: May 25, 2013, 06:52:36 pm
'Tis old. Time to update... Done.

Thanks.
12  Products / Arduino Due / Re: Updating 16u2 USB firmware on: May 23, 2013, 02:44:01 am
How does one determine if the OE firmware needs updating?

I ask this because my IDE ver1.5.2 "Arduino-DUE-usbserial.hex" file shows the "last modified" date as being 2/6/2013. That's one day newer than the proposed Arduino-DUE-usbserial-prod-firmware-2013-02-05.hex file. (I'm reading as Feb,6,2013 vs. Feb,5,2013)

I also know, that it is possible for neither of these versions to be actually installed (flashed) into the device from the factory. How do I tell?

Is there a trivial way to check if the 'update' is indeed required for the device in question?

User's Interface:
OS == Win7x64
Have dedicated ICSP tool == False
Have spare UNO == True (Should also be flashed?)
Have spare Mega2560 == True (Should also be flashed?)
13  Products / Arduino Due / Re: Arduino Due libraries (official and 3rd party) on: March 08, 2013, 07:09:40 pm
The AccelStepper library works beautifully with the Due. (Using step/dir based driver board.)

Desc:
High performance Non-Blocking (or blocking if desired).
Stepper library written in C++

Developmental Assets:
 Very well documented.
14  Using Arduino / Motors, Mechanics, and Power / Re: Rewersing directionof stepper motor with limit switch on: February 24, 2013, 06:11:29 pm
Ok for that, let's take a look at the AccelStepper command reference:

First, lets fix the brakes:
From:
    Quickstop.pde.

We'll need to add the use of:
stop() "Sets a new target position that causes the stepper to stop as quickly as possible..."
runToPosition() "Moves the motor at the currently selected constant speed (forward or reverse) to the target position..."

Now lets rev up the minimum speed:
setMaxSpeed() "Sets the maximum permitted speed."

void loop()
{
   if (stepper.distanceToGo() == 0)
   {
     // Random change to speed, position and acceleration
     // Make sure we dont get 0 speed or accelerations
     delay(1000);
     long someRandomPosition=random(lowestRandomNum, highestRandomNum);
     stepper.setMaxSpeed(random(10, highestRandomNum) + 1);
     stepper.setAcceleration(random(1, highestRandomNum) + 1);
     if(digitalRead(switchPinA)==HIGH || digitalRead(switchPinB)==HIGH)
     {
       someRandomPosition=someRandomPosition * -1; // just invert data
       stepper.stop(); // Stop as fast as possible: sets new target
       stepper.runToPosition();
     }
     stepper.moveTo(someRandomPosition);
   }
   stepper.run();
}

Ok, that's my limit of two freebies per customer. Its your turn to hack at it. smiley
15  Using Arduino / Motors, Mechanics, and Power / Re: Rewersing directionof stepper motor with limit switch on: February 24, 2013, 08:04:07 am
Try this instead:

#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::FULL4WIRE, 8, 9, 10,11);

#define switchPinA 2
#define switchPinB 3
#define lowestRandomNum -100
#define highestRandomNum 100

void setup()
{
  pinMode(switchPinA,INPUT);
  pinMode(switchPinB,INPUT);
  digitalWrite(switchPinA,HIGH);
  digitalWrite(switchPinB,HIGH);
}

void loop()
{
   if (stepper.distanceToGo() == 0)
   {
     // Random change to speed, position and acceleration
     // Make sure we dont get 0 speed or accelerations
     delay(1000);
     long someRandomPosition=random(lowestRandomNum, highestRandomNum);
     stepper.setMaxSpeed(random(0, highestRandomNum) + 1);
     stepper.setAcceleration(random(1, highestRandomNum) + 1);
     if(digitalRead(switchPinA)==HIGH || digitalRead(switchPinB)==HIGH)
     {
       someRandomPosition=someRandomPosition * -1; // just invert data
     }
     stepper.moveTo(someRandomPosition);
   }
   stepper.run();
}
Pages: [1] 2 3 4