HK15298 modifying to 180 degree rotation?

2,786 views
Skip to first unread message

Jason Ravel

unread,
Mar 17, 2013, 4:29:36 PM3/17/13
to inm...@googlegroups.com
So i bought the HK15298 as Gael suggested but it only rotates 90 degrees with the standard arduino servo.write(180) method. Did you modify the servo for 180 degree rotation Gael, and if so how? 

hansf...@gmail.com

unread,
Mar 17, 2013, 4:51:35 PM3/17/13
to inm...@googlegroups.com
Hi Jason,

If this is a digital servo I believe you need a programmer to achieve the 180 degrees. Other then that you need the servo ordered to do 180 degrees. I also believe you might be able to buy a small plug in board that allows the servo to achieve 180 degrees.
Others on this board may have other suggestions.

Hans

gael langevin

unread,
Mar 18, 2013, 4:28:53 PM3/18/13
to inm...@googlegroups.com
WOW, this is some kind of a point here!

@Jason, I used three of these servos in my robot, one as a thumb and the two others for the pinky and ringfinger, and didn't notice what you mentionned here and on Thingiverse until tonight. I see now that my three finger's servos don't actually do the full movements when I ask them to.

@Hansf are you sure about what you are saying, I remember reading that link you postedto understand the differences between Digital and Analog servos, but I don't recon anything like this.

If there isn't a more simple and cheaper way to get a digital servo to actuate from 0 to 180 degrees, I need to alert every potential buyer on the blog and Thingiverse. First they are more expensive to buy and if we need to add an extra board, this is going to be an expensive story.

If anyone has a solution please let us know.

hansf...@gmail.com

unread,
Mar 18, 2013, 5:23:09 PM3/18/13
to inm...@googlegroups.com
@Gael,

I believe if you can use 600micro second pulse you should receive +90 and if you send your servo 2400 micro seconds you should get -90 degrees.
See if that works for you.

Hans

gael langevin

unread,
Mar 18, 2013, 5:27:07 PM3/18/13
to inm...@googlegroups.com
I found this spec sheet but I have still no idea if we can re-program them and with what.

hansf...@gmail.com

unread,
Mar 18, 2013, 5:42:18 PM3/18/13
to inm...@googlegroups.com
A pulse of 1500 micro second should be 0.

Hans

hansf...@gmail.com

unread,
Mar 18, 2013, 5:46:28 PM3/18/13
to inm...@googlegroups.com
@Gael,

Here is a link that may help explain what I am talking about.
http://arduino.cc/forum/index.php?topic=5701.0

Hans

gael langevin

unread,
Mar 18, 2013, 6:09:28 PM3/18/13
to inm...@googlegroups.com
Thanks hansf,
I looked in my Arduino sketchs I had in library, because what you mentionned about the pulses reminded me of this one. I think this is what you are talking about. I need to submit that to Grog on MRL to see if we can adapt it to the service.
My arduinos are currently hooked with all the robot servos and I don't want to detach them to test, because I plan on trying new movements in the next coming days.
I recon you also got some digital servos, didn't you?
/*
 * ------------------------------
 *   MultipleSerialServoControl
 * ------------------------------
 *
 * Uses the Arduino Serial library
 *  (http://arduino.cc/en/Reference/Serial)
 * and the Arduino Servo library
 *  (http://arduino.cc/en/Reference/Servo)
 * to control multiple servos from a PC using a USB cable.
 *
 * Dependencies:
 *   Arduino 0017 or higher
 *     (http://www.arduino.cc/en/Main/Software)
 *   Python servo.py module
 *     (http://principialabs.com/arduino-python-4-axis-servo-control/)
 *
 * Created:  23 December 2009
 * Author:   Brian D. Wendt
 *   (http://principialabs.com/)
 * Version:  1.1
 * License:  GPLv3
 *   (http://www.fsf.org/licensing/)
 *
 */

// Import the Arduino Servo library
#include <Servo.h>

// Create a Servo object for each servo
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
// TO ADD SERVOS:
//   Servo servo5;
//   etc...

// Common servo setup values
int minPulse = 600;   // minimum servo position, us (microseconds)
int maxPulse = 2400;  // maximum servo position, us

// User input for servo and position
int userInput[3];    // raw input from serial buffer, 3 bytes
int startbyte;       // start byte, begin reading input
int servo;           // which servo to pulse?
int pos;             // servo angle 0-180
int i;               // iterator

// LED on Pin 13 for digital on/off demo
int ledPin = 13;
int pinState = LOW;

void setup()
{
  // Attach each Servo object to a digital pin
  servo1.attach(2, minPulse, maxPulse);
  servo2.attach(3, minPulse, maxPulse);
  servo3.attach(4, minPulse, maxPulse);
  servo4.attach(5, minPulse, maxPulse);
  // TO ADD SERVOS:
  //   servo5.attach(YOUR_PIN, minPulse, maxPulse);
  //   etc...

  // LED on Pin 13 for digital on/off demo
  pinMode(ledPin, OUTPUT);

  // Open the serial connection, 9600 baud
  Serial.begin(9600);
}

void loop()
{
  // Wait for serial input (min 3 bytes in buffer)
  if (Serial.available() > 2) {
    // Read the first byte
    startbyte = Serial.read();
    // If it's really the startbyte (255) ...
    if (startbyte == 255) {
      // ... then get the next two bytes
      for (i=0;i<2;i++) {
        userInput[i] = Serial.read();
      }
      // First byte = servo to move?
      servo = userInput[0];
      // Second byte = which position?
      pos = userInput[1];
      // Packet error checking and recovery
      if (pos == 255) { servo = 255; }

      // Assign new position to appropriate servo
      switch (servo) {
        case 1:
          servo1.write(pos);    // move servo1 to 'pos'
          break;
        case 2:
          servo2.write(pos);
          break;
        case 3:
          servo3.write(pos);
          break;
        case 4:
          servo4.write(pos);
          break;

   // TO ADD SERVOS:
   //     case 5:
   //       servo5.write(pos);
   //       break;
   // etc...

        // LED on Pin 13 for digital on/off demo
        case 99:
          if (pos == 180) {
            if (pinState == LOW) { pinState = HIGH; }
            else { pinState = LOW; }
          }
          if (pos == 0) {
            pinState = LOW;
          }
          digitalWrite(ledPin, pinState);
          break;
      }
    }
  }
}

Jason Ravel

unread,
Mar 21, 2013, 5:40:26 AM3/21/13
to inm...@googlegroups.com
let us know how your testing goes gael...i bet a lot of people are confused by this. i know i am, i cannot continue with the arm until i get the rotational wrist working. 

hansf...@gmail.com

unread,
Mar 21, 2013, 8:51:06 AM3/21/13
to inm...@googlegroups.com
Hi Jason,

If you have an Arduino you can actually test your servo with the program Gael posted here. It should tell you right away if your servo will reach the 180 degree rotation.

Other then that I won't have time to test this until this weekend some time. I am hoping my small servos come in by Friday. I have my large servos so I will do a test on them if other ones aren't in.

Hans

Christian Van Horn

unread,
Mar 21, 2013, 9:08:06 AM3/21/13
to inm...@googlegroups.com
I have posted questions on several websites inquiring to see if there is any way to extend the HK15298's range of motion. I have also sent their support department an email. I hope there is something that can be done, as otherwise these are great servos for the money. The HK15298B ( http://www.hobbyking.com/hobbyking/store/__22525__HK15298B_High_Voltage_Coreless_Digital_MG_BB_Servo_66g_20kg_0_16s_USA_Warehouse_.html )model is listed as having 20kg of torque! Hopefully we'll find out something shortly... Chris

Jason Ravel

