Which pulse width has my treadmill?

Hello,

i am trying to get a treadmill motor working with an arduino board.
i know that i will have to modulate the pulse width so that the motor controller ( MC 2100 ) will receive a valid signal.
how can i find out at which pulse length the motor controller operates?

Greetings colocolo

Is this datasheet relevant (does the picture of the board match yours)? If so it explains the controller signals.

yes i have that sheet. but i need to know how long pulses are.
however, i tried this sketch:

int pin = 7;

unsigned long duration;

void setup()
{
pinMode(pin, INPUT);
Serial.begin(9600);
}

void loop()
{
duration = pulseIn(pin, HIGH);
Serial.println(duration);
}

it gave me values around 9300. does that mean that the motor controller pulses are 9,3 millisec long?

Probably :slight_smile: Seen this? http://forum.allaboutcircuits.com/showthread.php?t=51061

i tried this . doesnt work.
but i managed to find out some data. with this code: lordvon's stuff: Getting PWM frequency and duty cycle with Arduino

the serial port gave me 47.23 and 50.64 out. the values vary.

so the frequency is 50 Hz and duty cycle 47 %. that would correspond because i already received a 9,3 ms signal. so the period would be 20 ms.

Could this be correct?

Well you've got the motor driver - try it out? The various threads say different things, one is likely to be right I suspect.