Using SNA41 PS2 to move servos

Hi folks,

I have bought one of these "Robot Arm" kits of AliExpress, and assembled it, it comes with an (I believe) SNA41 PS2 Controller/Motor/Servo controller board. I believe this is the spec for the board.

I have dug through their example code and tested the PS2 Controller portion, and I can see the output in the serial monitor on 57600. Great.

However, their main example code was for DC Motors, which I do not have, the arm is connected to servos. So I found some example servo code just to test it somehow, and I basically get nothing, no matter which servo I connect to which set of pins. I tweaked it slightly to actually test all the servos and I don't even get a twitch out of any of them. Am I doing something wrong here (alas all the servos are now installed in the arm and I'd rather not take it all apart)

Here is my very dumb test code and none of the servos even twitch at all, but I can see the looping numbers in serial (so it is running)

Any ideas would be amazing.

UPDATE: So I removed the control board, and I wired up 3 pins directly to the arduino itself and used the Servo.h library to run a quick and dirty test on all the servos and they all worked ok, I just had a dumb loop to move to 45 degrees and then back. They all worked and jiggled the arm around the desk. So it is either the control board isn't working, or the example code isn't right.

#include <Wire.h>
#include "Adafruit_MotorShield.h"
#include "Adafruit_MS_PWMServoDriver.h"

Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
Adafruit_Servo *Servo1 = AFMS.getServo(0);
Adafruit_Servo *Servo2 = AFMS.getServo(1);
Adafruit_Servo *Servo3 = AFMS.getServo(2);
Adafruit_Servo *Servo4 = AFMS.getServo(3);
Adafruit_Servo *Servo5 = AFMS.getServo(4);
Adafruit_Servo *Servo6 = AFMS.getServo(5);
Adafruit_Servo *Servo7 = AFMS.getServo(6);
Adafruit_Servo *Servo8 = AFMS.getServo(7);

void setup(){
  Serial.begin(57600);
  AFMS.begin(50);  // create with the default frequency 1.6KHz
  Serial.println("===========beging==========");
}

void loop() {
  Serial.println("===========1==========");
  Servo1->writeServo(90);
  delay(1000); 
  Serial.println("===========2==========");
  Servo2->writeServo(90);
  delay(1000); 
  Serial.println("===========3==========");
  Servo3->writeServo(90);
  delay(1000); 
  Serial.println("===========4==========");
  Servo4->writeServo(60);
  delay(1000); 
  Serial.println("===========5==========");
  Servo5->writeServo(90);
  delay(1000); 
  Serial.println("===========6==========");
  Servo6->writeServo(90);
  delay(1000); 
  Serial.println("===========7==========");
  Servo7->writeServo(90);
  delay(1000); 
  Serial.println("===========8==========");
  Servo8->writeServo(60);
  delay(1000); 
}


You're not trying to power the servos from your laptop, are you?

Servos need their own external power supply. Don't forget to connect all the circuit grounds.

Yeah, I was, as they worked ok when individually connected.

There's little to no documentation on this board, there is a single jumper that 'some post somewhere' said to disconnect and add 5v to the board.

So maybe I will try that.... thanks.

I was just surprised to not even get a twitch or anything out of them at all, when I wire one up at a time to 5v, gnd and digital pin I can move them via Servo.h

Look up the datasheet for your servos (or any, really). Their stall current is the most they can draw and they very well might draw that on startup, plus consider that a robot arm is always performing at least the work of holding itself in some position.

Most PC USB ports are rated for I think about 500mA. So it's very possible to overload that USB regulator and hopefully it doesn't burn out outright. That would be a bummer.

A good rule of thumb for using the Arduino voltage regulator is about the same rule of thumb for your USB port on your PC: a couple of sensors, sure. A small LCD screen, ok.
Anything that moves like motors, steppers or servos, really need their own external power supply.

Consider the following specs for a 1/5 scale Savox digital servo (yours look to be 1/10 but this should drive home the point)

  • Running Current (no load): 180mA @6.0V, 220mA @7.4V
  • Stall Current (at locked): 8500mA @6.0V, 10500mA @7.4V

source:
https://www.savoxusa.com/products/savsb2236mg-1-5-scale-high-voltage#technical-details
I chose Savox because it's a reputable brand of servos of which I am a satisfied customer.

1 Like

Appreciate it! I will look and see the best way to add power to the board directly.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.