unread,
Mar 21, 2013, 1:49:04 PM3/21/13
to inm...@googlegroups.com
Awesome let me know if you get any replies Christian. Hans I tried to code, no effect. I can manually turn it 180 degrees just not using arduino code. No programmer made for this servo either. Literally halted development for days because of this. Sigh.

Christian Van Horn

unread,
Mar 21, 2013, 2:17:21 PM3/21/13
to inm...@googlegroups.com
Will do. No response so far, but the request was passed on to their support staff...

Christian Van Horn

unread,
Mar 21, 2013, 5:05:25 PM3/21/13
to inm...@googlegroups.com
Hi Guys. I'm afraid the news is not good. This is Hobby King's reply:

Jarrad, Mar 22 04:27 (HKT):

Hi Christian ,
Thanks for contacting the HobbyKing Support Team.

Unfortunately in this size of servos we only have one servo that would allow 180 degree movement, however it would need a special programmer for that, which unfortunately we do not offer. It is called Hitec HPP-21, and is available at any Hitec servo distributorship.

The servo itself would be this:
http://www.hobbyking.com/hobbyking/store/__9809__Hitec_HS_7955TG_Titanium_Gear_Digital_Servo_18kg_65g_0_19sec.html?strSearch=7955

I hope this info is helpful,
have a great day and best of luck with your project!

I then wrote back:

So am I correct that this HK15298 is only a 90 degree servo, and can not be programmed or modified to increase rotation?

Answer:

Hi Christian ,
Thanks for contacting the HobbyKing Support Team.

Indeed, the range is limited by resistance if internal potentiometer, it cannot be changed past 100 degrees without electronic modifications.

So, there it is...

Jason Ravel

unread,
Mar 21, 2013, 5:36:30 PM3/21/13
to inm...@googlegroups.com
Damn, that sucks. Christian thanks so much for posting their reply. I'm going to manually increase the gear ratio on the wrist so that I can max the wrist rotation by creating a larger gear. 

gael langevin

unread,
Mar 21, 2013, 6:38:00 PM3/21/13
to inm...@googlegroups.com

Really sucks indeed, of rage I just opened one of them to check the inside. The potentiometer has a 0 to 180 range rotation. That means it is a matter of programming to me. The board inside is a PZ96L. Why isn't this restriction specified when you buy digital servos? I don't get it.
There must be a way to hack this.

hansf...@gmail.com

unread,
Mar 21, 2013, 7:08:39 PM3/21/13
to inm...@googlegroups.com
This is the programmer I ordered to set my Digital Servos.

http://www.servocity.com/html/hfp-25_servo_programmer.html

I haven't received any of the small servos yet so I really can't try the programming using the pulses.
When I get some time this weekend I will look into the program side of things. Hopefully a cheap solution can be found.

Hans

Christian Van Horn

unread,
Mar 21, 2013, 9:53:13 PM3/21/13
to inm...@googlegroups.com
Hey Gael, the PZ on the PC board stands for Pengzhang. They are the original manufactures for this servo. What is interesting is that according to the link, they can possibly rotate further... This is a real mystery here! Also, it says that they normally use 1000 to 2000 pulses, with a center at 1500...

Here's the most info I've found: http://www.topfreebiz.com/product/7168467/Pingzheng-13kg-Hv-Digital-Metal-Gears-Servo-for-1-5-RC-Cars-and-Aircrafts.htm

Christian Van Horn

unread,
Mar 21, 2013, 10:07:07 PM3/21/13
to inm...@googlegroups.com
Sorry for the misspelling. The correct name of the manufacturer is: Dongguan Ping Zheng Science Technology Co., Ltd.
I have sent them a direct email for more information, but don't hold much hope due to the language barrier... Chris

hansf...@gmail.com

unread,
Mar 21, 2013, 11:56:42 PM3/21/13
to inm...@googlegroups.com
Looking at their documentation it says their max travel is approx. 145 degrees. They must have a limitation in their boards to prevent them from getting the max pulses to achieve 180 degrees.
To achieve the 180 you must be capable of going to 600 micro seconds and their docs say they are only capable of a low of 800 micro seconds.
This is why they can only achieve 145 degrees. It must be a limitation in their board designs that they are using.
It looks like these servos can not be programmed to achieve the 180 degrees like the hitech servos. That is too bad because the price seemed very reasonable for hobby use.

