Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2012
    Posts
    4

    Default Cytron MD10C not working with arduino uno WHY?

    The problem is fix bad connection

    I have a Cytron MD10C that is connected to a 12v dc motor and I would like to control the speed and direction of the motor with a arduino uno.

    Connection:
    The 12 volts battery is connected to the terminal ( + & - ) and the motor is connected to the terminal ( A & B ) on the MD10C.

    The (Vin) is connected to the 12 volts battery for supplying the MD10C board.
    The (DIR) is connected on pin 8 on the arduino uno. (DIR = direction of the motor)
    The (PWM) is connected on pin 9 who is a (pwm).
    The (GND) is connected on the ground on the arduino uno.
    On the board there is two buttons A & B. When A is activate the motor will turn in one direction and when B is activate the motor turn's in the other direction. So the MD10C is working correctly.

    SEE THE attachment.

    The problem:
    When everything is connected I’m sending a (1-HIGH or 0-LOW) to pin 8 for direction and a value between 0 and 255 to pin 9 for speed. Nothing work's included the led for direction A or B but the led for power is working. I tested the wires between the MD10C and arduino uno for continuity and everything look Ok.

    Code on the back of MD10C board:

    PWM DIR Motor A Motor B
    1 x LOW LOW
    1 0 HIGH LOW
    1 1 LOW HIGH

    Arduino uno code:

    This code is just for testing the MD10C and arduino uno to run the motor.

    Code:
    int pinPwm = 9;
    int pinRotation = 8;
    
    void setup(){
    Serial.begin(9600);
    pinMode(pinPwm,OUTPUT);
    pinMode(pinRotation,OUTPUT);
    }
    
    void loop(){
    digitalWrite(pinRotation,HIGH);             // turn in one direction
    analogWrite(pinPwm,200);
    delay(2000);
    digitalWrite(pinPwm,LOW);                    // stop motor
    delay(1000);
    digitalWrite(pinRotation,LOW);           // turn in other direction
    analogWrite(pinPwm,100);
    delay(2000);
    }
    I also try this code for the (loop())

    Code:
    void loop(){
    digitalWrite(pinPwm,HIGH);                   // <<<<<<<
    digitalWrite(pinRotation,HIGH);             // turn in one direction
    analogWrite(pinPwm,200);
    delay(2000);
    digitalWrite(pinPwm,LOW);                    // stop motor
    delay(1000);
    digitalWrite(pinPwm,HIGH);                  //<<<<<<<<
    digitalWrite(pinRotation,LOW);           // turn in other direction
    analogWrite(pinPwm,100);
    delay(2000);
    }
    If you have any suggestions why the MD10C is not working please let me know.
    If you also have a Arduino code for running the motor with the MD10C.
    Thanks again for your help.

  2. #2
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    734

    Default

    Your code and connections look OK.

    What if your try not to mix digital and analogue writes on the same pins?

    Is this working?

    Code:
    void loop(){
    digitalWrite(pinRotation,HIGH);             // turn in one direction
    digitalWrite(pinPwm,HIGH); 
    delay(2000);
    digitalWrite(pinPwm,LOW);                    // stop motor
    delay(1000);
    digitalWrite(pinRotation,LOW);           // turn in other direction
    digitalWrite(pinPwm,HIGH);
    delay(2000);
    }
    Also, is the logic side operating at 12V or at 5V. If it is operating at 12V then it will not detect the Arduino 5V HIGH signal.

  3. #3
    Join Date
    Apr 2012
    Posts
    4

    Default

    Quote Originally Posted by Casmat View Post
    Your code and connections look OK.

    What if your try not to mix digital and analogue writes on the same pins?

    Is this working?

    Code:
    void loop(){
    digitalWrite(pinRotation,HIGH);             // turn in one direction
    digitalWrite(pinPwm,HIGH); 
    delay(2000);
    digitalWrite(pinPwm,LOW);                    // stop motor
    delay(1000);
    digitalWrite(pinRotation,LOW);           // turn in other direction
    digitalWrite(pinPwm,HIGH);
    delay(2000);
    }
    Also, is the logic side operating at 12V or at 5V. If it is operating at 12V then it will not detect the Arduino 5V HIGH signal.
    Hi, try the code above but the problem is the same, no the logic side is not 12 volt.

    Please need help

  4. #4
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    734

    Default

    Quote Originally Posted by Serge View Post
    On the board there is two buttons A & B. When A is activate the motor will turn in one direction and when B is activate the motor turn's in the other direction. So the MD10C is working correctly.
    How did you test this?

  5. #5
    Join Date
    Apr 2012
    Posts
    4

    Default

    Quote Originally Posted by Casmat View Post
    How did you test this?
    Yes, i did,

    I'm looking on the net but so far nothing. Thanks for try to help me.

    If you ever think of something please let me know. I'm going to look around.

  6. #6
    Join Date
    Apr 2012
    Posts
    4

    Default

    To test the Cytron Md10C you don't have to connect to the arduino uno. I did this.

    The 12 volts battery is connected to the terminal ( + & - ) and the motor is connected to the terminal ( A & B ) on the MD10C.

    The (Vin) is connected to the 12 volts battery for supplying the MD10C board. I also try the power from the motor side to power the MD10C board by changing the a jumper on the board from (Vin) to PWR. Both method work.

    The (GND) is connected on the ground on the arduino uno

    On the board there is two buttons A & B. When A is activate the motor will turn in one direction and when B is activate the motor turn's in the other direction. So the MD10C is working correctly.

  7. #7
    Join Date
    Apr 2012
    Posts
    1

    Default

    I am having a similar issue. The Cytron board tests fine with 12v hooked up to vin and 12v to power, both grounds connected. I can push the buttons and my motor runs great, both directions.

    When i fire up the arduino with some of the above sample code, it's a no go though. Has anyone resolved the issue or have some sample code to test out?

    Many thanks!
    mark

  8. #8
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    734

    Default

    @markeyro serge is suggesting his issue was due to a bad connection, perhaps the same applies to you?

  9. #9
    Join Date
    Nov 2012
    Posts
    2

    Default

    I also have two MD10C board, and with only digitalWrites (no pwm). I can get one of my boards to work. However neither of my boards work with pwm from the Uno. I don't think there is a connection issue as I've tested all the connections. The two buttons on the board work for both boards.

    Some help would be greatly appreciated.

    Code

  10. #10
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    734

    Default

    It seems that the PWM frequency on the Uno is not suitable for that board. Perhaps try other frequencies as described here: http://www.arduino.cc/playground/Code/PwmFrequency

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •