Z Looking Glass: Project SmartSurfaces

A insider's observation of Project SmartSurface

Jan’s Reply From Pololu Forum: On Motor Controllers Issues December 19, 2009

Filed under: Uncategorized — zilinzen @ 3:29 pm

Okay, here is what I posted on Pololu Forum about my malfunctioning motor controllers (just a little recap):

With 1INA, 1INB, 1PWM, +5V(IN), 1GND pins connected to a Arduino Duemilanove (ATMEGA328), OUT 1A and OUT 1B connected to the motor, VIN(+) and GND(-) connected to a single output DC power supply (30V/1A), the motor was not operating at its nominal voltage (12V) and current (0.6A) like it did on the other Dual VNH2SP30 MDO3A board with exactly the same circuit. The LED on OUT1 side didn’t light up but the LED on OUT2 section did while no electronic device was connected to OUT2 section.  Sometimes LEDs on both sides was off when the correct circuit was connected. Sometimes the red LED on OUT1 side was on only when OUT 1A was disconnected.

1)Red Light vs. Green Light:
The motor is running fine and the processor is not over heated but the red LED on the board was on all the time and I’m not sure if it’s a good sign because I assume it is green light that is supposed to be on.

2)PWM doesn’t control the speed of the motor. Not sure if I need to change PWM pin frequency on the Arduino.
Here the testing code:

int InA1 = 7;
int InB1 = 8;
int PWM1 = 3;  //PWM1 connects to pin 3
int PWM1_val = 127; //(25% = 64; 50% = 127; 75% = 191; 100% = 255)
void setup() {
Serial.begin(9600);
pinMode(InA1, OUTPUT);
pinMode(InB1, OUTPUT);
pinMode(PWM1, OUTPUT);
}void loop() {
digitalWrite(InA1, HIGH);
digitalWrite(InB1, LOW);
analogWrite(PWM1, PWM1_val);
}

3)Base on my circuit, how should I use EN/DIAG and CS pins and how should I program them?

4)For the Dual VNH2SP30 board that is not working. No LED was on when the left side was connected and here is the strange part: when I connected the right part, red LED on the right was on and the motor was not running but the processor on the LEFT side was over heated.

////////////////////////////////////////////////////////////////////////

Here is Jan’s reply:

What voltage are you using? The datasheet for that motor indicates a 43A stall current at 12V, which is past the 30A peak limit of the driver. Because the over-current protection can kick in anywhere from 30 to 70 amps, it could account for the unit-to-unit variation you’re seeing.

Therefore, I recommend doing some tests at lower currents. Do you have some smaller toy motors around that you could use? Also, what is your power supply? At these kinds of currents, that and the details of the wiring can be quite important. The LEDs on the motor driver board just correspond to the direction. You could even start your test with just the LEDs (i.e. don’t connect a motor at all). You can use direct connections for the inputs instead of connections to your Arduino: make one direction input high, make the other low, and you should see that making PWM high makes an LED go on. Flipping the direction inputs should change the LED color. You’ll need the main supply and the 5V supply connected during these tests.

The diagnostic and current sense pins are somewhat optional and up to you, though with that size of motor, you could be tripping some of the protection features, so you might want to monitor that line with a digital input. Current sense should go to an analog input if you care to see what the current is doing. You can look at it on a voltmeter if you want to get an idea for what it reads for different motor currents.

– Jan

Clearly, the overheating board is broken, thanks to FedEx’s “great delivery”. Later on, I used the same code on the other side of the functioning dual board and it was working fine. This means half of the “working” board is damaged, but not as severe. PWM pins are down as well as it can’t tell the DC motor to switching rotating directions. That explained why only the red LED is always on, but not the green on.  Now, it’s time to get a new board.

Advertisements
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s