Hopefully the manufacturer can come up with a solution or a work around.

Hans

Jason Ravel

unread,
Mar 22, 2013, 2:53:38 AM3/22/13
to inm...@googlegroups.com
So the proper pulse width has to be sent to the servo. Any ideas what the pulse width should be to achieve 145 degree rotation? 

hansf...@gmail.com

unread,
Mar 22, 2013, 5:55:09 AM3/22/13
to inm...@googlegroups.com
Hi Jason,

800 to 2200 micro seconds.

Hans

gael langevin

unread,
Mar 22, 2013, 7:51:22 PM3/22/13
to inm...@googlegroups.com
@Chris,
Thanks for looking up these infos. What I don't understand is why the specs found by the manufaturer are different with the specs given by Hobbyking., Hobbyking gives
Spec.
Torque: 14kg @ 6v, 15kg @ 7.4v

to 13,5Kg by the manufaturer

@Hansf
thanks for helping, specially if you get the same servo to test.

@jason, let us know if you can work it out with these pulses.


Christian Van Horn

unread,
Mar 22, 2013, 9:58:18 PM3/22/13
to inm...@googlegroups.com
Gael, I'm pretty sure the Hobby King specs are closer on the torque. I saw a review that said they are actually higher torque then the Hobby King specs... There is also a HK15298B that is rated at 20 kg... even better if we can ever figure this thing out...

Christian Van Horn

unread,
Mar 23, 2013, 9:20:02 AM3/23/13
to inm...@googlegroups.com
BTW, can anyone here verify that the current movement out of the box is only 90 degrees for the HK15298 servo? We need to know this accurately, as from the specs we should be getting nearly 140 degrees out of them. Thanks, Chris

Kai Ludwig

unread,
Mar 27, 2013, 1:52:12 PM3/27/13
to inm...@googlegroups.com
For RC applications 90 degrees + some margin is standard. Thats why 90 degree servos are not especially marked when sold. Servos with special configurations are. Luckily the standard servos have +/-60 to +/-70 degrees wich enables them to turn 120 to 140 degrees at all. That might fit for most applications.
 
The HK12598 is mechanically able to turn slighty more than 180 degrees. But the internal programming in combination with the build in potentiometer clips at +/- 70 degrees. Narrowing or widening the control pulses makes no sense because of the clipping done with the servo controller. The programming seems to be hardcoded as there are no programmers available for HobbyKing servos.
 
