Hi Everyone,
My Nybble is working after carefully following all the instructions and watching the assembly videos. It's just that it seems that my cat has a bit of a shake as he is walking and performing behaviours some of the servos seem to stutter a bit causing his movements to be shakey. I am using the recommended 14500 3.7v 800mAh batteries.
I have tried the following with limited or no success:-
1. Dialing up the power a bit from the nyboards potentiometer
2. Tried Adding a 220 / 1000 / 2200 micro Farad capacitor accross the power connectors.
3. Added ferite rings arround sevo leads
If any one has had a similar problem or sugestions for a working solution please let me know.
Absolutly love this project, thanks Rongzhong!
Cheers
Chris G
Great discussion on an important topic. Just wanted to cross-link to a comment that @Rongzhong Li posted here about how Tower Pro servos (in the original Nybble that I have) are commonly cloned and counterfeited so it is difficult to get genuine Tower Pro servo.
Hi all, I with purchase I received some servos that are not marked with any brand, in plastic casing and I am considering replacing them and servo arms as well. Namely after 3 min. Kitty legs are unscrewed and I have to mount them again. I wanted to replace servo arms with alu that are stronger and hold much better. I have some quesitons for you:
Did anyone tried this and is it really helping?
Did anyone mounted better servos such as Savos or similar?
For Alu arm how many tooth have your recommended servos that is which servo spline is used? I think you said somewhere 25 teeth which should be then B1 mini spline. - is that correct?
Best regards,
Alex
@eric.chanussot
Thank you, I will try this and get back to you.
Cheers
Chris Gomersall
@eric.chanussot
You were right my PWM ranges were initialy wrong I got them from some documentation on a site that sells the servo. But I don't trust them to be correct. It says they use standard PWM range. The Sketch program via the Arduino UNO works well and the servos moved, and responded to the inputs. After following the text prompts from the serial window, The program reported these PWM ranges for the 2 servos. As in my above post.
I'm still not there, I think I have the PWM ranges correct NOW, but the Nybble moves so SLOWLY and the movements are REDUCED in there range. For example in the WAVE or HI behavior. I can see Nybble attempting to wave and his left paw moves up and down but the shoulder position is not moving far enough, and the paw is not moving up and down enough. it just wiggles up and down a small amount.
It looks like I need to increase the range of movement and speed up the movement.
Can I increase the amount of movement per position say in 6 degree increments instead of 5 degree? I'm not sure how to achieve this.
Kind Regards
Chris Gomersall
@Rongzhong Li
@eric.chanussot
Hi There,
I used the Sketch code you provided with my Arduino UNO to get the PWM ranges of the two servos:
Shouldder servos K-Power DMC809 = 283 - 2080 replaces MG92B
Knee Servos Power-HD HD-1810MG = 490 - 3100 replaces MG90D
Uploaded modified sketch code to cat.
Then recalibrated.
Cat performs all behaviors VERY SLOWLY and with LIMITED RANGE OF MOTION
Should I change the constant in the code ?
#define MG92B_RANGE 150 to #define MG92B_RANGE 180
#define MG90D_RANGE 150 to #define MG90D_RANGE 180
Is there a way to speed up the servo movement? at the moment it is very slow?
Thanks for your support and help.
Kind Regards
Chris Gomersall
@Chris Gomersall
Hello,
Have you calculated the minimum and maximum pulse values of your DMC809 yourself? or did you find them somewhere?
In your October 12 message, you say you use the values: 1000µS at 1500µS.
It seems that the right values are: 900µS at 2100µS.
Source:
https://french.alibaba.com/product-detail/k-power-dmc809-coreless-servo-high-speed-3kg-torque-micro-digital-servo-for-450-rc-helicopter-60778400736.html
Maybe your problem is there?
Good cordiality
Yes, imagine you are the cat and the joints are arranged as clockwise spiral from body to limbs.
@Rongzhong Li
The index of the servos is the same as that of the representation below?
@Chris Gomersall
If you own an Arduino UNO.
Try this test sketch with the Servo library to see how your
servo responds to different settings, type a position
(0 to 180) or if you type a number greater than 200 it will be
interpreted as microseconds(544 to 2400), in the top of serial
monitor and hit [ENTER], start at 90 (or 1472) and work your
way toward zero (544) 5 degrees (or 50 micros) at a time, then
toward 180 (2400).
#include <Servo.h>
Servo servo;
void setup() {
// initialize serial:
Serial.begin(9600); //set serial monitor baud rate to match
servo.write(90);
servo.attach(9);
prntIt();
}
void loop() {
// if there's any serial available, read it:
while (Serial.available() > 0) {
// look for the next valid integer in the incoming serial stream:
int pos = Serial.parseInt();
pos = constrain(pos, 0, 2400);
servo.write(pos);
prntIt();
}
}
void prntIt()
{
Serial.print(" degrees = ");
Serial.print(servo.read());
Serial.print("\t");
Serial.print("microseconds = ");
Serial.println(servo.readMicroseconds());
}
then use the corresponding servo index after the ‘m’
That is a good idea, however I still have the Original servos' for the Head pan and tilt and the Tail.
I change the servos over for some testing.
On the cat, try to use the ‘m’ token to check the angle range. For example, “m0 -45” and “m0 45” should make the cat pan it’s head by 90 degrees. You can also use it to check the max angle ranges on Botha sides.
I've uploaded the altered code, and the cat is performing the behaviours strangely. The movements are shortened and the limbs don't extend fully
The wave for example. Nybble doesn't sit properly, and her front legs don't extend fully.
Maybe I need to alter the angle range of the servo's for the shoulder and for the knees?
Unfortunately I don't have any servo range testing equipment.
I must admit I feel a bit out of my depth here. Any further help is appreciated.
Cheers
Chris G
It’s the angle range of the servo. The tolerance is actually quite wide.
@Rongzhong Li
What is the value of 150 (MG92B_RANGE) located in: OpenCat.h \ // servo constants?
A small sketch usable with a simple UNO that can help to find the minimum and maximum values.
Rename .txt.en .pde
The parameters still work with the new servos, so I didn’t bother to fine calibrate them. I’m going to use DMC808 for MG90D. It’s a ODM model I requested from the manufacturer.
@Chris Gomersall Nice job, can you explain the method used to find the angle and the PWM range for these new servos? @Rongzhong Li It seems to me that you have tested the "K-Power DMC809", with you kept information? In the same quality as the "DMC809", which servo have you tested to replace the "MG90D"?
Yes, you’re right. Kudo was a servo brand I once tested but not satisfactory. I’ll remove it in later updates.
@Rongzhong Li
@eric.chanussot
Ok Good news I have found Pulse width range for new servos.
Shouldder servos K-Power DMC809 = 1000 - 1500 replaces MG92B
Knee Servos Power-HD HD-1810MG = 750 - 2250 replaces MG90D
Am I on the right track? what is KUDO what does it refer to?
These are the changes I have made to the code in OpenCat.h my changes are underlined
//servo constants
#define DOF 16
#define PWM_FACTOR 4
#define MG92B_MIN 250*PWM_FACTOR // changed from 170 to 250 to give min of 1000
#define MG92B_MAX 375*PWM_FACTOR // changed from 550 to 375 to give max of 1500
#define MG92B_RANGE 150
#define MG90D_MIN 188*PWM_FACTOR //changed from 158 to 188 to give min of 752
#define MG90D_MAX 562*PWM_FACTOR // changed from 515 to 562 to give max 2248
#define MG90D_RANGE 150
#define KUDO_MIN 115*PWM_FACTOR // I'm not sure what KUDO refers to ?
#define KUDO_MAX 621*PWM_FACTOR
#define KUDO_RANGE 220
// called this way, it uses the default address 0x40
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
// you can also call it with a different address you want
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x41);
// Depending on your servo make, the pulse width min and max may vary, you
// want these to be as small/large as possible without hitting the hard stop
// for max range. You'll have to tweak them as necessary to match the servos you
// have!
#ifndef KUDO
#define SERVOMIN MG92B_MIN // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX MG92B_MAX // this is the 'maximum' pulse length count (out of 4096)
#define SERVO_ANG_RANGE MG92B_RANGE
#else
#define SERVOMIN KUDO_MIN // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX KUDO_MAX // this is the 'maximum' pulse length count (out of 4096)
#define SERVO_ANG_RANGE KUDO_RANGE
#endif
Kind Regards
Chris G
You need to find the max and min PWM signals that results in servo movement then measure the angle range of the servo. Measure several servos to calculate the mean value.
I've found in the servo specs where it says what the pulse length is in seconds, but this is probably not very precise. There is a section in testServo.ino that allows for setting the pulse lenth in seconds. Should I use this?
@Rongzhong Li
Thank you for your reply,
Ok ALL NEW servo's installed and calibrated.
Cat's movements are strange and moving out of range for given instinct. it looks like i'll have to benchmark the min and max pulse length count.
I have found the code you refered to. testServo.ino
The code I have is slightly different, do i need to download the latest version of your code?
Do I plug in constant values for SERVOMAX and SERVOMIN and see what happens?
How do I find the correct values for these constants?
Sorry for all the questions.
The code should work for the new servos.
If the cat doesn't walk well, the new servos may have different PWM->Angle mapping. Modify the testServo code in ModuleTest folder to benchmark. Then update the related constants in OpenCat.h.
#ifndef KUDO #define SERVOMIN MG92B_MIN // this is the 'minimum' pulse length count (out of 4096) #define SERVOMAX MG92B_MAX // this is the 'maximum' pulse length count (out of 4096) #define SERVO_ANG_RANGE MG92B_RANGE
@Rongzhong Li @eric.chanussot
New Servo's Installed!
They fit well exept for a bit of filing I had to do to fit the shoulder servos in. As the wires for the new servos exit the body at the side rather than the bottom.
See Before filing ( Left ) and After filing ( Right ) Photo's:-
Old Servo Blue ( Left ) new servo Gold ( Right ) :-
Any advice on modifications needed to code instinct.h ? or any other modifications?
Shoulder servos: replacement for MG92B
K-power DMC 809
Spline count 20T
Speed @ 4.8v 0.08sec/60
Speed @ 6.0v 0.07sec/60
Knee servos: Replacement for MG90D
Power-HD HD-1810MG
Power HD 1810MG has a spline count of 21.
Speed @ 4.8V: 0.16 sec / 60° at no load
Speed @ 6.0V: 0.13 sec / 60° at no load
@Chris Gomersall
Hello, Have you purchased replacement servos? I put a lot on your experience to order! Best regards.
As long as it includes the accessory bag with compatible servo arms.
The released code is slowed down a little bit, so the slower servo shouldn't be a big problem.
Thank you, that makes sense. I will do. Is there anything else I should be doing? Given there will be small differences in the replacement servos.
For example the Power HD 1810MG has a spline count of 21.
And the speed of the servo is slightly slower.
Speed @ 4.8V: 0.16 sec / 60° at no load Speed @ 6.0V: 0.13 sec / 60° at no load
Another notes: After replacing the servos, you may need to update the new servo's angle and PWM range in Instinct.h.
@eric.chanussot
@Rongzhong Li
Found a worthy Replacement for the knee Servos
The problem as Rongzhong Li points out is that the original servos are shorter from the mounting point to the end of the servo block. See diagram below.
This is to provide enough clearance so the servo motors don't touch the batter holder as they move.
So the 2 replacement Servos are as follows:-
Shoulder servos: replacement for MG92B
K-power DMC 809
Knee servos: Replacement for MG90D
Power-HD HD-1810MG
The Knee replacement servo has a short distance between mounting and Servo Base of about 18.8mm which is about the same as the MG90D
I havn't purchased these yet, but I'm willing to take the risk and see how it turns out.
Finding both servos with similar specs and sizes wasn't easy!
K-Power available on ebay
Power-HD available on Amazon
Be careful I have found that there can be slight size variations even within the same model number.
Thankyou I would have missed that.
I will search for a shorter servo as a replacement for the MG90D
Thanks for all your replies!
The key dimension is measured between the screw plate and the bottom. So the DMC809 is still longer than MG90D.
This is what I've gotten from the servo specs:-
TowerPro MG92B Hi Torque used for Shoulder Servos Dimensions 22.8 x 12 x 31mm
TowerPro MG90D Used for Knee, Head and tail Servos Dimensions 22.8 x 12 x 28.5mm Shorter!
Possible Expensive Replacement K-Power DMC809 servo Dimensions 23 x 12 x 27mm
Given that these servos are shorter 27mm Will this be Ok for the Knees, head and tail and still provide clearence for the battery holder?
Cheers Chris G
I think the jittering may come from three sources:
1. The inertial of the leg causing the servo over rotate in feedback control
2. The wearing in the potentiometer as a position sensor
3. The wearing on the teeth of gears
I have tested some better servos ($20 each) and they have much better performance. So it's more likely in the servo rather than the circuit or signaling.