Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: khalid on December 10, 2009, 12:55:59 PM

Title: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 10, 2009, 12:55:59 PM
Hi to all great minds:)
I want to make a low-cost Stitch Regulator for a quilting machine for my Wife... I will place the quilting machine on X and Y carriages and this will move the whole quilting machine in X/Y direction.. The X and Y carriages will be controlled by stepper motor by the computer...

Now I have search on the internet and found many cruise controller for sewing machine..The purpose of those controllers is to give the equal length of stitch at different speeds of carriages... they are using encoders at X and Y carriages that sense the motion and send the movement into the cruise controller circuit that then send command to the sewing machine to regulate the stitch..These controllers are normally plugged into the sewing machine Padle controll port..

Now the X/Y carriage can be controlled with the help of Mach3, but the problem is How to control the equal length of stitch?..

How can we control the stitch length with Mach3?..Any ideas and solutions will be highly appreciated...


You can see the professional cruise controller here

http://www.quilterscruisecontrol.com/
BUT I NEED SIMPLE LOW COST controller for this purpose..Is thier anybody who can help me in this...Just give me an idea so that i can start..

(I also have an idea to attach a AC motor to the wheel of sewing machine to get the control of stitch via arduino only...)

Thanks

PS:
Many of us can make a low-cost open source open hardware quilting machine controler an d hardware and can gift it to relatives and especially the womens...
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: Sage on December 10, 2009, 01:51:33 PM
I have no idea how Mach turn works but it seems to be able to adjust the spindle speed of a lathe in relation to the X/Y feed rates to regulate cutting surface feet per minute. Could the spindle speed signal from mach turn be used to control the sewing machine motor speed or am I way off base here.

Sage

Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: koko76 on December 10, 2009, 03:51:02 PM
Hi to all great minds:)
I want to make a low-cost Stitch Regulator for a quilting machine for my Wife... I will place the quilting machine on X and Y carriages and this will move the whole quilting machine in X/Y direction.. The X and Y carriages will be controlled by stepper motor by the computer...

Now I have search on the internet and found many cruise controller for sewing machine..The purpose of those controllers is to give the equal length of stitch at different speeds of carriages... they are using encoders at X and Y carriages that sense the motion and send the movement into the cruise controller circuit that then send command to the sewing machine to regulate the stitch..These controllers are normally plugged into the sewing machine Padle controll port..

Now the X/Y carriage can be controlled with the help of Mach3, but the problem is How to control the equal length of stitch?..

How can we control the stitch length with Mach3?..Any ideas and solutions will be highly appreciated...


You can see the professional cruise controller here

http://www.quilterscruisecontrol.com/
BUT I NEED SIMPLE LOW COST controller for this purpose..Is thier anybody who can help me in this...Just give me an idea so that i can start..

(I also have an idea to attach a AC motor to the wheel of sewing machine to get the control of stitch via arduino only...)

Thanks

PS:
Many of us can make a low-cost open source open hardware quilting machine controler an d hardware and can gift it to relatives and especially the womens...

I'll think some more, but one thing that comes to mind is using an index pulse from the cam that drives the needle up and down, and then using that to regulate the speed of the motor.  You would want to make sure that for every unit of distance traveled that one pulse was generated.  If you have a machine that can feed constantly in X and Y at the speeds you need you should be fine.  I think the problem sounds a whole lot more complex than it is in theory.  Now getting the motors to move the way you want them in practice may be a bit more tricky ;)
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 10, 2009, 10:47:56 PM
Dear Sage and Koko:) Thanks for reply..

Sage thats a great idea, but unfortunatly we are making straight designs..Just think that we have a vector and we generated a PROFILE toolpath and made a Gcode File....This Gcode file can't work in MachTurn..We have to use MachMill..:(

Just think of that, If it is possible to get the real time FRO readings for each X and Y movement then It is possible to regulate the stitch... Consider we dry run (Simulate) the programm in Mach3 and we somehow collect the real FRO (compensating acceleration/velocity) and we some how put the real FRO between each X/Y carriage..

