Requests for help: Gcode cam follower/ tangential knife control.
-
@Kulitorum here.
I tried to use G2 and G3 but they are not interpolated very nice in current firmware and pausing during a G2 or G3 messes up and the printhead moves in random directions. I talked to dc42 about this, but I guess the current use of G2 and G3 is too low for him to spend time with it.
So I use very short lines of a max of 5 mm. With good jerk and acceleration parameters, that moves smoothly and allows me to pause a print at any time within 25mm, in regards to 4-5 commands being buffered in firmware.
Your slicer should keep an eye on overflow (crossing 360 degrees) and if needed "rewind" the rotation back to 0 to untangle your wires.
Now watching thread, if you need more help. Unfortunatly I can't share my code.
Kulitorum
-
Hello! Wonderful to see you here. And thanks for any help you can give.
Can you post your jerk settings?
So you are using G1 commands for everything?
If so. Are you using U commands on a new line? Or are you just using them on the same line as the XY accordance? It seems that it depends on if its a cornner or not...Any thing i should look out for that you had trubble with would be greaty appreciated if you could note those here.
I would like to run at higher speeds, so i may have more trouble than you have had getting things to run smoth.
Again thanks for sharing what you can!
~Russ
-
Well, my machine is a lot larger then yours, so comparing acceleration and jerk settings don't really make much sense.
Yes, I use G1 for everything, and have the U coordinate together with my XY coordinates. Ofcause my U coordinate is a tangent to a half vector between the line before and the line after the vertex, so you need to do some calculation there. You will need to have the coords XYU on the same line to get anything smooth. Increase your jerk until you start loosing steps, then increase your power on each motor until they reach 50-60c and lower the jerk until it don't fail no more.
Hope this helps. If you need more help, setup remote control of your computer and a webcam, and I can control your computer and we can adjust it together over skype
Kulitorum
-
@kulitorum said in Requests for help: Gcode cam follower/ tangential knife control.:
I tried to use G2 and G3 but they are not interpolated very nice in current firmware and pausing during a G2 or G3 messes up and the printhead moves in random directions. I talked to dc42 about this, but I guess the current use of G2 and G3 is too low for him to spend time with it.
Have you tried using G2/G3 with recent firmware versions? If you still have problems with G2/G3 when using firmware 2.02RC2, please let me know what they are.
-
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
Can you explain this rounding error.
What is the maximum amount of numbers after the decimal place i can have for the axis?The calculations are done using 32-bit floating point values. See https://www.exploringbinary.com/decimal-precision-of-binary-floating-point-numbers/ for info about the precision.
-
Quite a bit has been said since the original question... still, if it helps:
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
@danal said in Requests for help: Gcode cam follower/ tangential knife control.:
Russ,
Given David's answer that RepRap does not distinguish axis, and given that G-Code (and RepRap) ensure that all axis in a given single move reach their individual endpoints in sync, this all adds up to doing EXACTLY what you want for a coil winder.
That is, if the current XYZ position of the "control point" is somwhere around a coil, ready to make the next coil, and the U axis is "pointed aft" to correctly lay the wire, then a G2 arc move that specifies a next XY 1/4 of the way around the coil, and a U that specifies 90 degrees from where U starts (in the correct positive or negative direction)... that move will smoothly rotate U as XY accelerate, move, deccelerate.
Personally, I'd do 1/4 arcs while debugging so that you can "see" what is happening better.... but once you've confirmed how this all should work, and "good" g-code, then G2 moves that do full circles, one entire coil per G2 line, should be easy.
This is all very hard to put into words... does it make sense?
p.s. I'd still recommend you define your rotational axis as A (not U). This is a widespread standard for extra axis in CNC. It also MIGHT make the Web interface display it better.
Hi Danal,
Thanks for all your feed back,
what your saying makes sense. but let me get something correct.
If i send "G2 X90.6 Y13.8 I5 J10 U45"
David is saying that as the arc move is happening, The U will slowly move around the arc. and the motion will be fluid on the U along the direction of the arc?
Yes, that is the correct fundamental idea.
however, doing it point to point i will need to add the U on the line before the move so i know its going in the right direction. correct?
I would phrase it more as "U is needed on every line". Same idea.
-
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
Also, are you able to make a simple script program that has an in interface for such a G code generator?
Probably. Let me "check assumptions" on my end. Inputs to such a generator for "cylindrical" coil wraps would need to be:
- Core diameter (what the wire would be wrapped around, even if removed post wrapping).
- Core "length" or "height". In other words, first wrap at z=0 and last wrap at Z=this parameter.
- Wire diameter
- Number of layers
- Packing - even or offset (see below)
- Fudge factor for packing density. Could be called "tightness".
What else?
Even Packing:
OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO
Offset Packing(would really be half spaced, characters will not show that properly)
OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO
And, is there a need for "non cylindrical" winds? Donut/Torus or similar? Those are probably beyond a simple script. Examples:
OO OO OOO OOO OOOOO OOOOO OOOOOO OOOOOO OOOOO OOOOO OOOO OOOO OO OO
OO OO OOO OOO OOOO OOOO OOO OOO OOOO OOOO OOO OOO OO OO
-
Thanks for the feedback everyone. I will reply to comments sooner than later I hope.
In the meantime I decided to use a stepper motor directly as my tool end. This mainly to reduce any backlash and confusion between how many steps per revolution Ect. Right now I'm using an unknown stepper motor with a very large gear reduction which I cannot tune correctly. (I also re built it for bipolar). It also has a tremendous amount of backlash in the gears and renders it almost useless for this application. It's also not fast enough so I decided to dig through my Box of steppers and I found these really nice point 9゚ steppers. I ended up drilling a hole down the center and I'm going to attach my tool end directly on the shaft. This is a nema 17 which is quite large and heavy, but this is to prove the concept it will work, and because it was free in my bin of parts.
Yeah that hole sucked to drill... but i got it!!
Here's a few photos
I'll post more later
Thanks
~Russ -
Ok, still haven't had time to sit down and respond to posts... will do shortly.
However i have managed to get this done.
A proper video will be posted on my main YT when its time...
~Russ
-
One step closer...
But still alot to do.
~Russ
-
@danal said in Requests for help: Gcode cam follower/ tangential knife control.:
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
Also, are you able to make a simple script program that has an in interface for such a G code generator?
Probably. Let me "check assumptions" on my end. Inputs to such a generator for "cylindrical" coil wraps would need to be:
- Core diameter (what the wire would be wrapped around, even if removed post wrapping).
- Core "length" or "height". In other words, first wrap at z=0 and last wrap at Z=this parameter.
- Wire diameter
- Number of layers
- Packing - even or offset (see below)
- Fudge factor for packing density. Could be called "tightness".
What else?
Even Packing:
OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO
Offset Packing(would really be half spaced, characters will not show that properly)
OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO
And, is there a need for "non cylindrical" winds? Donut/Torus or similar? Those are probably beyond a simple script. Examples:
OO OO OOO OOO OOOOO OOOOO OOOOOO OOOOOO OOOOO OOOOO OOOO OOOO OO OO
OO OO OOO OOO OOOO OOOO OOO OOO OOOO OOOO OOO OOO OO OO
I will sendyou a PM and descuss this further!!
Thanks
~Russ -
wow, that's all i have to say...
https://www.youtube.com/watch?v=yPXUmXTCtok
https://www.youtube.com/watch?v=aq7Zv-7jEf8
~Russ
-
-
47.5 AWG wire. about 1000 turns, 4.186 Kohms. That's a lot of resistance!
Its funny you cant even see the wire going in to the tool...
not to bad. got a bit of a slip there in the center.... more to tune still. also the roller play's a roll. Get it... ha,
on i'm slap happy...God Bless,
~Russ -
-
Nice! Anyone have any ideas of applications for flat coils? Wireless charging perhaps?
-
...yes, wireless charging coils. See https://uk.farnell.com/w/c/passive-components/inductors/charging-coils/prl/results?st=wireless+charging+coils.
-
Off the top of my head, besides wireless charging: VLF radio. Magnetic radio for underground (cave, tunnel, etc) to surface communication. With larger gauge and some spacing, bed heat for a delta or polar, or induction heating. Metal detector coil.
-
Hi @Russ-Gries ,
Fantastic topic.
So, you use Duet3d wifi with RepRapFirmware correct ?
What is your gcode generator /slicer ?
You create a script to run your gcode and change the values ? Do you have more information about your post processor ?
Thanks
-
Hello,
Just about everything is documented on this playlist. :
https://www.youtube.com/playlist?list=PLsiIKXpZfLKI-UXGFdXYS2groWniI-Eh5
If you want to know why i built it. Its to build this:
And test some theories...
~Russ