Control an unknown stepper motor

Status
Not open for further replies.

RobinLi

Active member
Hello,
I'm trying to control a Tronical Robohead. Thats a stepper motor, used for tuning a Guitar. Gibson uses it in their GForce series.
http://www.gibson.com/gforce.aspx

I think its a bipolar stepper-motor and I tried to control it with this code:

Code:
#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 20, 21, 22, 23);

void setup() 
{
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);
}

void loop() 
{
  int val=200;
  stepper.step(val);
  Serial.println("new position");
}

and this 4-pin circuit:

https://www.arduino.cc/en/Reference/StepperBipolarCircuit

I can measure the PWM Signal at the stepper inputs but nothing happens. Has anyone an idea whats wrong?

RobinLi
 
What sort of power supply do you have feeding the H-bridge? Steppers need a reasonable current feed so if you are just using the USB power that may not be enough.

Do you have the original driver available to measure from? The voltage and step sequence matter.
 
First, DO NOT directly connect the motor wires to Teensy's pins. You must use a driver chip. The Teensy pins can't provide enough current. But the motor can produce high voltage spikes that will destroy your Teensy if directly connected. Boards like the adafruit motor shield are designed for the power needed in motors and the voltage changes when current switches rapidly in the inductance.

If using Adafruit's product, perhaps post a question on Adafruit's forum. Rick and others at Adafruit are very good about answering these sorts of questions.

Try posting a photo of the actual motor you have. The number of wires and any marking might help. If any are the same color, label them uniquely, so we can talk about them clearly.

Also use an ohm-meter to measure the resistance between each pair of wires. If you have 4 wires, that's 6 measurements. If 5 wires, 9 measurements. Post those numbers in a table, clearly showing each number and which 2 wires.

Without a photo, number of wires and resistance measurements, nobody can even begin to help with details.
 
This code, with Tronical Robohead does not work connecting directly to Arduino. Hoping it just needs more current, which will be available via H-Bridge and another power supply.

// Bipolar stepper control


int pin8 = 8;
int pin9 = 9;
int pin10 = 10;
int pin11 = 11;
int delt = 1000;

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(pin8, OUTPUT);
pinMode(pin9, OUTPUT);
pinMode(pin10, OUTPUT);
pinMode(pin11, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {

digitalWrite(pin8, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(pin9, LOW);
digitalWrite(pin10, HIGH);
digitalWrite(pin11, LOW);
delay(delt);

// wait for a second
digitalWrite(pin8, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(pin9, HIGH);
digitalWrite(pin10, HIGH);
digitalWrite(pin11, LOW);
delay(delt);

digitalWrite(pin8, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(pin9, LOW);
digitalWrite(pin10, LOW);
digitalWrite(pin11, LOW);
delay(delt);

digitalWrite(pin8, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(pin9, LOW);
digitalWrite(pin10, LOW);
digitalWrite(pin11, HIGH);
delay(delt);

// wait for a second
}
 
Definitely will work with the right circuit. I can move it back and forth a half step by momentarily connecting a coil pair to +12v and Gnd and then reversing polarity. Held it in my teeth and could feel it, it's so geared I'd never see it move.
 
Teensy pins only drive milliamps (10-20ma), so trying to get ~200ma through the steper would be optimistic. You probably should check those pins to see if they actually still function before doing much else with that board.
 
Status
Not open for further replies.
Back
Top