#garfield Logs

Jan 16 2023

#garfield Calendar

07:50 AM aandrew: Tom_L: nice book, thank you!
11:55 AM rue_mohr: My DC stepper finished a 36 degree step in about 18.9ms. (end of roll)
11:55 AM rue_mohr: The reference stepper motor finished a 0.45 degree step in 22ms. (end of ring)
11:56 AM rue_mohr: the stepper dc servo never overshot, the stepper did
01:49 PM aandrew: I haven't been following too too closely; you've got an encoder on the shaft of a DC motor, and you're driving it 100% + or 100% - to make the encoder "value" == target value?
01:49 PM aandrew: (as opposed to traditional PID which would output an "analog" (really PWM'd) voltage to do the same?
02:08 PM rue_mohr: yup
02:08 PM rue_mohr: bang bang with stop prediction
02:09 PM aandrew: what heuristic do you use for the stop prediction?
02:12 PM rue_mohr: preconstructed velocity/stop distance table
02:12 PM rue_mohr: so far the undershoot is better than the plain old error of the stepper
02:14 PM aandrew: ohhhh, so you characterize it beforehand with something like "when it's been moving for x msec, it continues to move for y counts after I remove power" kind of thing
02:16 PM aandrew: so that takes into account not only the inertia of the rotor itself but also of the rest of the system too
02:24 PM rue_mohr: no, I count the time between the lines
02:24 PM rue_mohr: I dont convert it to a speed, I just leave it as the count, less processing
02:24 PM rue_mohr: I have a pseudo-velocity to stop-distance table
02:25 PM rue_mohr: as the position accumulates it watches what it would stop at, given the current velocty, when thats more than the target position, it puts the motor into reverse
02:26 PM rue_mohr: it keeps it into reverse until the first backwards tick on the encoder, at which point it turns the power off
02:26 PM rue_mohr: http://paste.debian.net/1267453/
02:27 PM rue_mohr: I have it to 1/10 rev steps for 3 rotations
02:27 PM rue_mohr: 2880 lines/rev
04:59 PM aandrew: oh not stop, reverse
04:59 PM aandrew: heh
04:59 PM aandrew: that's not a bang-bang control that's really rough on the thing, lol
05:09 PM aandrew: I wonder if you're also getting some torque spiking because you aren't shifting direction without going through a braking phase
05:10 PM aandrew: i.e. you go "10" -> "01", and that's two instructions so you have an instruction's worth of time where you have "00" or "11"
05:14 PM aandrew: it'd be interesting to see how many times you get errored data on the encoder
05:57 PM rue_mohr: the driver is a direction bit and a power bit
05:57 PM rue_mohr: I leave the power bit on and flip the direction
05:58 PM rue_mohr: the encoder is tracking great
05:58 PM rue_mohr: I found out its only 5us to read it
06:43 PM Tom_L: good morning
06:44 PM rue_shop2: haha
06:44 PM rue_shop2: why does 32 bit arduino not work on 64 bit system
06:45 PM Tom_L: the planets don't align
06:46 PM rue_shop2: how does the log4j thing work?
06:47 PM Tom_L: how does _what_ work?
06:47 PM rue_shop2: you didn't hear about log4j?
06:47 PM Tom_L: no
06:47 PM rue_shop2: huge security oops
06:47 PM rue_shop2: and everyone was using it
06:47 PM Tom_L: oh
06:48 PM rue_shop2: there was a mad panic to pull it out of everything
06:50 PM Tom_L: guess i was out of the loop on that one
06:51 PM rue_shop2: make sure nothing on your webserver is using log4j
06:51 PM Tom_L: i wouldn't have a clue
06:52 PM rue_shop2: I think if you search for log4j as a file
06:52 PM Tom_L: i'll let you break in and check it for me :)
06:52 PM rue_shop2: log4j/log4j/1.2.x
06:53 PM Tom_L: from root?
06:53 PM rue_shop2: no
06:53 PM rue_shop2: anywhere
06:54 PM rue_shop2: I think it was getting leveraged by the groups that go around encoding peoples drives and puting up a ransom for their data
06:55 PM Tom_L: i'd just unplug it
06:55 PM Tom_L: they'd not get much
06:55 PM rue_shop2: they dont take your dta
06:55 PM rue_shop2: they encrypt it
06:55 PM Tom_L: i know
06:55 PM rue_shop2: ye
06:58 PM rue_shop2: hah, I think I deleted the bootloader off this arduino
06:58 PM Tom_L: good you got a programmer
06:58 PM rue_shop2: yep
06:58 PM Tom_L: do mine still work?
06:58 PM rue_shop2: its funny, I never know if I do or dont on any of the arduinos anymore
06:58 PM Tom_L: i haven't touched one for a very long time
06:58 PM rue_shop2: yea, I prefer yours
06:59 PM Tom_L: you got more than one don't you?
06:59 PM Tom_L: i still got a few in a box somewhere
06:59 PM rue_shop2: yes, you sent another a while ago
07:00 PM Tom_L: and a sack full of those blue cases un touched
07:00 PM rue_shop2: their pretty specific application, not many projects are that small
07:01 PM Tom_L: i got some jtags for them somewhere
07:01 PM Tom_L: i forget what all i have left
07:01 PM rue_shop2: you did a lot of things
07:01 PM Tom_L: covid erased alot
07:02 PM rue_shop2: lots of people I know, said they couldn't remember anything even about their highschool days
07:02 PM rue_shop2: before covid
07:02 PM Tom_L: i could tell storries
07:02 PM rue_shop2: so I feel kinda special with all my memories
07:03 PM Tom_L: i forgot how to drive
07:03 PM Tom_L: i forgot how to do my job
07:03 PM Tom_L: slowly came back
07:04 PM rue_shop2: covid hit some harder than others
07:04 PM Tom_L: ok i should tackle cleaning up another config
07:09 PM rue_shop2: I have a lot more gear from the hospital I need to strip down
07:09 PM rue_shop2: ouch this station needs more ram
08:00 PM aandrew: you have like the most incredible tech sources
08:07 PM rue_shop2: just a few good ones
08:07 PM rue_shop2: I'm starting to get worried about a shop fire tho
08:08 PM rue_shop2: old age paranoia?
08:08 PM rue_shop2: wtf 74S288 in dram!?
10:16 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/NEW_MILL_SHOP_2.8.4/new_mill.hal
10:16 PM Tom_L: all prettied up
10:16 PM Tom_L: and best of all... it still works
10:16 PM rue_shop2: k
10:16 PM rue_shop2: so, what need to be done for spindle orient?
10:16 PM Tom_L: figure out why it doesn't work
10:17 PM Tom_L: A: the index needs set on startup
10:17 PM Tom_L: B: i don't know why the spindle isn't coming on with an M19
10:18 PM Tom_L: but all the signals are wired and the mill runs
10:18 PM Tom_L: but i'm likely missing one or so
10:20 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/NEW_MILL_ORIENT/new_mill.hal
10:20 PM Tom_L: there's the bulk of it
10:21 PM rue_shop2: woof,
10:22 PM Tom_L: how do i search for a file in subdirs?
10:22 PM rue_shop2: find |grep word
10:22 PM rue_shop2: find has options, but their needlessly complex
10:25 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/NEW_MILL_ORIENT/orient.jpg
10:25 PM Tom_L: there's a diagram
10:25 PM Tom_L: i added a couple things to that
10:26 PM Tom_L: the remap code works
10:27 PM Tom_L: but the M19 R0 P1 doesn
10:27 PM Tom_L: t
10:27 PM Tom_L: R0 is the rotational degrees from 0
10:27 PM Tom_L: P1 clockwise only
10:27 PM Tom_L: P0 shortest distance
10:27 PM Tom_L: P2 ccw
10:30 PM Tom_L: anyway...
10:30 PM Tom_L: i didn't expect you to help. just showing what i've been working on
10:30 PM rue_shop2: funny that diagram quite resembes what was start to assemble in my head looking at that file
10:31 PM rue_shop2: a big connection map of modules
10:34 PM Tom_dev: https://forum.linuxcnc.org/10-advanced-configuration/42792-m19-and-spindle-index-enable-issues
10:34 PM Tom_L: more for me
10:34 PM Tom_L: so i can find it