#garfield Logs
Feb 25 2024
#garfield Calendar
12:41 AM rue_shop1: The key goal for EGMK is that the loop controller anticipates whats going to happen, it doesn't wait for it
12:53 AM rue_shop1: thats the EG part
12:53 AM rue_shop1: looking good so far, it can get the main drive pulse right to put the load as close to the target as is possible.....
12:53 AM rue_shop1: not while not knowing the load variation?
12:53 AM rue_shop1: the remaining error is different because you cant wait for encoder feedback to correct it
01:04 AM rue_shop1: rifraf, I did attiny13 code that takes 0-5V analog input and positions a stepper 0-180 degrees
01:04 AM rue_shop1: and one that takes RC servo input and does same
01:04 AM rue_shop1: its on github
01:06 AM rue_shop1: is 20 is 0.2ms
01:06 AM rue_shop1: what is 1sec
01:06 AM rue_shop1: 200 = 1ms
01:06 AM rue_shop1: 2000 = 2ms
01:06 AM rue_shop1: 20000 = 20ms
01:06 AM rue_shop1: 200000 = 200ms
01:06 AM rue_shop1: 1000000 = 1000ms
01:07 AM rue_shop1: well I got 200 wrong, but ok
01:07 AM rue_shop1: no I got it all wrong
01:07 AM rue_shop1: 20 = 0.2ms
01:07 AM rue_shop1: 200 = 2ms
01:08 AM rue_shop1: 2000 = 20ms
01:08 AM rue_shop1: 20000 = 200ms
01:08 AM rue_shop1: 100000 = 1000ms
01:13 AM rue_shop1: obfuscated_d, I'm chewing away at the code to do the pulse profiling
01:13 AM rue_shop1: but I'm just using your time code
01:14 AM rue_shop1: https://paste.debian.net/1308519/
01:14 AM rue_shop1: not done yet
01:28 AM rue_shop3: reverse time, travel, peak res. vel.
01:28 AM rue_shop3: 00001, 00003, 00000
01:28 AM rue_shop3: 00002, 00002, 00018
01:28 AM rue_shop3: 00003, 00001, 00018
01:28 AM rue_shop3: 00004, 00000, 00018
01:28 AM rue_shop3: 00005, 00000, 00018
01:28 AM rue_shop3: 00006, -00001, 00018
01:28 AM rue_shop3: 00007, -00003, 00018
01:28 AM rue_shop3: 00008, -00004, 00018
01:28 AM rue_shop3: 00009, -00011, 00018
01:28 AM rue_shop3: 00010, -00021, 00018
01:28 AM rue_shop3: 00011, -00029, 00018
01:28 AM rue_shop3: ok, the timer is out by a factor of 10
01:28 AM rue_shop3: but
01:31 AM rue_shop3: that velocity has to be wrong
01:36 AM rue_shop3: odd
01:54 AM rue_shop3: obfuscated_d, I have a program for ya!
01:55 AM rue_shop3: the velocity readings are broken for some reason
01:55 AM rue_shop3: oh hahah you used tcnt1
01:56 AM rue_shop3: no wait, no
01:59 AM rue_shop3: obfuscated_d, heh, how are you at charting multidimenstional data
01:59 AM rue_shop3: hehe
02:00 AM rue_shop3: ok, so X is the forward time
02:00 AM rue_shop3: Y is the reverse time
02:00 AM rue_shop3: and Z is the distance traveled
02:02 AM rue_shop3: this is crazy
02:03 AM rue_shop3: like almost completely consistantly, 2ms after the reverse power is pulled, the shaft changes direction
02:05 AM rue_shop3: the larger the power pulse, the longer the reversal-after-power-removal takes
02:09 AM rue_shop3: were taught that things will come to a stop if not being pushed on
02:09 AM rue_shop3: and thats not happening here
02:09 AM rue_shop3: their reversing direction after power is removed
02:10 AM rue_shop3: and its not like its just sometimes, this is here consistantly every time
02:14 AM rifraf: magnetic flux?
02:14 AM rue_shop3: ????
02:14 AM rue_shop3: there is something going on
02:14 AM rifraf: seen these? https://www.youtube.com/shorts/r8tUKQSctSY?feature=share
02:17 AM rue_shop3: yes
02:19 AM rue_shop3: ugh, I have to make a proper explorable 3d surface out of this to understand it
02:20 AM rue_shop3: obfuscated_d, this is built from (as) VelProf
02:20 AM rue_shop3: https://paste.debian.net/1308525/
02:20 AM rue_shop3: so its a main.c replacement
02:20 AM rue_shop3: the data is the forward speed and reverse speed charted against the ultimate displacement
02:21 AM rue_shop3: we need some sort of selection where, knowing the displacement we want, we can look up (two charts I think) the forward and reverse times to use
02:22 AM rue_shop3: I think if we limit it to getting that displacement in 2ms it should help
02:22 AM rue_shop3: the data isn't here for how long it took to come to a stop
11:10 AM rue_mohr: obfuscated_d, hi
11:10 AM rue_mohr: I'v learned how to use openscad to make a 3d surface of the data
11:29 AM rue_mohr: https://twitter.com/plastic_gear/status/1761735365420077098
11:29 AM rue_mohr: omg I need to make a vynal cutter head for my cnc!
12:03 PM rue_mohr: obfuscated_d, ok... I have a 3d .... data shape....
12:21 PM rue_mohr: hmm
12:22 PM aandrew: rue_shop3> like almost completely consistantly, 2ms after the reverse power is pulled, the shaft changes direction
12:22 PM aandrew: sounds like perhaps collapsing magnetic field but 2ms is pretty long
12:22 PM rue_mohr: yep
12:22 PM rue_mohr: and then, it changes direction again!
12:23 PM rue_mohr: mechanical resonance?
12:23 PM aandrew: could be some kind of elasticity in the belt?
12:23 PM rue_mohr: no belt in this one
12:24 PM aandrew: brushed motor, encoder on shaft, that's it?
12:24 PM rue_mohr: gearbox
12:24 PM rue_mohr: but encoder is on motor
12:24 PM rue_mohr: did you see the video?
12:24 PM rue_mohr: its pretty wild
12:24 PM aandrew: what if you remove the gearbox? do you get the same result? does it go faster now?
12:25 PM rue_mohr: mmm built in gearbox...
12:25 PM aandrew: what if you apply a brief pulse (no egmk) - does it happen?
12:25 PM rue_mohr: this IS just a pulse
12:25 PM rue_mohr: its a forward pulse, then reverse pulse
12:25 PM aandrew: I saw a rather long video with scope traces and pulses but I couldn't make out what was going on
12:25 PM rue_mohr: ok
12:25 PM aandrew: I have to go right now though, helpingn son
12:25 PM rue_mohr: so the top two traces are the motor driver signal
12:26 PM rue_mohr: the bottom two traces are the encoder channels
12:26 PM rue_mohr: you can see it changing direction atleast twice in the longer motions
12:27 PM rue_mohr: damnit, I need a keyboard that doesn't need to be operated with a freaking pickaxe after 1 week of use
12:35 PM rue_mohr: grrr gimbal lock in openscad }:[
12:36 PM rue_mohr: ok, I have ideas
12:36 PM rue_mohr: first off, this doesn't need to be a 3d chart
01:00 PM rue_mohr: I need higher resolution data...
01:08 PM rue_mohr: maybe this is just like tapping a tuning fork
01:08 PM rue_mohr: maybe all its doing is ringing
01:09 PM rue_mohr: that would be a killer for EGMK, its high freq drive technique would tickle every resonance the system has
01:11 PM rue_mohr: resonance would explian a limit on how fast you can get a system to respond
01:12 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/griddata.png
01:14 PM rue_mohr: this is a chart of on times and off times (x, and y) against final displacement values
01:14 PM rue_mohr: the idea is to have a table that says "for a displacement of 1, use these on and off values"
01:14 PM rue_mohr: but this data isn't high rez enough, I need to see ranges of values like 1
01:14 PM rue_mohr: the granularity is almost 2
01:15 PM rue_mohr: so I need about 5-8x more resolution
01:16 PM rue_mohr: but it also kinda shows there isn't much point in scanning over about 0.3ms
01:57 PM rue_mohr: looks like just scanning it to 1ms would be fine
02:01 PM rue_mohr: ok I think this goes beyond what can be done with timers
02:03 PM rue_mohr: I have the timer set to /16 now, it'll be choking the processor.
02:17 PM rue_shop3: I think that timer code isn't working right....
02:19 PM rue_shop3: and the velocity code
02:19 PM rue_shop3: it likes 18
02:21 PM rue_shop3: in 23 years you would expect rifraf would have a better internet connection...
02:37 PM rue_shop3: ok, I need some software to turn 640k data points into an image
02:54 PM rue_shop3: ok, so data is profiling...
02:54 PM rue_shop3: oh the bathtub, I should fix that
03:00 PM obfuscated_d: hey rue, man you've been busy! I had a lot of errands to run today
03:03 PM rue_shop3: np
03:03 PM rue_shop3: I'm doing a super big high rez data collection
03:03 PM obfuscated_d: neat
03:03 PM rue_shop3: it looks like, by the time the forward drive is like 0.7ms, there is all sorts of resonance stuff going on
03:04 PM rue_shop3: the shaft starts to ring
03:04 PM rue_shop3: Im pondering hooking up the encoder to a DAC to see it on the scope better
03:04 PM obfuscated_d: hmm. can't really do much about that
03:05 PM rue_shop3: might be able to do the pulses small enough to not cause it to ring
03:05 PM rue_shop3: waiting for 640k data points
03:05 PM rue_shop3: obfuscated_d, did you catch that paste I did?
03:06 PM rue_shop3: https://paste.debian.net/1308525/
03:06 PM rue_shop3: it will give a bit of an idea what the offsets are like for the different drive times
03:06 PM rue_shop3: I was going to ask if you want to give it a go on yours
03:07 PM rue_shop3: I needed to go higher resolution, I think you will too
03:07 PM rue_shop3: the high rez scan is gonna take hours
03:08 PM rue_shop3: I'm kinda doing a quick one now with not enough rest time
03:09 PM rue_shop3: I'm pretty sure there is something wrong with the velocity code
03:09 PM rue_shop3: it really likes "18"
03:17 PM obfuscated_d: what part of the velocity code?
03:18 PM rue_shop3: the numbers dont look good
03:19 PM rue_shop3: if you run that, you will see the velocity usually come out as 18 or 22
03:19 PM rue_shop3: I'm not sure why
03:19 PM rue_shop3: both those numbers would be crazy high speeds for the motor
03:21 PM rue_shop3: my goal is to get a 3d surface that shows plateaus for the different offsets in terms or forward and reverse drive times
03:21 PM rue_shop3: I'm hoping there is a "minimum" safe set of times that can be used for each offset
03:22 PM rue_shop3: there should kinda be "fields" of times that result in a 1 offset for example
03:22 PM rue_shop3: find something with a lot of margin
03:23 PM rue_shop3: the idea of having the velocity in that scan was to know, when the pulse was finished, what the exit velocity was like
03:23 PM rue_shop3: but the data is no good
03:25 PM rue_shop3: if I run this slower it'll take like a day
07:40 PM rue_shop3: ok I have high rez data
07:40 PM rue_shop3: and better data on the way
07:45 PM rue_shop1: 4M file
09:19 PM rue_mohr: wow, now THATS a visualization
10:24 PM rue_mohr: ok, thats it, I'm sure
10:24 PM rue_mohr: ob
10:24 PM rue_mohr: oh :(
10:36 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/output.png
10:36 PM rue_mohr: 6.3 megabytes of data from the avr
10:37 PM rue_mohr: I dont know why nobody ever wants to come to my parties