Simply think like that we are generating another Gcode file out of Mach3 that will include Real FRO reading in between each X/Y gcode..just like that

G01 X0 Y0
F20
G01 X1 Y2
F23

...
...
..
 etc

If I get the above code from the simulation run of Mach3 in a text file..I then can formulate and make a sketch for ARDUINO programmer to seperatly control the spindle of sewing machine ( Wheel) to get the equal length of stitch.

This FRO reading can then be Parse and calculated for regulating the length of stitch...

Regards
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: koko76 on December 11, 2009, 08:34:01 AM
IMHO you are getting confused and over complicating the situation.  Nothing needs to be taken out of Mach3, and FRO is feed rate override, which is not a useful quantity in this case.
Mach3 has facilities to sync one thing to another such as syncing carriage motion to the spindle when threading on a lathe. 
Mach3 is a trajectory planner/motion controller, not a generator for G code.  You feed it toolpaths and it syncs the relevant axis, no need to reinvent the wheel here.
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 11, 2009, 08:42:01 AM
Thanks KoKo..You are right i am using Mach3 for last 7 years... I know its a great powerful controller..but can you explain please How can we Sync the sewing machine needle with the carriage..Kindly give me a hint with respect to Mach3:)

Thanks for posting and enlighten us..
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 11, 2009, 08:45:48 AM
KoKo... To make the imagination more simple, suppose we install a stepper motor with timing belt on sewing machine hand wheel... Now suppose that One complete turn of Machine wheel gives you One Stitch... Now as the two stepper motors X/Y moves (Keeping the acceleration/deceleration in mind)How can we sync the machine wheel motor..so that the stitch length remains same..

Thanks
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: koko76 on December 11, 2009, 09:13:54 AM
As  I already pointed out, the operation is similar to a lathe while threading.  You count your index pulses from the "spindle"  and sync the feed of the two axis to that, just like cutting threads.  Alternately you could set up the sewing machine spindle as an A axis, and code accordingly, but that sounds like a programming nightmare to me. 
If I were to do this, I would opt for the first one, as it's going to be more practical.  If you want me to tell you how to set up Mach3 specifically I'm sorry I can't help you there, you'll have to do some reading on your own, the Mach3 Manual is excellent.  First determine your axis of motion and work backward from there. 
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 11, 2009, 09:15:27 AM
KoKo..Thanks for your effective feedback..I will look into the matter in  more detail..:)
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: HimyKabibble on December 11, 2009, 11:48:03 AM
If I'm understanding the problem correctly, you want to be able to program a path for Mach3 to follow, but the stitch rate has to track the velocity along that path, so you get a consistent stitch length, right?  If so, with encoders on both axes, it's a simple matter to combine the encoders to generate a single overal velocity signal.  You can use that to feed an "index" signal into the Mach3 spindle speed sensor input, and use the spindle output to drive the stiching motor.  Then you have the spindle PID to do the tracking for you.

Regards,
Ray L.
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 11, 2009, 02:11:04 PM
Hi Ray...You are a genius ..This is what i want to do...I thought it is not possible with Mach3 because of my ignorance to the knowledge of encoders... I was thinking to control the X/Y carriage with Mach3 and the spindle i.e. Motor with Arduino Microcontroller...
But now i dropped my idea to control the spindle with Arduino,its a bit complicated..Now i want to control the whole system with Mach3 alone..Ray CAN YOu help me in this HOW CAN I DO IT IN MACH3..Kindly give me some step by step method/Hints so that i can do this..Please
Following is my thread on Arduino Forum
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1260432183/0#3

