#linuxcnc Logs

Sep 12 2023

#linuxcnc Calendar

12:05 AM -!- #linuxcnc mode set to +vvv by platinum.libera.chat
12:24 AM -!- #linuxcnc mode set to +v by ChanServ
01:01 AM solarwind: lol
01:01 AM solarwind: I have my stepper motor spinning at 6,000 RPM
01:02 AM solarwind: dumb open loop drive, square wave to the coils
01:02 AM solarwind: It's a NEMA23
01:32 AM solarwind: I can push it well past 8000 RPM
01:32 AM solarwind: all about the field oriented control now
01:33 AM solarwind: nothing inherent about steppers being "slow", all about how you drive them
01:33 AM XXCoder: can it even turn under pressure of your fingers
01:33 AM solarwind: the insides aren't balanced to those speeds
01:33 AM solarwind: XXCoder easily
01:33 AM solarwind: it has way more torque than "conventional wisdom" would have you believe
01:33 AM solarwind: it's field oriented control
01:34 AM solarwind: although I'm running it at 80V to fight the inductance
01:34 AM solarwind: it's meant to run more at 20V
01:34 AM solarwind: It's very worthwhile making high end drivers for steppers based on field oriented control
01:35 AM solarwind: These things are cheap and you can buy them everywhere and since they're BLDC, they're inherently _very_ efficient
01:36 AM solarwind: All those pole pairs give it a big low speed torque advantage for sure though
01:37 AM solarwind: Going to build a dyno this month to measure small motor torque
01:40 AM XXCoder: if its doable, wonder if you can build drivers for those
01:40 AM solarwind: Of course it's doable
01:40 AM solarwind: it's all about the math
01:41 AM solarwind: SimpleFOC already proved it
01:41 AM solarwind: now I just have to add in the feedback code and send them a pull request
01:42 AM solarwind: Already at 1,500 RPM I can't stop it with my fingers with the shaft wrapped with some paper towel so I don't hurt my fingers
01:43 AM solarwind: The inductance is a very important property
01:43 AM solarwind: the lower you make the inductance, the easier it is to get high torque at high RPM
01:43 AM solarwind: or just raise the voltage up to like 200V
01:44 AM solarwind: I can see the current waveform on my oscilloscope
01:44 AM solarwind: as soon as it spins up, current drops to < 100mA
01:44 AM solarwind: but holding current is like 2A
01:46 AM rmu: FOC isn't really "square waves to the coils"
01:46 AM solarwind: took my sleep meds
01:46 AM solarwind: that was first test
01:47 AM solarwind: the second test I gotg it to 8000+ RPM]
01:47 AM solarwind: going to pass out any minute now
01:47 AM solarwind: but the technique most certainly works
01:47 AM jpa-: mechaduino did something similar, it just suffered from quite poor firmware and was noisy
01:47 AM solarwind: sorry for messy description, semi druggged up
01:48 AM solarwind: will post more when I'm less drugged
01:48 AM solarwind: Efficiency is also well above 90%
01:48 AM solarwind: can use this to power even a simple fan motor
01:48 AM rmu: a stepper motor is "just" a (usually 2 phase) permanent magnet synchronous motor with a high number of poles, so no secret you can use similar methods to drive them
01:48 AM solarwind: rmu EXACTLY
01:48 AM solarwind: it's a switched reluctance motor technically,
01:48 AM solarwind: well hybrid (permanent magent + switched reluctance)
01:49 AM solarwind: but that all means very high potential for high efficiency
01:49 AM solarwind: and you can drive it with the same FOC techniques
01:50 AM rmu: for proper FOC you will want encoder probably. i guess most "plug and drive" closed loop stepper motors are using FOC
01:51 AM solarwind: you NEED encoder for FOC
01:51 AM solarwind: and no they're not
01:51 AM jpa-: either FOC or DTC, i've found DTC gives less audible noise
01:52 AM solarwind: what's dtc?
01:52 AM solarwind: but the closed loop stepper kits are not FOC
01:52 AM rmu: hmm. you could "guess" position from back-emf and bunch of math
01:52 AM jpa-: instead of fixed-frequency PWM you do on-off control at higher frequency
01:52 AM jpa-: "direct torque control"
01:52 AM solarwind: ah
01:52 AM solarwind: I always use encoder anyway
01:53 AM jpa-: what are https://www.omc-stepperonline.com/nema-8-closed-loop-stepper-motor-0-015nm-2-12oz-in-encoder-1000ppr-4000cpr-8hs12-0604d-e1000 and similar using if not FOC?
01:53 AM solarwind: will answer in the morning
01:53 AM solarwind: 3 drugs killing me right now
01:53 AM jpa-: because at the point when you are driving a stepper based on encoder, it becomes FOC almost automatically
01:54 AM solarwind: have to sleep
01:54 AM solarwind: nop
01:54 AM solarwind: jpa- not at all
01:54 AM solarwind: absolutely no no
01:54 AM solarwind: FOC is not closed loop control
01:54 AM solarwind: talk in the morning, good night
01:54 AM solarwind: I probed all their signals with my scopes and what not
01:54 AM solarwind: talk in the morning, good night
01:59 AM rmu: "sensorless FOC" will find a bunch of documents explaining the principle but it is rather math heavy so caveat emptor
02:01 AM rmu: https://www.infineon.com/dgdl/Infineon-TLE987x-Sensorless-Field-Oriented-Control-ApplicationNotes-v01_00-EN.pdf?fileId=5546d46270c4f93e0170f23529817afa
02:01 AM solarwind: yes I'm aware
02:01 AM solarwind: and it's not perfect
02:01 AM solarwind: whereas an optical encoder always give you exact information
02:07 AM rmu: that was just for illustration. i'm no motor control phd.
02:29 AM solarwind: Yup confirmed, I can see increasing the voltage increases the current ramp up in the coils
02:29 AM solarwind: high torque at high RPM
02:29 AM solarwind: I can maintain constant torque through the RPM range
02:33 AM Deejay: moin
02:59 AM travis_farmer: Morning :-)
03:08 AM Deejay: hey travis
03:09 AM travis_farmer: howdy
04:18 AM rigid: did anyone ever try blender for CAM? https://github.com/vilemduha/blendercam looks usable
04:19 AM Tom_itx: i'm sure someone has
04:19 AM Tom_itx is now known as Tom_L
04:21 AM rigid: So if this someone reads this, they should comment now or forever hold their peace :-P
04:23 AM Tom_L: 'artistic CAM'
04:28 AM rigid: Tom_L: what about it? Never milled a toilet paper holder with nice ornaments for a loved one?
04:34 AM Scopeuk: or carved a tree or similar into a large piece of wood to back fill with semi translucent resin
05:02 AM -!- #linuxcnc mode set to +v by ChanServ
05:20 AM -!- #linuxcnc mode set to +v by ChanServ
05:27 AM JT-Cave: morning
06:21 AM JT-Cave: raining here
06:21 AM travis_farmer: same here
06:22 AM Tom_L: just stopped here
06:23 AM Tom_L: 59F
06:24 AM travis_farmer: 62F/69F
06:39 AM JT-Cave: rooster just crowed
07:41 AM * JT-Cave starts his chicken day
08:29 AM JT-Cave: Tom_L, you can now add more MDI commands...
08:39 AM JT-Cave: and I bumped the version
10:47 AM Tom_L: ok i'll build here in a bit
10:57 AM Tom_L: mmm, mine keeps coming up with an 08/24 build date even after cloning
11:00 AM Tom_L: did you push that?
11:01 AM Tom_L: it does show the add MDI command bar
11:04 AM Tom_L: and reads the saved ones in
11:05 AM Tom_L: JT-Cave, i'll wait for the ver update
11:08 AM Tom_L: suggestion: in "Options" add a place to add tools to the tool table and optionally rename the tool.tbl
11:25 AM Tom_L: or map to 'tooledit' which would be fairly easy i think
11:26 AM Tom_L: you'd have to make sure it was installed
11:28 AM travis_farmer: question about G10 L2, does P0 set for whatever the active coordinate system is? so if i touch off for work zero, then probe for angle and run G10 L2 P0 R... then it will apply the angle to whatever coordinate system i zeroed work to?
11:30 AM travis_farmer: going by http://linuxcnc.org/docs/2.9/html/gcode/g-code.html#gcode:g10-l2 i just wasn't sure if that's what coordinate "Active" meant
11:30 AM Tom_L: i use G10 L20 X0 for example
11:31 AM Tom_L: ... G10 L20 P1 X0
11:32 AM travis_farmer: this is G10 L2 though
11:32 AM Tom_L: i get that
11:32 AM Tom_L: just saying i use that as a MDI_COMMAND to set the fixture offset on mine
11:33 AM travis_farmer: ok
11:34 AM Tom_L: G10 L20 is similar to G10 L2 except that instead of setting the offset/entry to the given value, it is set to a calculated value that makes the current coordinates become the given value.
11:36 AM travis_farmer: i see that. this is for a macro that assigns rotation based on the probed difference, in case i can't get the piece perfect on the table
11:41 AM travis_farmer: so first i call this at one point on X https://github.com/travis-farmer/linuxcnc/blob/master/nc_files/align-xa.ngc then i move down a bit and call https://github.com/travis-farmer/linuxcnc/blob/master/nc_files/align-xb.ngc i am just wondering if i need to set P0 to a coordnat system, or if P0 is fine for whatever avtive coordnates
11:41 AM Tom_L: P0 is the current active work system afik
11:42 AM travis_farmer: ok, thank you. that's what i needed to confirm :-)
11:42 AM Tom_L: i use P1 P2 etc so i'm sure which one is getting saved to no matter which one is active
11:42 AM travis_farmer: ok
11:42 AM Tom_L: G54 is default
11:42 AM Tom_L: P0
11:42 AM Tom_L: on start
11:42 AM Tom_L: or P1 for that matter
11:43 AM travis_farmer: but if i have already zeroed work, then the system "should" be in G54, right?
11:43 AM Tom_L: like i said, i use P1 P2 etc to be sure
11:43 AM travis_farmer: ok, thank you :-)
11:44 AM Tom_L: and i've had multiple offsets in one program several times
11:44 AM travis_farmer: sounds confusing ;-)
11:44 AM Tom_L: run Position 1 using G54 flip the part to another fixture and run Position2 on G55 etc
11:45 AM travis_farmer: i guess i haven't run anything that complex yet, but i may run into it in the future...
11:45 AM Tom_L: no, this is confusing: http://tom-itx.no-ip.biz:81/~webpage/cnc/cincinnati/Cincinnati_7.jpg
11:46 AM travis_farmer: my machine is not even close to that much room ;-)
11:46 AM Tom_L: 3 spindle
11:47 AM JT-Shop: nap time
11:47 AM Tom_L: JT-Shop, you get my notes?
11:47 AM travis_farmer: enjoy, JT :-)
11:47 AM JT-Shop: just reading them
11:47 AM JT-Shop: gotta go to Foxy after my nap
11:48 AM Tom_L: the version didn't update here
11:48 AM Tom_L: better be careful, he'll put you to work
11:51 AM JT-Cave: <Tom_L> mmm, mine keeps coming up with an 08/24 build date even after cloning
11:51 AM JT-Cave: <Tom_L> did you push that?
11:51 AM travis_farmer: hmmm, that reminds me... gotta setup my sisters TV for her...
11:51 AM JT-Cave: nope I forgot... done now
11:53 AM JT-Cave: why would you want to rename tool.tbl?
11:59 AM Tom_L: i call mine linuxcnc.tbl but it's not necessary to rename it
11:59 AM Tom_L: or something like that.. i forget exactly
12:01 PM Tom_L: renaming wouldn't be necessary really
12:01 PM JT-Cave: seems tool.tbl is more descriptive of what it is
12:01 PM Tom_L: well i'm special :)
12:01 PM JT-Cave: anyhow nap time here
12:01 PM JT-Cave: :)
12:01 PM Tom_L: tool.tbl is fine
12:01 PM Tom_L: off to the store then i'll build
12:37 PM Tom_L: JT-Cave, PR #26 ready
12:39 PM Tom_L: i like the change to MDI_COMMAND
12:43 PM JT-Shop: thanks
12:55 PM travis_farmer: Numbered parameters: after a tool change, am i correct that #5403 will contain the tool length from the tool table, for Z?
12:57 PM travis_farmer: http://linuxcnc.org/docs/html/gcode/overview.html#sub:numbered-parameters
02:08 PM JT-Shop: for the currently loaded tool... hmm it says offsets so better to check with a debug
02:09 PM travis_farmer: ok, will do :-)
02:09 PM JT-Shop: do you know how to do a debug?
02:10 PM travis_farmer: yes
02:10 PM JT-Shop: ok
02:10 PM travis_farmer: (DEBUG, value = %d#<some_value>)
02:43 PM rigid: is there a way to control higher-level stuff above gcode? like "if this switch pressed, feed this gcode file. otherwise that."
02:43 PM rigid: or rather, what would be the best-practice way?
02:43 PM rigid: i could think of a few ways...
02:44 PM rigid: but I probably missed the obvious one :)
02:46 PM JT-Shop: python interface
02:59 PM Tom_L: could that be mapped to a MDI_COMMAND to call the files (they would need to be hardcoded names)
03:00 PM JT-Shop: yup
03:00 PM jpa-: you can also check switch value and use call in a gcode file
03:00 PM JT-Shop: with a digital input
03:00 PM Tom_L: might be better than the mdi thing
03:03 PM rigid: thank you! I haven't considered MDI
03:05 PM jpa-: there is also https://linuxcnc.org/docs/html/man/man1/axis-remote.1.html
03:08 PM rigid: yeah, and halshow etc. i guess for simple stuff, shell scripts might be the best compromise
03:08 PM rigid: ehrm, halcmd i mean
03:55 PM t4nk_freenode is now known as t4nk_fn
07:28 PM -!- #linuxcnc mode set to +v by ChanServ
07:28 PM -!- #linuxcnc mode set to +v by ChanServ
07:35 PM -!- #linuxcnc mode set to +v by ChanServ
09:25 PM XXCoder: https://www.youtube.com/watch?v=MfqQQu5E-Oc
09:25 PM XXCoder: nice
10:31 PM Rhine_Labs: Just in California Right to Repair Passes Assembly 50-0 on 09/12/2023 on to the Governor for a Signature. https://www.youtube.com/watch?v=bbB_nR7EoAQ
10:34 PM roycroft: the legal challenge will be filed before the ink from the governor's signature dries
10:36 PM Rhine_Labs: Apple backed it.
10:39 PM roycroft: but elon musk didn't, i would wager
10:43 PM roycroft: it will be interesting to see how the google case toes
10:43 PM roycroft: goes
10:47 PM Rhine_Labs: https://leginfo.legislature.ca.gov/faces/billCompareClient.xhtml?bill_id=202320240SB244&showamends=false
10:49 PM XXCoder: $50 to $99 only. meh
10:49 PM XXCoder: ah theres > $100 with changes
10:49 PM Rhine_Labs: Autos are exempt
10:50 PM roycroft: it's a start
10:50 PM Rhine_Labs: 3 Years for 50-99 and 7 years 100+
10:51 PM roycroft: the right to repair movement has been working for about 50 years to get something even as basic as this
10:52 PM roycroft: it's been a really tough sell in this country
10:53 PM XXCoder: yeah. autos being exempt sucks
10:55 PM Rhine_Labs: Yea, seem each state passing metter and better, NY was gutted by gov., Minnesota was beat down, Ca is way better.
10:55 PM Rhine_Labs: Soon a state (Texas) will remove the July 2021
10:56 PM XXCoder: remove date?
10:56 PM Rhine_Labs: Yea, products made available and manufactured after July 2021
10:57 PM XXCoder: whts premise on that law making products made after that date illegal
10:59 PM Rhine_Labs: Mans if your device was not mfg after 2021 they do not need to make parts of schematics available.
11:00 PM XXCoder: ah so same rights but it dont ext4end all way back but just to july 2021?
11:08 PM roycroft: back dating is a much greater challenge
11:10 PM Rhine_Labs: Yea, will get there there are a few states that dont have the 2021 in their bills.
11:11 PM Rhine_Labs: These billks reach way further then the state they are passed in.
11:41 PM XXCoder: well certainly will be interesting to see what happens.