0

Problem with CPX servo limits
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Problem with CPX servo limits

by pvanallen on Thu Oct 01, 2020 2:06 pm

I just had my students try out servos with MakeCode for the first time. Several had an issue where:

    The servo made a grinding noise
    The CPX got very hot - to the point of smelling funny
We were able to fix the issue by not moving the servo to either zero or 180 - i.e. staying away from the extreme positions. So it seems that the common variations in servos are not handled well in the MakeCode defaults. 4 out of 8 of us had this problem. This was with the Micro Servo:

https://www.adafruit.com/product/169

In the Arduino IDE, the defaults seem safer (i.e. not trying to send the servo to locations beyond its physical stops). This can be adjusted with the attach function if the user is not getting the desired range from a specific servo.

Code: Select all | TOGGLE FULL SIZE
servo.attach(pin, min, max)


Does the MakeCode set servo range block do the same thing as servo.attach()? That's not clear from the help documentation, which implies the range block prevents the user from sending values outside the specified range. What I would want is the ability to scale the values sent to a more narrow or wide range of actual positions of the servo.

pvanallen
 
Posts: 7
Joined: Thu Jan 20, 2011 11:42 am

Re: Problem with CPX servo limits

by pvanallen on Fri Oct 02, 2020 6:28 pm

To follow up with this, one student's CPX died due to this situation, and another student's servos went bad after being pushed to hard.

pvanallen
 
Posts: 7
Joined: Thu Jan 20, 2011 11:42 am

Please be positive and constructive with your questions and comments.