But i was stuck into that problem and my mind is not working :( I am at the totally dead point and YOU came in the form of LIGHT RAY..thanks
I was also thinking on the same and i made some pseudocode for Arduino

(http://www.talkshopbot.com/forum/messages/2/49125.jpg)

Consider we have two potentiometer at both carriage X and Y.
consider both Pots divided into 0~5V ( corresponding PWM 0~255) we can map..

To get the value of Hyp. of triangle the pseudocode..


//Initialization of variables

hyp=0
Old_PWM_A=0
New_PWM_A=0
Old_PWM_B=0
New_PWM_B=0
Constant_RPM_Wheel= 5  //lets suppose this is initial rough value
//This value will later fine tuned, but for the time now consider the  //sewing machine Paddle is pressed at this when 'hyp=0' or there is //no movement in carriage.

/* When the Machine carriage will start movement (manual or Computer controlled) we will convert the Previous New_PWM values into Old_PWM values */

New_PWM_A= Some value we will get when Pot. change value
Old_PWM_A= previously stored New_PWM_value at A
New_PWM_B=Some value we will get when Pot. change value
Old_PWM_B= previously stored New_PWM_value at B

Now calculating the value of 'hyp' variable and put some DELAY
hyp= SQRT(Sqr(New_PWM_A-Old_PWM_A)+sqr(New_PWM_B-Old_PWM_B))

This hyp value will be scaled or Mapped
If this hyp!=0 then we can run another DC motor that will press the paddle foot with simple mechanism.

----------------------------------------------------------
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: Overloaded on December 11, 2009, 03:46:35 PM
How about this.
Attach a rotary encoder to the main rotating component of the sewing machine, configure the encoder to Mach as a pendant MPG and run the G-code in Shuttle Mode by simply pressing the treadle to control the speed.
Maybe ?
Not too difficult to try.
Just guessin',
RC
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: koko76 on December 11, 2009, 04:51:11 PM
How about this.
Attach a rotary encoder to the main rotating component of the sewing machine, configure the encoder to Mach as a pendant MPG and run the G-code in Shuttle Mode by simply pressing the treadle to control the speed.
Maybe ?
Not too difficult to try.
Just guessin',
RC
Now that's the simple solution I was trying to think of!  The new AMT encoders that are out there would be ideal, as you can vary the number of pulses per rev, making it easier to sync up the two.
Makes a whole lot of sense from a practical usage standpoint too, sewing people are used to pushing the pedal to make things go, not clicking "cycle start".  Plus when you stop the pedal, motion stops. 
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 11, 2009, 11:33:02 PM
Hi RC and Koko again:)

Thanks for brainstorming... Is it possible to complete automation of the system without human intervention...I didn't used the pendant stuff nor i ran my machine ever on shuttle mode..but i will study it too..Last night i studied Mach3Turn manual and Mach3manual but i find no clue How can we synchronise the two inputs from X/Y carriages encoder to get a single Velocity vector suggested by RAY..

However when i studied about MPG pendant and Shuttle pro i found that this will again require a human to stand by the machine and it will be difficult for a human to control the regulaerity of stitch length..Am I right? Somewhere at CNC Zone i studied about the Pendant and Shuttle Pro capability of Mach3

I really like this one. Run a program, during the run press the Shuttle
Button. The program will ramp to a stop (Deceleration time may be set int he
config/state screen). Now turn your MPG, the tool will move with your
turning of the wheel and execute the program slowly. Once your past the
feature you were nervous about, hit the shuttle button again and the program
will ramp back up to speed and continue. You may only go forward, but I did
allow you to turn the wheel in either direction just in case your right hand
gets tired playing with this feature. (It is VERY cool, I can see why this
is popular, and have no doubt it will be popular in Mach3...).
Whatever JOG mode you are in will switch to MPG mode when you press
shuttle, but it will revert back to what you had selected when you exit
shuttle mode. Please let me know what you think of not only the way it
works, but how well it works for you. Small tweaking may be necessary on my
part. (Though my mill and I love it.. :) )"


If i use Pendant for Mach and run it in shuttle mode, then If i have to use my hand to control the speed at each bend/corner of the design Gcode then it will be difficult to automate ...

I will be happy if you all can help me in this matter.. I have started the making of machine and it will take less than a week to be opera
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: HimyKabibble on December 11, 2009, 11:47:46 PM
OEM DRO 813 gives the blended velocity, which should be what you need.  Depending on what kind of update rate you need, you might be able to use a VB macropump to read that (update rate would be about 10X/second in Mach3 v3, and 20X/second in v4), and adjust the Spindle Speed Over-ride (OEM DRO 74) to modulate the spindle speed output to control the stitch rate.  If the update rate is too slow, you'd have to either move it into a brain, or a plug-in.  Under v4, plug-ins will be pretty easy to write.

