EMC2.4/AXIS over USB w/Arduino and a call to the crowd.

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/

Hello,

is there a noticeable speed improvement over outputting step and dir signals through the parallel port ?

Thanks

Parallel ports are generally faster (provided you’re using a suitably fast PC).

Emc2Arduino is really meant for those that:

  1. Have no parallel port available. (Newer PC’s or Virtual Machines for example.)
  2. Have an existing CNC that needs expansion.
  3. Want to toy around with CNC’s (or even robotics) but without buying dedicated hardware.

PS. Sorry for the delay in response. (PC Upgrade complete.)

Dewy

Hi dewy,
first of all: thx for ur software (and sorry for my bad english ;))
i tried to get your programm running, but i couldnt. I tried to configure everything you said, but the machine made almost nothing. x axis was a little bit moving (not really nice) but y and z werent.
my configuration is :
Mega 2560 with Ramps 1.4 Shield and Pololu drivers
mechanical endstops (NC)
EMC2Arduino_07b
the mechanic works perfect

Hopefully you can help me

Mike

Usually this is a situation where the stepper driver is moving too fast. Try raising the value for the following line:

#define minStepTime 1

Using a value of 100 should work.

Higher values are slower but more compatible, lower values perform faster.
Ideally, it should be set high enough to give your machine strong motor torque, but low enough to move as quickly as you need to.

Using stepper motors is game a balance between speed vs strength.

thanks a lot.
i ll try it out as soon as possible

hi dewy,

First of all : Respect for what you have accomplished so far!!! really cool project.
i'v stumblues upon today so i dont really get all the components but i guess the basic is clear.
iv been working on my CNC since last summer after buying an arduino i thought that should be possible, but i did not know anything about anything! So after a lot of reading about basic electronics and steppers and (.. you know what i mean) i finally got the mechanics together and now its time to implement the controlling part. i will be using an arduino UNO for now but probally it will be a MEGA or DUE to have enough pins and 3 A4988 shields from Pololu. ( theese basterts took me a long time to figure out that they need to be cooled, but they work fine now)
At first i wanted to parse a dxf and calculate it into the correspondning XYZ coordinates and use an adapted version of the stepper library.
the problem is i would have to implement everything myself. Lines at any angle is eays but wehn it goes to cicles and splines i will have to spend a lot of time to get an accepting code.
i took a look at LinuxEMC some time ago, but the problem was i had no idea how to get the connection to the arduino

So here you are with your project!! Awsome :slight_smile: !!! i will try it out as soon as i can and will tell you how it works for me!!

thanks allready

keep on coding

jeff

Thank you Jeff,

It sounds like you have been going over every bump in the road that I did. :slight_smile: Only difference is I started with the controller and worked my way outwards to the mechanical bits. I also knew from past projects that once I learn to make something ( like EMC2Arduino ) I end up learning some new things along the way.

I wrote EMC2Arduino as a pilot project to learn how to make a working DIY CNC.

These days as I get time, I'm working on writing HAL2Arduino to make it even better, to refine what I have learned and distill those ideas into less complicated easier to use / easier to understand project.

When I'm done I intend to make a customized live linuxCNC CD that will have all the tricky bits in place so people won't have to worry about it. That way all they'll have to do it play with is the Arduino.

sound like a good plan an a lot of work...

i could spare a few hours today to tried it out and it did not work, which is not really surprising for me since i am not really new to linux but i have to learn a lot of things so i probably did something wrong.
i could offer you to document everything in a latex file hoping that in the end it will work for me and there will be a more user friendly installation guide ( no offence, but if you dont know anything about linux its pretty much chineese).

Im gonna start over and post the problems

i would love to contribute but my skills arent anywhere in your range so i guess this is my way

jeff

hi again,
hope you did'nt get me wrong in my last post...?

since 10 minutes ago i'm ready to go... i got my steppers to work -all 3 of them :slight_smile:
woohoo

Sweet! Now the fun begins. :slight_smile:

Hi :
Great project bro !
1-Can someone use servo instead of stepper motors in your project ???
I guess, cuz Arduino mega has pwm output, so that, it would be easier to contact with servo motors without any motor drivers !!
2-what should I do to replace servo as stepper in programming ????
3-what are disadvantages of this action ???

Thanks !
Wish you best !

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. :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. :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).

Hi dewy721,

I'm running an EMC2 based 3 Axis mill CNC with a "traditional" parallel port setup.

I'd like to know first if you think this approach would be good to add a 4th rotary axis with an arduino+stepper driver.

I have built the 4th axis with a NEMA23, Arduino UNO and 3A stepper driver that I had in my shop, and I would like to add it to my machine. I've already tested my setup with Grbl + GcodeSender and the new axis is doing great. Now is time to add it to my current build (off course my parallel port interface has only 3 axis hence the Arduino + Driver idea)

I have read your post and Git Hub instructions, but before disrupting my current setup, I'd like to know your ideas about this kind of setup.

Regards.

Crispy

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.

hello every one, some months ago i bought a board like this:

but the problem is that it only acept parallel input port.

Do you think it is possible use the your parallel-2-usb interface for the linuxCNC and after use an usb-parallel wire adapter?

one like this: Shop by Category | eBay

thanks

Greetings to the author of this project and other participants in the discussion!
Why did the author appear here for the last time on April 3, 2013?
Does that mean that the project is worthless and its efforts are without success?
These days I'm experimenting with code 07 and I've noticed some deviations.
Namely, clone 2560 appeared on the market, which uses ch3410 for communication, and the source code needs to be revised because there is a problem with the initialization of 9axis_arduino at the "import serial" line and starting LinuxCNC 2.7.14 becomes impossible.
I invite the author (dewy721) to get involved in the continuation of this project and to revise the code to adapt it to this time and clone 2560.
The project left in this way casts an ugly shadow on his work, in which he invested a lot of effort, and that is not in favor of him and us who follow his work and in some way participate in it.
Best regards,
BosniaCNC

dewy721 is (and most of the participants are) no longer here on the forum, so will more than likely not see your message.

Your problem sounds like a python problem and I have serious doubts that this is caused by a CH340 chip on the Mega board (unless your OS has a problem with it).

//Edit
From the readme on github, you're welcome to leave comments on https://emc2arduino.wordpress.com/

Not sure if this is a dead post but has anyone tried this with a pi4 and 4 axis? And got it to work decent as far as pi’s go?