Pages: [1]   Go Down
Author Topic: Help needed to interface Pololu 3A Motor Controller  (Read 1294 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all ,
 Recently i bought a motor controller from pololu http://www.pololu.com/catalog/product/392

I want to connect a hobby servo motor to this and control it.controlling in the sense that i should be able to rotate it forward and backwards as a first step .
Is any microcontroller board is needed to control it? (Like arduino board,, because i have it)
This is the link to the user guidehttp://www.pololu.com/file/0J61/smc03a_guide.pdf
can you give me the connection diagram to connect the RC hobby servo to the controller through Arduino?

I have used the following link to get going http://printarduino.blogspot.in/2010/02/arduino-and-pololu-motor-controller.html
I have tried the code and with following connections:
controller pin3 (Serial input ) is given to Arduino digital pin1(TX pin)
controller pin5(Reset pin) is given to Arduino digital pin7
RC Hobby servo is connected to controller's motor positive and negative inputs (PWM input is left out)
controllers pin1 and pin2 & motor power and ground (Motor controller) are supplied from Arduino 5v
Jumper J1 is removed to select the serial interface.
I have used the following code and uploaded successfully.
Code:
int resetPin = 7; //need to have a reset pin so you can control motors

    void setup()
    {
    delay(1000); //delay for 1 second
    Serial.begin(9600); //Serial set to 9600 baud
    pinMode(resetPin,OUTPUT); //set the reset pin to HIGH to program
    delay(1000); //delay for 1 second

    //move motor(s)

    }

    void loop()
    {
    digitalWrite(resetPin,LOW); //reset the motorcontroller
    delay(100); //delay for 1 msec
    digitalWrite(resetPin,HIGH); //intitiate motorcontroller
    delay(1000); //delay 1 second


    //Serial.print(0x80,BYTE); //command motorcontroller
    //Serial.print(0x00,BYTE); //move parameter

    //**motors are configured as motors 2 and 3 by default 2 is right side and 3 is left side
    //Serial.print(0x05,BYTE); //right side motor move forward
    //Serial.print(0x04,BYTE); //right side motor move backward

    //Serial.print(0x07,BYTE); //left side motor move forward
    //Serial.print(0x06,BYTE); //left side motor move backward

    //Serial.print(0x3F,BYTE); //speed setting command 0x7F = full speed; 0x3F half speed; 0x00 speed off



    //both motors in sequence allowing both motors to move
    Serial.print(0x80,BYTE); //command motorcontroller
    Serial.print(0x00,BYTE); //move parameter
    Serial.print(0x05,BYTE); //right side motor move forward
    Serial.print(0x3F,BYTE); //speed setting command 0x7F = full speed; 0x3F half speed; 0x00 speed off

    Serial.print(0x80,BYTE); //command motorcontroller
    Serial.print(0x00,BYTE); //move parameter
    Serial.print(0x07,BYTE); //left side motor move forward
    Serial.print(0x3F,BYTE); //speed setting command 0x7F = full speed; 0x3F half speed; 0x00 speed off


    delay(3000); //let it run for 3 seconds

    }
Thanx
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Recently i bought a motor controller from pololu http://www.pololu.com/catalog/product/392
I want to connect a hobby servo motor to this and control it
Why?
You can not control a servo with a motor controller like this.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can but as a first step,, later on i want to have PID cotroller with closed loop control
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey just verify my board connections?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can
Suite yourself, so you will know how to wire it up then?
I am not sure anyone can show you how to do something only you think can be done.
Logged

New Hampshire
Offline Offline
God Member
*****
Karma: 17
Posts: 781
There are 10 kinds of people, those who know binary, and those who don't.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hey just verify my board connections?


This may be futile given Mike's success (lack of), but here goes;

Quote
RC Hobby servo is connected to controller's motor positive and negative inputs (PWM input is left out)

An RC hobby servo will not do anything until you give it a pwm input signal telling it what to do.  With that left out, you have a nonfunctional servo.
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not even sure what a servo will do if you power it from high frequency PWM instead of DC.
I assume the OP was going just set the PWM to 100%.
Can't think why you'd want to do it though - seems a very expensive way of powering a servo.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: