Issues with UltraBorg servo feedback
Forums:
Hi,
It seems I might have an issue with the feedback received from the UtraBorg from the servos.
Maybe it is important to point out that the setup I'm going to describe used to work, but not anymore.
It is also probably important to mention that I'm getting proper distance readings from the UB, which is getting its power directly from the BattBorg as I described in this post and according to your comment.
To be more specific, I have 2 SG90 servos connected to #1 and #2. Before this happened, I was able to calibrate them (using code, not the GUI) to the preferred start positions. Now every time I power up the UB, they properly go to these positions.
However, if I try to set them to different positions (also via code), I get the following:
UB.CalibrateServoPosition1(3500)
Failed sending calibration servo output #1!
If I try to re-calibrate them, all I'm getting is:
UB.SetWithRetry(UB.SetServoMaximum2, UB.GetServoMaximum2, 5500, 5)
Failed sending servo maximum limit #2!
Failed reading servo #2 maximum burst!
Failed reading servo #2 maximum burst!
Failed sending servo maximum limit #2!
Failed reading servo #2 maximum burst!
Failed reading servo #2 maximum burst!
Failed sending servo maximum limit #2!
Failed reading servo #2 maximum burst!
Failed reading servo #2 maximum burst!
Failed sending servo maximum limit #2!
Failed reading servo #2 maximum burst!
Failed reading servo #2 maximum burst!
Failed sending servo maximum limit #2!
Failed reading servo #2 maximum burst!
Failed reading servo #2 maximum burst!
Out[5]: False
This happens regardless to which UB output I'm connecting the servos (while, of course, changing the CalibrateServoPositionX methods appropriately).
I tried the same thing with a spare servo of the same type - the same errors.
Is it possible that I broke somehow the UltraBorg? I manipulated it a few good times for mounting since the last time everything worked...
Is there a way of finding out more about what causes this / debug the issue?
Thanks!
valika
Sun, 01/17/2016 - 14:16
Permalink
Issues with UltraBorg servo feedback
Oh, and something else that I noticed: one of the servos (I suspect #2) is doing very, very small rotations from time to time, without any code being responsible for this.
I noticed because I have the PiCamera on a tilt/pan setup connected (this what the servos are for) and I saw the small movements in the streamed video.
Listening carefully, I noticed the respective motor sounds also...
valika
Sun, 01/17/2016 - 20:25
Permalink
Issues with UltraBorg servo feedback
Answering my own question, in hope somebody else makes the same mistake:
I should have initialized the UltraBorg, which I forgot to do:
UB.Init()
Looking into the code examples is really helpful... ;)