#robotics Logs
May 07 2017
#robotics Calendar
12:12 AM z64555: oops, found an error in 2 year old untested code
12:15 AM z64555: doing a shift and scale to make sure the throttle values are within min and max constraints, but when scaling down the throttles to fit the max values, I forgot about the edge case
12:15 AM z64555: of where the down-scaling might push the throttle below the min again
12:22 AM Anniepoo_: oops
03:07 AM rue_shop3: hahah
03:07 AM rue_shop3: the LM2907 kinda sucks
03:07 AM rue_shop3: the output is completely dependent on the supply voltage
03:08 AM rue_shop3: it does a charge cycle on every edge, so I'm not sure on how it would like pwm
03:08 AM rue_shop3: or varried duties
03:11 AM rue_shop3: ok, so now I'v done the lm2907
03:11 AM rue_shop3: hmm, what next
03:11 AM rue_shop3: current sensor or power supply regulator
03:22 AM rue_shop3: I wonder what happens when you put a pizo in a ceramic resonator circuit
03:50 AM rue_shop3: 8-| I UNDERSTAND!
03:51 AM rue_shop3: a pizo puts out charge with the polarity and amplitude of force applied to it
03:51 AM rue_shop3: a mosfet takes the charge from a capacitor and turns it into a resistance
03:52 AM rue_shop3: SO putting the pizo on the input of a 4069 causes the force to be directly converted into voltage
03:52 AM rue_shop3: without needing the integrator
03:53 AM rue_shop3: I have it from the output to the input of the 4069
03:53 AM rue_shop3: the output is the source of the 4069?
03:54 AM rue_shop3: hmm no
03:54 AM rue_shop3: interesting that works
04:13 AM rue_shop3: YES!
04:13 AM rue_shop3: YES!!!!
04:13 AM rue_shop3: if I take a 2n7000 and put the pizo between the gate and source, I get a REALLY sensitive, absolute presure sensor
04:14 AM rue_shop3: with a 12V supply and a 1k pullup, source also on ground
04:14 AM rue_shop3: its amazing really
04:15 AM rue_shop3: a 10mm pizo, pushed on right (with a really small amount of force) will generate +-10V easy
04:16 AM rue_shop3: if your attach the non-gate side of the pizo to the inverted output instead of the source, it brings down the gain
04:16 AM rue_shop3: negitive feedback
04:16 AM rue_shop3: this would rock for weighing screws
04:30 AM rue_shop3: wow, the things you never thought to think of
04:34 AM rue_shop3: https://www.aliexpress.com/item/50PCS-12mm-Piezo-Elements-Sounder-Sensor-Trigger-Drum-Disc-Copper/32732330019.html
04:35 AM rue_shop3: https://www.aliexpress.com/item/50PCS-2N7000-TO92-Small-Signal-MOSFET-200-mAmps-60-Volts-N-Channel-TO-92-Original-and/32492820331.html
04:35 AM rue_shop3: thats almost all you need
10:05 AM z64555: congrats
10:52 AM z64555: gotta figure out this min/max clamping
11:02 AM z64555: probably can't do them independantly, have to do the op together
11:25 AM z64555: ok, here we go, shift down towards 0, the scale down by max - min
11:25 AM z64555: hm, wait, no
11:25 AM z64555: almost
11:26 AM z64555: scale down by max + min
11:26 AM z64555: then add min
11:28 AM z64555: hm, still not quite there
11:33 AM z64555: there.
11:34 AM z64555: e[] -= e_min;
11:34 AM z64555: e[] /= (e_max + MIN) / MAX;
11:34 AM z64555: e[] += MIN;
11:57 AM rue_bed: z64555, are you trying to change the range of a value?
11:58 AM rue_bed: aka take 56-890 and scale it to 0-1024?
12:06 PM z64555: yeah. second line is borked.
12:07 PM z64555: rue_bed: yes, had a friend help me out
12:07 PM z64555: what you see there is my groggy brain trying to shake rust off the gears
12:09 PM z64555: should be:
12:09 PM z64555: e[] -= e_min;
12:09 PM z64555: e[] /= e_max - e_min;
12:09 PM z64555: e[] *= MAX - MIN;
12:09 PM z64555: e[] += MIN;
12:12 PM rue_bed: do you know about the arduino map() function?
12:12 PM z64555: would help if I was using arduino
12:13 PM rue_bed: / for linear remapping of number ranges, see arduino map()
12:13 PM rue_bed: / think of a line, between Il,Ol and Ih,Oh, this solves the y for given x position
12:13 PM rue_bed: #define RangeRemap(v,Il,Ih,Ol,Oh) (((((v)-(Il))*((Oh)-(Ol)))/((Ih)-(Il)))+(Ol))
12:14 PM z64555: which is exactly what we did
12:14 PM rue_bed: z64555, arduino dosn't matter, point is, they have a nifty feature anyone can use
12:15 PM rue_bed: #define Min(X,Y) ((X) < (Y) ? (X) : (Y))
12:15 PM rue_bed: #define Max(X,Y) ((X) > (Y) ? (X) : (Y))
12:16 PM rue_bed: its better to make a library of common operations rather than to rebuild them each time in your code
12:16 PM rue_bed: if they aren't messed up, anyhow
12:17 PM rue_bed: / does a differ from b by more than D?
12:17 PM rue_bed: #define DiffGreater(a,b,D) (ABS((a)-(b))>D? : 1 : 0)
12:18 PM rue_bed: / convert X,Y to integer offset V, I is XMAX J is YMAX
12:18 PM rue_bed: / this is broken for 0 based arrays...
12:18 PM rue_bed: /#define xy2i(X,Y,I,J) (((I)*(Y))+(X))
12:18 PM rue_bed: #define xy2i(X,Y,I) (((I+1)*(Y))+(X))
12:18 PM rue_bed: #define i2x(V,J) ((V)%(J+1))
12:18 PM rue_bed: #define i2y(V,J) ((V)/(J+1))
12:18 PM rue_bed: looks like I had an oops version
12:19 PM rue_bed: anyhow
12:20 PM rue_bed: mmmm I'v not done any coding in a while
12:33 PM z64555: Yeah, I'm still in the process of building my library. I don't code often enough to have it full by now
12:34 PM synja: what are you making z64555
12:34 PM z64555: same thing I've been making for the past 4 years, lol
12:35 PM synja: well i haven't been around here for the last 4 years
12:35 PM z64555: I work on my quadrotor for a bit, then put it back on the shelf to collect more dust. repeat every year
12:35 PM synja: ah
12:35 PM synja: ah
12:35 PM z64555: staying alive?
12:36 PM synja: have you ever tried mounting a 3d gun on it and use image recognition?
12:36 PM synja: there's a kick, but you can compensate mid air
12:37 PM synja: just wondering. it's a fun project :P
12:37 PM z64555: I will not arm drones
12:37 PM synja: lol
12:38 PM z64555: even if it's some toy gun like a nerf blaster or paintball marker
12:38 PM z64555: :P
12:38 PM synja: not even napalm with a magnesium fuse?
12:39 PM z64555: oh hail naw
12:39 PM synja: meh. to each their own
12:39 PM synja: but you do have image recognition with it right?
12:40 PM z64555: gotta get it flying first
12:40 PM synja: oh ic
12:41 PM z64555: image recognition is kinda moot too for a drone, you want to know if you're going to hit an object from the video feed, and for that you need range data
12:41 PM z64555: which means either stereoscopic vision or mixing with a lidar
12:41 PM synja: you can get that with multiple cameras processing the same image via disparity
12:42 PM synja: yeah
12:42 PM synja: it's a $8 project
12:42 PM z64555: that's what stereoscopic vision is
12:42 PM synja: hence the yeah
12:42 PM z64555: uses two cameras
12:42 PM z64555: ok
12:42 PM synja: doesn't take up too many cycles either
12:43 PM z64555: That largely depends on the resolution of the cameras and what you're using to proccess each frame
12:43 PM z64555: if you've got a piddly little MCU with just an FPU on it, good luck
12:43 PM synja: well you use larger resolutions for training image classifiers, smaller resolutions for real time
12:44 PM synja: i could make do with it z64555
12:44 PM z64555: but if you've got something like an x86 or a a FPGA, congrats
12:44 PM synja: you can also just outsource it to one of your servers
12:44 PM synja: just get the connection and commands
12:45 PM z64555: yeah, there's that
12:45 PM synja: more latency
12:46 PM rue_house: the kicker is that you dont need stereo for distance, you just need to work out your layers and sheer rates
12:46 PM z64555: but alas, that's far away
12:47 PM synja: rue_house, you don't _need_ it, but it's helpful
12:47 PM synja: it's more convenient than working movement around the vision system
12:47 PM synja: takes up less cycles too
12:47 PM z64555: layers/sheer rates only work if you're moving. But then again any aerial drone is almost never stationary
12:47 PM synja: just, 1 more piece of hardware
12:48 PM synja: if you know how much you moved by then yes
12:49 PM z64555: there's also that
12:49 PM synja: also drones are shifting in air, so the camera would have to take a small subsection (tricky) or operate on a gyro or something
12:49 PM rue_shop3: did you guys catch the revelation about force sensors I had last night?
12:49 PM z64555: Yeah, you made a force sensor out of a piezo and a transistor
12:50 PM rue_shop3: yea, an absolute force sensor too
12:50 PM rue_shop3: you dont have to use an integrator
12:50 PM rue_shop3: it does need pre-zeroing tho
12:50 PM synja: :/
12:50 PM rue_shop3: usually any change of the input zeros it
12:50 PM synja: just use a pot for that?
12:50 PM synja: oh
12:51 PM rue_shop3: force
12:51 PM rue_shop3: the $4ea force sensors can be replaced by piezos that cost $4/50pcs
12:52 PM z64555: heh, that's some serious engineering cost tacked onto them
12:52 PM rue_shop3: I never thought to realize that a fet is a charge accumulation meter
12:52 PM rue_shop3: z64555, ?
12:53 PM rue_shop3: this is by far a cheaper way to go than ANY force sensor I'v seen yet
12:53 PM z64555: ah, what do they normally do?
12:53 PM rue_shop3: tell you how much force is being applied to something
12:53 PM rue_shop3: ...you dont get it do you?
12:54 PM synja: it's exactly what it sounds like
12:54 PM z64555: I've got one foot on the pavement, so I might be missing something you're trying to tell me
12:55 PM synja: he's taking the current generated by the piezo and measuring it with the fet
12:56 PM z64555: that much I understood
12:56 PM synja: if something touches one, you can get the force of the object on the sensor
12:57 PM synja: i'm not sure what else there's to say about it
12:57 PM z64555: He keeps mentioning something about an integrator, so I'm assuming the normal force sensors just sense instantanious force, whereas this circuit will sense accumulative force
12:58 PM synja: if you make it sensitive enough, it could even work for gas pressure
12:58 PM z64555: I think that would just require a thin piezo
12:58 PM synja: mhm
12:59 PM synja: i think the voltage generated would be the instantanious force, while the current is the accumulated
12:59 PM rue_shop3: when you tap on a piezo, you only get a pulse, like its come thru a differentiator
01:00 PM rue_shop3: er, /tap/push/
01:00 PM rue_shop3: peizo outputs dF
01:00 PM z64555: well, yes
01:00 PM rue_shop3: the gate capacitance of the fet integrates it
01:01 PM rue_shop3: so you get the absolute force
01:01 PM rue_shop3: there is almost NO drift
01:01 PM rue_shop3: I left the pliers sitting on my test sensor for a good 5 mins and it went back to zero when I took them off
01:02 PM z64555: nice
01:02 PM rue_shop3: this helps me do a force feedback controller
01:02 PM z64555: since you don't need an integrator circuit, which is an op amp and some caps
01:03 PM z64555: frees up board space and reduces power consumption, perhaps
01:03 PM rue_shop3: and works better
01:03 PM rue_shop3: from what I can tell
01:03 PM z64555: patent it :D
01:04 PM rue_shop3: not interested
01:04 PM rue_shop3: I'm interested in making my force feedback robot controller
01:04 PM z64555: lol, ok
01:05 PM rue_shop3: I think I need to find that last cap that exploded in this computer, apps keep crashing
01:11 PM z64555: blah, almost forgot that the cyclic values are -1 to 1
01:17 PM z64555: I'm currently working on the engine driver, btw. It has a limiter in it to prevent the throttle value going outide the range that the motors can safely run
01:18 PM z64555: while trying to keep the requested cyclic and collective values
01:20 PM z64555: The limiter also modifies the cyclic and collective, so that the predicitve algorithsm (including the kalman filter) know what's going on
01:20 PM * z64555 tries to remind his fingers to type a bit slower
01:26 PM synja: rue_shop3> I'm interested in making my force feedback robot controlle
01:26 PM synja: hot damn that's right
01:26 PM synja: thanks for the idea
01:26 PM synja: i was looking for a skin substitute
01:28 PM synja: i mean that wasn't what you meant, but it could be used for that
01:28 PM synja: :P
01:53 PM z64555: hm.
01:53 PM z64555: Guess I'll have to do the "hard way" to figure out the cyclic
01:53 PM z64555: The collective is just the average of all engine throttles, so the same formula used to remap them can be applied to the collective's initial value
01:55 PM z64555: but the cyclic has a more complex relationship with the motors and with the collective
02:23 PM Ahmed___: is there any book about SLAM algorithms ?
02:24 PM deshipu: there are lots of papers
02:34 PM veverak: ROS afaik has nice implementation
05:21 PM Anniepoo3dprinte: 8cD
05:21 PM Anniepoo3dprinte: I think I'm ready
05:23 PM Anniepoo3dprinte: Whoot - the control circuitry comes up. Panel display seems happy
05:24 PM Anniepoo3dprinte: it returns to home
05:25 PM z64555: Sagitarius A*?
05:25 PM z64555: yikes.
05:25 PM Anniepoo3dprinte: 8cD
07:56 PM rue_house: anniepoo, did you hear about the force sensor!?
08:05 PM ace4016: yea, they detect mitachlorians
08:06 PM ace4016: sorry, midichlorians*
08:17 PM Anniepoo3dprinte: printing - first part came loose
08:39 PM Anniepoo3dprinte: 8cD still printing
08:39 PM Anniepoo3dprinte: suspect it'll take a while
09:03 PM anniepoo: no, what force sensor?
09:16 PM z64555: He made an accumulative force sensor out of a piezo and a fet
09:16 PM z64555: most force sensors are instantanious, if you want the total force applied to the sensor, you'd have to hook up an integrator
09:54 PM anniepoo: oh, nice!
09:54 PM anniepoo: yes, that's cool
09:54 PM anniepoo: this I've got to see
09:55 PM anniepoo: And FWIW it looks like we have a successful print. It's from the SD card, a sample part, but a good sign
09:56 PM rue_shop3: oh did you just get the printer!?
09:56 PM rue_shop3: assembed...
09:57 PM * rue_shop3 glances around nervously...
10:16 PM Anniepoo3dprinte: hey rue
10:16 PM Anniepoo3dprinte: 8cD yup, just printed a test part
10:17 PM Anniepoo3dprinte: it just finished
10:17 PM Anniepoo3dprinte: how do we get it off the blue tape?
10:18 PM Tom_itx: chisel
10:18 PM Anniepoo3dprinte: seriously? wood chisel?
10:18 PM Anniepoo3dprinte: Ok
10:18 PM Tom_itx: thin one yes
10:18 PM Anniepoo3dprinte: ok, great - going after one
10:18 PM Tom_itx: just pop it on the edge
10:19 PM Anniepoo3dprinte: ok, have a 1/2" wood chistel
10:20 PM Tom_itx: 1" would be better
10:20 PM Anniepoo3dprinte: can I use the blue tape again, or should I put new?
10:20 PM Tom_itx: no idea
10:21 PM Anniepoo3dprinte: ok, thanks
10:21 PM Anniepoo3dprinte: tape looks ok
10:21 PM Tom_itx: https://www.walmart.com/ip/Marshalltown-462-15072-1-5-inch-Chisel-Knife-Rosewood-Handle/118861399?wmlspartner=wlpa&selectedSellerId=1148&adid=22222222227051869299&wmlspartner=wmtlabs&wl0=&wl1=g&wl2=c&wl3=148210252227&wl4=pla-262224585800&wl5=9024248&wl6=&wl7=&wl8=&wl9=pla&wl10=112562587&wl11=online&wl12=118861399&wl13=&veh=sem
10:21 PM Tom_itx: one of those
10:22 PM Anniepoo3dprinte: ah - paint scraper
10:22 PM Anniepoo3dprinte: 8cD
10:22 PM Anniepoo3dprinte: okey dokey
10:23 PM Tom_itx: gasket scraper
10:23 PM Tom_itx: call it what you will :)
10:23 PM Tom_itx: finger removal tool
10:24 PM rue_shop3: yea paint scraper
10:25 PM rue_shop3: er, arg
10:25 PM rue_shop3: putty knife is what its called
10:25 PM rue_shop3: I put a one sided edge on mine
10:25 PM rue_shop3: AND TIED IT TO THE PRINTER
10:25 PM rue_shop3: I use green tape
10:26 PM rue_shop3: if its not stickey enough, give it a FAST LIGHT wipe with alcohol, it brings the glue forward
10:26 PM rue_shop3: consider the tape to be sacraficial or you will go insane
10:27 PM anniepoo: ok, great, thanks
10:27 PM anniepoo: green tape's not as sticky as blue tape
10:27 PM rue_shop3: correct
10:27 PM anniepoo: so what do you wipe?
10:27 PM rue_shop3: the tape
10:27 PM anniepoo: not getting the alcohol
10:27 PM anniepoo: on the sticky side?
10:28 PM anniepoo: prior to putting down?
10:28 PM rue_shop3: only if you have problems with it comming off too easy
10:28 PM anniepoo: ah
10:28 PM rue_shop3: aka during the print
10:28 PM anniepoo: yup
10:28 PM anniepoo: first print popped off the tape
10:28 PM rue_shop3: remember to wipe dust off the table before printing
10:28 PM rue_shop3: while printing or after
10:28 PM anniepoo: while printing
10:28 PM anniepoo: I had the nozzle too high
10:29 PM anniepoo: misread instructions
10:29 PM rue_shop3: oh yea :)
10:29 PM anniepoo: it's now set with a proper thickness gage
10:29 PM rue_shop3: it should slightly squish the first layer of plastic
10:29 PM anniepoo: well, they said 0.4mm
10:29 PM rue_shop3: it should not be so close on the first layer that it causes a major wake
10:30 PM anniepoo: sorry, they said 0.15 to 0.25 (the 0.4 was my original mistake)
10:30 PM rue_shop3: a bit of a wake is ok
10:30 PM anniepoo: so it's set to 0.203
10:30 PM rue_shop3: http://www.electronics-lab.com/wp-content/uploads/2015/03/schem1.gif
10:30 PM rue_shop3: I cant find this schematic on my web browser, anyone have a link for it?
10:30 PM rue_shop3: ;)
10:30 PM anniepoo: depending on how much I'm deflecting the bed when jiggling the thickness gage
10:32 PM anniepoo: 8cD I'm totally cranked
10:32 PM anniepoo: 8cD We have a new toy
10:32 PM anniepoo: 8cD it was shockingly easy to put in service
10:32 PM anniepoo: 2nd part printed with no issues
10:33 PM anniepoo: now I'm lusting for a dual extruder unit (and thinking about the fact that kevin has an extruder head - he started to make one, never went anywhere)
10:33 PM rue_shop3: <headdesk>
10:34 PM z64555: the hotend looks super easy to mill
10:34 PM anniepoo: yes
10:34 PM anniepoo: there's nothing 'exciting' on the unit
10:35 PM anniepoo: but we def didn't want a hobby project
10:35 PM z64555: just a slab of metal with holes drilled in it, the tube is a threaded stainless pipe with a radial, er, radiator
10:35 PM anniepoo: tomorrow I'm hoping to put out a part we need for business
10:35 PM anniepoo: never have done that without the kit
10:35 PM anniepoo: totally happy with the $$ and time equation
10:36 PM anniepoo: Mike was just here- he took the part that popped off home, he's going to invest it and we'll try burnout
10:36 PM anniepoo: 8cD
10:49 PM Tom_itx: what sort of table is it?
10:50 PM Tom_itx: they use kids glue sticks around here to stick the PLA
10:50 PM Tom_itx: if you use it for that, make it like a 20% or less print
10:51 PM Tom_itx: just a guess but it makes sense to me
10:51 PM rue_shop3: anniepoo, what slicer are you using?
10:52 PM Tom_itx: rue_shop3, how many are there now?
10:52 PM Tom_itx: and which one works best?
10:53 PM rue_shop3: well I use slic3r
10:54 PM rue_shop3: you have to know that if it crashes when you open the stl, restart and before realoading the stl, change the layer height by like +-.001mm
10:54 PM rue_shop3: it seems that if there are surfaces that co-incide with the layer height multiple, it crashes slic3r
10:54 PM Tom_itx: silly
10:56 PM Tom_itx: have you tried one for a mold yet?
10:57 PM rue_shop3: not gonna try burning out pla!
10:57 PM rue_shop3: I'll make another printer that can do wax
10:57 PM Tom_itx: why?
10:57 PM rue_shop3: I'm determined it'd be a mess
10:57 PM Tom_itx: yeah wax would probably do better
10:57 PM rue_shop3: so, I'm really interested to see how anniepoo does with that
10:57 PM Tom_itx: but i bet if you did about a 15-20% fill it would work ok
10:57 PM rue_shop3: :)
10:58 PM rue_shop3: ~
10:59 PM Tom_itx: drop some PLA off a spool in your crucible and see what happens
11:00 PM * rue_shop3 takes a scrap to a blowtorch
11:00 PM * rue_shop3 has LOTS of scrap
11:02 PM rue_shop3: BAD CHOICE FOR ELECTRICAL BOXES
11:03 PM rue_shop3: it does get thin enough to drain out of a hole
11:04 PM rue_shop3: I need to figure out supper
11:05 PM Tom_itx: come to think of it, i missed that too
11:10 PM * z64555 had crackers for dinner
11:10 PM * Tom_itx eats a granola bar and calls it a night
11:13 PM anniepoo: I'm using Crue or something as slicer
11:14 PM Tom_itx: take pics of your casting venture
11:14 PM anniepoo: we will
11:15 PM anniepoo: about to take some pix of machine, brb
11:22 PM anniepoo: 8cD
11:25 PM anniepoo: http://partyserver.rocks/anniepoo/3dprinter/
11:25 PM anniepoo: printer and output
11:25 PM anniepoo: 8cD
11:28 PM anniepoo: 8cD
11:28 PM anniepoo: >8@_ Gonna be printing snail parts soon
11:30 PM anniepoo: ok, home to shower off fiberglass and eat
11:30 PM anniepoo: 8UD <-- happy camper
11:34 PM mrdata: how quickly will snail parts print?
11:34 PM rue_shop3: no no dont eat fiberglass!
11:35 PM rue_shop3: your prints are blurry, I'm not sure of the fix for that
11:35 PM rue_shop3: mmm i3
11:36 PM rue_shop3: not bowden which means feeding it plastic is not a !@#$#!$^!$%^@#$%@#%!@$#%^&
11:37 PM rue_shop3: heated bed
11:37 PM tttb2 is now known as tttb
11:37 PM rue_shop3: and [hahahah] (heatsinks)