#garfield Logs

Mar 19 2020

#garfield Calendar

01:40 AM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1150531.jpg
01:46 AM rue_mohr: minimal component latches for buttons
01:46 AM rue_mohr: the SCR based one being a bit smaller
05:26 AM polprog: rue_mohr: https://polprog.net/rozne1/ircjunk/cradleservo/
05:26 AM polprog: it seems that my usb floppy is in transit
05:26 AM polprog: the tracking says it will arrive last monday
05:27 AM polprog: i guess Corona Extra makes everything halt
05:27 AM polprog: it was a module connecting to the PCB under the cradle
05:28 AM polprog: it's pre made but none of the other interruptors are visible light
05:28 AM polprog: interruptors i have*
05:28 AM polprog: this thing is pretty bright. that's 5v thru 1k there, so about 3-4 mA
05:33 AM polprog: it also looks like i can use LM324 instead of TL074, these have a larger voltage swing i think
05:37 AM polprog: i i am right about the maths, LM324 is 55Mohm input impedance, while TL074 is in the order of gigaohms.
05:37 AM polprog: so i can use lm324 fine..
07:21 AM polprog: your latches remind me to pull optocouplers from the dead psu board i have
07:21 AM polprog: then i could just toss them into a deep box
07:21 AM polprog: since all the other stuff was pulled previously
08:59 AM rue_mohr: if you want a fast compartor, use the LM393 / LM339
08:59 AM rue_mohr: they go up to about 4Mhz
09:00 AM rue_mohr: hey I like the ground
09:00 AM rue_mohr: oooh the opto is one of THOSE
09:00 AM rue_mohr: I have some logic versions
09:01 AM rue_mohr: I have a better circuit for a raw phototransistor if you want
09:02 AM rue_mohr: http://ruemohr.org/~ircjunk/circuits/linebot.jpg
09:03 AM rue_mohr: it plays on the fact that the phototransistor is current limited
09:03 AM rue_mohr: the 22k determines the sensitivity
09:03 AM polprog: hmm
09:04 AM polprog: ill keep that in mind when i use the optical interruptors since they have phototransistors
09:04 AM polprog: i found that lm324 makes a better signal
09:04 AM polprog: im not using a comparator here, but a voltage follower for now
09:04 AM rue_mohr: ah
09:04 AM rue_mohr: hey, try this
09:04 AM polprog: i wanted to check out a schmitt trigger
09:04 AM rue_mohr: print a strip that has a "sine wave" on it
09:04 AM polprog: hmm
09:05 AM rue_mohr: see if you can get analog output
09:06 AM polprog: i can, if i stop the carriage so that the sensor looks at part black part white bar i get a voltage inbetween
09:06 AM polprog: now im trying to get stm32 gpios working.. to drive the L239D
09:06 AM polprog: for some reason PB15 andPB3 dont work
09:06 AM rue_mohr: you can use an SVG to make a sine wave gradient
09:06 AM rue_mohr: on a what?
09:06 AM polprog: on a bluepill
09:06 AM rue_mohr: k, what system do you want to use
09:07 AM polprog: libopencm3
09:07 AM rue_mohr: no, I mean, did you want digital or?
09:07 AM polprog: these dont seem to be special. PB3 is not special and PB12,13,14 work despite being SPI
09:07 AM polprog: for now i want to be able to move the carriage X steps
09:08 AM polprog: or even, move 10 steps left
09:08 AM polprog: steps as in stripes on the gauge
09:08 AM polprog: later ill add a second sensor for detecting the edge
09:09 AM polprog: i was thinking either two black bars on the sticker or two interruptors on the chassis and a tab on the carriage
09:09 AM rue_mohr: they dont seem special
09:10 AM rue_mohr: any chance you pushed 5V into them?
09:10 AM polprog: PB15 is MOSI2
09:10 AM polprog: i havent pushed 5V into them, not yet
09:10 AM polprog: the only 5V thing is uart
09:10 AM rue_mohr: but unless you turn on alternate fucntions for them, its just PB15
09:10 AM polprog: i didnt explicitly turn on AF for them..
09:11 AM rue_mohr: well, the symptoms of what I'v had for a long time now changed a bit, so I'm staying home to watch myself today
09:12 AM rue_mohr: I have to get the garbage out
09:12 AM rue_mohr: back in a bit
09:12 AM polprog: same
05:40 PM rue_mohr: I think
05:41 PM rue_mohr: if you put a square wave into a FFT as a reference table instead of a sine wave, it would pick out the square waves
05:41 PM rue_mohr: if I'm right, an FFT can be bent to detect any particular repeating waveform
05:42 PM rue_mohr: it would tell you the frequency and amplitude of it
05:42 PM rue_mohr: and phase
05:42 PM rue_mohr: so, the position and scale of it
05:42 PM rue_mohr: hmm
05:43 PM zhanx: my laptop is not here, how did it log on?
05:43 PM rue_mohr: ? it did?
05:43 PM rue_mohr: it didn't get stolen did it?
05:43 PM zhanx: * Topic for #garfield set by rue_more (Fri Feb 21 20:49:34 2014)
05:43 PM zhanx: * zhanx_laptop (~zhanx@unaffiliated/zhanx) has joined
05:43 PM zhanx: * zhanx_laptop has quit (Ping timeout: 246 seconds)
05:43 PM zhanx: <rue_mohr> I think
05:44 PM polprog: hmm. i have stripe counting working.. but i get noise into the digital input
05:44 PM polprog: ill have to make a schmitt
05:44 PM zhanx: if it got stolen how did it get on the net with an encrypted hd
05:44 PM rue_mohr: polprog, use that circuit I gave ya, its waaay better for digital
05:44 PM zhanx: its turned off and waiting to be packed still
05:45 PM rue_mohr: zhanx, well, lets work out WHERE your laptop is...
05:45 PM zhanx: i tried it off now
05:45 PM rue_mohr: ko
05:45 PM rue_mohr: hard for me to answer
05:45 PM zhanx: it was on for 3 minutes
05:45 PM rue_mohr: windows update?
05:45 PM zhanx: ubuntu
05:45 PM rue_mohr: no its linux
05:46 PM rue_mohr: hmm
05:46 PM zhanx: would windows even turn on a computer with no internet ?
05:46 PM zhanx: my internet tether is here
05:46 PM rue_mohr: maybe it was (modulus day) ago?
05:46 PM zhanx: its been off for 8 days
05:47 PM rue_mohr: ok, quite odd
05:47 PM rue_mohr: does the irc client auto start?
05:47 PM zhanx: only reason i saw it was the auto start and login
05:47 PM zhanx: yes
05:47 PM rue_mohr: spooky
05:47 PM rue_mohr: think your being watched?
05:48 PM zhanx: why?
05:48 PM rue_mohr: !.!.!!!. ParANoiaAAAAAaa
05:48 PM rue_mohr: I dont know, I cant come up with any ideas
05:48 PM rue_mohr: esp as you'd have to have logged in
05:49 PM zhanx: no, i am just wondering, its encrypted with a long as password at boot and logiin
05:49 PM zhanx: i use a sentence as the boot password
05:49 PM rue_mohr: yep, I'v done that on sites with stupid credentials
05:50 PM zhanx: great now i am paranoid
05:51 PM rue_mohr: and your turned it off, not slept it
05:51 PM zhanx: that laptop only had one wifi network in the config and that is next to me
05:51 PM rue_mohr: did it tell you the IP you last logged in from when you connected today?
05:52 PM zhanx: no it was gone too fast
05:52 PM rue_mohr: I have my laptop tell me its public address every hour, puts in on the website
05:52 PM zhanx: had to ethernet connection on it
05:52 PM polprog: rue_mohr: the one with '86 and '00?
05:52 PM rue_mohr: http://ruemohr.org/erp/ip.htm
05:53 PM zhanx: it was off too fast to email me
05:53 PM polprog: thats not the problem .. the problem is that i have a shitton of noise everywhere
05:53 PM zhanx: so i know the boot was not full
05:53 PM rue_mohr: polprog, try that circuit...
05:53 PM rue_mohr: its got a really really high contrast signal
05:54 PM rue_mohr: zhanx, and you positivly know where the laptop is.
05:55 PM zhanx: locked in the cabin, it has a broken screen and unplugged it and shut it down to move it but didn't
05:55 PM polprog: ill try it but i dont see what i could gain from it. Or you mean use it as a frontend for the photosensor?
05:55 PM zhanx: 100% know because i didn't take the monitor yet also
05:58 PM polprog: idk why im getting so much noise on the scope. I wasnt getting that much noise on the rigol, and i wasnt getting thta much noise when the scope stood in a different place
05:58 PM polprog: maybe it should go up on the shelf
05:58 PM polprog: so that probes dont flap around the table
05:58 PM polprog: there is a power strip under the table as well...
05:58 PM polprog: i should check this and that tomorrow
05:59 PM polprog: anyway, rue_mohr my problem is that the input interrupt thats supposed to count the transitions is firing several times per transition due to noise
06:00 PM polprog: i could... put a nop loop in there but thats nasty
06:00 PM polprog: or i could figure timers out
06:00 PM polprog: and soft debounce
06:00 PM polprog: or just use an external opamp schmitt
06:00 PM polprog: i have 3/4 LM324 unused
06:01 PM polprog: anyway. It can count stripes and goes more less back and forth the same amount
06:01 PM rue_mohr: polprog, that front end circuit with the transistor
06:02 PM rue_mohr: http://ruemohr.org/~ircjunk/circuits/linebot.jpg
06:02 PM rue_mohr: that circuit before the gates
06:02 PM rue_mohr: just try that
06:02 PM rue_mohr: the 22k adjusts sensitivity
06:02 PM polprog: hmm
06:03 PM polprog: id have to make sensor no.2 from one of the photointerruptors
06:03 PM rue_mohr: put a stripe on a motor shaft and see what freq it can go to
06:03 PM polprog: my current sensor is LDR based
06:03 PM rue_mohr: but its the triangular black module?
06:03 PM polprog: yes
06:03 PM rue_mohr: those are transistor tho...
06:03 PM rue_mohr: ???
06:03 PM polprog: this one is LDR
06:03 PM polprog: the interruptors are transistor yes
06:03 PM rue_mohr: what.....
06:04 PM polprog: idk, it measures like an LDR
06:04 PM polprog: so far i get 8Hz with 4mm period just because the stepper wont go faster at 5V
06:04 PM polprog: https://polprog.net/rozne1/ircjunk/cradleservo/IMG_0307.png https://polprog.net/rozne1/ircjunk/cradleservo/IMG_0308.png
06:04 PM rue_mohr: no I mean make a dc motor shaft thats half white and half black
06:04 PM polprog: ah
06:05 PM rue_mohr: the resistance from a phototransistor will change too
06:05 PM rue_mohr: but it'll be different depending on the polarity
06:05 PM polprog: hmm
06:05 PM polprog: i dont know myself now
06:06 PM rue_mohr: not to say they dont exist, but all the modules like that I'v ever seen are phototransistor
06:07 PM polprog: wait phototransistors are two wires as well
06:07 PM polprog: aw fuck
06:07 PM rue_mohr: :)
06:07 PM polprog: ill have to test it different way then
06:07 PM polprog: hmm
06:07 PM polprog: still doesnt help the steper noise issue
06:08 PM polprog: idk ive been throwing caps at this thing all day today and i cant get rid of the spikes
06:08 PM rue_mohr: would need more info
06:08 PM polprog: sadly i didnt take any scope screenshots...
06:09 PM rue_mohr: meh
06:09 PM rue_mohr: electrical info would do
06:09 PM rue_mohr: still dont know what circuit your using
06:09 PM rue_mohr: aside from it having an op-amp
06:09 PM polprog: what circuit am i using where
06:09 PM polprog: on the frontend or on the driver?
06:09 PM rue_mohr: between the sensor and the scope
06:09 PM polprog: ah
06:09 PM polprog: gimme a sec
06:14 PM rue_mohr: this must be a microsoft download second
06:15 PM polprog: lol
06:15 PM polprog: http://pasteall.org/pic/show.php?id=c2070cb3bb6ec425d3f8ba6d8a0787b4
06:16 PM polprog: its dead simple...
06:18 PM rue_mohr: oh dear
06:18 PM polprog: yeah
06:18 PM rue_mohr: no
06:19 PM rue_mohr: a schmitt might be ok
06:19 PM rue_mohr: but, no
06:19 PM rue_mohr: er, a comparator
06:19 PM rue_mohr: a comparator with schmitt
06:19 PM polprog: this was built with the idea that the device is an LDR
06:19 PM polprog: which is probably not right as we established
06:19 PM polprog: and yeah id like to replace that foloower with a schmitt
06:20 PM rue_mohr: measure the sensor forward polarity and back, if the resistance is exactly the same, it probably is a LDR, if its quite different, its a phototransistor
06:21 PM rue_mohr: polprog, if you want, take the - off the output and put it to a voltage divider
06:21 PM rue_mohr: it'll be better, but its not as good as my cicuit
06:23 PM Tom_L: gettin lots done during quarentine?
06:23 PM polprog: pretty much
06:23 PM polprog: yeah, its a phototransistor
06:24 PM rue_mohr: cool!
06:24 PM rue_mohr: use my circuit
06:24 PM polprog: ok
06:24 PM polprog: and a schmitt
06:24 PM polprog: this actually makes it even weirder since the rest of the photointerruptors have 2 + 3 pins
06:24 PM polprog: and one has 2 + 4
06:24 PM polprog: i wanted to ask you about that one
06:29 PM polprog: but thats tomorrow
06:29 PM polprog: i have to get up early tomorrow
06:29 PM polprog: nighters
06:36 PM rue_mohr: the 2+3 pin ones are logic ouputs
06:36 PM rue_mohr: they take 5V and usually supply an open collector output
06:36 PM rue_mohr: 2+4 will be 2 channel
06:36 PM rue_mohr: if you show me I might already know the pinout
11:23 PM rue_mohr: ok, off to work tommorow, see what happens and what doesn't