#robotics Logs

Feb 22 2017

#robotics Calendar

12:45 AM branjb: anyone have an example of controlling stepper acceleration and velocity using timers? finding lots of white papers but no actual implementation
12:48 AM branjb: probably just not looking in the right place, figured i'd ask before implementing it myself
01:10 AM z64555: implementation varies between microprocessors
01:11 AM z64555: somewhat suprised there hasn't been an example for arduino
01:11 AM z64555: letsee.
01:12 AM z64555: Given a base pulse chain, you can determine velocity and acceleration based on it
01:12 AM z64555: this will be a z-domain function
01:13 AM z64555: so velocity would thus be delta position, and acceleration the delta velocity
01:13 AM z64555: v = p1 - p0; and a = v1 - v0
01:14 AM z64555: You can then send those data through an implementation of a PID
01:14 AM z64555: *datam
01:15 AM z64555: which controls the output pulses to the stepper
01:17 AM z64555: You can probably directly control the veleocity by adjusting the output frequency
01:18 AM z64555: which can be as simple as adjusting the pulse period timer
01:18 AM z64555: or timer value
01:18 AM z64555: Like I said, how that's actually done varies across uC's
01:33 AM Jak_o_Shadows: oooh, control stuffs
01:33 AM Jak_o_Shadows: Fill me in
01:36 AM z64555: branjb wants to control velocity and acceleration of a stepper motor
01:37 AM z64555: I'm not sure how much of my explanation was understood
01:37 AM z64555: and I'm busy trying to overhaul FSO's controls system
01:42 AM Jak_o_Shadows: a) FSO?
01:42 AM Jak_o_Shadows: b) Hmm. Does branjb care about a particular velocity profile, or just capping it or something?
01:43 AM z64555: I'm thinking the former
01:44 AM z64555: FSO = FreeSpace Open, an open source game I keep myself busy with
01:44 AM Jak_o_Shadows: eyyyy
01:44 AM Jak_o_Shadows: Good on you
01:44 AM Jak_o_Shadows: FSO is great
01:47 AM z64555: and he leaves, lol
01:49 AM z64555: wb
01:49 AM Jak_o_Shadows: ty. Computer BSOD'd. I was running a hp laptop bios upgrader in the hopes of finding out what type of bios it was, so I could identify the beeping this laptop in fron tof me is doing
01:49 AM Jak_o_Shadows: ANyway, what are you changing with FSO?
01:52 AM z64555: the controls backend, This is the part of the program that manages the input bindings from keyboard, mouse, and joystick
01:53 AM z64555: I'm doing a much needed overhaul on it so we can get multiple joystick support, custom LUA controls support (modders can make more controls if they like, and have their behavior defined in a LUA hook)
01:53 AM z64555: and more
01:56 AM z64555: sigh
01:56 AM z64555: Ending up re-doing a good chunk of my initial work
01:57 AM z64555: std::pair<short, short> was insufficient for the binding structure, so I declared a new struct{char; char; short;}
01:58 AM z64555: first char wil identify which controller the binding is for, the second char will ident the type of control/transducer it's referencing
01:59 AM z64555: and the last short will be the index of the control
01:59 AM z64555: its a bit more complicated, but more flexible
02:01 AM Jak_o_Shadows: oh gosh, multiple joysticks would be beautiful
02:02 AM Jak_o_Shadows: Any thoughts on having calibration curvesa, and trims?
02:02 AM Jak_o_Shadows: Also, it's in what, C++?
02:02 AM z64555: yes, C++
02:02 AM Jak_o_Shadows: Any particular bindings? Like, SDL or somewhat?
02:02 AM z64555: and somebody has already made calibration curves, but it has to use commandline flags for now
02:03 AM z64555: SDL2
02:03 AM z64555: but the calibration curves hasn't been merged in yet
02:03 AM z64555: the dev who made it keeps getting distracted by work. :P
02:05 AM Jak_o_Shadows: aha
02:06 AM z64555: I've mostly figured out how to hand multiple joysticks within FSO, but saving them is a bit tricky
02:06 AM Jak_o_Shadows: aye. How is joystick config saved?
02:07 AM z64555: Well, currently, it just assumes that there's one joystick, so only the button index is saved
02:07 AM z64555: When multiple joysticks come into play, however, you need some way of identifying which joystick is which
02:07 AM Jak_o_Shadows: How are you identifying them?
02:07 AM Jak_o_Shadows: Like, system order isn't really good enough
02:07 AM z64555: yes
02:07 AM z64555: I'll have to use GUID
02:08 AM z64555: which is kinda like a MAC address for network devices
02:09 AM z64555: the GUID is a char[16] hash, but it's only garaunteed to be (mostly) unique to a model of joystick
02:10 AM z64555: So, the bindings will be correct and valid, but you may end up having your right-hand joystick suddenly become your left-hand joystick after restarting your PC
02:11 AM z64555: so I'm trying to figure out some sort of mechanism to swap/cycle the bindings through joysticks with the same GUID
02:11 AM z64555: ...while I'm fixing things that I've broken again
02:13 AM Jak_o_Shadows: that's a good idea
02:14 AM z64555: I'm happy though. An off-shoot of this project has yielded a generic undo/redo system
02:14 AM z64555: :D
02:15 AM z64555: https://github.com/scp-fs2open/fs2open.github.com/pull/1243
02:16 AM z64555: it makes use of C++'s template system to enforce type safety
02:18 AM z64555: It can do single item undo/redo operations, as well as a multiple item undo/redo ops
03:21 AM Jak_o_Shadows: Undo where? FRED mostly?
04:02 AM Jak_o_Shadows: These could be handy
04:02 AM Jak_o_Shadows: saves on using threaded rod.
04:02 AM Jak_o_Shadows: (stewart platform)
04:15 AM Jak_o_Shadows: https://www.aliexpress.com/item/20pcs-Pushrod-Connectors-Linkage-Stoppers-D2-1mm-D1-8mm-D1-3mm-RC-Airplane-Parts-Replacement-Remote/32704510201.html?spm=2114.01010208.3.35.RsOFwU&ws_ab_test=searchweb0_0,searchweb201602_2_10000073_10000077_10000074_10000167_10000175_10000069_10000068_10000062_10000063_10099_10000156_10000158_10096_10000056_10000059_10000097_10000094_10000090_10000091_10000147_10000144_10084_10000150_10083_10000011
04:32 AM Jak_o_Shadows: Hmm. What's a source for steel rod to use in that
05:17 AM Jak_o_Shadows: bugger it. coathangers
09:02 AM rue_house: piano wire
09:03 AM rue_house: drill a hole in a #6 standoff and get the same thing
09:03 AM Tom_L: what size?
09:04 AM Tom_L: every time i do an install, i feel a great sense of acomplishment just for making it thru it
09:24 AM rue_house: linux, windows, or the mixed things you keep comming up with
09:30 AM rue_house: https://www.aliexpress.com/item/Promotion-50Pcs-M3-Male-Thread-Hex-Standoff-Hexagonal-Spacer/32694537687.html
09:30 AM rue_house: of of course jak wouldn't be here anymore
09:57 AM rue_shop3: Tom_L, yes, this morning the motors done, the brushes gave up
02:00 PM z64555: huh.
02:00 PM z64555: Placing a \ at the end of a // comment line makes it uncomment the next line(s)
02:14 PM Snert__: that's a "continue line on next line"
02:14 PM Snert__: when bash scripting is where I know it from.
02:15 PM z64555: yeah, I've been trained to use it in macros
02:15 PM z64555: didn't know it applied to other things, as well
02:16 PM Snert__: I've never tried it to see if it causes an uncomment though.....hmmmm.
02:58 PM Snert__ is now known as Snert
05:13 PM Tom_itx is now known as Tom_L
09:42 PM z64555 is now known as zzz64
10:11 PM rue_shop3: wholy crap, the motor IS pulling 20A
10:12 PM rue_shop3: 3.3V 15A
10:12 PM branjb: z64555: I was more curious what it would look like with the timers, would it be one timer generating steps and another timer adjusting the period of the first timer?
10:13 PM rue_shop3: 50w
10:13 PM rue_shop3: wow
10:17 PM rue_shop3: if my buck filter were working right, I should be able to push 63A into that motor
10:17 PM rue_shop3: oh, I suppose not at 100% duty
10:23 PM orlock: rue: http://en.crypt.net.au/ESDBench/IMG_1445.JPG.jpg
10:23 PM rue_shop3: the only reason its working is because of things like the 3V loss on one of the jumper wires
10:24 PM rue_shop3: orlock, wow, Mr Moneypants!
10:24 PM orlock: rue_shop3: free, had to disassemble it, get it home, put it back together..
10:24 PM orlock: its nice though
10:24 PM rue_shop3: 8-O
10:24 PM rue_shop3: you could make like 6 i3's with that!
10:24 PM orlock: missed out on a few others, forgot the date of the raffle
10:25 PM rue_shop3: or a cnc router!
10:25 PM orlock: yeah
10:25 PM rue_shop3: what panels was it used for?
10:25 PM rue_shop3: (front)
10:25 PM orlock: prefer it as a desk, i can just buy more extreusion
10:25 PM rue_shop3: server?
10:25 PM rue_shop3: I wish I could just go buy extrusion :/
10:26 PM rue_shop3: those ARE rack mount adapters on it aren't they?
10:26 PM orlock: yup
10:27 PM rue_shop3: do you know what it used to have in it?
10:27 PM orlock: for electronics test gear i guess
10:27 PM orlock: Nope, signal generators and other test gear i guess
10:27 PM orlock: it was for diagnostics of medical instruments
10:28 PM orlock: (i assume as it was from work, and thats what they make)
10:28 PM rue_shop3: at 300Hz, 50%, how big an inductor should I need to hold 20A +- 1A?
10:28 PM rue_shop3: it looks like its BIG
10:29 PM rue_shop3: 1A over 3.3ms
10:31 PM orlock: rue_shop3: pain in the ass to put together, you have to pre-load all the fasteners during assembly
10:31 PM orlock: and hope they don't slide out
10:31 PM rue_shop3: looks like 3600H
10:31 PM rue_shop3: :/
10:32 PM orlock: making stuff at home using that extrusion would be a nightmare without a good saw and jog
10:32 PM orlock: jib
10:32 PM orlock: fuck
10:32 PM orlock: jig
10:36 PM rue_shop3: crap
10:37 PM rue_shop3: I have a 23A 12V power supply, and a 9.6V 40A motor
10:37 PM rue_shop3: and the power supply trips out just trying to start it
10:37 PM Tom_L: doesn't seem to be enough
10:37 PM rue_shop3: its a pwm speed controller
10:38 PM rue_shop3: so I put in a buck filter
10:38 PM rue_shop3: which should make it constant power
10:38 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/misc_stuff/12v_supply3.jpg
10:38 PM rue_shop3: but its not gonna work at 300Hz
10:38 PM Tom_L: i should send you that
10:38 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/misc_stuff/12v_supply2.jpg
10:38 PM rue_shop3: I have a 24V, 30A linear
10:39 PM Tom_L: that's from a large RV charge system
10:39 PM rue_shop3: arg, arg arg arg arg
10:39 PM rue_shop3: this is the spindle controller for the new cnc
10:39 PM rue_shop3: so its variable speed
10:39 PM rue_shop3: its just a little cordless drill motor
10:39 PM Tom_L: i thought you blew that motor up
10:40 PM rue_shop3: no, the motor on THE SHERLINE died
10:40 PM Tom_L: i got a spare
10:40 PM rue_shop3: I got a dead sherline I killed and dont own
10:40 PM Tom_L: after i pulled the wires from the commutator
10:40 PM Tom_L: and fixed them
10:40 PM Tom_L: bad bad rue
10:40 PM rue_shop3: its brushes are done
10:40 PM rue_shop3: this morning it was pulsing and kicking
10:40 PM Tom_L: they're hard to replace too
10:41 PM rue_shop3: tapped it with a wood block and it got better
10:41 PM rue_shop3: yea, its one of the origionals, so they are apparently evil to replace
10:41 PM Tom_L: that's why the new ones have screw access
10:41 PM rue_shop3: yea
10:41 PM rue_shop3: I'm looking at a $250usd bill I think
10:41 PM rue_shop3: thats $375 cad
10:51 PM Tom_L: for what?
10:53 PM Tom_L: pull the motor off that old treadmill you don't use anymore
10:54 PM Tom_L: i just got the motor not the whole thing
11:00 PM Tom_L: https://www.sherlinedirect.com/index.cfm?fuseaction=product.display&product_id=1135&CFID=125977471&CFTOKEN=75260357
11:01 PM Tom_L: you want the leeson one though i think. that's the one with external brushes iirc
11:02 PM Tom_L: err no, the one i linked says 'external brushes' so that'd be it
11:03 PM Tom_L: i nearly screwed my old one up trying to replace those internal brushes
11:06 PM Tom_L: http://sherline.com/Wordpress/wp-content/uploads/2016/01/dc_wiring.pdf
11:06 PM Tom_L: wiring chart
11:06 PM Tom_L: Sherline Motor Part Numbers:
11:06 PM Tom_L: 45450—Leeson (discontinued)
11:06 PM Tom_L: 45470—Hill HouseSpeed Adjustment
11:07 PM Tom_L: if you swap it, you need to tweak the control pots a bit as described there