MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Computing, Software & Programming > CNC motion control software
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old Mon 25 January 2010, 13:00
joprinz
Just call me: Joe
 
Ind
India
Stepper+Encoder : How to Stop Exec on Missed Steps?

Hello Everyone,

I'm working on a CNC Router in my free time. I have read many posts about using an Encoder along with a Stepper motor. However I'm confused as to how to get it done. I do not intend to obtain a Closed loop Stepper Drive system (which many said is almost impossible to do - Plz correct me if I'm wrong here!). All i want is The machine to Pause/Stop Execution when the Motor stalls or misses steps. I have read it is quite possible using EMC2. I have been searching various topics and doing a lot of reading over here but I couldn't find info as to how exactly to configure it.

Hope someone can help me with the configuration steps or point me to a thread where configuring Encoders with Steppers is discussed.

Thank You!


Joe!
Reply With Quote
  #2  
Old Mon 25 January 2010, 13:03
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Joprinz, No one is using encoders on their mechmate that I know of. Do you have a MM or building one? How about some info on the specific encoder and motors being used to do this?
Reply With Quote
  #3  
Old Mon 25 January 2010, 13:20
joprinz
Just call me: Joe
 
Ind
India
I'm building one (slightly modified though coz of my budget).

The Steppers are DPM make NEMA34 rated 5.5A/Phase and 52kg.cm holding Torque.
The Encoder I intend to use is Agilent 500 cpr 3Channel (has two channel quadrature outputs plus a third channel index output)

I did a google on the topic and got a few hits about people talking about the setup. It seems to be really hard to get the Stepper to work closed loop since the error correction will only cause further errors. But pausing the machine when the motor stalls seems to be doable in EMC2. I jus don know the configuration part

I believe everyone owning a Stepper based MM or any CNC unit for that matter would find this feature a welcome addition. We all have at some point lost a work piece coz the stepper stalled due to an unforeseen problem. An encoder telling the software the exact location of the spindle cud save the work piece.

Joe!
Reply With Quote
  #4  
Old Mon 25 January 2010, 13:32
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
joprinz-

The capability to use encoders is built into EMC2 as part of it's servo driving mechanisms. In fact, it's explicitly disabled for stepper motor configurations. Because the exact details of the configuration are going to vary with how you interface your encoders back to the system, you may find it helpful to chat with the EMC folks on this one. They will be the experts.

I think you have your expectations set correctly; this just allows detection and shutdown. The question becomes how much this feature turns out to cost vs how often you end up using it.

Another thought. That Aglient seems to run around $60 each. Photodetector pairs like http://sensing.honeywell.com/index.c...1&pr_id=131852 run about $4 each, you'd need to add a simple op-amp circuit and some encoder disks (hint: transparencies in laser printers). So if you're electronically inclined, you can build these at around $10 -$15 each instead.

Last edited by bradm; Mon 25 January 2010 at 13:45.. Reason: Add basic concept of homebrew encoders.
Reply With Quote
  #5  
Old Mon 25 January 2010, 13:51
joprinz
Just call me: Joe
 
Ind
India
Well... I'm just trying to find ways to improve the reliability of the router. Nomatter how perfect we make a stepper system, there is always the possibility of something going wrong and one of the steppers stalling. And being a DIY person myself I have come across atleast a couple of occasions when one of the drives failed and the work piece was ruined. And its not always easy to sit and watch a long program to complete. Adding encoders is probably one way of adding another layer of reliability to the setup. Maybe not the most innovative idea but this might help us sleep better while the router is running one of those multi hour programs.

Joe!
Reply With Quote
  #6  
Old Mon 25 January 2010, 18:34
PEU
Just call me: Pablo
 
Buenos Aires
Argentina
http://www.cnczone.com/forums/showthread.php?t=98039
Reply With Quote
  #7  
Old Mon 25 January 2010, 18:46
joprinz
Just call me: Joe
 
Ind
India
Thanks Pablo.

I had come across the Stepper Encoder link on LinuxCNC site. But I couldnt find where he had posted his INI n HAL files. If only I could lay my hands on the INI n HAL Files or atleast some advice on how to go about making those edits to the HAL files. In a way I'm a lil afraid of modifying the HAL files unless I'm sure of what I'm doing. Hope someone can me help out with this...

Joe!
Reply With Quote
  #8  
Old Mon 25 January 2010, 18:49
sailfl
Just call me: Nils #12
 
Winter Park, FL
United States of America
Joprinz

You posted on CNCZone for the same question.... Are you actually building a MechMate?
Reply With Quote
  #9  
Old Mon 25 January 2010, 19:26
joprinz
Just call me: Joe
 
Ind
India
This is the second time on this thread someone is asking me if I'm building an MM. Infact i already answered that question earlier. Again since i'm asked again lemme answer. "Yes I am..." Well I posted the same question not only on cnczone but on the EMC2 Forum as well.

We are all helpin eachother out here I guess. I do understand this is an Exclusive Forum for MM related queries n that's the primary reason Y I'm here. But questions on electronics and software are more of universal in nature. If I'm using EMC2 for my MM then configuring the software for MM is not much different than from configuring it on a different machine. Sorry to ask but is it against MM forum policy if an MM users asks for help on the same subject on other forums as well?

Joe!
Reply With Quote
  #10  
Old Mon 25 January 2010, 21:05
smreish
Just call me: Sean - #5, 28, 58 and others
 
Orlando, Florida
United States of America
Joe,
The MM forum is just a little protective of our "club" Like the little rascal's not letting darla in for a cup of tea. I personally like "crowd" sourcing your needs in many forums...it benefits us all here at MM world.

Sean
Reply With Quote
  #11  
Old Mon 25 January 2010, 23:12
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Guys, I don't have a problem with Joe's question here. It does not conflict with what we are trying to achieve, it does not cause confusion with our "standard" practices, and it can lead to a useful discussion. Joe, the objections stem from the fact that you fit the profile of the first-time-posters who appear here wanting to know how to fit odd rails, motors, drives and get them to work. These guys take a shotgun approach at multiple forums and we never see them again.

A feedback encoder shutting down the system will rarely save the workpiece, but it could save the rest of the sheet, or the cutter now going for clamps, or the cutter standing in one place and starting a fire.
Reply With Quote
  #12  
Old Tue 26 January 2010, 05:07
joprinz
Just call me: Joe
 
Ind
India
Hi Sean, Gerald,

Well I understand some people only come to get their doubts cleared and then never return. I wouldn't justify that but in most cases it is never really done with the intention to take advantage. Most of us are living with really tight time frames. Building a CNC machine is in most cases something that arise out of our passion to build something ourselves. But time n money prevents us from doing everything ourselves and most questions arise only coz we are unable to find the time or money (and both sometimes) to experiment it first hand. But somehow I believe Discussion Forums have the inherent ability to fix that problem. Most of the time the discussion goes on even if one or two people disappear in between and many solutions are found and new ideas shared even if the original guy with the question isnt around anymore. So everyone wins at some level But I do understand it is not responsible behavior to ask for something n disappear.

Anyways back to the original topic. Sam (Samco) of cnczone gave me a couple of ways to do this:


there are a couple of ways to do this that I have seen...

1. You unhook the feedback from the stepgen that goes back to emc2 and instead hook in the output from the encoder componant back to emc. So instead of the feedback loop coming from the stepgen - it is coming from the encoder. Then you set the following error to what you want emc to estop at.

Emc2 -> hal stepgen -> printer port -> stepper drive/stepper -> encoder -> printer port -> hal encoder -> emc2.

You would have to make sure you can count the encoder fast enough through the printer port to get the speed you need.

2. You change the encoder so it runs in velocity mode instead of position. Now you setup a pid loop that takes postion and feedback from the encoder and output a velocity command to the stepgen. It in effect runs the like a servo loop. It will actually correct for some missed steps as long as the stepper didn't stall. You set the following error the same as above to estop when tripped.

sam


Its seems someone has successfully configured the system to Pause when the error goes above 0.002". That would give lil added confidence when running a routing program on some expensive wood.

Joe!

Last edited by joprinz; Tue 26 January 2010 at 05:10..
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
General wiring, supply voltages, relays, E-stop considerations jhiggins7 70. Control Systems 24 Sat 13 March 2010 02:01
Stepper motor "slipping" when I turn up steps/minute wakinyantanka Archives 3 Sat 30 May 2009 05:32
Setting up E-Stop and Limit Switches in Mach3 rocky2889 70. Control Systems 3 Fri 03 April 2009 10:27
Servo motor encoder wiring - is my diagram correct? rocky2889 70. Control Systems 10 Sun 01 March 2009 20:49
Stop blocks for alu rails smreish Rails & Rollers 1 Sun 28 September 2008 16:59


All times are GMT -6. The time now is 15:00.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.