But there is a trick that might work (use at own risk and beware of that I'm still testing it):
 
Open the servo and add 1,3 KOhm 1% tolerance resistors at both ends of the potentiometer. That will widen the turn angle to slightly more than 180 degrees.
 
!!!Be aware that NOT running into the endstops has now be ensured by the software!!!
 

Christian Van Horn

unread,
Mar 27, 2013, 2:56:50 PM3/27/13
to inm...@googlegroups.com
Kai, does this have any effect on the servos ability to center? Also, could the added resistors be modified to limit travel to 160-170 deg? Thanks for the great post, Chris

Kai Ludwig

unread,
Mar 28, 2013, 4:30:25 AM3/28/13
to inm...@googlegroups.com
Hi Chris.
 
For fewer degrees use resistors with slightly lower value. Just experiment with 1,1kOhm, 1,2kOhm and 1,3kOhm (1% tolerance) until you get the same angle extension to both sides. Some experimentation is needed, but it can be easily done. Remember to apply resistors to BOTH sides of the potentiometer to roughly keep the symmetry of the voltage divider that is implemented with the potentiometer. The resistor values may differ but aplyying them to both sides is mandatory.
 
At the moment I don't know if every single HK15298 servo has to get adjusted individually or if the values can be the same for all servos of that type. It depends on the tolerance of the built in potentiometer and requires further experimetation.
 
If you find a resistor combination that extends the range symetrically to both sides the center point does not move. In my example I used 1,1kOhm for one side and 1,2kOhm for the other. That worked fine for full 180 degrees without touching the endstops.
 
 
Regards,
Kai.

Christian Van Horn

unread,
Mar 28, 2013, 5:28:11 AM3/28/13
to inm...@googlegroups.com
I've got to buy a few of these to play around with. I guess the ultimate mod would be to find out if it's possible to simply change out two of the already installed SMT resistors onboard (if they exsist) or some other SMT fix... Thanks Kai!

Kai Ludwig

unread,
Mar 28, 2013, 7:44:08 AM3/28/13
to inm...@googlegroups.com
Just adding standard resistors is much easier because there is plenty of space for that in the servos housing. Desolder cable from pot and solder the res inbetween, done. Resoldering SMD resistors is a PITA. I would strongly suggest not trying that.
 
You can even temporarly add small cables, partially remount the servo and play with the resistors from outside while having the servo running. Works quite fine.
 

Kai Ludwig

unread,
Mar 29, 2013, 12:25:50 PM3/29/13
to inm...@googlegroups.com
Just some more feedback from the testing labs.
 
Having modified the fourth servo I now have proof that the results are reproducable good enough. If you open a servo and look at it from the bottom having the motor down and the potentiometer top attach 1,2 kOhm to the left pin of the pot and 1,1 kOhm to the right pin of the pot. Till now that worked fine for all my servos.
 
Because the potentiometer itself has a tolerance of 10% the outcome varies but in all cases I managed to get full 180 degrees with this setup. But you have to test carefully because depending on the actual tolerance of the potentiometer you'll find that the servo may run into the mecanical endstops before the logical endvalues are reached.
 
So the software that will control the robot has to get calibrated for each servo to get this right. But that is a minor problem. Just make sure not to forget abut it.
 

Kai Ludwig

unread,
Mar 29, 2013, 1:55:30 PM3/29/13
to inm...@googlegroups.com
(where I put the resistors)

B Stott

unread,
Apr 11, 2013, 12:51:34 AM4/11/13
to inm...@googlegroups.com
Here is a link to more detail for what Kai was describing - Increase Servo angle of deviation

The author's use of two additional pots was what I was working to suggest then I found his great servo tips so we get more from less.

B Stott

unread,
Apr 11, 2013, 1:34:18 AM4/11/13
to inm...@googlegroups.com
Just for the comfort of seeing the fix from different angles - http://www.rcgroups.com/forums/showthread.php?t=629294

Seems not so uncommon to alter a servo for rotation angle now.

gael langevin

unread,
Apr 11, 2013, 6:35:58 PM4/11/13
to inm...@googlegroups.com
Thanks bstott for the extra infos, using two potentiometers can be pretty interesting also for special functions.

B Stott

unread,
Apr 12, 2013, 2:37:24 PM4/12/13
to inm...@googlegroups.com
Here are some inexpensive micro 200K potentiometers to apply to this. As already stated potentiometers will be easy to allow you to adjust your motor and then must stuff them into the motor case and use that motor!

http://www.ebay.com/itm/10pcs-204-200K-Blue-White-Resistance-Adjustable-Resistor-/110957997137?pt=LH_DefaultDomain_0&hash=item19d59cac51

Hans de Bruin

unread,
May 11, 2013, 12:27:27 PM5/11/13
to inm...@googlegroups.com
I recenty bought MG996R servo's for the same thing. The MG996 should be the successor of the MG995 Gael has been using previously (according to the pictures).
Same problem as described above. The range is only 145 (140?) degrees.

The way I got it working was to use servoMain.write(20); for the 0 degree setting.
And serverMain.write(160) for the max setting.
That worked so far.
Anything lower than 20 doesn't give any response on the servo. Higher than 160 also.

When I looked closer at the label I noticed that it says "digital" so I guess these are also digital servo's.

When I try the same thing with a HS-805BB I can use servoMain.write(0) to servoMain.write(180) to get it to rotate fully.
But it is mirrored, so 0 degrees is on the opposing side of the MG996R's 0 degrees.

I'll try to do the modification with the resisitors on these servo's to see if that gives a 180 deg. rotation.

All a bit confusing but I guess that's because it's the first time I do something with servo's.
IMG_1468.JPG

gael langevin

unread,
May 12, 2013, 8:18:11 AM5/12/13
to Hans de Bruin, inm...@googlegroups.com
Hi Hans de Bruin,
Yes it is pretty confusing, I got some MG946R from HobbyKing and they also seem to operate from 20 to 160. Although using them with MRL with the same range than the MG995 doesn't seem to trouble them.
I wonder how come these restriction of degrees aren't clear in the specs of the servos, or do I miss something...


2013/5/11 Hans de Bruin <ctrl.a...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
To post to this group, send email to inm...@googlegroups.com.
Visit this group at http://groups.google.com/group/inmoov?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Hans de Bruin

unread,
May 12, 2013, 3:07:36 PM5/12/13
to inm...@googlegroups.com, Hans de Bruin
Hi Gael,

That's interesting. I'll try MRL this week before I start modding the servo's. Since everything is now in place except for the wires that would save me a lot of work.
Thanks!

Hans de Bruin

unread,
May 20, 2013, 11:41:38 AM5/20/13
to inm...@googlegroups.com, Hans de Bruin
Hi Gael,

I've been playing with MRL but so far I've not been able to figure out how to get this working with MRL. (ERROR org.myrobotlab.service.Servo  - servo's controller is not set
).
I have read everything on the website but I find the documentation not very clear. 
There are some things in the forum (http://myrobotlab.org/content/inmoov-basic-program-start) but without answers so that doesn't help very much.

Could you pls post the code you use to move the servo using MRL? Then at least I have a starting point to make the hand move. And if that works I don't have to modify the servo's.

Thanks.



On Sunday, May 12, 2013 2:18:11 PM UTC+2, gael langevin wrote:

Hans de Bruin

unread,
May 20, 2013, 11:57:22 AM5/20/13
to inm...@googlegroups.com
AH ignore my last message. Already found the problem.
With MRL the Ardiuno needs external power to move the servo. So after powering on my powersupply it started working.

Not 180 deg. though... Still only 120 deg. or so.

Looking into it...

gael langevin

unread,
May 20, 2013, 1:39:14 PM5/20/13
to inm...@googlegroups.com
Hi Hans,
Are you using the HK15298? if yes this post is about these servos not being able to go to 180 degrees. I have created the "simple servo bed" with the "wheels" actuators to get a simple solution to this servo problem.
Are you using the last version of MRL with the script on the InMoov service? Grog has made a lot of changes this week-end (19/05/13) and I need to test with my robot to see if it works.

Hans de Bruin

unread,
May 20, 2013, 4:55:14 PM5/20/13
to inm...@googlegroups.com
Hi Gael,

I am using both the HK 15298 and the TowerPro MG996r. I have also with MRL the same behaviour that it only rotates about 90 deg.

I thought that the simple servo bed was replaced by "new hand servo brackets" but apparently it's the other way around.
I will continue now with the simple servo bed and hopefully that will solve it.

Thanks for the update.

gael langevin

unread,
May 21, 2013, 9:36:53 AM5/21/13
to inm...@googlegroups.com
Actually it is mainly the "wheels" that make the difference if you use HK15298 servos. The fact is, the fishing braid line runs on the circomference of the "wheel" which gains length of traction.
Now using a HK15298 for the wrist will reduce the rotation of the wrist because of the only 90 degree movement of the servo.
Kay ludwig, (if you have read this post) has found a solution with resistors to amplify the locked degree movement of the HK15298.
Reply all
Reply to author
Forward
0 new messages