Reverse servo rotation?


#1

Enjoying playing with mBlock to power an Arduino Uno robot with my son. Previously I was trying to get an untethered robot working with S4A, but it required a bluetooth connection which was never stable.

We are working on a car robot, and I’m wondering how to control the direction of DS04-NFC servo? S4A had a “motor” block which included a ‘reverse’ options - but in mBlock the only controls seem to be PWM output. I can make it spin around in circles nicely though…

Any suggestions?


#2

Did you try using a negative number to get it to rotate backwards?


#3

Yes, it does turn the other way, but very weakly. I guess you can do this in hardware with an H bridge, but the “motor” block in S4A handled it in software.


#4

Hm, usually that’s an indication of a low PWM number. did you try to increase the number? Just wondering out loud.

@tec_support, any ideas?


#5

I tried various negative values up to -150, but same result: low power and sounds like it’s wheezing.


#6

Normally, the negative values can make the Makeblock Servos rotate at reverse direction.
It looks like DS04-NFC servo isn’t from Makeblock, we are not sure if it can perfectly work with the program block since we haven’t done test with other brand servos.


#7

Here’s the motor block example from S4A:

There’s no other hardware involved, so guess this just isn’t supported in mBlock. Too bad…


#8

Well it works fine in Arduino code with servo.h included. I also see that the sample extension includes a ‘motor’ block. There is also an extension available for the Adafruit motor shield, but I don’t have that so can’t test.


#9