#garfield Logs
Apr 14 2020
#garfield Calendar
05:48 AM polprog: phew, 12:30
05:53 AM polprog: overslept a bit
05:53 AM polprog: after about 10 on the tiny load, red led + 1k resistor, one cell is at 1.1 V and the other at .5
05:53 AM rue_bed: ?
05:58 AM polprog: i charged two nicd cells yesterday night and as a test connected them to a red led + 1k resistor overnight
05:59 AM polprog: this morning it was still lit
05:59 AM polprog: the cell voltage at the beginning were 1.3 per cell
09:00 AM rue_mohr: red led, so 1.4V, maybe
09:00 AM rue_mohr: 1k resistor
09:00 AM rue_mohr: hmm, problem
09:00 AM rue_mohr: ah 2.4V
09:01 AM rue_mohr: current is 1mA
09:01 AM rue_mohr: if overmight is 8 hours
09:02 AM rue_mohr: you got 0.125mAh draw from it ?
09:02 AM rue_mohr: ah no
09:02 AM rue_mohr: 8mAh
09:03 AM rue_mohr: I'm gonna guess they are 600mAh batteries
09:03 AM rue_mohr: and you could do a 10 hour test
09:04 AM rue_mohr: they are 'empty' at 90% (depth of discharge)
09:04 AM rue_mohr: so, 60mAh over 10 hours
09:04 AM rue_mohr: you would set up for 6mA
09:05 AM rue_mohr: load
09:05 AM rue_mohr: aka, 6 of the led/resistor strings, or a resistor of 160 ohms
09:06 AM rue_mohr: https://batteryuniversity.com/learn/article/nickel_based_batteries
09:06 AM rue_mohr: that might roughly confirm that math
10:02 AM aandrew: hm, 6h ahead of me
10:02 AM aandrew: polprog: you're over in europe somewhere, guessing Poland given your name?
10:33 AM aandrew: man I have been sitting at this computer for almost 4h and have got *nothing* meaninful accomplished
10:40 AM polprog: aandrew: yes, thats right
10:40 AM polprog: rue_mohr: they are "1250mAh" cells run down heavily
10:41 AM polprog: so i have no idea how much in reality.. these two are the only ones that dont "charge" in several seconds on the lab psu
10:41 AM polprog: i might have resurrected the sealed batt pack
10:42 AM polprog: basically i have two six cell ni-cd packs. one was completely dead, took it apart, measured the cell voltages and cut them apart into individual cells im messing with now
10:43 AM polprog: one cell was completely dead (0V) so this one goes to the dead battery box.. two seem fine - they take some time to charge - and those were these two im testing
10:53 AM polprog: meanwhile i left the other, intact pack charging for an hour now
10:53 AM polprog: and it seems to be recovering.. the charge current went from 160mA to 200mA and the radio works
10:59 AM aandrew: wondering what you do with the dead batteries
10:59 AM polprog: the totally dead or just a little dead?
10:59 AM aandrew: just kind of a storage place for future "hey I wonder if I can get the cadmium out of them" or something more?
10:59 AM aandrew: the totally dead (0V) ones
10:59 AM polprog: for now they just go into a plastic box. i have quite some various dead cells
10:59 AM polprog: got two dead 18650 Li-ion cells
11:00 AM polprog: ill probably take them to the recycler when i have enough
11:00 AM aandrew: the NiCd whisker thing can usually be reconditioned with some high current treatment but it's been almost a decade since I've done anything with NiCd and almost as long for NiMH
11:00 AM polprog: i dont feel like taking cadmium stuff apart... i sleep in this room ;)
11:00 AM aandrew: I bought a dozen 18650 cells to "standardize" on something for my projects with the kids
11:01 AM polprog: i read about reconditioning. Battery University says NiCd are pretty tolerant to mistreatment
11:01 AM aandrew: with enough cadmium you could sleep a LOT longer... :-)
11:01 AM polprog: :P
11:01 AM aandrew: yes NiCd are nigh indestructable
11:02 AM aandrew: my dad LOVED his NiCd batteries and was careful to treat them well to prevent the whiskers, they delivered lots of current and served him really well
11:02 AM polprog: that overnight led load was to run them down to .6V as suggested in https://batteryuniversity.com/learn/article/how_to_restore_nickel_based_batteries
11:03 AM aandrew: *nods*
11:04 AM aandrew: when I was in to NiMH I had an elaborate plan to put barcode stickers on the individual cells and build a nice charger that could identify which specific battery was in which slot and if that battery was due for a deep discharge/charge to do it and take care of all of this automatically
11:04 AM polprog: in fact they are back to 1.2V.. all of them
11:04 AM aandrew: I still want to do something like that
11:04 AM polprog: hmm, good idea
11:04 AM polprog: mine are numbered with a marker noiw
11:04 AM polprog: now*
11:05 AM polprog: the two that were being ran down
11:05 AM polprog: i should take a 1k resistor, a 1n4148 and just discharge them to .4
11:05 AM polprog: the two that are okay
11:25 AM Tom_L: do a back yard bomb video with the dead cells
11:25 AM Tom_L: everyone else has...
11:48 AM polprog: i dont think nicd are this reactive
05:00 PM rue_mohr: I have a constant current source I use for 20hr discharge tests
05:25 PM aandrew: A friend of mine created the re:load and re:load pro; I bought one of the latter and it's actually quite useful as a low-current (hundreds of mA) load
05:29 PM rue_mohr: :) I build an op-amp and big-mean-fet one, then I stuck on an avr for serial control and monitoring
05:29 PM rue_mohr: goes up to 10A iirc
05:29 PM rue_mohr: 5?
05:29 PM rue_mohr: it was 5A cause it was a 1 ohm senses with a 5V range
05:30 PM rue_mohr: iirc I changed it for some reason
06:13 PM aandrew: that is pretty much the definition of a programmable load right there
06:14 PM aandrew: I've been contemplating an oxygen concentration sensor design
06:14 PM aandrew: the general design is based on the velocity of sound in different gasses
06:15 PM aandrew: speed of sound in air (mostly N2) vs O2 is ever so slightly different, but there are a few products (and a lot of research papers) which suggest this is doable without much in the way of hocus-pocus
06:15 PM rue_mohr: huh
06:16 PM rue_mohr: are normal oxygen sensors electrochemical?
06:17 PM aandrew: you basically need a temp sensor (since the speed of sound is also very dependent on temp) and a single pair (for conc only) or pair of pairs (for flow) of ultrasonic transducers
06:17 PM aandrew: that is one way yes
06:17 PM aandrew: there are chemicals which fluoresce based on O2 conc
06:17 PM rue_mohr: oo
06:18 PM aandrew: I can use a diode-connected transistor as temp sensor or that magic circuit for airflow and then a pair of transducers to sense concentration
06:18 PM aandrew: basically critical, repeatable measurement of small units of time and a bunch of math is all that's needed
06:18 PM rue_mohr: seems like an awefull touchy signal ratio
06:19 PM aandrew: yes, but it also seems very doable
06:20 PM aandrew: a fast STM32 timer can have very nice capture resolution, and I can also use something more application specific like a TDC7200/7201 to get dozens-of-nsec resolution
06:20 PM aandrew: using nothing more than an AVR
06:20 PM rue_mohr: hah, I wondered how I would do it and my deisgn almost immediatly required a pourus bottle of liquid hydrogen
06:20 PM aandrew: (I'd go for the stm32 just because I like them and I dont' see much value in optimizing for tiny 8-bitters anymore)
06:20 PM rue_mohr: 400Mhz on the fpga
06:21 PM aandrew: actually the larger the variation in molar weight between gases in the mixture, the easier it is because the bigger the difference in propagation time
06:22 PM aandrew: that's why you'd use something like a TDC7200; it does the stupid fast bits cheap and gives you a SPI interface
06:22 PM rue_mohr: dont know that one
06:23 PM rue_mohr: I'm sure the maker community could make a great ventillator if we just broke up the damn problem right and distributed it out
06:40 PM aandrew: fuck me.
06:40 PM aandrew: the security camera got a perfect shot of my plumber butt when I bent over to pick up the parcel UPS dropped off.
06:40 PM * aandrew goes to find a goddamned belt
06:42 PM rue_mohr: HEH
06:43 PM rue_mohr: OOPS, CAPS IS ON
06:43 PM rue_mohr: to make this code event based I have to turn it inside out, its being quite a challange
06:43 PM rue_mohr: it would be nice if it'd been event based from the start
06:48 PM Tom_L: maybe you should have found an event based tutorial instead
06:49 PM rue_mohr: thats the only "write an editor" tutorial I'v ever seen
06:51 PM Tom_L: http://lpan.io/what-i-learnt-from-viw/
06:52 PM Tom_L: maybe that will inspire you
06:56 PM rue_mohr: I dont want to start again :)
06:56 PM rue_mohr: I'm on a path I have owrking code
06:56 PM rue_mohr: its just gonna need lots more transforms
06:56 PM Tom_L: no but maybe it has some clues
06:57 PM rue_mohr: dont need many at this point, its all a process of gradually rewriting everythign a few times
06:57 PM Tom_L: carry on.
06:57 PM rue_mohr: thanks for the link I'm looking it over
07:29 PM aandrew: ugh
07:29 PM rue_mohr: ?
07:29 PM aandrew: I need to work on BLE shits not fantasizing about 55ps resolution for ultrasonic measurements
07:30 PM rue_mohr: 55ps
07:30 PM aandrew: I took a 5hr energy about 2h ago which means I'll probably be up until 2 or 3am now (in 7h)
07:30 PM Tom_L: pico sec?
07:30 PM aandrew: yes pico
07:30 PM rue_mohr: 18Ghz
07:30 PM aandrew: TDC7200 is a time interval counter designed for very granular measurements between events
07:30 PM aandrew: it's just a ring counter going that fast and latching values
07:30 PM aandrew: very cheap chip
07:30 PM Tom_L: i did a polaroid sensor on a robot if that counts
07:30 PM aandrew: (not being sarcastic)
07:31 PM rue_mohr: if they aren't using an 18ghz counter, they must have some interesting propigation delay stuff
07:32 PM aandrew: it's an interesting little chip, if you want the diversion the datasheet is http://www.ti.com/lit/ds/snas647/snas647.pdf
07:32 PM aandrew: also fuck you TI for your idiotically-named documents
07:33 PM aandrew: ST is no better actually
07:33 PM Tom_L: http://www.robotstorehk.com/6500.pdf
07:33 PM Tom_L: that was their datasheet
07:34 PM Tom_L: i'm sure things have improved since polaroid days
07:35 PM rue_mohr: hah
07:35 PM rue_mohr: oh, that
07:35 PM rue_mohr: I must have one of those
07:35 PM Tom_L: i've got a couple iirc
07:35 PM Tom_L: one is different
07:36 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/largebot/largebot1.jpg
07:36 PM Tom_L: on that bot
07:37 PM rue_mohr: didn't get to using them
07:37 PM rue_mohr: were the results verry stable?
07:37 PM Tom_L: not bad
07:37 PM Tom_L: good for iirc about 30'
07:37 PM Tom_L: alot better than those little ones
07:38 PM rue_mohr: there is an fpga project
07:40 PM Tom_L: i've got a few of the SRF04's
07:41 PM aandrew: yeah I have a box of SRF04s that I'm going to cannibalize for this
07:42 PM aandrew: I like the encoder-wheel-wheel
07:42 PM rue_mohr: you kow about the encoder generator?
07:42 PM aandrew: hm?
07:43 PM * aandrew is a bear of very little brain
07:43 PM rue_mohr: we lost the good one, I think the author passed
07:43 PM Tom_L: david anderson had one
07:43 PM rue_mohr: I got a backup
07:43 PM Tom_L: http://www.geology.smu.edu/~dpa-www/myrobots.html
07:43 PM Tom_L: somewhere on there
07:44 PM rue_mohr: where is it..
07:44 PM Tom_L: http://www.geology.smu.edu/dpa-www/robo/Encoder/pitt_html/encoders.html
07:44 PM aandrew: http://www.geology.smu.edu/dpa-www/robo/Encoder/pitt_html/encoders.html
07:44 PM aandrew: yeah
07:44 PM Tom_L: maybe
07:45 PM rue_mohr: no I saved the encoder generator
07:45 PM aandrew: this looks like a site I should mirror
07:45 PM rue_mohr: remember the web one?
07:45 PM aandrew: no, no... I must do BLE now
07:45 PM Tom_L: :)
07:45 PM aandrew: dammit rue, you know how hard it is to focus when you have other interesting things
07:46 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/maxbot/maxbot_index.php
07:46 PM rue_mohr: hold on this is crasy
07:46 PM Tom_L: that was my most fun one
07:47 PM rue_mohr: no no no where is it!!!
07:47 PM aandrew: nice build, Tom_L
07:47 PM aandrew: dammit
07:48 PM Tom_L: http://www.bushytails.net/~randyg/encoder/encoderwheel.html
07:48 PM Tom_L: that was one i remember
07:48 PM rue_mohr: oh! its back up
07:48 PM * aandrew bashes his head against the desk as he mirrors that page
07:48 PM rue_mohr: maybe he's ok
07:49 PM rue_mohr: where is my copy!?
07:49 PM rue_mohr: wtf
07:50 PM rue_mohr: wtf
07:50 PM Tom_L: aandrew, you saw my mill build?
07:50 PM rue_mohr: ok what the hell is going on
07:51 PM Tom_L: covid-19?
07:51 PM rue_mohr: maybe thats not what I have a backup of
07:51 PM aandrew: hm, not so easy to mirror, encoderwheel.php returns a png when wgetted
07:51 PM rue_mohr: who was ...
07:51 PM rue_mohr: it renders is as a png
07:51 PM Tom_L: that was the one i remembered besides davids
07:51 PM rue_mohr: html canvas iirc
07:51 PM Tom_L: i made my own
07:51 PM rue_mohr: thats the one where is my copy?
07:51 PM rue_mohr: his does all the fancy stuff
07:52 PM Tom_L: right behind that box under that pile of .....
07:52 PM rue_mohr: but where is my copy?
07:52 PM rue_mohr: wormfood
07:52 PM Tom_L: yeah i remember him
07:52 PM rue_mohr: ooh, I'm mixed up
07:53 PM rue_mohr: its the baud rate calculator I saved
07:53 PM Tom_L: he did the baudrate generator
07:53 PM rue_mohr: yea
07:53 PM rue_mohr: a good one
07:53 PM rue_mohr: I have a slightly old version
07:53 PM rue_mohr: someone contacted me, said he was in trouble and needed help to save the sight
07:53 PM rue_mohr: I didn't click in time
07:54 PM rue_mohr: oh yea, ok, 1+1
07:55 PM rue_mohr: randyg is the one donating my webspace
07:55 PM rue_mohr: :)
07:55 PM rue_mohr: you would tink I would remember who is who
07:55 PM Tom_L: i recall someone else
07:55 PM Tom_L: i forget his nick
07:55 PM Tom_L: started with "H" i thought
07:55 PM rue_mohr: oh wait
07:55 PM rue_mohr: maybe you are right
07:56 PM rue_mohr: cowgar
07:56 PM Tom_L: i'm not gonna go look it up
07:57 PM rue_mohr: no its ok, I ought send him more money tho
07:59 PM rue_mohr: randyg
08:08 PM aandrew: balls
08:08 PM aandrew: can't grab that php
08:09 PM aandrew: heh I remember wormfood
08:09 PM aandrew: he moved off to china, started a new family and has disappeared for the last few years now, sadly
08:21 PM rue_mohr: I wonder if he gets messages from sales on the site, ahhahaha
08:39 PM aandrew: arrrrrgh still have to get started on BLE
08:39 PM aandrew: got derailed on looking at stm32g4x4 which has a similar ring counter as the TDC7200
08:39 PM aandrew: must focus!
08:39 PM Tom_L: well let's see what else we can distract you with...
09:05 PM rue_mohr: heh
09:05 PM rue_mohr: wow, I'm about to go down for the count again
09:05 PM rue_mohr: whatever I have, has me completely exhauseted
09:10 PM Tom_L: mmm
09:52 PM rue_mohr: yea, fun
09:52 PM rue_mohr: if the user hits escape, the system gives you the escape character
09:53 PM rue_mohr: but if you hit any control character, it gives you an escape, and a bunch of other stuff
09:53 PM rue_mohr: so, if you get an escape, you need to know if there is anything else comming in faster than the user could have typed it to know if its a control charater or not
09:55 PM Tom_L: that would be the fastest keboard rate possible then
09:55 PM Tom_L: what if he holds the key down?
09:55 PM rue_mohr: yea
09:55 PM rue_mohr: what a freaking mess, sadly not the only one
09:55 PM rue_mohr: lets say the user presses F5
09:56 PM rue_mohr: the code for F5 is different on every type of terminal
09:56 PM Tom_L: how much delay does the system allow on a keypress before it starts repeating it at the given rate?
09:56 PM rue_mohr: } else if (!strcmp( s, "OR")) { return KEY_F3;
09:56 PM rue_mohr: } else if (!strcmp( s, "[13~")) { return KEY_F3;
09:56 PM rue_mohr: } else if (!strcmp( s, "[[C")) { return KEY_F3;
09:57 PM rue_mohr: it comes thru as a continious stream, so you cant tell
09:57 PM rue_mohr: you have to work with the fact that escape escape, is escape
09:57 PM Tom_L: sounds like you're having fun
09:57 PM rue_mohr: yea....
10:26 PM rue_mohr: http://unixwiz.net/techtips/termios-vmin-vtime.html
10:30 PM Tom_L: detective rue
10:32 PM Tom_L: what is POSIX?
10:32 PM Tom_L: not having a unix background i dunno
10:40 PM rue_mohr: lost roots
10:40 PM rue_mohr: defined stadards that nobody who wasn't making up their own thing didn't follow
10:41 PM rue_mohr: a clean slate restart would be really benificial to technology in general
10:41 PM rue_mohr: we would have it all screwed up in another 40 years anyhow, but
10:42 PM rue_mohr: I'm getting closer
10:46 PM rue_mohr: ok!
10:46 PM rue_mohr: geez, I'm inadvertantly making lots of bugs that I have to go back on
10:46 PM rue_mohr: net direction is forward tho
10:47 PM Tom_L: don't make it worse!
10:48 PM rue_mohr: like I said, 100lbs pile of tangled rope
10:48 PM rue_mohr: you know when you give in and you start "unthreading one end" ?
10:48 PM rue_mohr: which you know technically makes nots int eh process?
10:48 PM rue_mohr: but if you follow it to the end it'll work>?
10:49 PM Tom_L: you say...
10:50 PM Tom_L: just make sure it's one rope
10:50 PM rue_mohr: moving from flow based to event based is pretty ugly
10:50 PM rue_mohr: "cut the wire, if its got 3 ends when your done, you did it wrong!
10:50 PM rue_mohr: "
10:52 PM Tom_L: maybe i'll mineatureize my cube tomorrow
10:52 PM Tom_L: have to see what cutters i have
10:55 PM rue_mohr: no snowflake?
10:56 PM Tom_L: unlikely
10:56 PM Tom_L: i got some brass chunks i may fiddle with and see what happens
11:00 PM rue_mohr: hah, I should send you some of my chineese 1mm bits to use and try it
11:01 PM rue_mohr: ok! now to rewrite the other two functions
11:12 PM rue_mohr: heh
11:13 PM rue_mohr: 'save' checks if there is no filename, if there isn't it triggers a prompt to get one., if it gets one, it sets the file name and triggers the save
11:14 PM rue_mohr: haha! it works
11:15 PM rue_mohr: most gui code, 2/3 of the code is setting up the ui
11:22 PM Tom_L: save and save as
11:22 PM Tom_L: save means the file is already there
11:23 PM Tom_L: save as means it might be saved but you want to call it something else
11:24 PM Tom_L: does it use fread fwrite or is it done another way?
11:25 PM Tom_L: all my low level file handling is done with fread fwrite fopen and handles (open file numbers)
11:26 PM aandrew: sigh
11:26 PM aandrew: I hate node.js
11:36 PM rue_mohr: it doesn't use the FILE stream stuff
11:36 PM rue_mohr: its actaully prettty ugly, its breaking the inpoput file down into an array of strings
11:39 PM rue_mohr: I'm gonna replace that bit, but its quite a few steps away
11:43 PM Tom_L: i wrote parts of my work program using arrays
11:43 PM Tom_L: i was kindof afraid i might run out of space but i never have yet
11:44 PM Tom_L: it _was_ far enough along it uses code blocks
11:45 PM Tom_L: so i can pass a block to the array as a parameter and it will act on the array
11:47 PM Tom_L: Meth_no = ascan(tb_methods, {|elem| lkey = elem[1]})
11:47 PM Tom_L: then it went thru a list of key exceptions
11:53 PM rue_mohr: hmm
11:54 PM rue_mohr: I have a much better editor core I wrote back in 2000
11:54 PM Tom_L: made me realize i wanted to fix something in the program
11:54 PM Tom_L: minor
11:55 PM Tom_L: on a lookup, go to the bottom of the screen since that's usually where i end up
11:55 PM Tom_L: default is top