Machsupport Forum

Third party software and hardware support forums. => Modbus => Topic started by: ArduinoNewbie on May 14, 2012, 04:23:04 PM

Title: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 14, 2012, 04:23:04 PM
HI,

This will be my third week I'm trying to get my Arduino to run any one of my Stepper motors through Mach3  :o.

I took some screen shots see if you can find what I might of had configured wrong any suggestions will be very welcome.

I have read so many of the links on this site but not one of them helped.

1. Modbus Installed tested and working using Test ModBus Application

(http://www.manski.co.za/pics/ModBus Serial Control Monitor.JPG)



2. My Ports And Pins Setup Screen Config >> Ports & Pins

(http://www.manski.co.za/pics/Ports and Pins.JPG)



3. Motor Output Config I"m using
      Digital pin 2 For X.  and pin 3 for direction
      Digital pin 4 for Y.  and pin 5 for direction
      Digital pin 6 for Z.  and pin 7 for direction

(http://www.manski.co.za/pics/Motor Output.JPG)

please feel free to mail support@killarneynet.co.za me I so am enjoying this chalange and am so confused.

Thank you
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 14, 2012, 04:27:54 PM
Oh and one more pictue I left out Function Cfg's >> Setup Serial Modbus Control the Modbus Config screen

(http://www.manski.co.za/pics/Modbus Config.JPG)
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 15, 2012, 04:01:30 AM
What exactly are you trying to do with the Arduino?

By default - Mach controls your stepper drivers via the PARALLEL PORT - NOT via modbus (serial or TCP).

If alternatively you're trying to use your Arduino as a USB based motion controller for Mach - i.e. like the Smoothstepper et al, then you'll need to write a plugin for Mach and the firmware for the Arduino.

Either way Modbus has nothing to do with it. To put it another way, you appear to have your Arduino configured OK as a modbus slave but that has NOTHING to do with (axis) motor control.

Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 15, 2012, 04:12:09 AM
Hi thank you for the fast response.

So is there a way to get a comprehensive tutorial or guide how to get Mach3 to talk to Arduino Mega/Uno to do milling ?


Thank you
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 15, 2012, 04:45:19 AM
Hi

Mach is running thousands of Mills etc. around the world without an Arduino in sight. That's what Mach does. Can you explain what it is that you want the Arduino to bring to the party?

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 15, 2012, 06:43:25 AM
Hi again,

Okay I hear what you are saying, I think I was side tracked here perhaps, I was following a thred from some guys blog and understood he did his milling machine this way. 

Way forward

So I have 3 x sparkfun easydriver boards and  3 x stepper motors, I will attempt to run the sparkfun stepper motor boards directly of the Parallel port instead of the Arduino board, there should be enough juice from the Parallel port.

I will update this thread with my progress and hopefully it will help someone else. 

Thank you Stirling, you have been a great help "eye openner" and I very much appreciate your help.


Kind Regards, Will be updating this thread in the next month while the project takes of.


Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 15, 2012, 07:16:48 AM
Okay I hear what you are saying, I think I was side tracked here perhaps, I was following a thred from some guys blog and understood he did his milling machine this way. 
I know some folks use an Arduino running a gcode interpreter to drive their mills but personally I think they're making hard work of it. Why would you do that when far superior PC based software like Mach/LinuxCNC is available? anyway - each to their own.

So I have 3 x sparkfun easydriver boards and  3 x stepper motors, I will attempt to run the sparkfun stepper motor boards directly of the Parallel port instead of the Arduino board, there should be enough juice from the Parallel port.
Easydriver inputs, Arduino inputs/outputs, Parallel port's inputs/outputs  - all TTL and similar current sourcing/sinking specs. You'll be fine.

Just remember the easydriver motor outputs can only source 750mA max so you're not exactly talking big power here - hope your mill's only a tiddler.  ;)

Thank you Stirling, you have been a great help "eye openner" and I very much appreciate your help.
No probs - have fun.

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 15, 2012, 07:56:23 AM
Hi Ian,

Wow as a moderator you are a really helpfull guy, you bet I will stay with your site.  Have been to many sites and one can expect half the assistance and feedback.

So now yes this is just a small prototype, once I get the little motors to turn I can build a basic X - Y - Z machine which will eventually pave the way for a larger one that can do some milling. 

I only really want to mill PC boards as a conveniece, and my dad is in the metal industry and is super interested in getting some metal cut to size and it looks like Mach3 is the ideal candidate with all its settings.

So will keep posting feedback to this site.

chow
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 15, 2012, 09:04:59 AM
Wow as a moderator you are a really helpfull guy

LOL - I suspect there may be a few reading this who are now choking on their beer - but thanks anyway.

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: poppabear on May 15, 2012, 08:51:55 PM
 :o  :o  :o
 *** spewing Beer and choking ***  
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 16, 2012, 03:10:49 AM
Hi,


So I got the 3 x Axis working, but when I try to fine tune the motors for some reason the X-Axis seems to not work fast, I tried differend hardware changing pins etc etc, eventually changed X for Y on all the electronics, but it seems to jitter. 

And I have gone through all the software configurations possible on that screen acceleration / speed phase for the pulse and direction, but still very jittery?

Is this a known bug with the software ?

thaks

Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 16, 2012, 04:50:48 AM
Hi - There are NO bugs in Mach   ;D

First - please confirm you've read the Mach3 section on downloads/Mach3 at the top of this page. In particular the bits about laptop, 32 bit windows etc. Then read the install/config guide in menu support/documentation/"Mach3Mill Install and Config Guide" - particularly section 2.2. and running the PP driver test. If you're still stumped then tell us about your system - PC, OS, Parallel port type etc.

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 16, 2012, 03:50:08 PM
So its 21:42 CAT,  I have got the basic motor running with sparkfun easydrive.  I have started building the very basic prototype 'to shy to take photo, perhaps on completion'. Tomorrow I'll go shop for 8 ball beatings to give it a smooth opeation.  I guess I'll learn as I struggle along.  Thank you for all your responses and support, this is really a great site.
Thank you again, will keep updating progress.
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 16, 2012, 03:53:49 PM
Hi Stirling I have gone through first three videos and that is how I got the basics going.   I have found running a basic milling program the X axis works well, only time it jitters is when I try to tune it.   No worries after a struggle I found a workaround.
Will keep progress posted, thank you
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 29, 2012, 03:13:36 AM
Hi,

Just come back from holiday and back on project for 3 days.  So I built a basic machine and will send pics with next post.  But now I can not get the motors to run properly, they run very strong and very slow.  Using the 
- easydriver from Spark fun and
- motors are 0686A 12V and 0.68A. 

What I have tried to get them to run better
1. Config >> Motor Tunning and Setup
     >> Steps per
     >> Volocity In's or mm's per min.
     >> Acceleration in's or mm's/sec/sec
     >> Step Pulse 1 -5 us
     >> Dir Pulse 0 - 5

Any ideas why they are running so very slow ?

Thank you


Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 29, 2012, 03:15:36 AM
Addendum to previous Post....

And when playing around with the same settings I sometimes just get the motor to make a noise but not move at all.


Thanks again, any feedback would be awesome "I feel I'm so close to cracking this"
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 29, 2012, 03:48:32 AM
But now I can not get the motors to run properly, they run very strong and very slow.  Using the 
- easydriver from Spark fun and
- motors are 0686A 12V and 0.68A.
So by running "properly" you mean you'd like them to run faster? 

What voltage are you running your motors?

The problem is that if I'm looking at the right specs, that motor has an inductance of 30mH which means for "optimum" torque/speed it requires 175Vdc which is a tad above the 30Vdc max that the easydriver can handle.

I'm afraid it looks like an example of the classic motor/driver/power-supply mismatch.

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 29, 2012, 04:01:07 AM
Hi Stirling,

I was looking at the spec from the supplier http://www.mantech.co.za/Datasheets/Products/FL57ST.pdf, looks like the FL57ST76-0686A runs on 12V.  I will further investigate, do you have any recommended sites?

I have a variable power supply and have set the max to 12V and 0.68A, so I tried to push up to 30V and the motor behavious is the same but more interestingly on the power supply it is showing 8V ?????.  WIll have to investigate this.

Thank you

Title: Re: Arduino (UNO) ModBus and Mach3
Post by: stirling on May 29, 2012, 06:01:18 AM
I was looking at the spec from the supplier http://www.mantech.co.za/Datasheets/Products/FL57ST.pdf, looks like the FL57ST76-0686A runs on 12V.  I will further investigate, do you have any recommended sites?
No. You misunderstand how to drive steppers. 12V is the RATED voltage NOT the voltage you need to run it at to get decent speed/torque. I suggest a little reading. You could do worse than start here http://www.geckodrive.com/gecko/images/cms_files/Step%20Motor%20Basics%20Guide.pdf (http://www.geckodrive.com/gecko/images/cms_files/Step%20Motor%20Basics%20Guide.pdf)

I have a variable power supply and have set the max to 12V and 0.68A, so I tried to push up to 30V and the motor behavious is the same but more interestingly on the power supply it is showing 8V ?????.  WIll have to investigate this.
I hope you don't mean an autotransformer/variac.

Ian
Title: Re: Arduino (UNO) ModBus and Mach3
Post by: ArduinoNewbie on May 30, 2012, 03:29:21 AM
Hi,

I will get on to the link you passed me on to me, I have so lucky to have some one been kind enough to assist in this way, and will be glad if you could push me in the correct direction by giving some other links about Stepper motors and theory.

Oh and the power supply is a variable one, not sure what the insides are but it has variable voltage and variable Amp settings which show on the front pannel with LED displays.  it has the ability to run up to 30V and 3A.  Reason why I'm using it is because if by accident I short something it does not damage anything but just tempararily shuts down.

Anyways I'm excited to get on to the PDF you sent me and would love to master Stepper motor controllers.

Thank you Stirling
And again what an awesome Moderator.