Go Down

Topic: Re: MOTOR NSS MOVING HELP !!!!!!!!!!!!!! (Read 877 times) previous topic - next topic

spookyjack123

hello, i wish to power a robot using the pololu low voltage dual serial motor controller, but i am unable to get the robot to move, my current code causes a 1 second ish solid green light, followed by a blinking green light, however when the motor power source is plugged in, it displays the solid green light, then the robot moves less then a millimeter at an extremely lower power, i know it is not brownout considering the same power is being sent to the motor controller wether the motor controller itself is recieving power for its motors (in this case the motor controller is powered from 2 AA ) anyways here is the pololu link and the code

http://www.pololu.com/catalog/product/120

Code: [Select]

#include <NewSoftSerial.h> // includes the library for serial data transfers


#define txPin 5 // states what pin transmits the data to the pololu controller
#define rstPin 6 // states what pin is used a reset,which puts the controller to a defualt, all motors off state
#define rxPin 4 // this pin is used to recive data and is required, however it is unused in this sketch

NewSoftSerial motor(rxPin, txPin); // this shows what pins that are defined will be used with the New Soft Serial interface

void setup()  {
  pinMode(rstPin, OUTPUT); // this shows that the reset pin set to transfer, and not to recive electricity.
  digitalWrite(rstPin, HIGH);  // puts the current on the rstPin to max so the controller doesnt reset
  motor.begin(9600); // this begins a NSS interface named "motor"
  delay(2000);
 
  motor.print(0x80, BYTE);  // this is the start byte that makes the controller listen to the below commands
  motor.print(0x02, BYTE); // This tells the motor controller that its configuation will be changed
  motor.print(0x00, BYTE); // new configuration byte, if fails revert to 0x7F
  delay(2000);

motor.print(0x80, BYTE); // Start Byte
motor.print(0x00, BYTE); // Tells The motor it is going to send power to the motors
motor.print(0x03, BYTE); // motor 2 backward
motor.print(0x7F, BYTE); // full speed
delay(2000000);
}
void loop()  {
 
}


MarkT

I think people need more info about the circuit to be able to help with this...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Grumpy_Mike

Quote
i know it is not brownout considering the same power is being sent to the motor controller wether the motor controller

You need to try and understand what you are doing.
You don't send power to a motor you send voltage, in response the motor draws current. The product of current and voltage is power.

If the LED is no for the right amount of time then there is nothing wrong with the software, so posting the code gets us nowhere. It sounds like a brown out issue to me as often the voltage drops as current is drawn, especially when using batteries. You need to measure the voltage across the battery when it is under load. You will probably see it plummet dramatically when it tries to power something.

Go Up