I have a sain smart adafruit L293D motor shield. I am connecting 2 tower pro sg90's and a stepper motor to it. So far, no problem, everything moves well. Now, there are to tri pins labeled SER1 and SER2. the SER1 servo is overheating. No matter which servo I connect, it over heats. the SER2 is perfectly fine. I dont think this is a sketch problem. any one out there with this sheild
experiencing this?
sainsmart boasts about the fact that you can use 2 servos and 2 steppers, or 2 servos and 4 dc motors at one time. It will be perfect for a robotic arm i am designing. So the overheating problem will be an issue. To clarify, the only problem with the servos outside of heat, is that when they reach their full range (0 to 180 degrees), the motor continues to run. So i added buffers, but it still does not seem to stop the SER1 from heating up. Again, I have used a couple different servos, so i know it is not a sketch issue. but for fun, here it is:
#include <AccelStepper.h>
#include <Servo.h>
AccelStepper stepper;
#define ANALOG_IN A2
Servo arm1servo; //arm starting at the base
Servo arm2servo; //arm extending from arm1
int potPin1 = A0; //potentiometer for arm1servo
int potPin2 = A1; //potentiometer for arm2servo
int val1;
int val2;
void setup(){
stepper.setMaxSpeed(1000);
arm1servo.attach(9, 0, 2000);
arm2servo.attach(10, 0, 2000);
}
void loop(){
// Read new position
int analog_in = analogRead(ANALOG_IN);//sets ANALOG_IN to int
stepper.moveTo(analog_in);
stepper.setSpeed(100);
stepper.runSpeedToPosition();
val1 = analogRead(potPin1);//reads the value of the pot(0 to 1023)
val2 = analogRead(potPin2);
val1 = map(val1, 0, 1023, 0, 179);
val2 = map(val2, 0, 1023, 0, 179);
arm1servo.write(val1); //sets servo position according to scale
arm2servo.write(val2);
delay(15);//servos time to get there before next input
}
I have a sain smart adafruit L293D motor shield. I am connecting 2 tower pro sg90's and a stepper motor to it. So far, no problem, everything moves well. Now, there are to tri pins labeled SER1 and SER2. the SER1 servo is overheating. No matter which servo I connect, it over heats. the SER2 is perfectly fine. I dont think this is a sketch problem. any one out there with this sheild
experiencing this?
A photo of how you've connected things would be very useful - sounds like a supply issue
on the SER1 - have you measured the voltages of the pins to the servo? From the schematic
it seems there should be identical supplies on the two servo connectors though.
Are you mechanically loading either of the servos?
well, the multimeter shows that the servo ports are holding at 4.75 volts. nothing strange. The servos are buffered and do not hit the mechanical stop. So i just dont know. there is no load on the servos, free movement. It cant be a gear jam, that would mean all of the servos in that particular port (SER1) get jammed when plugged in. i am going to try grounding directly to arduino and not to the port. let's see what happens. if you guys have any other ideas, i am up for them.
int analog_in = analogRead(ANALOG_IN);//sets ANALOG_IN to int
stepper.moveTo(analog_in);
stepper.setSpeed(100);
stepper.runSpeedToPosition();
Can you comment these lines out so that the stepper is not driven and see if the heating problem still occurs.
Even comment out the library references to the stepper.
Don't ask me why but it all looks fine and I'd say that it might not be the problem, but ..