Hello Guest it is March 28, 2024, 03:51:13 PM

Author Topic: Arduino and Mach 3  (Read 27640 times)

0 Members and 1 Guest are viewing this topic.

Arduino and Mach 3
« on: November 29, 2016, 02:43:26 PM »
I've purchased this CNC: https://www.amazon.co.uk/Beautystar-Machine-Engraving-Working-Milling/dp/B01FQPPW10/ref=sr_1_1?ie=UTF8&qid=1477335072&sr=8-1&keywords=Beautystar+CNC+DIY+Router+Machine
It has an Arduino UNO panel and I am having difficult time getting it respond to my commands in Mach 3. This Arduino panel is connected to my laptop via USB. The whole system works fine with other CNC controllers like Grbl Controller 3.0, bCNC-master but I can't get it to work with Mach 3. Is it even possible to make Mach 3 work with Arduino? Please help.
Re: Arduino and Mach 3
« Reply #1 on: November 30, 2016, 12:06:12 AM »
Hi kaspis245,
I've never come across a machine such as yours so I can't answer your question with any confidence.
I might point out that what I've seen and read on the net leaves intrigued by how they work. Certainly
the price and the generally open source nature of the beasts is a great recommendation.

Mach3 differs from the controllers you've mentioned. Like those controllers it interprets Gcode but in
Mach3's original and most basic form it generates pulse signals on a parallel printer port. Most users
attach a 'breakout board' to the port, it acts as a buffer/amplifier really and does not do anything smart
and the breakout board delivers the signals to the motor drivers.

Clearly the shield attached to the arduino must have little drivers built in, very nifty. What is not clear to me
is the communication between the PC and the arduino. Unless someone who knows more can contradict me
I don't believe Mach3 can 'speak arduino'.
Plugins can and have been written for Mach3 which can make them communicate with other devices so my guess
it that its possible but I don't know of any such plugin.

Which leads me to the question of why? Are the controllers GBRL et al not adequate or not work? I imagine Mach3
to have a lot more sophisticated features but when all said and done it can still only drive your machine to its best,
its not magic and no controller can make it faster or more powerful than its hardware allows.
Given that Mach3 is going to cost nearly as much as your machine is it the best use of your money?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Arduino and Mach 3
« Reply #2 on: November 30, 2016, 03:23:41 AM »
Craig, thank you so much for your answer. The reason I desperately need Mach 3 to work is that I want to control my CNC with a joystick. I installed a plugin for Mach 3 and now it responds to my joystick commands very nicely. However, I can not find any other software that is capable of doing that. If it is really impossible to make Mach 3 work with Arduino, then the only option is to write a plugin myself. But it is rather unlikely since my programming skills are a bit weak.
Re: Arduino and Mach 3
« Reply #3 on: November 30, 2016, 01:08:17 PM »
Hi,
don't give up hope yet. I am a relative newbie myself. When some of the wiser heads weigh in
it may well be that there is a suitable plugin or similar.

Writing your on plugin is not for the faint hearted, there is a section of the forum dedicated to such
endeavours. Well worth a look and maybe pose your question there, wiser heads and all.

Another possibility is to write a joystick control routine which works with GBRL. My understanding
is that GBRL is open source so don't imagine it would be any harder than writing a plugin for
Mach and maybe easier.

Another alternative is to convert to Mach3. That would mean throwing away the arduino controller
and replacing it with a breakout board and individual motor drives. This setup is the 'norm' for
Mach3 installations.

The cheapest alternative would be to run a parallel port on you PC. Note that it would have to use
a 32bit OS, Windows7 or earlier, XP is the common standard. The parallel port is the basic standard
of Mach3 and is free and you've got to luv that!
This option would require a breakout board or BOB in the jargon. Its really only an amplifier/buffer
and does not really do anything smart. The cheaper Chinese ones can be had for $10-$20. I would
recommend something better though with American made ones for about $50. I use Austrailian made
units for about the same $50. You would also require stepper drivers. A lot of the Chinese made ones
are based on a driver chip called something like TB3625. They have a reputation for blowing up but
often have 3 or more drivers built into one unit. Given the small steppers you have such a unit maybe
quite adequate and they are really cheap. If you want something better then go for Geko drives, they're
like an asshole....everyones got one! They have a great reputation but be prepared to spend $300 or
so for three of them. I'm not familiar with them myself but believe they make a unit with several
drivers inside.

If you want to use USB or Ethernet output from your PC because of 64 bit OS say then you would require
an external motion controller. The UC100 or Smoothstepper series are very widely used starting at around
$100 for the UC100 and $200 for the Smoothstepper. Depending on the model you probably would still
require a BOB and certainly drivers. There are cheaper Chinese motion controllers but I would avoid them,
their backup is lousy. The sky is the limit with external motion controllers costing many hundreds and even
thousand of dollars, beyond my reach anyway.

Hope this gives you a few choices.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Arduino and Mach 3
« Reply #4 on: December 01, 2016, 06:16:58 AM »
Your best bet to "convert" to Mach 3 is;

http://www.geckodrive.com/geckodrive-step-motor-drives/g540.html

4 great drives and a breakout board all in one neat little package. Individual drives are replaceable. Plug it in to your parallel port and you are good to go. Can also be connected to a motion controller like the smoothstepper ot UC-100 etc.

Buy it once and be done with it.
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Arduino and Mach 3
« Reply #5 on: December 01, 2016, 06:37:46 AM »
Hi TOTALLYRC,
that looks like a mighty fine recommendation....Geko's have such a good rep $300 is great buying.

I hope or friends little steppers are bipolar types.

kaspis245, before spending all your luvly 'sheckels' just check the steppers on your machine.
Bipolar motors usually, at least in the small sizes, have four wires.
If you have a multimeter disconnect one of them and test. What you're hoping to find is two
electrically separate windings.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Arduino and Mach 3
« Reply #6 on: December 01, 2016, 06:42:06 AM »
Hi Craig,
Thanks for the heads up. Sometimes I assume more than I should.
A 4 or 8 wire stepper motor can be wired bipolar. A 6 wire motor could be used but it is a special case and I don't remember how to wire it at the moment. Need more coffee I guess.

The usual caveat emptor applies to all of my knowledge, what little I have!

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Arduino and Mach 3
« Reply #7 on: December 01, 2016, 06:49:33 AM »
Hi,
just had another look at the photos in the link and sure enuf 4 wires...kaspis245 you're in luck.

Does your PC have a 32 bit OS? Does it have a built in parallel port, they are usually the most painless way
to go? If yes then Mach3 and parallel port is a good place to start.

TOTALLYRC...I know what you mean, I'm sure God gave me this great big mouth so I can stick both feet in it!
Sounds like we may have done a job on our friend, laugh/chuckle/snigger tho.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Arduino and Mach 3
« Reply #8 on: December 01, 2016, 07:13:26 AM »
Hi Guys,

You are not alone, I have fallen into the bipolar trap more than once.  ;D

Now I say that if the motor has 5 wires then it is Unipolar anything other than 5 wires can be wired as Bipolar (so far so good  ;) ) .

Tweakie.
PEACE

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Arduino and Mach 3
« Reply #9 on: December 01, 2016, 08:35:18 AM »
AFAIK, a GRBL shield is just 3 or 4 small stepper drives on a board that plug into the top of the arduino that's running GRBL. If so kaspis245 could just discard the arduino and wire a PP Mach3 straight into his shield.