ModGrasp
A Wave Simulator and Active Heave Compensation Framework
JOpenShowVar, a communication interface to Kuka robots
Motor calibration for modular robot

Motor calibration for modular robot

I just made a simple tutorial that can be used for motor calibration when assembling modular robots.

Here is the Arduino code that can be used with the circuit above to calibrate one motor. Just press 'a', 'b' or 'c' from the keyboard to align the motor shaft to the desired position (0, 90 or 180 degrees). Then fasten the screws to the bracket.
// Calibration tool for modular robots
// Copyright Filippo Sanfilippo
#include <SoftwareServo.h>

SoftwareServo servo;

void setup()
{
  servo.attach(3);
  servo.setMaximumPulse(2200);
  Serial.begin(9600);
  Serial.println("Ready");
}

void loop()
{
  static int value = 0;

  if ( Serial.available()) {
    char ch = Serial.read();
    switch(ch) {
      case 'a':
        value = 0;
        servo.write(value);
        Serial.println("0 degrees");
        break;
      case 'b':
        value = 90;
        servo.write(value);
        Serial.println("90 degrees");
        break;
      case 'c':
        value = 180;
        servo.write(value);
        Serial.println("180 degrees");
        break;
    }
  }
  SoftwareServo::refresh();
}

Share it!
Motor calibration for modular robot - Filippo Sanfilippo
Filippo Sanfilippo