#robotics Logs

Jan 02 2021

#robotics Calendar

07:55 PM rue_mohr: so where do we put the pole then
08:03 PM rue_mohr: well how much gain can we take on
08:03 PM rue_mohr: we would need to know what the drive signal is during the part of the response where its falling off
08:03 PM rue_mohr: and we looked at the return signal
08:03 PM rue_mohr: hmm
08:03 PM rue_mohr: hard to go back and look at the drive signal, its pwm
08:03 PM rue_mohr: can we push it to a DAC?
08:03 PM rue_mohr: thats a bunch of work
08:03 PM rue_mohr: is there another way to figure it out?
08:03 PM rue_mohr: well we know the gain is 6
08:03 PM rue_mohr: ok
08:04 PM rue_mohr: yea
08:04 PM rue_mohr: what if we do the error externally and then feed the result to the avr
08:04 PM rue_mohr: what if we just use the avr for ADC->PWM
08:05 PM rue_mohr: well, uh
08:05 PM rue_mohr: hmm
08:05 PM rue_mohr: hmm
08:05 PM rue_mohr: then we just move it all to digital when were done?
08:05 PM rue_mohr: well, then we can test the digital filter against a known analog one
08:06 PM rue_mohr: huh
08:06 PM rue_mohr: hmm
08:06 PM rue_mohr: didn't think we would end up making an analog controller
08:06 PM rue_mohr: how about we redo the current one in analog to see how it compares?
08:07 PM rue_mohr: the avr doing PWM should act as the Z domain converter anyhow, so there should be no error in the crossover
08:08 PM rue_mohr: hey then we could try out that analog PID filter too
08:08 PM rue_mohr: heh
08:08 PM rue_mohr: eh!?
08:08 PM rue_mohr: you really want to try that thing, dont you?
08:08 PM rue_mohr: :)
08:08 PM rue_mohr: ok, so?
08:09 PM rue_mohr: ok, we take what we have and set up a tiny13 to do ADC->PWM
08:09 PM rue_mohr: oof, with a 2.5V center and a gain of 2
08:09 PM rue_mohr: hmm yea
08:10 PM rue_mohr: so, input is 0-5, output is differential pwm -100% -> 100%
08:10 PM rue_mohr: yea
08:10 PM rue_mohr: this could get interesting, I wish we had more time
08:10 PM veverak: there is never enough time
08:10 PM rue_mohr: no :(
08:11 PM rue_mohr: but it looks like I'm gonna get a good feel for realtime adjusting loop filters!
08:11 PM veverak: :)
08:17 PM rue_mohr: ok, we need to adjust the tiny13 code
08:18 PM rue_mohr: we have a tiny13 loop controller?
08:18 PM rue_mohr: this year too
08:19 PM rue_mohr: pwm0 = limit((fb - ctrl)<<1, 0, 128);
08:19 PM rue_mohr: pwm1 = 0;
08:19 PM rue_mohr: this is the code we need?
08:19 PM rue_mohr: it is, what did you use it for?
08:19 PM rue_mohr: jun
08:20 PM rue_mohr: what did we do in jun?
08:21 PM rue_mohr: charlieADC
08:21 PM rue_mohr: ok that was for the thing detector
08:21 PM rue_mohr: serialADC
08:21 PM rue_mohr: no idea
08:21 PM rue_mohr: 2chSerialADC
08:21 PM rue_mohr: .. again, no idea
08:21 PM rue_mohr: then the loop controller
08:22 PM rue_mohr: then MCP4725test1
08:22 PM rue_mohr: then encoderDAC
08:22 PM rue_mohr: those last two are just a group
08:22 PM rue_mohr: ok, photos...
08:22 PM rue_mohr: jun what?
08:22 PM rue_mohr: jun 19
08:24 PM rue_mohr: its the tilt and pan mirror
08:24 PM rue_mohr: you used tiny13's on the tilt and pan mirror?
08:24 PM rue_mohr: dont you remember? "modular servo"?
08:25 PM rue_mohr: ooooooohhhhhh...
08:25 PM rue_mohr: the servo that was so amazingly slow, loop speed didn't even matter
08:25 PM rue_mohr: yea
08:26 PM rue_mohr: you have to go finish that thing you know
08:26 PM rue_mohr: ME!?
08:26 PM rue_mohr: regardless, thats your answer
08:27 PM rue_mohr: ok, so in the meantime we have like everything we need
08:27 PM rue_mohr: yea, mod that up a bit
08:28 PM rue_mohr: dude, that thing is serial control?
08:28 PM rue_mohr: and you didn't run a serial line to it?
08:29 PM rue_mohr: mmmm
08:29 PM rue_mohr: we could have had sun all summer
08:29 PM rue_mohr: yes, and now its winte
08:34 PM rue_mohr: wait, what
08:34 PM rue_mohr: your doing software pwm?
08:35 PM rue_mohr: oh you did ugly things to this in order to pull off serial
08:35 PM rue_mohr: yea it doesn't help if we have to rewrite everything eh?
08:49 PM rue_mohr: arg, seriously? I have to do my own ascii art for a tiny13 pinout?
08:53 PM rue_mohr: arg, the fileserver needs to caps AGAIN
08:54 PM rue_mohr: ever since I upgraded it from a P133 its been NOTHING BUT TROUBLE
09:03 PM rue_mohr: gee that occupied all of 16% of a t13
09:03 PM rue_mohr: lets go see if it works
09:03 PM rue_mohr: food?
09:03 PM rue_mohr: ugh, you bios
09:03 PM rue_mohr: I'm working on it
09:04 PM rue_mohr: tell me that when you have an AI pet walking around the house
09:04 PM rue_mohr: :(
09:04 PM rue_mohr: be fair
09:04 PM rue_mohr: time, TIM!
09:06 PM rue_mohr: anyone wanna google up "adding poles to increase bandwidth" and tell me if it coughs up anything usefull?
09:08 PM Tom_L: https://www.researchgate.net/post/How-addition-of-open-loop-right-half-plane-pole-zero-affects-the-bandwidth-of-the-close-loop-system
09:08 PM Tom_L: https://www.accessengineeringlibrary.com/content/book/9781259643835/toc-chapter/chapter10/section/section12
09:09 PM Tom_L: you're just looking for an audience :)
09:09 PM Tom_L: woops on the 2nd one
09:11 PM Tom_L: https://www.quora.com/How-do-bandwidth-effect-in-compensators-and-during-addition-of-poles-and-zeroes
09:13 PM Tom_L: https://web.ece.ucsb.edu/~long/ece145b/Feedback2.pdf
09:13 PM Tom_L: that one even has handwritten scribble in it !
09:14 PM rue_mohr: no I'm trying to reduce the time on this project
09:14 PM rue_mohr: its expanding past the time I have available
09:14 PM Tom_L: no help, dunno what you're doing... sry
09:15 PM rue_mohr: I'm trying to get more performance out of a basic servo by making it into mroe than a basic servo
09:36 PM rue_mohr: Add a dominant pole
09:36 PM rue_mohr: • Move a dominant pole
09:36 PM rue_mohr: • Miller compensation
09:36 PM rue_mohr: • Add a zero to the closed loop gain
09:36 PM rue_mohr: I can move the pole?
09:38 PM rue_mohr: I like how amplifier designers make it sound like its so easy to make an oscillator
09:38 PM Tom_L: you should be a pro at that by now
09:44 PM rue_mohr: I'm getting it a bit
09:44 PM rue_mohr: but looking back on some of my stuff, I'm not sure how mcuh of what I'v learned I'm retaining
09:44 PM rue_mohr: I was going thru the curcuits book finding all sorts of things I'd forgotten about
09:44 PM rue_mohr: good things!
09:44 PM Tom_L: that's why you're putting it in a book
09:45 PM rue_mohr: yea, but the mental catalog is important too
09:46 PM rue_mohr: like just now, I'd forgotten I did a tiny13 servo loop controller
09:46 PM rue_mohr: none of the 1400+ twitter followers have chimed in on this project
09:47 PM rue_mohr: I think I'm the only one actually working on understanding the practical application of it
09:47 PM Tom_L: maybe you stumped em
09:47 PM rue_mohr: pol did pretty good last night helping me hunt poles
09:47 PM Tom_L: or they're still on holiday
09:48 PM rue_mohr: then he will be all wrapped up in school :(
09:48 PM rue_mohr: I'm on my own
09:48 PM rue_mohr: the 3d graphs on the maxim site were a bit of a thinker tho
09:49 PM rue_mohr: it ties in bode plots and S plane nicely
09:49 PM rue_mohr: ok I'm gonna go test this ADC->PWM
09:49 PM veverak: await
09:50 PM veverak: you generate PWM via ADC peripheral?
09:50 PM rue_shop1: so, I'm gonna do the loop control in analog, so I can scope it, after I get what I want, I can convert it to digital
09:50 PM rue_shop1: but I need a motor driver, pwm, so this tiny13 takes an analog channel and converts it to differential pwm
09:51 PM rue_shop1: yes ADC->PWM
09:51 PM veverak: interesting
09:51 PM rue_shop1: in analog I can catch everything with my scope
09:53 PM veverak: well
09:53 PM veverak: logic scope is good enough for my pwm
09:53 PM veverak: (but I do only rc servos)
09:53 PM rue_shop1: veverak, I cant find the documentation I can understand to know how adding a pole will affect the system as it stands
09:53 PM rue_shop1: and nobody is able to help me out, so it seems
09:53 PM veverak: what is pole?
09:53 PM veverak: (and I won't propably help you as you may have guessed)
09:54 PM rue_shop1: its a filter thing
09:54 PM rue_shop1: poles and zeros
09:54 PM rue_shop1: they mark where the response of a system changes in context of the frequencies applied to it
09:55 PM veverak: yeah, no go for me
09:55 PM veverak: (I finally made my robot wireless)
09:55 PM Tom_L: http://www.ee.ic.ac.uk/pcheung/teaching/ee2_signals/Lecture%209%20-%20Poles%20Zeros%20&%20Filters.pdf
09:55 PM veverak: (installed rpi4, so it does not need usb cable)
09:56 PM veverak: now, I shall prepare some funky moves for it
09:56 PM veverak: so back to simulator
09:57 PM rue_shop1: Tom_L, when you did the programmers, do you think you would call the amount of time it took up comparable to a full time job?
09:58 PM Tom_L: no
09:58 PM rue_shop1: hmm
09:58 PM rue_shop1: I wonder if I should do a little project like that so I can have a stock of some parts when its done
09:59 PM Tom_L: i still have some :)
09:59 PM Tom_L: and parts to make some
09:59 PM rue_shop1: :) yep, I'm thinking of other parts
09:59 PM rue_shop1: base projects for sale around parts I want to have a bunch of
09:59 PM rue_shop1: "and thats why the oscillator for the beeper is a tiny85!"
09:59 PM rue_shop1: :)
10:00 PM rue_shop1: I need to learn to use other peoples dollars for my projects
10:00 PM Tom_L: heh
10:00 PM rue_shop1: because most of them dont mind anyhow
10:00 PM veverak: that's a good skill
10:00 PM veverak: I use tax money
10:00 PM Tom_L: i did recently make a couple paying parts on the mill
10:01 PM rue_shop1: nice
10:01 PM Tom_L: i showed you one
10:01 PM rue_shop1: even if its not paying itself off completely, having it lift some weight is good
10:57 PM rue_shop1: cmd = ADC <<1
10:57 PM rue_shop1: its like the code is never dividing the ADC by two!?
10:57 PM rue_shop1: :)
10:57 PM rue_shop1: oh!
10:57 PM rue_shop1: cmd = ADC << 1;
10:57 PM rue_shop1: there!
10:57 PM rue_shop1: ;)
11:00 PM rue_shop1: ok, the avr code works
11:18 PM rue_shop1: nice, I can use to resistors to combine the control and feedback signals, and its closed loop
11:18 PM rue_shop1: horrid with a gain of 1, but closed loop
11:22 PM rue_shop1: ok quiz question everyone
11:22 PM rue_shop1: op-amp if Ri is 1k, what should Rf be set to in order to achive a gain of 6!
11:23 PM rue_shop1: cmon, inverting amplifer
11:23 PM rue_shop1: technically a gain of -6
11:23 PM rue_shop1: cmon...
11:26 PM rue_shop1: I think I should kick everyone but Tom_L polprog veverak and Jak_o_Shadows
11:26 PM rue_shop1: cause were the only real people here
11:26 PM rue_shop1: there are 50 bots
11:26 PM veverak: more like 50 idlers
11:26 PM rue_shop1: people who say they want to watch the channel and NEVER perticipate
11:27 PM rue_shop1: I bet their all gateways to empty endpoints
11:31 PM rue_shop1: ok, this analog version of the servo should perform exactly like the digital one