#robotics Logs

Nov 27 2020

#robotics Calendar

11:13 AM ragarain: hi all!
11:20 AM ragarain: I've been building a robot arm to move a camera around and am having trouble with the dead band of the servos (LDX-218)... I want to be able to rotate the servo in tiny, tiny steps, to make a veeeery slow, very smooth movement, following an input command from e.g. a rotary encoder...
11:20 AM rue_mohr: ok
11:20 AM rue_mohr: your using hobby servos?
11:21 AM rue_mohr: the different chips all work the same way
11:27 AM Tom_itx is now known as Tom_L
11:27 AM rue_mohr: I presume it was the servo and not the control software you were using tho
11:27 AM rue_mohr: like, what you used did send out a proper 50Hz signal with stable pulses, right?
11:27 AM ragarain: <rue_mohr> like, what you used did send out a proper 50Hz signal with stable pulses, right?
11:27 AM ragarain: <<< yeah it was doing it just fine
11:29 AM rue_mohr: some of the servos have horrid dead band, and some of them dont have any
11:29 AM ragarain: I did not know about these 555 circuits... gotta look that up
11:30 AM ragarain: <rue_mohr> some of the servos have horrid dead band, and some of them dont have any
11:30 AM rue_mohr: its makes a nice quick analog test
11:30 AM ragarain: <<< would you expect the same model to have the same dead band? i.e. do you mean different kinds of servos have different amounts of dead band?
11:30 AM rue_mohr: the arduino code is hopeless
11:30 AM rue_mohr: its not stable at all
11:30 AM ragarain: which code? you mean like... tester code?
11:31 AM rue_mohr: I have not purchased the same model enough times to say
11:31 AM rue_mohr: the arduino servo code
11:31 AM rue_mohr: its awefull
11:31 AM ragarain: I suppose at this point I'm wondering: wouldn't it be easier to just get some servos with a small dead band... am entirely unsure how to find one though
11:31 AM ragarain: <rue_mohr> the arduino servo code
11:31 AM rue_mohr: I wrote my own control softawre because of it
11:31 AM ragarain: <<< ah yeah?
11:32 AM ragarain: you mean the pca9685 libraries specifically? actually I was running those via a pi
11:32 AM rue_mohr: some of those are awefull too
11:32 AM ragarain: the output seemed just fine (judging by my cheap-ish digital osci... which should be fine for this application)
11:32 AM rue_mohr: if they are just running it continious, there is no resolution left
11:33 AM ragarain: hmmm
11:33 AM rue_mohr: https://github.com/ruenahcmohr/m328hobbydriver
11:33 AM ragarain: well, I was able to target positions fairly accurately, provided the position wasn't too far from the previous one... i.e. to move 1deg I'd move 5deg one way and then 4deg back.... 9_9
11:34 AM rue_mohr: I dont disbelieve its the servos
11:34 AM rue_mohr: the communication to it is in binary tho
11:34 AM ragarain: yeh
11:35 AM rue_mohr: and its C, not arduino
11:36 AM ragarain: oic, this library you linked, it's meant to put out pwm's from the 'native' arduino pwm pins?
11:37 AM ragarain: do you have any advice on how I could proceed to find a servo (or controller pcb) that fits my needs?
11:37 AM rue_mohr: no, it uses io pins, but controls them in the right way
11:37 AM ragarain: or is the general approach to make your own? :P
11:38 AM rue_mohr: if you want to redo the servos, it might be the best solution
11:38 AM ragarain: as that's what I'm doing now... reinventing the wheel and learning a lot... but I spose I'm wondering if there's a faster way
11:38 AM rue_mohr: I have made a few arms
11:38 AM rue_mohr: I didn't have to modify the servos, but the positioning isn't always awesome
11:38 AM rue_mohr: do you have pics of your arm?
11:39 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm7/slide.htm
11:39 AM ragarain: hmmm it's currently dismantled as I'm playing with the diy servo control... but lemme see if I can find sth
11:39 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm8/slide.htm
11:39 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm9/slide.htm
11:39 AM rue_mohr: http://ruemohr.org/~ircjunk/robots/arm10/slide.htm
11:40 AM rue_mohr: I was gradually working towards more printable and available parts
11:40 AM rue_mohr: that github firmware is what they use
11:42 AM rue_shop1: my diy loop controller is based on a TLC5940 for pwm
11:43 AM rue_shop1: I have an atmega8, with a tiny26 for extra ADC
11:43 AM ragarain: https://imgur.com/a/kJULwgD (bad picture, sry)
11:43 AM ragarain: so these brackets are quite standard I guess
11:43 AM ragarain: nice arms (:
11:44 AM rue_shop1: yea, imugr doens't work for most of my browsers
11:44 AM rue_shop1: they must be trying to pull something crazy
11:45 AM rue_shop1: wow, thats quite the chain!
11:46 AM ragarain: https://shitpost.to/i/qzehxyl08td1kjhh.png?key=EtnoQOAdraHuvkecsArRqmG95r0J3Vb6
11:46 AM ragarain: there, reupload
11:47 AM ragarain: hehe yeah it's a bit of a chain, but since I want to only do sloooow movements and the servos are actually quite strong it's rather ok...
11:47 AM ragarain: its purpose is to move a camera, which sits on top
11:47 AM rue_shop1: k
11:48 AM rue_shop1: do you have a circuit sketch for what you were using to manually control the loop?
11:48 AM ragarain: but basically I want to figure out how to make the smallest movements (while still 'knowing' position, so I can easily save and refind positions)
11:49 AM ragarain: mmh, no circuit, I just read out the poti and drive the motor... using some standard PID libraries
11:49 AM ragarain: I'm also not so happy with the poti, so I think I'll replace them with magnetic encoders... like an as5600 or kmz60
11:50 AM ragarain: not sure if that's possible with the fields the motors create but that's sort of... optimization... the PID remains a bit challenging, but it's fun to learn...
11:51 AM rue_shop1: hah
11:51 AM rue_shop1: the pot can give you 10 bits
11:52 AM rue_shop1: over 300 degrees
11:52 AM rue_shop1: it SHOULD be ok
11:52 AM ragarain: well... it's a bit more jumpy than I would like
11:52 AM rue_shop1: ?
11:52 AM rue_shop1: it should be smooth
11:53 AM rue_shop1: the pot output
11:53 AM ragarain: maybe it's the arduino's adc (10bit I think)...
11:53 AM ragarain: but it does go up and down a tick sometimes, so with that current setup the resolution is cut in 3
11:54 AM ragarain: it's a digital poti... which I'm having a hard time wrapping my head around anyway... but it seems to me that there's a lot of converting back and forth from analog to digital and back...
11:54 AM rue_shop1: at 10 bits you will get some noise
11:55 AM rue_shop1: thats just analog
11:55 AM rue_shop1: hmm
11:55 AM rue_shop1: I could help you more, but I'm working on a DIY LVDT thats taking up most my time
11:56 AM ragarain: ahhh
11:56 AM ragarain: well, I was mostly trying to see if someone could recommend me a servo (or controller) to use
11:57 AM ragarain: I'm sure I'll figure out how to reinvent the wheel sooner or later :P
08:11 PM rue_mohr: ragarain, obviously, if your into paying $32ea for a servo there are some great ones :)