#garfield Logs

Nov 26 2023

#garfield Calendar

04:02 AM rue_mohr: oh, its 2am
01:04 PM aandrew: rue_mohr: you're the 555 king... can I use a 556 such that timer 1 is a fixed 38kHz square-ish wave but only oscillates when timer 2 fires, about once every 5 seconds or so?
01:05 PM rue_mohr: ..
01:05 PM rue_mohr: yes
01:05 PM rue_mohr: do you want the off state to be high or low?
01:05 PM rue_mohr: the duty control will be trickey tho
01:07 PM aandrew: off state should be high I think (driving an IR LED) -- duty cycle isn't terribly important, just square-ish when oscillating. the much slower timer duty cycle would be nice to have around 10% or so (i.e. a half second-ish flash every 5s) -- none of it is terribly critical though
01:07 PM aandrew: not asking you to design it, just wanted to know if it was realistic before I embarked on it
01:07 PM rue_mohr: those recievers saturate easy tho
01:07 PM rue_mohr: cause of the AGC
01:07 PM rue_mohr: hmm, morning brain
01:08 PM rue_mohr: so if the first timers pin 3 is connected to reset of the other timer...
01:09 PM aandrew: sure and that's ok, as long as the rx doesn't say "I got a signal" when there isn't one I don't much care, I'm just using it to detect the 38khz carrier. If I have to "extend" the on time of the 38khz timer I can use a cap so that a half second visible LED flash gets me .75-1s 38kHz modulated IR flash...
01:09 PM rue_mohr: well
01:09 PM aandrew: in fact a bigass cap on the visible LED would be visually appealing
01:10 PM rue_mohr: iirc the recievers just ignore a signal longer than x...
01:10 PM aandrew: I'm toying with the idea of a self-synchronizing firefly swarm. IR receiver nudges the slow timer's discharge
01:10 PM rue_mohr: oh, and the 38kHz MUST be 50%
01:10 PM aandrew: rue_mohr: if worse comes to worst I'd just take 76kHz and T FF it
01:11 PM aandrew: but I'm hoping not to need that
01:11 PM rue_mohr: you can trim the duty
01:11 PM aandrew: yeah I remember seeing ... interesting ways to do that
01:11 PM rue_mohr: I cant remember if the reset state is high or low, I think its low...
01:11 PM rue_mohr: -- OK --
01:11 PM aandrew: but I thought on 556 it was trickier. Using "newer" 556 might give me 50% though, IIRC the CMOS 555s could do 50% no problem
01:11 PM rue_mohr: two methods are
01:12 PM rue_mohr: 1) pin 3 of A controls reset of B
01:12 PM rue_mohr: ugh
01:12 PM rue_mohr: lets me start again
01:12 PM rue_mohr: 1) output pin of A controls reset of B
01:12 PM rue_mohr: 2) dont use DISC on A, and parallel it with DISC on B
01:13 PM rue_mohr: I think those result in opposite polarity rest states
01:14 PM rue_mohr: a diode from output to control voltage can be used to adjust the duty (diode and series resistor)
01:14 PM rue_mohr: I'm still in zombie mode, after eating and a shower I can play
01:15 PM rue_mohr: 38kHz, 500ms every 5000ms (hard end of the duty spectrum)
01:15 PM aandrew: no problem
01:15 PM rue_mohr: might almost throw a t13 at that
01:15 PM aandrew: yeah I want to avoid that, it's trivial to do in software
01:16 PM rue_mohr: 555 is't stable on long times like 5 sec
01:16 PM rue_mohr: tho
01:16 PM rue_mohr: cd4060
01:16 PM aandrew: 38khz is 50% duty, 0.2Hz isn't and actual timer rate on 0.2Hz isn't important, just slooooow
01:16 PM aandrew: 38khz is important to be stable like you noted
01:17 PM rue_mohr: cd4060 w/LC osc...
01:17 PM aandrew: but the actual firefly butt output being a little irregular would be nice actually
01:17 PM rue_mohr: diode OR gate
01:17 PM rue_mohr: I'll play with 556
01:17 PM rue_mohr: good refresher anyhow
01:18 PM aandrew: heh sorry didn't mean to give YOU a project :-)
01:56 PM rue_mohr: no I dont have one today yet
01:57 PM Tom_L: sure you do, you just haven't realized it yet
01:57 PM rue_mohr: exactly
01:57 PM rue_mohr: this sounds nice to start from
01:57 PM rue_mohr: I need breakfast
01:57 PM rue_mohr: and its 11:54, so then I'll need lunch
01:58 PM rue_mohr: I'll just start them at the same time
01:58 PM Tom_L: i can offer a few suggestions if you're stumped
01:59 PM rue_mohr: for breakfast?
01:59 PM rue_mohr: I was thinking rice
01:59 PM rue_mohr: oh thats when I thoguht I had more time
01:59 PM rue_mohr: drat, what a mess
01:59 PM Tom_L: no, projects
02:00 PM rue_mohr: ah
03:32 PM rue_mohr: https://paste.debian.net/1299318/
03:33 PM rue_mohr: aandrew, I'll work on it more later, converted from C
03:33 PM rue_mohr: finished breakfast/lnch
03:38 PM rue_shop3: aandrew, ok, I'm going to use the pin 1 side timer for the 38kHz
03:42 PM rue_shop3: ah! its not oscillating cause there is no power!
03:42 PM rue_shop3: excellent...
03:45 PM Tom_itx is now known as Tom_L
03:47 PM rue_shop3: reset leaves the output low
03:49 PM rue_shop3: yea, grounding out the RC leaves it high
03:55 PM rue_shop3: -- aandrew --
03:55 PM rue_shop3: NE556, 5V
03:56 PM rue_shop3: 6 - 1nf - 7
03:56 PM rue_shop3: 5 - 10k var - 6
03:56 PM rue_shop3: 2 - 6
03:56 PM rue_shop3: 1 - 5k var - 3
03:57 PM rue_shop3: that will get the 38kHz at 50%
03:57 PM rue_shop3: (7 ground, 14 vcc)
03:57 PM rue_shop3: next
04:01 PM rue_shop3: 13s...
04:06 PM rue_shop3: wow
04:06 PM rue_shop3: that didn't take long
04:06 PM rue_shop3: the top is the 3sec system
04:06 PM rue_shop3: ah, I got it backwards, hold up
04:08 PM rue_shop3: ok, top row of 556
04:08 PM rue_shop3: 8 - 47uF - GND
04:09 PM rue_shop3: 8 - 100k - 9
04:09 PM rue_shop3: 8 - 12
04:11 PM rue_shop3: 8 -|<- - 10k - 9
04:11 PM rue_shop3: that is the 3/0.5sec timer
04:11 PM rue_shop3: then we connect it
04:13 PM rue_shop3: ? I got it backwards?
04:13 PM rue_shop3: damn, a correction is going to make a mess
04:14 PM rue_shop3: ok thats right, I forgot to remove a resistor for testing
04:14 PM rue_shop3: to connect the two,
04:15 PM rue_shop3: 13 - 6
04:15 PM rue_shop3: it bursts 38khz, for 1/2 sec and sleeps for 3 seconds with the line high
04:15 PM rue_shop3: -- aandrew --
04:18 PM rue_shop3: output off pin 5
04:18 PM rue_shop3: :D
04:38 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1300104.jpg
04:38 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/burst38.png
04:44 PM rue_mohr: I suppose 8 components isn't bad.
04:45 PM rue_mohr: always looks like a lot on a breadboard
04:45 PM Tom_L: use smt and it won't
04:45 PM rue_mohr: I suppose most of that would fit under a DIP
04:47 PM rue_mohr: so I bought a FPV viewer helmet
04:48 PM rue_mohr: I'm waiting for the camera
04:48 PM rue_mohr: or modulator, I forget now how I bought it
04:48 PM Tom_L: a what?
04:49 PM rue_mohr: I think the camera+modulator was cheaper
04:49 PM rue_mohr: a first person view helmet, like VR
04:49 PM rue_mohr: but for cameras on things like racing drones
04:49 PM Tom_L: figured it out just as you said that
04:49 PM rue_mohr: mmm
04:49 PM Tom_L: i don't see how those guys do that
04:49 PM rue_mohr: the good ones are NOT cheap, so I only got a descent one
04:50 PM rue_mohr: yea
04:50 PM Tom_L: i've watched a few of those
04:50 PM rue_mohr: I'll tell you if I find out
04:50 PM Tom_L: gonna race a drone?
04:50 PM rue_mohr: no
04:50 PM rue_mohr: I want to play with the robots tho
04:50 PM Tom_L: they have 0 time to think
04:50 PM rue_mohr: funny thing, RC remotes are CRAZY exensive too!
04:51 PM rue_mohr: like, $50 from china for anything shaped like a real remote
04:51 PM Tom_L: right but pretty simple actually
04:51 PM rue_mohr: goes up to $150 pretty quick
04:51 PM Tom_L: i've had a few
04:51 PM rue_mohr: then strolls on to like $500
04:51 PM rue_mohr: yea
04:51 PM Tom_L: not a trigger handle
04:51 PM rue_mohr: tahts why I'm confused
04:51 PM rue_mohr: yea, 2 sticks +
04:51 PM Tom_L: do they use a trigger with wheel or what?
04:51 PM Tom_L: 2 joysticks
04:51 PM rue_mohr: 2 sticks +
04:52 PM rue_mohr: the + varies
04:52 PM Tom_L: that's what i had and a few buttons
04:52 PM rue_mohr: yea
04:52 PM rue_mohr: $$$$$
04:52 PM Tom_L: i nearly forgot what mine was like but it was for boats
04:52 PM rue_mohr: I know a guy who might have some old remotes, I should ask if I wants to re-home them
04:52 PM Tom_L: just throttle and steering
04:53 PM Tom_L: no gimball for roll pitch yaw
04:53 PM Tom_L: the frequencies may not be legal now
04:53 PM Tom_L: i think they combined some
04:54 PM Tom_L: but i won't tell
04:54 PM Tom_L: 27mhz iirc
04:55 PM Tom_L: if you were a ham, they had some ham frequencies too
04:55 PM Tom_L: 72 not 27
04:55 PM Tom_L: 72.0 – 73.0 MHz and 75.4 – 76.0 MHz
04:55 PM Tom_L: some are designated land and some air iirc
05:02 PM rue_mohr: :)
05:02 PM rue_mohr: I'd like to switch it up to wifi and keep it all digital
05:13 PM rue_mohr: latency probably sucks tho
05:13 PM rue_mohr: and less range
05:13 PM rue_mohr: but I'm actually not worried about range
05:13 PM Tom_L: use a microwave band
05:13 PM Tom_L: :)
05:14 PM rue_mohr: 5.8Ghz is pretty crowded, lets add to that mess!
05:15 PM Tom_L: i'm sure all the 'good' frequencies are soaked up by guberments
05:15 PM rue_mohr: I cant keep up with my own tasks
05:15 PM Tom_L: i can, i just don't
05:15 PM rue_mohr: I like distractons like that 556 thing tho, more straighforward and simple
05:16 PM Tom_L: i could go try and fix the mill but i'm not going to
05:16 PM rue_mohr: so what was wrong, one thing?
05:16 PM Tom_L: 2
05:16 PM rue_mohr: k, tell...
05:17 PM Tom_L: joint following errors which i think points to MAX_ACCELERATION per joint and the step selector on the pendant is acting up again
05:17 PM rue_mohr: does it have axis feedback?
05:17 PM Tom_L: no
05:17 PM Tom_L: steppers generally don't
05:19 PM rue_mohr: so by joint follow errors, you mean its not traversing linear?
05:19 PM rue_mohr: like x and y are out of sync?
05:19 PM Tom_L: it looses steps and faults
05:19 PM rue_mohr: ah
05:19 PM Tom_L: then things don't align and parts get scrapped
05:19 PM rue_mohr: do you have an acceleration torture test?
05:19 PM rue_mohr: find the limit and back off a bit from it?
05:19 PM Tom_L: any number of programs would probably do
05:20 PM Tom_L: i just hope MAX_ACCELERATION is the problem because then i'm not sure where to look
05:20 PM rue_mohr: I mean a program where the races and axis back and forth and stops at a calibrated spot to see if I lost steps
05:21 PM rue_mohr: I kinda did that with mine
05:21 PM Tom_L: i don't lose steps until it faults
05:21 PM Tom_L: and it trips estop
05:21 PM rue_mohr: backed off to about 75% of the speed that seemed to be dropping steps
05:21 PM rue_mohr: mostly it seems to be acceleration with my machines
05:21 PM Tom_L: but it ran for a long time like this. just recently did i start having problems
05:22 PM rue_mohr: this one I got has a really bad resonance speed tho
05:22 PM Tom_L: i was running 14ipm
05:22 PM Tom_L: and i've run test cuts at 35ipm
05:22 PM rue_mohr: have it go from 0->+5" -> -5" -> {} ->0 a few times and see if it stops on 0?
05:23 PM rue_mohr: full speed/accel
05:23 PM Tom_L: full is 210ipm
05:23 PM rue_mohr: if it drops steps, dial the accel down, try again
05:23 PM aandrew: hm
05:23 PM aandrew: http://ruemohr.org/~ircjunk/tempimage/p1300104.jpg
05:23 PM rue_mohr: hah aandrew !!! I did a huge text schematic!!!! ^^^^
05:23 PM rue_mohr: its all written out in words!!!
05:23 PM rue_mohr: :)
05:23 PM aandrew: oh wait
05:24 PM rue_mohr: I used headers and everything
05:24 PM aandrew: haha one moment
05:24 PM aandrew: the pic came after so I thought it was the correct one
05:24 PM aandrew: one moment
05:28 PM rue_mohr: Tom_L, so, accel torture test?
05:28 PM rue_mohr: I'd chase after accel, usualy velocity isn't a big issue
05:32 PM aandrew: I think I got it
05:33 PM aandrew: https://ibb.co/CKJjZ7p
05:34 PM rue_shop3: no, the output is wrong
05:34 PM aandrew: almost, 7 is ground
05:34 PM rue_shop3: yes, and 14 is vcc
05:34 PM aandrew: you indicate 5 is output no?
05:35 PM rue_shop3: but 5 is the output
05:35 PM rue_shop3: have you 2/6
05:35 PM aandrew: oh. duh
05:35 PM rue_shop3: its the same as the drawn one :)
05:35 PM aandrew: yeah I was using that then you yelled at me to use the text version :-)
05:36 PM rue_shop3: well I went to a lot of trouble to speak it all out :)
05:36 PM rue_shop3: so you understand it?
05:37 PM aandrew: no
05:37 PM rue_shop3: aha
05:37 PM rue_shop3: are you familiar with the 3 compoent 555 osc (including the 555)
05:38 PM rue_shop3: ?
05:38 PM rue_shop3: Iuse it all the time
05:39 PM rue_shop3: your only half here...
05:39 PM aandrew: the bottom one makes sense. the upper one though, 9 is out2, not 10, which is reset2. 9 is out2, not trig (8) or thresh (12).
05:39 PM aandrew: nope I'm here, I was just cross-referencing to a pinout
05:39 PM aandrew: the labels are what is confusing me on the top 555
05:41 PM rue_shop3: so, at heard, their both 3 component oscillators
05:41 PM rue_shop3: "2" goes to "6", a cap to ground, that bits standard
05:41 PM aandrew: right
05:41 PM rue_shop3: but instead of all that resistor goofyness, you just put a single resistor from the OUT to the cap
05:42 PM rue_shop3: now, that leaves you with an open collector output, which is great
05:42 PM rue_shop3: on the lower osc, you can use that open collector to pull the control votlage for *half* the cycle, which changes the duty
05:42 PM rue_shop3: drag it back to 50%
05:44 PM rue_shop3: on the top osc, its that same 3 component osc, 1 cap, 1 resistor (and the chip), but its using a diode/resistor to severly bend the charge curve
05:44 PM rue_shop3: to give the 6:1 ratio
05:44 PM aandrew: out isn't open collector is it?
05:44 PM rue_shop3: no, its the normal output
05:44 PM aandrew: oh you're talking about the duty cycle mod
05:44 PM rue_shop3: thats what you do with the low component version of th osc
05:45 PM rue_shop3: so, becasue I have used *that* type of osc mode, I, again, have the open collector discharge pin available
05:45 PM aandrew: right I figured out what you were doing with the diode+resistor
05:45 PM rue_shop3: and I use it to squish the capacitor on the *other* oscillator
05:45 PM rue_shop3: I dont use the resets
05:46 PM aandrew: right, you're grounding it out/discharging it which holds the output high
05:46 PM rue_shop3: exactly
05:46 PM rue_shop3: reset would make the output low during the inactive time
05:46 PM aandrew: since 1/3 vcc > ground, comparator output is high, sets FF out high
05:47 PM aandrew: that's pretty slick
05:47 PM rue_shop3: I guessed the 3 sec osc pretty close the first time
05:48 PM rue_shop3: so, hopefully that works the same for you, stupid 20% caps are evil
05:49 PM aandrew: I should be able to tap pin 9 (slow output) for the visible firefly butt LED, and pin 5 is the 38kHz modulated IR LED output
05:49 PM aandrew: yeah I am sure this is going to do the trick
05:49 PM rue_shop3: 10
05:49 PM rue_shop3: 10 is your slow output
05:50 PM aandrew: ... 10 is the reset input of the 2nd timer isn't it?
05:51 PM aandrew: disc 1, thres 1, control 1, reset 1, out 1, trig 1, gnd, then trig 2, out 2, reset 2, control 2, thres 2, disc 2, vcc
05:52 PM rue_shop3: no, 10 is the output...
05:52 PM rue_shop3: wait,w hat
05:52 PM rue_shop3: oh, sorry
05:52 PM rue_shop3: eek
05:53 PM rue_shop3: oh damn, I counted the pins wrong
05:53 PM rue_shop3: 12 is right,
05:53 PM aandrew: that's what was confusing me - the pin names on the upper (slow) timer weren't lining up
05:53 PM rue_shop3: 9 should be 8, 10 shoudl be 9
05:53 PM rue_shop3: sorry
05:53 PM rue_shop3: oh disc2 is 13
05:54 PM rue_shop3: ugh
05:54 PM rue_shop3: this is what editors are for
05:55 PM Tom_L: i dropped accel from 45 to 40 and ran thru the program 2x no load just fine
05:56 PM Tom_L: and this day the pendant is working normal
05:56 PM aandrew: heh that's why I was saying I don't understand. upper timer pins should be 9 12 8 (top to bottom)
05:56 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1300105.jpg
05:57 PM rue_mohr: that should be right
05:57 PM aandrew: and then disc is 13 like you said, going to 5
05:57 PM rue_mohr: no, to 6
05:57 PM aandrew: hhahaha "v2 :-)"
05:57 PM rue_mohr: right the the cap of T1
05:57 PM rue_mohr: :)
05:57 PM aandrew: er yes 6 not 5
05:57 PM aandrew: that makes a lot more sense now :-)
05:58 PM rue_mohr: k, see, I make a mistake and now you understand it much better
05:58 PM rue_mohr: :)
05:58 PM aandrew: and I found 556 timers that should work at 3V (CR2032) but I don't know if those IR emitters will work worth a damn that low
05:58 PM aandrew: thank you sir
05:58 PM rue_mohr: use 2, 6V
05:58 PM rue_mohr: not sure what the voltage stability of it is
05:59 PM rue_mohr: the spec is 5.11V +-0
05:59 PM rue_mohr: :D
05:59 PM aandrew: yeah 6V would work much better
05:59 PM aandrew: it's okay, fireflies get tired too
06:02 PM aandrew: now I can take the output of the IR receiver and either tie it to the slow osc cap through a diode or a transistor to invert it if I need to so that when it receives the IR signal it bumps the charge on the cap
06:04 PM aandrew: ok it's active low with an internal pullup
06:15 PM rue_mohr: right, dont use it for evil
06:19 PM rue_mohr: and do a sweep to see what the timing stability is
06:19 PM rue_mohr: over vcc
06:24 PM Tom_L: ok that seemed to help
06:30 PM rue_shop3: lcnc wont let the nc program go over the machines accel limit, right?
06:31 PM Tom_dev: right
06:31 PM Tom_dev: it's all in the ini settings
06:31 PM Tom_dev: overall and per axis
06:45 PM rue_mohr: I can't shake off being tired
08:03 PM rue_mohr: heh
08:03 PM rue_mohr: twitter has an emojii for pregnant man...
08:04 PM Tom_L: getting a little far fetched i'd say
08:04 PM rue_mohr: there isnt' one for man breastfeeding baby...
08:04 PM rue_mohr: not finding a descent 'thinking' one...
08:06 PM Tom_dev: http://emojibook.club/emoji/thinking-face
08:06 PM rue_mohr: found it, thanks
08:06 PM Tom_dev: https://www.istockphoto.com/photos/thinking-emoji
08:06 PM Tom_dev: i personally like the 'happy face' ones better
08:08 PM Tom_dev: https://www.istockphoto.com/vector/pointing-to-forehead-emoticon-gm1181904219-331678330
08:08 PM Tom_dev: you started it.....
08:08 PM rue_mohr: hmm, the state machine clock isnt' working
08:08 PM rue_mohr: *sigh*
08:09 PM Tom_dev: ok 2 problems solved this evening. i better quit while i'm ahead
08:10 PM rue_mohr: mhm
08:11 PM Tom_L: of course i won't know if the cnc is fixed until i put tool to metal again
08:11 PM rue_mohr: I think you should make an unloaded torture test program
08:11 PM Tom_L: i dry ran the same file 4x
08:12 PM Tom_L: and it wouldn't make it thru clean at all on metal
08:12 PM rue_mohr: run an axis back and forth at max accel like 2 inches 50 x and see if it loses steps
08:12 PM Tom_L: it might be more likely to fault with 2 axis going
08:13 PM Tom_L: circular test
08:13 PM rue_mohr: X
08:13 PM rue_mohr: or just diagonal
08:13 PM rue_mohr: \
08:13 PM rue_mohr: but max accel
08:14 PM Tom_L: i don't think i set that in gcode
08:14 PM rue_mohr: or just do one axis at a time and have it come back to a dial
08:14 PM Tom_L: it's part of the interpreter
08:14 PM rue_mohr: ok
08:14 PM rue_mohr: so in the gcode set it to max vel
08:14 PM Tom_L: accel
08:15 PM rue_mohr: say, against dial at x5, then move to +2 and -2 20x full speed, then go back to dial nice
08:15 PM rue_mohr: g00 F99999 x-2
08:15 PM rue_mohr: g00 F99999 x2
08:15 PM rue_mohr: g00 F99999 x-2
08:15 PM rue_mohr: g00 F99999 x2
08:16 PM rue_mohr: g00 F10 x5
08:16 PM Tom_L: G0 ignores F
08:16 PM rue_mohr: (back to dial)
08:16 PM rue_mohr: oh
08:16 PM rue_mohr: G01
08:16 PM rue_mohr: :)
08:16 PM Tom_L: G0 is rapid
08:16 PM rue_mohr: rapid is not full speed tho is it?
08:16 PM Tom_L: which maxes out at 210 ipm
08:16 PM rue_mohr: its just a descent speed?
08:17 PM Tom_L: 210 is pretty much max
08:17 PM rue_mohr: yup
08:17 PM Tom_L: but it's never cutting then
08:17 PM rue_mohr: but its an accel test
08:17 PM rue_mohr: and thats an accel torture
08:17 PM rue_mohr: doesn't even get up to full speed before its got to decelerate
08:18 PM Tom_L: right
08:18 PM Tom_L: my rotary accels pretty slow
08:18 PM Tom_L: but i haven't tuned on it near as much
08:19 PM Tom_L: it does go a degree if you say so though
08:19 PM rue_mohr: yea, I set my accels pretty low
08:19 PM rue_mohr: motors are not good at it
08:19 PM rue_mohr: not steppers
08:19 PM rue_mohr: dc motors are crazy.
11:27 PM rue_mohr: aandrew, https://hackaday.io/page/19719-the-lm555-done-wrong
11:27 PM rue_mohr: ;)