Regards,
Ray L.
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 12, 2009, 12:02:22 AM
Ray Thanks for coming back and insight... I will difinitly study all that stuff i never did before and implement for this purpose..However with your help it seems not difficult... I hope you will keep brain storming and will guide all of us to the path of success..

Best Regards
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: HimyKabibble on December 12, 2009, 12:11:06 AM
In fact, if you used a brain to scale the blended velocity, and feed it back into the SSO, that might just do what you need with almost no effort.

Regards,
Ray L.
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 12, 2009, 02:19:40 AM
Dear Ray,
Kindly guide me what Hardware i shall require?.. and what is SSO?.. Also please tell me Can i use ARDUINO in this project...
Following is Arduino Specification...
http://arduino.cc/en/Guide/Introduction

It can drive Servo, Stepper and DC Motor ..A good amount of Analog input Pin/and Out put pins..It also has digital input output pins..
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: koko76 on December 12, 2009, 10:29:40 AM
Hi RC and Koko again:)

Thanks for brainstorming... Is it possible to complete automation of the system without human intervention...I didn't used the pendant stuff nor i ran my machine ever on shuttle mode..but i will study it too..Last night i studied Mach3Turn manual and Mach3manual but i find no clue How can we synchronise the two inputs from X/Y carriages encoder to get a single Velocity vector suggested by RAY..

However when i studied about MPG pendant and Shuttle pro i found that this will again require a human to stand by the machine and it will be difficult for a human to control the regulaerity of stitch length..Am I right? Somewhere at CNC Zone i studied about the Pendant and Shuttle Pro capability of Mach3

I really like this one. Run a program, during the run press the Shuttle
Button. The program will ramp to a stop (Deceleration time may be set int he
config/state screen). Now turn your MPG, the tool will move with your
turning of the wheel and execute the program slowly. Once your past the
feature you were nervous about, hit the shuttle button again and the program
will ramp back up to speed and continue. You may only go forward, but I did
allow you to turn the wheel in either direction just in case your right hand
gets tired playing with this feature. (It is VERY cool, I can see why this
is popular, and have no doubt it will be popular in Mach3...).
Whatever JOG mode you are in will switch to MPG mode when you press
shuttle, but it will revert back to what you had selected when you exit
shuttle mode. Please let me know what you think of not only the way it
works, but how well it works for you. Small tweaking may be necessary on my
part. (Though my mill and I love it.. :) )"


If i use Pendant for Mach and run it in shuttle mode, then If i have to use my hand to control the speed at each bend/corner of the design Gcode then it will be difficult to automate ...

I will be happy if you all can help me in this matter.. I have started the making of machine and it will take less than a week to be opera
No, the human does not control the stitch length in this scenario, the human ONLY controls the speed at which the program runs via the foot pedal.  Mach3 waits for the encoder counts to go by, and moves the X and Y accordingly, that is what shuttle mode does.  "Stitch length" is a function of the velocity of the motor used for the sewing machine.  If you track it's motion and sync the table to that you have a controlled length.
Title: Re: Idea for CNC Mach controlled Quilting Machine (No costly stitch regulator)
Post by: khalid on December 13, 2009, 01:47:24 AM
KOKO..Thank you for your feedback on this...

Now what i understand is to install an ENCODER ( can i use encoder from a Mouse) on sewing Machine Wheel .. Now I just want some more HELP.. As RC posted his comments
"configure the encoder to Mach as a pendant MPG and run the G-code in Shuttle Mode by simply pressing the treadle to control the speed"

I have few questions:
1- How many encoders are required? Where the wires from  the  encoder will be connected to?..Can i use Breakoutboard to connect the wires?
3- How can I configure the encoder to Mach as a pendant MPG?
4- Do I need EXTERNAL HARDWARE for MPG i.e.Knob or I can use the Mach3 MPG ( software based)..