Hi, while I am waiting for my Herkulex servos to arrive and designing a mechanical structure using all of them (including the smallest and the biggest ones), I have got a question regarding power supply.
Now, the DRS-0101/0201 use 7.4V while DRS-0401/0601 use 14.8.. (here’s a good comparison chart: Francerobotique.com)
Does anyone know if the smaller ones have some resistors pre-installed in the motors? Can I have one common power supply of 15V so that all work well or I should actually have to use 2 power supplies to use all of the servos in one setup?
Why would there be resistors in the motors? To overheat them? You never use resistors in
power electronics, everything is switch-mode now.
No, each voltage requires its own supply. If you'd avoided the 0101 you could have used
a single 11.1V LiPo pack for the lot.
You might be able to drop your higher voltage supply with a DC-DC converter and save some
money if you can find a DC-DC converter that's cheaper than a separate supply/battery. Make
sure peak current requirements are met.
Thanks MarkT, I got it. But it means that the wiring should be modified, right? 2 data wires should be in a daisy chain mode while the 2 power wires should be modified, so that smaller motors get 7.5V while the bigger ones get 15V, from different power supplies, right?
So I have finally received both the DRS-0101 and DRS-0201. Connected to my Arduino Mega and after some hassles made it work with the library http://hovis.co.kr/guide/drs0201_api_eng.html.
My code is following (ignore the motor #2, I just commented it, the case with just one motor is the same):
#include <Herkulex.h>
long timeSpent;
long previousMillis;
float angle;
int speed = 360;
void setup()
{
delay(1000); //a delay to have time for serial monitor opening
Serial.begin(115200); // Open serial communications
Serial.println("Begin");
Herkulex.beginSerial1(115200); //open serial port 1
Herkulex.initialize(); //initialize motors
}
void loop(){
Herkulex.moveAllAngle(1, -60, LED_BLUE);
// Herkulex.moveAllAngle(2, 60, LED_BLUE);
Herkulex.actionAll(speed);
delay(speed);
angle = Herkulex.getAngle(1);
timeSpent = millis() - previousMillis;
Serial.print("-60: ");
Serial.print(timeSpent);
Serial.print(" angle: ");
Serial.println(angle);
previousMillis = millis();
Herkulex.moveAllAngle(1, 60, LED_GREEN);
// Herkulex.moveAllAngle(2, -60, LED_GREEN);
Herkulex.actionAll(speed);
delay(speed);
angle = Herkulex.getAngle(1);
timeSpent = millis() - previousMillis;
Serial.print("+60: ");
Serial.print(timeSpent);
Serial.print(" angle: ");
Serial.println(angle);
previousMillis = millis();
}
Now according to the specification the speed of both motors should be 0.147s/60degrees at 7.4v. I have connected them to a power supply 7.5v 2.2A, but getting maximum 0.360s/60degrees. If I am trying to make it faster, the motor just don't go to its 60 degrees..
Do I calculate the degrees and time correctly?
Is there anything I can do to make them faster?
Thanks for the answer DuaneDegn. I know what the code gives me.. This speed "constant" is the result of experiment that actually allows me to get the motors to reach their 60 degrees and the delay is used just to simplify the test. I will rewrite it however to check the angle, but as you have mentioned it will unlikely help, might be even slower because of constant questioning of the motor.
So can please anyone confirm that the actual speed of the motor is more than twice slower than in the specs?
Do you think that Arduino Due might help here? ..though the library would need to be converted.
arisetobe:
Do you think that Arduino Due might help here?
I doubt the problem is caused by the Arduino. The Due would send the exact some message and I don't think the communication speed is an issue.
The communication time might be causing your measured speed to be less the specs. I doubt the specs include the communication overhead. The 60 degree figure is likely meant to be the speed to move 60 as the motor is already turning. It might not include acceleration on either end of the movement. I haven't read the datasheet so I'm not sure how they determine the speed.
You mention having a 7.5V 2.2A power supply. Have you monitored the voltage as the motor is moving?
I don't know what it is but many motors don't like to be powered by wall-wart type supplies. I've found motors generally do much better when powered from a good battery pack.
I think you are likely measuring the speed differently than how Herkulex measures the speed and I also wonder if your power supply isn't providing the needed current.
I have found the issue.. it is me programming at 1am local time..
Of course the speed will be twice slower if I measure time from -60 degrees to 60 degrees, and compare it with the specs 0 to 60 degrees..
But I am not satisfied with the speed though, my experiments with stepper motors gave me some better results, but of course the torque was a shame.. With these motors however I won't be able to make my robot run..
I have measured the power supply before, not this time, will check tomorrow btw, thanks for the suggestion, as there seem to be a small room for improvements.
Another question, it is stated in the library description Dongbu Herkulex Arduino Library « Robottini that the the "moveSpeedOne” function has the parameter "pTime=execution time in milliseconds” so I assume that after setting the execution time, the motors should stop, right?
In reality they keep on moving. I am using following code:
#include <Herkulex.h>
int n = 1;
void setup()
{
delay(1000); //a delay to have time for serial monitor opening
Serial.begin(115200); // Open serial communications
Serial.println("Begin");
Herkulex.beginSerial1(115200); //open serial port 1
Herkulex.initialize(); //initialize motors
Herkulex.moveSpeedOne(n, -300, 100, LED_GREEN);
}
void loop(){
}
if anyone have had the issue, maybe something should be edited in the library to make the execution time parameter working?
This quote from the page you linked to, doesn't sound the motor will stop after "pTime".
motor continuous rotation with a specified speed
I don't know what "pTime" does but my guess is it instructs the program when to issue the speed command. You could of course try various values to see how the behaviour of the program/motor changes.
it instructs the program when to issue the speed command
This is actually what I also thought about, though I can't imagine a case when it might be required.
I have wrote to Dongbu as well.. will see what they say.
arisetobe:
This is actually what I also thought about, though I can't imagine a case when it might be required.
I have wrote to Dongbu as well.. will see what they say.
I'd think it would be pretty easy to figure out what the parameter is. Just set different values and watch what happens.
I have written a library that is capable of setting up, and driving the HerkuleX DR-0101 and DR-0201. You can find it here: HerkuleXLib v1.0 – Le blog de Benoit Puel
I hope it could help. For instance, the input parameters are given in standard units (degrees, milliseconds) to avoid user to make conversions.
Please fill free to make feedbacks about the library.