#garfield Logs

Nov 20 2020

#garfield Calendar

10:33 AM aandrew: good old fashioned stick welding like me
10:39 AM aandrew: he must be a bazillion times better if he's getting that metal at such nice perfect right angles though to make an XY table without binding like crazy
10:39 AM aandrew: it's all spot welds though, I assume he's gonna do a proper job after he's got it tacked together?
10:39 AM aandrew: he didnt' clamp down those bars either, just kind of tacked them on where they were
10:39 AM aandrew: no protection on the threads either, I think I would have wanted to put some kind of accordion "sock" on it
11:31 AM rue_mohr: hot metal cause the top to explode off
01:39 PM polprog: ive got the weird traders keyboard working
01:39 PM polprog: they run regular USB HID over the DB15
01:39 PM polprog: now i just need a DB15 shell for the cable
01:39 PM polprog: for now i just went over it with electrical tape
02:40 PM polprog: ok, i came up with a FSM design that can do the 8675309 up and down
02:40 PM polprog: its got 4 output bits and one input
02:41 PM polprog: q1-q4 goes to BCD to 7 seg decoder, q5-q8 is the "next address" lines, and that along with the 1 onput bit goes to a latch/GAL-latch that goes to the address of the eeprom
02:43 PM polprog: if i had 8 bit latches i could make a whole class of n-bit output, m-bit input and (8 - m)-bit program machines
02:43 PM polprog: i can have as many output bits as i want ( i can put a second output-only eeprom in paralell)
02:45 PM polprog: but for a given k-bit address eeprom
02:46 PM polprog: hmm
02:47 PM polprog: brrr
02:47 PM polprog: again
02:47 PM polprog: n bit output
02:47 PM polprog: m bit input
02:47 PM polprog: j bit sized program
02:48 PM polprog: k bit long address
02:48 PM polprog: k = j + m
02:48 PM polprog: thats the only limit
02:59 PM polprog: ok, i got something drawn out
03:00 PM polprog: i should start watching mech tho
03:00 PM polprog: :/
03:08 PM rue_mohr: 8675309
03:08 PM rue_mohr: all unique digits
03:08 PM rue_mohr: try using the digits themselvs for the next addrerss
03:09 PM rue_mohr: did I send you the C library
03:09 PM aandrew: USB over DB15? wtf
03:10 PM polprog: rue_mohr: that could simplify it, but i want mine to stop when i press a button
03:10 PM polprog: aandrew: lol yeah
03:10 PM rue_mohr: ok, thats just another input tho
03:11 PM polprog: ill probably put together a post about it or make a vjo
03:11 PM rue_mohr: let me take an example seq
03:11 PM polprog: aandrew: ^
03:11 PM polprog: rue_mohr: i have it all drawn out already
03:11 PM rue_mohr: ok
03:12 PM polprog: https://polprog.net/rozne1/ircjunk/fsm/eprom-fsm.jpg
03:13 PM rue_mohr: you could fit it all in the Gal, but working out the equations would be really painfull
03:13 PM rue_mohr: nice
03:13 PM polprog: i could add more glue logic to fake-extend the output data bus, ie, if Q7=1 then Q1-Q6 is next address, otherwise next address is address+1
03:13 PM polprog: but that would be too complicated for a first one
03:13 PM polprog: plus, this one is called 8675309 machine but it outputs 1234 :P
03:14 PM rue_mohr: so I can show you this later, snag these two files: http://ruemohr.org/~ircjunk/programming/c/ROMLib.c http://ruemohr.org/~ircjunk/programming/c/ROMLib.h
03:14 PM rue_mohr: simple functions that save some typing
03:14 PM polprog: :)
03:15 PM polprog: ok, gotta eat supper then i start mech
03:15 PM polprog: im so glad i worked the keyboard out
03:16 PM polprog: it was laying on the desk for like a month
03:16 PM rue_mohr: yea what do all the crazy keys come up as?
03:16 PM polprog: they dont :( probably doesnt send them via HID or for some reason xev can't see them
03:16 PM rue_mohr: !? ok
03:16 PM polprog: only the "transmit" one shows up, as numpad enter
03:16 PM rue_mohr: there is a program that sill show you keycodes too
03:16 PM polprog: i need to work out wireshark usb sniff
03:17 PM polprog: well, thats xev isnt it?
03:17 PM rue_mohr: no there is a command line prog
03:17 PM polprog: hmm
03:17 PM rue_mohr: oh, come to think of it, maybe
03:18 PM rue_mohr: xev reports scancodes whereas showkey by default reports keycodes. sudo showkey -s reports scancodes
03:18 PM rue_mohr: ""
03:18 PM polprog: hmmmm
03:21 PM polprog: ill write that down...
03:34 PM rue_mohr: http://paste.debian.net/1173658/
03:35 PM rue_mohr: I just want to show you how easy a project *like* that is with that library
03:35 PM rue_mohr: check out the code when you have a chance, see if it makes sense
03:37 PM rue_mohr: hah, could have used switch...
03:37 PM rue_mohr: I'm still learning
03:37 PM rue_mohr: I need a makefile for it
03:40 PM polprog: all:
03:40 PM polprog: gcc *.c -o main.elf
03:40 PM polprog: ;)
03:47 PM Tom_L: switch is same as case no?
03:58 PM polprog: yeah
04:12 PM rue_mohr: then to run it..
04:12 PM rue_mohr: build:
04:12 PM rue_mohr: ./main.elf
04:12 PM rue_mohr: ?
04:14 PM rue_mohr: ok, I did
04:14 PM rue_mohr: all:
04:14 PM rue_mohr: gcc *.c -o main
04:14 PM rue_mohr: ./main
04:14 PM rue_mohr: clean:
04:14 PM rue_mohr: rm main output.bin
04:26 PM polprog: eek
04:26 PM polprog: the point of makiefile it to stay away from recompiling all the stuff all the time :(
04:27 PM polprog: https://polprog.net/papiery/avr/485slave/Makefile
04:27 PM rue_mohr: but clean should take you down to source
04:32 PM polprog: yeah
04:32 PM polprog: hmm
04:32 PM polprog: i should put that in clean next time
04:32 PM rue_mohr: I mean, what you want isn't main, its binary.out
04:44 PM rue_shop1: were on like red alart out here in canada
04:44 PM rue_shop1: is there going to be a world left for me to go back to after school is out?
04:54 PM Tom_L: no
04:54 PM Tom_L: red alert for what?
04:55 PM Tom_L: things get better so everyone ignores then things get alot worse again
04:56 PM Tom_L: you know the rules...
04:56 PM Tom_L: don't fix anything until someone gets killed
05:00 PM rue_shop1: covid
05:00 PM Tom_L: this will be ongoing for at least a couple more years
05:01 PM Tom_L: mark my word
05:01 PM rue_shop1: the problem is comming up that its an industry
05:02 PM Tom_L: of course it is
05:02 PM rue_mohr: I wonder how many fake cancer research facilities just converted over fake covid research
05:07 PM Tom_L: i just worry about my little corner of the world and let the rest go by
05:09 PM rue_mohr: I just wound the lvdt
05:28 PM Tom_L: how do you know what ratio?
05:31 PM Tom_L: so i found a couple bad 4-40 taps so i decided to get some new ones of 4-40, 6-32 and 8-32 and drills for each so i can have them with the taps
05:32 PM Tom_L: thinking ahead...
05:32 PM Tom_L: and got back to put them in the 'new' organizer i have to find out i'd already done that a few weeks ago :(
05:32 PM Tom_L: i shouldn't run out for a while
05:33 PM Tom_L: plug and bottoming taps
05:33 PM Tom_L: of each
05:36 PM rue_shop1: 1:1:1
05:36 PM rue_shop1: heh oops
05:37 PM rue_shop1: it works
05:37 PM Tom_L: cool
05:38 PM rue_shop1: and putting a triangle wave in comes out with a nice square wave
05:40 PM Tom_L: how does that work?
05:43 PM rue_mohr: transformer is an integrator
06:16 PM polprog: huh?
06:16 PM polprog: hm
06:17 PM polprog: i guess that makes sense, U = L dI/dt, so I = tU/L
06:17 PM polprog: i never looked at it that way
06:36 PM rue_shop1: my idea to use a FET for the polarity switching of the amp was bogus, too much gate capacitance
06:36 PM rue_shop1: trying 4066
06:37 PM rue_shop1: polprog, take a look at that C source eh?
06:50 PM polprog: i scrolled thru it
06:50 PM polprog: looks good to me, ill play with it $(next time i sit to the bench)
06:50 PM polprog: i have 4 hours of work tomorrow :(
06:50 PM polprog: i should hit the bed now
06:52 PM rue_shop1: it strips off a level of complexity
06:53 PM rue_shop1: dispite the code not really doing anything complex
06:53 PM rue_shop1: it makes it all really easy
06:53 PM polprog: yeah, its neat
06:53 PM polprog: oh.. sunday too
06:53 PM polprog: ah no
06:53 PM rue_shop1: I had to use a sample-and-hold on the lvdt
06:53 PM polprog: not me
06:53 PM polprog: ah yeah, 4066 makes a nice s&h
06:53 PM polprog: oh
06:54 PM polprog: i downloaded all 4000 series datasheets listed on the wikipedia page into my pdf search
06:54 PM polprog: pretty useful
06:54 PM polprog: i have to do 7400 too, i tried it but the ti.com links dont work well with downthemall
06:54 PM polprog: ill try to use wget
06:54 PM polprog: ive got a couple 4066
06:56 PM polprog: i need some of this antistatic foam, half of my 4000 series dips are loose in the drawer
06:56 PM polprog: makes it hard to search them
06:57 PM rue_shop1: :)
06:58 PM Tom_L: tubes
06:59 PM polprog: hmm, dont have spare narrow dip tubes
06:59 PM polprog: maybe ill stick some alu foil to some styrofoam or something. i dont like that kinda backing
07:06 PM polprog: goodnight
07:06 PM Tom_L: bye bye
07:17 PM rue_shop1: gn
08:05 PM aandrew: you crazy kisd and your ROM FSMs
08:05 PM Tom_L: it's a cult
08:07 PM aandrew: the drinking the kool-aid stage is when they make the FSMs dynamic by using RAM and having the states modify other states
08:07 PM rue_shop1: aandrew, go on, give it a try, first one is on the house
08:08 PM aandrew: lol
08:08 PM rue_shop1: aandrew, yea I'm not ready for that yet
08:09 PM rue_shop1: tho I'm going quick
08:09 PM rue_shop1: that clock request turned into a basic computer
08:09 PM aandrew: no, I am buried under two big contracts (one of which is a Matryoshka contract of contracts), just signed a third and have invested in a new company. I'm beyond overwhelmed
08:09 PM aandrew: you are crazy
08:09 PM aandrew: it's awesome to watch on twitter
08:09 PM rue_shop1: heh
08:09 PM rue_shop1: I'm playing with lvdt right now
08:09 PM rue_shop1: its going great
08:10 PM aandrew: I read about them years ago but didn't really get into them
08:10 PM rue_shop1: but all the amplifiers in the world suck
08:10 PM aandrew: isn't it just more or less a sensing inductor?
08:10 PM rue_shop1: transformer with a movable core
08:10 PM rue_shop1: you play with the balance of two pickup coils
08:11 PM rue_shop1: is, or is not the NE5532 a rail to rail amplifier damnit
08:11 PM aandrew: heh
08:12 PM aandrew: I've always been told to stay away from the rails, even on rail to rail op amps if you care about precision
08:12 PM rue_shop1: aha, I think I found it
08:12 PM rue_shop1: no, I dont think they say
08:12 PM aandrew: rue_shop1: so what are you using the LVDT for
08:13 PM rue_shop1: well, standard pinout, so here goes
08:13 PM rue_shop1: aandrew, I need somthing like 208 force sensors for my big mecha :)
08:13 PM rue_shop1: ^^^ well you asked
08:14 PM aandrew: are LVDTs ridiculously cheap or something?
08:16 PM rue_shop1: yea it can only get within 1.5V of the rails
08:16 PM rue_shop1: well, I 3d printed one
08:16 PM rue_shop1: that was cheap
08:17 PM rue_shop1: the 0-100% signal changes depending how big you make them
08:17 PM rue_shop1: so 0-100% can be 1mm or 1m
08:17 PM aandrew: sure that makes sense
08:18 PM rue_shop1: arg, the gain of the 5532 is really nice
08:18 PM rue_shop1: 0-5V over 1mm is cool too :)
08:18 PM rue_shop1: but I'd need -2V and +7V rails
08:20 PM rue_shop1: know if there is a single channel 4066 chip?
08:20 PM rue_shop1: oh wait I know, I just pet the cat and pick up a chip...
08:26 PM rue_shop1: this one is 0-5V over 0.2"
08:43 PM aandrew: what do your 3d printed ones look like? how many turns on primary and secondary?
08:45 PM rue_mohr: heh, if you dont have tweets set to "last" instead of "most popular" you will never see anything I post :)
08:45 PM rue_mohr: https://twitter.com/RueNahcMohr/status/1329958100133052418
08:46 PM aandrew: no I set it to last, just haven't been paying super close attention this week
08:46 PM rue_mohr: heh
08:47 PM aandrew: oh come on that video is only a couple hours old, I haven't been on twitter
08:47 PM aandrew: here you are guilt tripping me over it
08:48 PM rue_mohr: heh
08:48 PM rue_mohr: I'm using twitter to drive me to do things so I can post them
08:48 PM aandrew: ahh okay. now I'm starting to remember
08:48 PM aandrew: ---*nnnnn--uuuuuu--*nnnnnn---
08:49 PM aandrew: nnns are the two windings of the secondary, wound with same polarity
08:49 PM rue_mohr: I hooked it to my LM3914 flash ADC, I'm about to post another vid
08:49 PM aandrew: uuuu is the excited primary
08:49 PM rue_mohr: other way
08:49 PM aandrew: opposite polarity yes
08:49 PM rue_mohr: ----*nnnnnnn---*uuuuuuu--nnnnnn*---
08:49 PM aandrew: can you tell I'm tired
08:49 PM rue_mohr: and u is the drive winding
08:49 PM rue_mohr: :)
08:49 PM aandrew: yeah
08:49 PM rue_mohr: but
08:49 PM rue_mohr: what I dont get
08:50 PM rue_mohr: why are they using sine waves?
08:50 PM rue_mohr: thats stupid
08:50 PM rue_mohr: I'm using a triangle, I get a square wave out
08:50 PM aandrew: possibly for EMI/RFI?
08:50 PM rue_mohr: it all has to be shielded anyhow
08:50 PM rue_mohr: there is a fancy chip that measures energy to turn it into DC
08:51 PM aandrew: yeah log amps do that at RF
08:51 PM Tom_L: that's like putting a square peg in a round hole ehh?
08:51 PM rue_mohr: the triangle wave gives me a square wave output, I just have to wait for the slews
08:52 PM rue_mohr: it looks like sample-and-hold is the best
08:52 PM rue_mohr: I suppose I could try to do a precision rectifier on it
08:53 PM rue_mohr: the rail-rail amps are $$$ tho
08:54 PM rue_mohr: the NE5532 are dirt cheap 100pcs / $10
08:54 PM rue_mohr: mcp6002 is 10pcs / $5.50
08:55 PM rue_mohr: lmc6482 is 10pcs / $7
08:55 PM rue_mohr: it might be worth a dc-dc
08:55 PM rue_mohr: the BWP of the 5532 cleans things up nice too
08:55 PM aandrew: why bother iwth rail to rail?
08:56 PM aandrew: what's wrong with either making your primary signal smaller or using larger supply rails?
08:56 PM rue_mohr: adc
08:56 PM aandrew: I mean hell you don't even need MUCH, you can use a cap inverter to give you a few volts of -ve headroom
08:56 PM aandrew: to get you down to zero I mean
08:57 PM aandrew: I've done that countless times
08:57 PM rue_mohr: and I already need an osc for the coil
08:57 PM aandrew: hell it doesn't even have to be a clean -ve voltage
08:57 PM rue_mohr: so I'm half way there
08:57 PM aandrew: woooo-oh! livin' on a prayer
08:57 PM rue_mohr: yea a charge pump off the 555 doing the driver coil would prolly be ok
08:58 PM rue_mohr: whats the GBP of the lm358?....
08:58 PM aandrew: 700kHz
08:58 PM rue_mohr: OUCH
08:59 PM rue_mohr: its too bad I cant rectify it before I amplify it
08:59 PM aandrew: you can
08:59 PM rue_mohr: maybe I should try it
08:59 PM aandrew: I used a precision rectifier to rectify the raw output of a CT *before* burdening it
09:00 PM aandrew: in theory the CT just develops more voltage to work over the diode drops, it worked okay actually
09:00 PM rue_mohr: yea
09:00 PM rue_mohr: ct will do that
09:00 PM rue_mohr: hmm
09:00 PM rue_mohr: but this is EMF, not current
09:00 PM rue_mohr: the peak output is about 100mV
09:01 PM aandrew: what's an LVDT except for a weaksauce CT? you'll need more primary current or you'll punk out
09:01 PM rue_mohr: strong, but not awesome
09:01 PM aandrew: I wonder if you can paint on a ferrous "tube" on a wooden skewer and use it as the core of an LVDT
09:02 PM rue_mohr: if I used a dpdt analog switch, I could rectify the signal before amplifying it
09:02 PM rue_mohr: after all, I know *when* its going to flip
09:03 PM aandrew: yes...
09:03 PM aandrew: seems harder to do than a pair of diodes in the feedback path of an op amp though
09:03 PM rue_mohr: its emf
09:03 PM rue_mohr: I dont have the votlage to drop
09:04 PM aandrew: hm
09:05 PM aandrew: I'm having trouble following
09:05 PM rue_mohr: ct is current output
09:05 PM rue_mohr: this is just voltage
09:06 PM aandrew: *sigh* yes you're right
09:06 PM aandrew: I should go to bed
09:06 PM rue_mohr: :) no worries
09:06 PM rue_mohr: HOWEVER
09:06 PM rue_mohr: could I put a current source in series with it?
09:06 PM rue_mohr: maybe not
09:08 PM aandrew: you might be able to poke around the "joule thief" designs, maybe they have some super low voltag rectification ideas
09:10 PM aandrew: maybe something in here too: https://www.tek.com/document/handbook/low-level-measurements-handbook
09:11 PM rue_mohr: idea
09:11 PM rue_mohr: the signal from the coil is centered around 2.5V and its only 100mv
09:12 PM rue_mohr: if I use the 5532 to precision rectify it, then its dc, and whatever can be used for a followup amp cause its dc
09:12 PM rue_mohr: wait, what was the goal again?
09:12 PM rue_mohr: void the expensive amps
09:12 PM rue_mohr: did you TRY an LM324?
09:13 PM rue_mohr: no... I forgot...
09:13 PM rue_mohr: mhm...
09:13 PM aandrew: drive it lower frequency and use an LM386 :-)
09:13 PM rue_mohr: whats the GBP of the lm324?
09:13 PM rue_mohr: I aleady dialed it down to 10khz casue the rise time was horrid
09:14 PM aandrew: yeah typical LVDT signal conditioners use synchronous rectification
09:14 PM aandrew: 1.2MHz for the LM324
09:14 PM rue_mohr: wow your fast
09:14 PM rue_mohr: ok, the 324 might be ok then
09:14 PM aandrew: literally "lm324 gbw" in google, first hit
09:14 PM rue_mohr: hahaha
09:16 PM aandrew: how's https://www.ti.com/lit/ds/symlink/rc4580-q1.pdf, 12MHz GBW, $0.33 on digikey, bipolar up to 18V
09:16 PM aandrew: +/-18V that is, so 36V, nice and wide
09:18 PM rue_shop1: I'd like to avoid things that wont work between 0 and 5V rails
09:18 PM rue_shop1: oh the adc video
09:18 PM rue_shop1: arg
09:18 PM aandrew: well you drive the - with the charge pump, give it 5V V+ and you have a 0-3V circuit
09:18 PM aandrew: er 0-3V signal range for your ADC
09:21 PM rue_shop1: noise...
09:21 PM aandrew: pfff, that's what software is for
09:22 PM rue_shop1: well ok, unless its a stm32 ;)
09:23 PM aandrew: these are all using precision rectifiers it seems
09:23 PM aandrew: http://www.mikesflightdeck.com/lvdts/lvdts.html
09:23 PM rue_mohr: do they use sine wave?
09:23 PM rue_mohr: waits for it to load...
09:24 PM rue_mohr: wtf sine wave
09:30 PM aandrew: a sine wave means you're not wasting bandwidth by dealing with harmonics...
09:31 PM rue_shop1: I'm not tho
09:31 PM rue_shop1: I'm using a triangle wave,
09:31 PM rue_shop1: analog people prolly call that just a few % distortion off a sine wave, I'v seen those things they call sine waves!
09:32 PM aandrew: triangle wave is full of harmonics as well
09:32 PM aandrew: just saying, to faithfully reproduce a triangle wave of X Hz requires greater bandwidth than sine of same freq
09:35 PM aandrew: https://www.analog.com/media/en/reference-design-documentation/design-notes/dn362f.pdf interesting idea to eliminate the need for precision rectification
09:47 PM rue_shop1: the 324 can go from about 0.2V to 4V on a 5V supply
09:48 PM rue_shop1: remember that current mode oscillator I posted for polprog?
09:48 PM rue_shop1: that used the two current sources and the 555?
09:49 PM rue_shop1: heh
09:50 PM rue_shop1: honestly, I dont know if it can do 10khz anyhow
09:54 PM rue_shop1: hahah
09:54 PM rue_shop1: there is a full wave rect here that uses the lower rail for the recification
10:18 PM rue_shop1: the 5532 would need an expanded set of power rails, but
10:18 PM rue_shop1: has the bandwidth
10:18 PM rue_shop1: the precision rectifier is an issue casue I cant get the gain I need at the same time
10:18 PM rue_shop1: tho, the 5532 might be able to pull of 100x and do the rectify
10:22 PM rue_shop1: at 9V, the 5532 pulls about 0.9mA
10:22 PM rue_shop1: if I target not pulling more than 10mA, I have a number of supplies should be fine
10:22 PM rue_shop1: - regulation
10:23 PM rue_shop1: actauly, a max232...
10:25 PM rue_shop2: if I use a max232 for a converter, or 2323
10:25 PM rue_shop2: and I'd need a 555 for an osc
10:26 PM rue_shop2: and a coil driver amp, maybe an LM386
10:26 PM rue_shop2: then the NE5532 as the amps, and a cd4066 for the s&h
10:26 PM rue_shop2: OUCH
10:27 PM rue_shop2: the 232 is probably silly, so, saying I use the 555 for that with some diodes and caps
10:28 PM rue_shop2: should be able to do ~ -3, +7
10:28 PM rue_shop2: what if yo use a tiny13
10:28 PM rue_shop2: do tell
10:29 PM rue_shop2: well, you can use it to trip over the current sources for the triangle, and that would drive the coil
10:29 PM rue_shop2: it can generate the sample pulse, but
10:29 PM rue_shop2: we would still need the amps
10:31 PM rue_shop2: yea, what to do about that analog
10:33 PM rue_shop2: CAN the 5532 pull off 100x gain in one stage?
10:33 PM rue_shop2: lets find out..
10:39 PM rue_shop1: hahahah idea
10:39 PM rue_shop1: use the LVDT primary as a booster coil for the amp!
10:39 PM rue_shop1: hahaha
10:39 PM rue_shop1: ok, bu the 5532 is rockin it
10:40 PM rue_shop1: no problems with that much gain in one stage
10:40 PM rue_shop1: bit too much actually
10:43 PM Tom_L: u 2 have fun
10:43 PM Tom_L: gnite
10:53 PM * rue_shop1 looks for a clock
10:53 PM * rue_shop1 hides it before he sees the time
10:53 PM rue_shop1: so, I should buy lots of 5532
10:54 PM rue_shop1: if you need to do that, why not double stage and use 358
10:54 PM rue_shop1: 700khz?
10:54 PM rue_shop1: oh yea
10:54 PM rue_shop1: 741
10:54 PM rue_shop1: ?
10:54 PM rue_shop1: I mean, if you need a power supply anyhow, right?
10:55 PM rue_shop1: no wait, then I would need 2
10:55 PM rue_shop1: must be wehre 358 ones in
10:55 PM rue_shop1: there must be another
10:55 PM rue_shop1: I think its 5532
10:56 PM rue_shop1: omg the 358 is a joke
10:57 PM rue_shop1: it cant even start to slew in time
10:57 PM rue_shop1: ok
10:58 PM rue_shop1: and you want 1 amp per board, right
10:58 PM rue_shop1: yea I want to put them on it
10:58 PM rue_shop1: k, so no chip sharing
10:58 PM rue_shop1: we need to test an amp
10:58 PM rue_shop1: driver
10:58 PM rue_shop1: yea
11:05 PM rue_shop1: ok, that performs badly, not awefull, but bad