#garfield Logs

Nov 28 2022

#garfield Calendar

12:44 PM rue_shop3: haha
12:54 PM rue_shop3: http://ruemohr.org/%7Eircjunk/tempimage/foo2.jpg
12:54 PM rue_shop3: http://ruemohr.org/%7Eircjunk/tempimage/foo3.jpg
12:54 PM aandrew: heh
12:54 PM rue_shop3: their both wrong, its 13, even the FFT says my gears suck
12:54 PM rue_shop3: oh well
12:56 PM aandrew: hm
12:56 PM aandrew: horseshoe shape might be a better idea for something ML-based
12:56 PM rue_shop3: yours might do better
12:56 PM aandrew: where you train it to identify that shape and then see what it comes up with
12:56 PM rue_shop3: I was thinking about the polar angles
12:56 PM rue_shop3: they wouldn't be kinda continious
12:56 PM rue_shop3: they would reverse
12:57 PM rue_shop3: not sure how to check that but the voice in the back on my mind says its easy
12:57 PM aandrew: https://ibb.co/k1Fk3hW
12:58 PM Tom_L: irc seems busier of late
01:00 PM rue_shop3: somewhere between a group project (cough cough POLPROG!) and twitter collapsing
01:00 PM rue_shop3: hahah
01:00 PM rue_shop3: 13.5 eh?
01:00 PM rue_shop3: where did you .5 come from tho?
01:00 PM Tom_L: you got a chipped tooth
01:00 PM aandrew: interestingly the next contour is the "other side" of the black line and it gets 13.0 exactly
01:01 PM rue_shop3: you only have 13 bumps
01:01 PM aandrew: https://ibb.co/VMB53QG
01:01 PM rue_shop3: but that first post HAS 13 bumps
01:02 PM rue_shop3: what!?
01:02 PM aandrew: "number of intersections: 26.923125691648238"
01:02 PM rue_shop3: how did it count that any different than the first one?
01:02 PM aandrew: vs
01:02 PM * Tom_L thinks rue_shop3 was trying to emulate a canadian flag
01:02 PM rue_shop3: heh
01:02 PM aandrew: "number of intersections: 26.0"
01:02 PM aandrew: Tom_L: funnily enough that's how every canadian starts out drawing shitty maple leaves
01:03 PM rue_shop3: but, aren't the tooth waveforms exactly the same?
01:03 PM rue_shop3: wait
01:03 PM aandrew: you guys have the pledge of allegiance, where we have drills on improving fine motor skills for leaf drawing
01:03 PM rue_shop3: why is there an irregular space
01:03 PM rue_shop3: in the first one
01:03 PM rue_shop3: the little loop should have collapsed something
01:04 PM rue_shop3: was there a 0.0?
01:04 PM aandrew: not sure I have to take a closer look
01:04 PM aandrew: let me dump the data
01:04 PM rue_shop3: it might work right both times with that other teeth threshold method
01:04 PM rue_shop3: >0
01:05 PM rue_shop3: I'm helping a plumber with a boiler today, but he got side-tracked on an emergency call
01:05 PM aandrew: yep
01:05 PM aandrew: teeth: [1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -0.07687430835176201, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
01:05 PM rue_shop3: 0.0!
01:05 PM aandrew: vs
01:05 PM Tom_L: you gonna be a plumber now?
01:05 PM rue_shop3: oh, close to zero
01:05 PM aandrew: teeth: [1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0]
01:05 PM rue_shop3: yea ok
01:06 PM aandrew: so
01:06 PM aandrew: we need to discard zeroes
01:06 PM rue_shop3: so, want to spin a quick new version and I'll tell ya the conversion to the other alg?
01:06 PM aandrew: or anything not 1 or -1
01:06 PM rue_shop3: oh
01:06 PM rue_shop3: wait you might have a point
01:07 PM rue_shop3: if thats dicarded, it might be more accurate
01:07 PM rue_shop3: ?
01:07 PM rue_shop3: talk to me
01:08 PM rue_shop3: discarded, cause the next data point will account for the tooth
01:08 PM rue_shop3: we end up with a tristate system
01:08 PM rue_shop3: the tooth profile is either at below zero, above zero, or *at zero
01:09 PM rue_shop3: <+-1 is "at zero"
01:09 PM rue_shop3: but
01:09 PM rue_shop3: the >0 cutoff would work to, becasue the data point would get rolled onto one side and discarded
01:10 PM rue_shop3: aandrew, get the wife and kids in on this so that your less distracted!
01:10 PM rue_shop3: +dog
01:10 PM Tom_L: go chase the cat a while
01:11 PM rue_shop3: kitty is angry cause I'm not in bed sleeping
01:11 PM rue_shop3: I'm gonna go try that image with the new code...
01:15 PM rue_mohr: [True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True]
01:15 PM rue_mohr: Amplitude toothcount is: 13
01:15 PM rue_mohr: [True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True]
01:15 PM rue_mohr: Amplitude toothcount is: 13
01:15 PM rue_mohr: max is: 47944.01018190232
01:15 PM rue_mohr: peak count is: 1
01:15 PM rue_mohr: >>> peaks are: [47944.0101819] at [13] <<<<
01:15 PM rue_mohr: max is: 48920.704982632284
01:15 PM rue_mohr: peak count is: 1
01:15 PM rue_mohr: >>> peaks are: [48920.70498263] at [13] <<<<
01:15 PM rue_mohr: the new code with <0 and your image pre-processing completely works
01:16 PM rue_mohr: sorry, I dont have any graphic output on it right now
01:20 PM rue_mohr: my entire program output looks like....
01:20 PM rue_mohr: ###################################################
01:20 PM rue_mohr: 5 contours found
01:20 PM rue_mohr: ditching profile 0 because the area is... ugly...
01:20 PM rue_mohr: ditching profile 1 because the area is... ugly...
01:20 PM rue_mohr: ditching profile 4 because the area is... ugly...
01:20 PM rue_mohr: Amplitude toothcount is: 13
01:20 PM rue_mohr: Amplitude toothcount is: 13
01:20 PM rue_mohr: >>> peaks are: [47944.0101819] at [13] <<<<
01:20 PM rue_mohr: >>> peaks are: [48920.70498263] at [13] <<<<
01:20 PM rue_mohr: that my new version with your preprocessing and my new thresholding
01:21 PM rue_mohr: I can quick walk you thru the threshold changes if you want
01:21 PM rue_mohr: oh I can
01:21 PM rue_mohr: do this...
01:21 PM rue_mohr: too....
01:21 PM rue_mohr: https://paste.debian.net/1262182/
01:21 PM rue_mohr: ahhh yea
01:29 PM rue_mohr: the dimentions of some of the arrays in that code dont match the older code, so its not quite copy/pastable
01:33 PM rue_mohr: nice, got it on the pi
01:33 PM rue_mohr: but, without the image generation, its a bit hard to use
01:35 PM rue_mohr: Tom_L, so did you hear of the rectified 120V dc servo driver I'm doin for the cnc?
01:35 PM rue_mohr: for xyz?
01:36 PM rue_mohr: its a modified computer power supply...
01:36 PM rue_mohr: https://twitter.com/RueNahcMohr/status/1597077946715758592
01:36 PM rue_mohr: big ole "NO TOUCH" on almost all that circuit
01:37 PM rue_mohr: the breadboard part is isolated
01:37 PM rue_mohr: the driver uses two wires that control isolatro leds
01:37 PM rue_mohr: back to back, one for forward, the other for reverse
01:38 PM rue_mohr: that way you cannot tigger both at the same time
01:38 PM rue_mohr: casue at 350V it would go bang fast
01:40 PM rue_mohr: the big heatsink thing on the left is the overvoltage shunt
01:41 PM rue_mohr: it was probably throwing 10-20w
01:41 PM rue_mohr: which is a LOT more than I thought
01:41 PM rue_mohr: explains why the little suppressor blew up last time
02:26 PM rue_shop3: I'm not sure what takes the pi longer, taking the picture or loading all the libraries for opencv
02:50 PM rue_shop3: http://ruemohr.org/%7Eircjunk/tempimage/image_counts.jpg
02:50 PM rue_shop3: LINT
02:50 PM rue_shop3: really throws the amplitude count (top)
02:50 PM rue_shop3: bottom is the FFT
02:53 PM rue_shop3: http://ruemohr.org/~ircjunk/tempimage/image_counts2.jpg here, the FFT isn't really sure if its 122 or 124
02:53 PM rue_shop3: this is where new gears are nice, their clean...
02:56 PM rue_shop3: I cleaned it and they both came up 123
02:57 PM rue_shop3: http://ruemohr.org/~ircjunk/tempimage/image_counts3.jpg
03:03 PM aandrew: ok I'm back
03:03 PM rue_shop3: ^^
03:03 PM aandrew: server decided that the roughly-annual "hard drive controller has some counter that overflows and causes the drives to disappear" should occur now
03:04 PM aandrew: I don't see anything that you wrote before just now
03:04 PM rue_shop3: :]
03:04 PM rue_shop3: aandrew, compaq?
03:06 PM aandrew: HP yes
03:06 PM rue_shop3: heheh, wow
03:06 PM aandrew: how did you know?
03:06 PM aandrew: known issue?
03:06 PM rue_shop3: no,
03:06 PM rue_shop3: when I worked in IT
03:06 PM rue_shop3: they had a backup battery on a raid card
03:06 PM rue_shop3: and when it died, it took the cache and your raid config with it
03:07 PM rue_shop3: thats why I vow to software raid only
03:07 PM rue_shop3: Amplitude toothcount is: 96
03:07 PM rue_shop3: >>> peaks are: [4604.13396693 5201.6351257 ] at [95, 96] <<<<
03:07 PM rue_shop3: I grabbed the first value in the arry, but I should find the highest
03:07 PM rue_shop3: it'll be 96
03:10 PM Tom_L: lucky you haven't burnt something down yet.. looking at the driver
03:11 PM rue_shop3: its fused
03:11 PM rue_shop3: I'm more worried about shock hazard
03:11 PM rue_shop3: unisolated 175V
03:12 PM rue_shop3: I'm not sure how to wrap up the overvotlage limiter
03:12 PM Tom_L: i found that _once_ on that sherline driver
03:14 PM rue_shop3: these motors are for DC mains
03:14 PM rue_shop3: their the only thing I have that can do 10kRPM at these power levels
03:15 PM Tom_L: i showed you those machines my kid runs now?
03:15 PM rue_shop3: yep
03:15 PM Tom_L: the big cincinnatti 3 spindle
03:15 PM rue_shop3: yep
03:15 PM rue_shop3: I cant run that at home
03:15 PM Tom_L: ~180' X
03:15 PM rue_shop3: tho I'd love to have my home in that
03:15 PM rue_shop3: nice big building
03:15 PM Tom_L: with 2 gantrys on it
03:16 PM Tom_L: he said they have 10 in there
03:16 PM rue_shop3: crazy
03:16 PM rue_shop3: so they need 9 operators and 2 repair techs
03:16 PM Tom_L: i think it was one of the biggest cnc shops in town when the old guy retired
03:17 PM Tom_L: this outfit just bought it fairly recently
03:17 PM Tom_L: i got A9 mostly set up
03:17 PM Tom_L: just waiting on foreign orders to arrive
03:17 PM rue_shop3: heh, eager much? :]
03:18 PM rue_shop3: things move reallllly slow here
03:18 PM Tom_L: no it was mostly still sitting on the bench
03:18 PM Tom_L: maybe 10 min worth
03:19 PM Tom_L: if i were anxious, i would have run them already
03:19 PM rue_shop3: hehe
03:19 PM rue_shop3: I feel like I'm spoiling your fun
03:19 PM Tom_L: i like to turn the mill on once in a while even if i don't run anything and that was opportunity
03:20 PM rue_shop3: next year we will probably sell about 40 sprayers
03:20 PM rue_shop3: when the season hits
03:20 PM rue_shop3: so were interested in making sure we have prestock
03:20 PM rue_shop3: for the 15mm pins, we MIGHT switch to copper pipe
03:21 PM Tom_L: hmm
03:21 PM rue_shop3: sounds pricey, but the 1/4" galvanized rod we usually use cant be obtained AND its a LOT of work to process
03:21 PM rue_shop3: the copper pipe (the orig guy used it) is pretty quick to cut with a pipe cutter
03:22 PM rue_shop3: aandrew, tell me what ya thing
03:22 PM rue_shop3: k
03:22 PM Tom_L: what about SS rod?
03:23 PM rue_shop3: we can get 1/4" copper pipe at about 7c/15mm
03:23 PM rue_shop3: and dont have to cut it on the lathe and then sand the end
03:25 PM rue_shop3: we tried buying some pre-made pins
03:25 PM rue_shop3: iirc they were expensive
03:25 PM rue_shop3: and didn't come in the right lengths
03:25 PM rue_shop3: huh
03:26 PM rue_shop3: I keep getting gears in this set that the FFT isn't sure of
03:36 PM Tom_L: is the copper for the trigger pivot?
03:36 PM rue_shop3: and the other pin
03:36 PM Tom_L: you think that will wear well?
03:36 PM rue_shop3: they have so far
03:36 PM rue_shop3: none of the old ones come back with them worn thru
03:36 PM rue_shop3: like pre-us old old
03:37 PM Tom_L: copper?
03:39 PM rue_shop3: yup
03:39 PM rue_shop3: haha, I had a gear I'd hand-counted at 100
03:39 PM rue_shop3: the software count was 99
03:39 PM rue_shop3: so I carefully reconted, its 99
03:54 PM rue_shop3: aandrew, had to drop the area cutoff to 20k for one
04:00 PM rue_shop3: aandrew, are you interested in an image set?
04:00 PM rue_shop3: I dont have a lot
04:02 PM rue_shop3: aandrew, for scale
04:02 PM rue_shop3: what if we used a scaled QR code sticker?
04:04 PM rue_shop3: I think the software for those is pretty done
04:04 PM rue_shop3: like a 1cm square
04:15 PM rue_shop3: picking the gear up helps ditch shadows
05:00 PM rue_shop3: hahah
05:00 PM rue_shop3: some of these results, I tell ya
05:18 PM rue_shop3: I have like 50-some-odd gear pics
05:18 PM rue_shop3: the amplitude counter is doing much better with additions from your code
05:24 PM rue_shop3: hahaha
05:26 PM rue_shop3: http://ruemohr.org/~ircjunk/tempimage/count2.jpg
05:26 PM rue_shop3: for ref, the upper is the amplitude count and the lower is the fft
05:27 PM rue_shop3: maybe we could see if the profile is within 50% of the radius of the enclosing circle?
06:31 PM rue_shop3: on a ratchet pawl, the amplitude counter kicked the ffts ass
06:33 PM Tom_L: did you try a sprocket?
06:33 PM rue_shop3: oh I'll get one now
06:34 PM Tom_L: get the rear cluster too
06:34 PM Tom_L: :)
06:35 PM rue_shop3: heh, the camea is a bit too close
06:36 PM rue_shop3: so, an fft must set up the bins as cycles per sample time
06:37 PM rue_shop3: if you have 4000 samples, the first bin would be such that it would be 1 cycle over that 4000 samples
06:37 PM rue_shop3: the 100th bin, would be a wavelength of 100/4000's cycle time
06:38 PM rue_shop3: http://ruemohr.org/~ircjunk/tempimage/sprocket.jpg
06:38 PM rue_shop3: they even agree
06:38 PM Tom_L: :)
06:39 PM Tom_L: rack of a rack and pinion
06:39 PM rue_shop3: haha no
06:39 PM rue_shop3: but, an interesting point
06:40 PM rue_shop3: we should have it make a box around the thing and see if its ~ square
06:41 PM rue_shop3: http://ruemohr.org/~ircjunk/tempimage/sprocket2.jpg
06:50 PM rue_mohr: I sorted hundreds of gear last night, but with the small ones I was throwing like 8-10 at a time under there
07:09 PM rue_mohr: maybe if I do some kinda leader randomly off the gear to the text
07:09 PM Tom_L: smaller font size too
07:10 PM rue_mohr: I'm gonna have to make it bigger and thicker if I'm gonna see it on a composite screen
07:10 PM rue_mohr: one of those little backup camera ones
07:10 PM Tom_L: mmm
07:10 PM rue_mohr: oh I have a bigger one, like 9"
07:13 PM rue_mohr: was also thinking of a tray, you can have two and swap them with mulytiple sets of gears
07:14 PM rue_mohr: black and white trays for white and black gears
07:20 PM rue_mohr: so
07:21 PM rue_mohr: squareness
07:21 PM rue_mohr: a good square is H=w
07:21 PM rue_mohr: but, whats an acceptable real-world square
07:23 PM rue_mohr: center, radius = cv2.minEnclosingCircle(c)
07:23 PM rue_mohr: if (radius < 15):
07:23 PM rue_mohr: print("ditching profile", i, "becasue its smaller than 15 pixies...")
08:25 PM rue_mohr: Tom_L, ?
08:25 PM rue_mohr: anyone...
08:26 PM rue_mohr: anywhere....
08:33 PM Tom_L: WHAT!
08:33 PM Tom_L: i was out messin on the mill a bit
08:34 PM rue_mohr: <rue_mohr> http://ruemohr.org/~ircjunk/tempimage/image_counts.jpg
08:34 PM rue_mohr: <rue_mohr> do you think I should put an arrowhead at the radius?
08:50 PM rue_mohr: hah
08:50 PM rue_mohr: ok, it cant be a square, it needs to be done with a rotated box
08:50 PM rue_mohr: acid tests...
11:18 PM rue_mohr: aandrew,
11:18 PM rue_mohr: cv2.imshow('Binary image', cv2.resize(image_gray, (1024,768)))
11:32 PM rue_mohr: aandrew, I think you would have fun with this data set...
11:32 PM rue_mohr: I got some odd gears in here
11:32 PM rue_mohr: been making adjustments as I go thru it again
11:38 PM rue_mohr: http://ruemohr.org/%7Eircjunk/tempimage/count100.jpg
11:39 PM rue_mohr: note how well they agree on the 55