I have a io60p16 board and 2 servos hooked into it. I can move the servos but if I have more than one in the code running, the state is forgotten and then I can move them with my thumb rather than the servo fighting to keep its state. If I comment out the SetServo with the _tilt, the pan servo updates and remembers state. If I use a phidget board, I can have multiple servos just fine.
@ Justin - declaring then starting without doing a start after the duration update doesn’t cause an update
@ dobova - can you provide what I should be doing. looking at that post, it isn’t screaming “this is what you should do” Switching to SetPwm still causes it to happen where I can physically adjust the servo with just my thumb.
@ dobova - did you apply load to the servo? Can you provide the source much like I did so I can see if I’m doing something wrong?
I can move my servos just fine, it is when you apply load on them that they fail. More so, moving them fast I noticed what I would call “incomplete” movements where they should have gone to a certain position but they didn’t.
When it was hooked up to the oscilloscope, that kind of make me go, something is bad is going on here.
I don’t know what power source you’re using, but when I see that they work fine with no load and then “fail” under load, it seems to me your power supply can’t provide enough current to the servo - your stall current on the servo is exceeding what the power supply can reliably offer and it causes the other weird behaviour.
I beg your pardon cructas but I didn’t undertand your problem, so I was thinking something related to the driver. I haven’t loaded the servos except with my fingers. I’m using a Meanwell power supply like yours and it’s good enough for 5V so I don’t think is ps problem.
But take care of this:
the PWM period need to be 20ms minimum and dutycycle from 10% to 20% (1ms to 2ms). This is not always true, you need to check docs about your specific servos.
As Gus stated, servos are not always 5V, they may need 6V.
It seems stupid but may be wires connecting ps and board V+ may not be enough to support starving current.
Using the scope you can check if voltage is dropping down with load.
I don’t think this is software related problem, except if the servo let drain current on PWM wire for some strange reason when under load.
Power only to the V+, not to 5v. I switched to the 5v power supply from a 6v since I was afraid they may be not getting enough amps to operate when I was using a 6v PS.
This works just fine with a single servo, as soon as the code was increased to two servos, you start seeing the jumping and load issue. Hooking up an oscilloscope (see the picture) with the first set of code in this post, you see the jump in the signal. That is with zero load. Ignore the fact I’m using servos. The signal is not constant when it should be.
@ dobova, can you provide a source sample that I can try? I based my code off a post. Have you tried your stuff with what is currently released as your post was 2 months ago.
I’ll try setting this up tonight. You may want to try it without using the explicit servo.Duration. In the code that was delivered to GHI, this was not yet implemented and I haven’t seen the final source code that was delivered in the last SDK. So, they may not have finished it. The duration is specified in the constructor. So, just stick with that for now w/o using the .Duration and see if you get different results.