# Thread: CNC Winding Machine....How to?

1. ## CNC Winding Machine....How to?

Hallo!
first of all i have to apologize because most probably i'm writing this post in the wrong section....maybe...
i'm building a CNC winding machine, I already have experience with CNC router, i have some stepper and drivers so i wanted to use them.
the idea is very simple: one stepper rotates the bobin and another stepper moves continuosely the wire from one site to the other of the bobin, nothing difficult...seemed!
i tried to figure out this motion in g-code (independent move of two axis) but no way, i have no idea of how to do it in g-code, i don't even know if it is feasible.
Could someone advise some g-code for that? or in case g-code does not fit the purpouse, do you have any suggestion on how to solve the problem?
thanks a lot!!

2. It is easily accomplished with G-code. I will assume your bobbin rotation axis C and your guide axis Z. I will further assume one unit in the C axis is 1 rotation and 1 unit in the z axis is 1 mm. I will also assume your wire is 1mm diameter for this example.

So you want the C axis to rotate 1 unit for every 1 unit (1mm) of the Z axis. For 0.5mm wire you would want 2 C axis rotations per Z axis mm.

G-code like this:

G1Z10C10F100

This will simultaneously rotate the bobbin 10 turns and advance the guide 10 mm to get a nice laydown. Obviously you would increase these numbers to make the wrap wider and alter the ratio between the numbers to accomodate different wire sizes. Now you would have a similar line of G code to go back to the start:

Z0C0 Then Repeat for multiple wraps.

So for 4 layers of windings 10mm wide the gcode would be:

G0Z0C0
G1Z10C10F100
Z0C20
Z10C30
Z0C40

Hope this helps
Matt

3. Originally Posted by keebler303
It is easily accomplished with G-code. I will assume your bobbin rotation axis C and your guide axis Z. I will further assume one unit in the C axis is 1 rotation and 1 unit in the z axis is 1 mm. I will also assume your wire is 1mm diameter for this example.

So you want the C axis to rotate 1 unit for every 1 unit (1mm) of the Z axis. For 0.5mm wire you would want 2 C axis rotations per Z axis mm.

G-code like this:

G1Z10C10F100

This will simultaneously rotate the bobbin 10 turns and advance the guide 10 mm to get a nice laydown. Obviously you would increase these numbers to make the wrap wider and alter the ratio between the numbers to accomodate different wire sizes. Now you would have a similar line of G code to go back to the start:

Z0C0 Then Repeat for multiple wraps.

So for 4 layers of windings 10mm wide the gcode would be:

G0Z0C0
G1Z10C10F100
Z0C0
Z10C10
Z0C0

Hope this helps
Matt
thanks a lot Matt! of course this helps!! i have just one doubt: assuming that the C>0 means clockwise turning, when C is going back from 10 to 0 the bobing is turning backwards thus unwrapping the wire fom the bobin? am i wrong?
if so, this could be avoided like this:

G0Z0C0
G1Z10C10F100
Z0C20
Z10C30
Z0C40

but this way the bobin rotation wouldn't be continuous, there would be a zero speed point at the end of each row of the g-code, if so there would be an uneven tension of the wire and (most important) it would take ages to complete the winding considering that the number of coils is above 8.000.

4. tension shouldn't be managed that way IMO it should be through a friction device (to be determined based off of you roll of wire) kind of like a welder friction roller for feeding wire through.

5. Originally Posted by miljnor
tension shouldn't be managed that way IMO it should be through a friction device (to be determined based off of you roll of wire) kind of like a welder friction roller for feeding wire through.
It makes sense, but i still have the problem of speeding up the process...

6. isnt that controlled by spindle speed verses feed rate?

can't you just increase those parameters?

7. Originally Posted by miljnor
isnt that controlled by spindle speed verses feed rate?

can't you just increase those parameters?
OMG!!! you're right!! Mach3 can control the spindle as Step/Dir... and that's it!!! the rest it's just back an forth on one of the axis!

8. lol, Glad I could help.

9. Originally Posted by corcia
OMG!!! you're right!! Mach3 can control the spindle as Step/Dir... and that's it!!! the rest it's just back an forth on one of the axis!
my first thought was to setup the rotating stepper as say the Y axis, and the side to side as X, then you just need to "draw" a zigzag line

set it up so the length of one zig is one turn of the rotating axis

10. I would have thought this would be very easy on a CNC lathe.

If length of bobbin is 20 mm and wire is 1 mm and Z0. is start of first wrap:

G0 X(some number for clearance) Z0.
S(desired rotation RPM) M3
G1 Z-19. F1.
Z0.
Z-19.
Z0.
Z-19.
Z0.
(repeat as needed for desired number of layers)
M0

Can also be built into a loop or a macro or a sub call if needed.

11. Originally Posted by corcia
thanks a lot Matt! of course this helps!! i have just one doubt: assuming that the C>0 means clockwise turning, when C is going back from 10 to 0 the bobing is turning backwards thus unwrapping the wire fom the bobin? am i wrong?
if so, this could be avoided like this:

G0Z0C0
G1Z10C10F100
Z0C20
Z10C30
Z0C40

but this way the bobin rotation wouldn't be continuous, there would be a zero speed point at the end of each row of the g-code, if so there would be an uneven tension of the wire and (most important) it would take ages to complete the winding considering that the number of coils is above 8.000.
Of course you are correct, my mistake. The Z would go back and forth, the C would always be increasing. If you have "CV" mode enabled, it would not stop at the end, it would continue turning. Obviously you could bump up the feedrate to get to whatever speed you needed. I think your mechanical setup would be the limiting factor, far before mach ran out of steam. With a proper mechanical setup, you could wind the coils in a matter of seconds.

Matt

12. Originally Posted by txcncman
I would have thought this would be very easy on a CNC lathe.

If length of bobbin is 20 mm and wire is 1 mm and Z0. is start of first wrap:

G0 X(some number for clearance) Z0.
S(desired rotation RPM) M3
G1 Z-19. F1.
Z0.
Z-19.
Z0.
Z-19.
Z0.
(repeat as needed for desired number of layers)
M0

Can also be built into a loop or a macro or a sub call if needed.
I would think you would want to have the motion synchronized with the spindle rotation to prevent a mistake like a gap or an overlap due to the small error between commanded speed and actual. Maybe you could use some part of a threading cycle? I'm not real familiar with lathe G code.

Matt

Page 1 of 2 12 Last

### About CNCzone.com

We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

### Follow us on

Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.