Significant breakthrough! The 180kg.cm high-torque servo motor is now operational. Posting guide here to show how I got it working.
I realized that this kind of complicated looking electronic hardware is a BIG turnoff to a lot of people who are trying to make a large robot. Most instructions online either had parts missing and were written in Chinglish or videos by a couple of Indians whom I could barely understand.
Fuck that. I just wanted it to work ASAP. So without further ado:
Hardware Used:
High Torque (180kg.cm) Servo Motor DC12 Volt to 24 Volt with steel gearing.
£30 ($39.58) each at time of writing.
Elegoo MEGA2560 R3 (Arduino MEGA2560 Clone) about £13 ($17.15) at time of writing. You can get cheaper ones but MAKE SURE THAT YOURS COMES WITH A USB CABLE!
(You don't actually need a power adaptor because the benchtop PSU will be providing the electricity, but it's a good idea to make sure that a plug is also included so that you can use your microcontroller for other applications as well).
The power plug I got with mine was an Elegoo brand AC-DC adaptor
Input:100-240 Volts AC
Output: 9 Volts - 1 Amp DC
The data cable was a blue type A to type B USB 2.0 cable.
The type A end goes in your computer's USB port,
The type B end fits into the socket on your Arduino/Elegoo Mega.
Eventek KPS3010D DC 0-30 Volt 0-10 Amp Benchtop Variable Power Supply
Mine cost £75.99 ($100) and included a power cord and two sets of crocodile clips.
Jumper wires - male to female
You can get over 100 of these for about £5-6 ($6-8) off Amazon.
Male to male ones are often included in the pack as well.
You'll only need a couple of jumper wires to connect one high-torque servo, but of course robowaifus include many circuits and servo motors so a pack of 100+ is useful!
Standard Household Electrical Cable
A 2m extension lead costs about £5-6 ($6-8) or you can get 10m of cabling for about £11 ($14.50).
I used a craft knife and metal snips to strip the outer cable wall off and get a couple of 30cm (1ft) lengths of power and neutral cable.
I then used a wire stripper to strip about half a centimeter of covering from each end
and wound the exposed copper filaments into a tight helix between my fingers.
These wires can then be connected between your PSU and the positive and negative screw terminals on your high-torque servo motor (see wiring diagram).
I know these benchtop power supplies expect you to attach a black negative cable and a red positive power cable but in the U.K. the power cable (positive) is brown and the negative cable is blue.
Wiring (also see circuit diagram)
Negative terminal on PSU ----> Negative screw terminal on servo motor
Positive terminal on PSU ----> Positive screw terminal on servo motor
GND on servo motor ---->GND on Arduino MEGA
PWM on servo motor ---->PWM Pin 9 on Arduino MEGA
Once your high-torque servo motor is connected to the ArduinoMEGA and PSU,
load up ArduinoIDE and make sure that you have selected the correct microcontroller from the
Tools> Board:> ArduinoAVR Boards menu
(in this case ArduinoMEGA or MEGA2560).
Then make sure that serial port is operational by checking
Tools> Port:>"COM X"
For example, mine was set to COM3.
If you have problems here you'll need to open Device Manager and troubleshoot it.
Ports (COM & LPT) is just below Portable Devices. If you can't see any Ports (COM & LPT) option, press
View> Show hidden devices
and it should appear.
Once your board and port are set, you should copy and paste the following code into Arduino IDE. This is the "Sweep" servo example sketch.
/* Sweep
by BARRAGAN <http://barraganstudio.com>
This example code is in the public domain.
modified 8 Nov 2013
by Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/Sweep
*/
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
Then press the Upload button.
As soon as the code uploads successfully to your ArduinoMEGA, then the high-torque servo
shaft should repeatedly move between 0 and 180 degrees.
Thats it. Functional high-torque servo!