Smart servo MS-12A not working with Arduino


#1

Hello.
I recently bought a Smart Servo MS-12A. Following the instructions available in the makeblock webpage (https://www.makeblock.com/project/smart-servo-ms-12a), i used Arduino IDE and its microcontrollers (UNO, MEGA 2560 and MEGA ADK) with the servo respective libraries, and it just DIDN’T MOVE AT ALL.
It is stranger, because the RGB led blinking examples were succesful, but any moving attempt wasn’t.
Also tried by using the mblock 3.4 IDE, with the same results.
Is there any error in the libraries or my procedure? Is something left to try?
Thank you, ang greetings from Chile.


#2

Hi CRojas_mech,
Did you connect battery for it? The smart servo requires 6-12v.


#3

Yes, i supplied 12V DC from a 24W power source, and still no movement.
I even created a program containing blinking LEDs and movement, and it executes by just blinking the LEDs, ignoring the movement orders.
It may not be important, but in the “MSMartServoTestGetParameters.ino” example incluided (which is suposed to rotate the servo and print some associated parameters), the serial monitor shows zero values on every parameters (including temperature). Obviously, the servo didn’t rotate at all.
This is the message from the serial monitor of the Arduino IDE:
image
Thank you for replying.


#4

Sorry for the delay reply.
We have update the library recently. Have you reinstall mBlock 3.4.12? The latest version.
And what is the version of your Arduino? 1.6.5 or you installed separately?


#5

No problem, thanks for replying :relaxed:
I re-installed mblock 3.4.12 and Arduino IDE 1.8.8, latest versions of each, and there was some improvement. The servo tends to vibrate, as it is “trying” to move but not having enough torque, moving one step forward and one back instantly.
The Servo Arduino libraries at Github haven’t been edited since 2 years ago.
And yes, i installed mblock and Ardunio IDE separately.

If you were able of making it move, could you send a photo or archive of the program used for it?
Thanks again.


#6

Hi CRojas_mech,
I have tested Auriga with smart servo, it works as it should be.
If the program uploaded successfully, it should be working.
Not sure what is “The servo tends to vibrate, as it is “trying” to move but not having enough torque, moving one step forward and one back instantly.” Do you have the video and which example code tested?
If you use mBlock 3 graphic programming, it moves as you expected?
Also, can we have a look of the cable connection from smart servo to the Arduino board?


#7

Hi there, i have the same problem as CRojas_mech, and i was wondering if there was a solution to the problem, since there are no new posts in this thread.

Cheers


#8

The problem, as HJOCHS wrote, is that Arduino libraries are useless, so the Arduino serial communication signals can not do anything else than blink the Leds of the Smartservo.
¿Could you, as Makeblock Tech_support personnel, try out the Smart servo MS-12A by using the Arduino Microncontroller? then you might understand our problem.
Thanks.


#9

Hello CRojas_mech,
Please kindly point out the issue of the smart servo library for me. We’ll have a check.

We have updated the libraries, have you update and tested? Here is the link: https://github.com/Makeblock-official/Makeblock-Libraries

Thank you!


#10

Hello. I first apologize myself if my last reply sounded unkind or unplesant, it wasn’t my intention.

The libraries that i, from the beginning, incluided in the Arduino IDE program were the ones available in the Makeblock webpage
Webpage: https://makeblock.com/project/smart-servo-ms-12a
Library link: https://github.com/Makeblock-official/MSmartServo-Driver/tree/master

I acctually downloaded the library attached to the link you wrote in your last reply, and those were not adapted to Arduino microcontroller. For compiling on Arduino IDE, it was necessary to include the “MSmartServo.h” library, available in the link i just included in this reply.

To finish this reply, and as you requested, the problem with the Arduino libraries (and examples incluided) is that NO MOVEMENT COMMAND is readed or functional. As i wrote some replies earlier, the code can be compiled and uploaded to an Arduino, but when executed, it is like every movement command is ignored.
For the record, the Led blinking commands are functional
So, for example, if the code (ignoring the initialization and other comands) says :

mysmartservo.setRGBLed(1,255, 0, 0); //Red, Green, Blue
delay(1000);
mysmartservo.MoveTo(1,50,180);
delay(2000);
mysmartservo.setRGBLed(1,0,255,0);

it executes, and the SmartServo will ligght up, and blink from red to green WITHOUT rotating at all.

Thank you for keep replying this topic.
Greetings from Chile :blush:


Smart Servo MS-12A Arduino IDE
#11

Hello CRojas_mech,
We did test the Orion board which is working, please check you have modified the codes as you used Arduino Uno board.
image


Smart Servo MS-12A Arduino IDE
#12

Hello
The program still doesn’t work, and with the changes donde, does exactly what i described in previous replies.
Here is an example, a little modified in order to visualize the problem.

And here is an actual video of the smart servo, in which the Arduino UNO is running the same program in the image above.
MS-12A Smart Servo issue with Arduino

Greetings from Chile!


MS-12A Smart Servo - Arduino, pin assignment
#13

I sent you a program, please test it.


#14

I tested it, and IT WORKED!!!

For the record:

  1. the Arduino user MUST initialize in its code:
    #include <SoftwareSerial.h>
    #include<MeSmartServo.h>
    #inlcude <MeOrion.h>

  2. The Arduino user MUST initialize the communication pins of the arduino by typing:

MeSmartServo mysmartservo(PORT5);

Because of the Orion board library. This makes the Arduino UNO use the Rx and Tx pins by default.

  1. Sadly, at the moment of using the “GetParameters” functions, the Arduino plataform does not read well the data (such as temperature, current, angle…) from the Smart Servo MS-12A. The recived data is recived and displayed in the Arduino IDE monitor, but is not able of reading some characters.

In this case, i only needed it to rotate for a project, so i’m very satisfied (and happy :blush:) with the results.
I sinceraly appretiate the time and patience from tech_support.
Thank you very very much :blue_heart:


Smartservo do not worki.g on Arduino IDE 1.8
#15

Glad to hear that :relaxed: And thanks for your patience.


#16

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