#robotics Logs
May 03 2020
#robotics Calendar
01:00 AM Jak_o_Shadows: Ok. Doing that maths again
01:06 AM Jak_o_Shadows: 36 Mhz => every clock is 28 ns.
01:06 AM Jak_o_Shadows: I For the 9 outputs, I want them to repeat at 50 Hz
01:06 AM Jak_o_Shadows: therefore nominally they are each2.22 us
01:06 AM Jak_o_Shadows: Which is 79365 ticks
01:06 AM Jak_o_Shadows: can't be right. Maybe each clock is 56
01:57 AM Jak_o_Shadows: Hmm. Each at 50k => 480 Hz
02:06 AM Jak_o_Shadows: and each at 10k => 265 Hz
02:33 AM Jak_o_Shadows: nope, wrong probe. Actually 2.38 kHz
02:33 AM Jak_o_Shadows: ok, that actually makes sense.
02:49 AM rue_mohr: Jak_o_Shadows,
02:49 AM Jak_o_Shadows: Yes, I am actually here for once.
02:49 AM rue_mohr: you have to drop the full range and the 50hz if you want the extra channels
02:49 AM rue_mohr: I think you will find that the timer divider I used is the only usable one
02:49 AM rue_mohr: I was dissapointed that with all the speed, I ended up with the same as the avr
02:49 AM rue_mohr: but the stm32 has more channels, and more subchannels
02:49 AM Jak_o_Shadows: Yeah, I haven't changed that.
02:49 AM Jak_o_Shadows: Yeah.
02:49 AM rue_mohr: how many channels you going for?
02:49 AM Jak_o_Shadows: TBH, I only need 2 here. For this specific case.
02:49 AM rue_mohr: hehe
02:49 AM Jak_o_Shadows: Ideally I want 18, but again, that isn't really too difficult.
02:49 AM rue_mohr: your just working on pushing the limits of the tech :)
02:49 AM Jak_o_Shadows: Just use the different channels of the timer
02:49 AM Jak_o_Shadows: Well, is it interesting anywhere else?
02:51 AM rue_mohr: ah, something doesn't add up tho
02:51 AM Jak_o_Shadows: https://github.com/ruenahcmohr/servo32/blob/master/main.c yeah?
02:51 AM rue_mohr: I think the low res timer actually does 2.5ms
02:51 AM rue_mohr: yup
02:53 AM rue_mohr: heh, hmmm
02:53 AM rue_mohr: ah wait...
02:54 AM rue_mohr: hmm
02:56 AM Jak_o_Shadows: hmm. I think that at the extreme ends, I am likely to get overflow, and hence not correct frequency as best as I can.
02:56 AM rue_mohr: hehe I cant see it
02:58 AM rue_mohr: hmm
02:58 AM rue_mohr: thought I had the timers directly toggle the pins...
02:59 AM Jak_o_Shadows: The timers do directly do the clock
02:59 AM Jak_o_Shadows: Not sure how the length of the clock pulse is defined
03:00 AM Jak_o_Shadows: not that it really matters
03:00 AM rue_mohr: the docs are a chore to navigate
03:00 AM Jak_o_Shadows: yes.
03:01 AM rue_mohr: ooh
03:01 AM rue_mohr: its just the reset I manually clock
03:01 AM rue_mohr: yea, I cant see the 50Hz
03:01 AM rue_mohr: strange
03:01 AM rue_mohr: it really looks like its not in there
03:02 AM rue_mohr: did you scope it?
03:03 AM rue_mohr: technically, for me, thats a bug
03:04 AM rue_mohr: refreshing a servo too fast screws up its gain
03:04 AM rue_mohr: in my avr code, I use a low resolution timer to trigger a servo pulse
03:04 AM rue_mohr: technically, cause of the 4017, you cant really do that here
03:05 AM rue_mohr: once you finish one pulse you on to the next
03:05 AM Jak_o_Shadows: Yeah, I am scoping it
03:05 AM rue_mohr: http://ruemohr.org/~ircjunk/tutorials/elex/hobbyservo/servo101.html <-- see the two circuits at the bottom?
03:05 AM rue_mohr: its emulating that in software
03:06 AM rue_mohr: as much as it can be said to do so
03:07 AM rue_mohr: I could also expect me to put in a dummy channel, that balances the timing for the set
03:08 AM Jak_o_Shadows: I think a single dummy channel isn't enough
03:08 AM rue_mohr: no, its not a proper solution
03:08 AM rue_mohr: time slots are, but cant be done with a 4017
03:08 AM Jak_o_Shadows: Yeah, but even so, a single dummy channel can't last long enough.
03:09 AM rue_mohr: I'd have to run the numbers
03:09 AM rue_mohr: a 595 could do it, if you controlled the OE line
03:10 AM rue_mohr: you dont need to completely reload the 595, just give it one tick
03:10 AM Jak_o_Shadows: If you put all servos at 500 us, you end up with a rate of 150 Hz
03:10 AM rue_mohr: the great thing about the 4017 is its number of outputs
03:10 AM Jak_o_Shadows: You could do it with the 4017, if you used another timer to kick it all off
03:10 AM Jak_o_Shadows: well, it would be closer anyway
03:10 AM rue_mohr: no, think about 2 concurrent updates
03:10 AM rue_mohr: where the middle servos change value a lot
03:10 AM rue_mohr: there will be jitter seen by each servo
03:11 AM rue_mohr: (jitter in the 50hz)
03:11 AM Jak_o_Shadows: Yeah
03:11 AM Jak_o_Shadows: but it'd be closer than 150 Hz
03:11 AM rue_mohr: and so its reduced to fixed time slots
03:12 AM rue_mohr: yup
03:12 AM rue_mohr: I'm kinda sad, I thought I did better on that project
03:13 AM Jak_o_Shadows: It probably mostly works in practice
03:13 AM rue_mohr: it works, but I expect if the duty is set low on all the channels, things must screw up
03:14 AM rue_mohr: servos multiply that pulse time to make the trigger for the motor drive
03:14 AM rue_mohr: if you cycle them early, the gain gets capped
06:57 AM SpeedEvil is now known as Guest65024
09:06 AM BitEvil is now known as SpeedEvil
02:15 PM veverak: damn it
02:15 PM veverak: the simple IK solver suffers at singularities
02:15 PM veverak: so, the alternative is damped least squares
02:15 PM veverak: but that is meh too :/
02:15 PM veverak: (but can't even start anywhere )
11:37 PM mrdata: veverak, how many degrees of freedom do you have to deal with? and how much storage do you have to spare?
11:39 PM mrdata: do you end up having a problem with limbs getting in each other's way?
11:56 PM mrdata: eg: hexapod with 2 motors per limb, mapping efficient routes from all positions to all other positions is O( k^12 ) storage for k positions; not bad if k is low, but k=4 then has 16 million states
11:57 PM mrdata: it would seem to me, that most of those are independent and therefore a sparse array mapping would be a good choice