View unanswered posts | View active topics It is currently Sat Dec 20, 2014 9:55 pm






Reply to topic  [ 5 posts ] 
Quarter Scale Winch Servo Control 
Author Message
Rookie

Joined: Mon Oct 27, 2014 8:02 pm
Posts: 3
Post Quarter Scale Winch Servo Control
Using Quarter Scale Winch Servo HS-785HB which has interesting properties that we are trying to figure out how to control.

The first issue is safety where if you tell the servo arm to go to a particular position and something mechanically has gone wrong we can't figure out how to have the servo to go neutral by not applying any force. Basically want it to return to the startup state prior to sending a position which is not applying force.

We also noticed that servos on a particular servo controller when you send a position state to one servo the other servos will begin to home. We had a mechanical race condition we were able to solve by moving servos to different controllers.

The other condition we are trying to understand is the difference between servo and continuous in the drop down for the servo config. We would like to use the HS-785HB as a continous servo which it appears to support by sending a 0 or 255. The challenge is we need an off state but if we send any other position to the servo say 127/128 then it appears to try and go to that position.

Is it worth buying the servo programmer to deal with any of these issues related to positions or is that considered modifying the default servo behavior from the factory and not allowed by FTC rules.


Wed Nov 19, 2014 10:22 am
Profile
Professor
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 214
Post Re: Quarter Scale Winch Servo Control
To your first issue, there is unfortunately no solution. Servos do not provide any feedback on their actual position; they can only tell you the position they're supposed to be in. So, there's no way to tell if there's something keeping the servo from reaching its target position.

To your second issue, this is an oddity of the servo controllers. The servos are not powered from the time the program starts to the first command to a servo on that servo controller. After the first servo command on that controller, it then starts sending signals to ALL of its servos, which makes them all go to their home position. The way to fix this is at the start of your program to set all of the servos to the position you want them to start in. They will then hold that position, even when you send commands to other servos on the same controller.

A continuous rotation servo is one that has no internal physical limits to its rotation, so it can keep rotating around forever. In this kind of servo, sending it a value of 0 makes it go full speed in reverse, 127/128 makes it stationary, and 255 makes it go full speed forward. A standard servo has a limited range and each value 0-255 corresponds to a specific position. The HS-785HB is a standard servo with a range of 3.5 rotations, and can only be used as such. In other words, the number you send to it using the servo[] command will tell it to go to a certain position, not be used as a power value.

What is the servo programmer you're referring to? Do you have a link to it? I have a feeling it's probably not FTC legal, but it's hard to definitively say without knowing what exactly it is.

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://bluechariotsoffire.com/.


Wed Nov 19, 2014 12:09 pm
Profile
Rookie

Joined: Mon Oct 27, 2014 8:02 pm
Posts: 3
Post Re: Quarter Scale Winch Servo Control
Based on some additional searching it appears to be a missing API in robotc that would allow you to disable the entire servo controller so that all servos on that controller would be "turned off".



From the datasheet http://www.cougarrobot.com/attachments/ ... 20v1.2.pdf setting the PWM field to 255 disables PWM output which I assume would match the power on characteristics that servos can be moved manually until you send your first position command. It appears to be a feature in labview. Should be easy enough for RobotC to add it in as a API to allow for a driver controlled option via a button to disable the servos if they are mechanically unable to move.

Need to go back and check where I think sending a 0 to the Winch Servo will cause continuous rotation in one direction and a 255 in the other direction. The challenge is how to make it stop rotating when you have reached your desired position. Would be great to hold the current position or at minimum have it not rotate. This is how the HSR-1425CR works.

For the servo programmer details at https://www.servocity.com/html/hfp-25_s ... GzBb_nF-5o


Wed Nov 19, 2014 12:24 pm
Profile
Professor
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 214
Post Re: Quarter Scale Winch Servo Control
willishf wrote:
Based on some additional searching it appears to be a missing API in robotc that would allow you to disable the entire servo controller so that all servos on that controller would be "turned off".

OK, I see what you're saying. Yes, this is unfortunately missing as a built-in ROBOTC feature. But, if you're interested in getting advanced, you could code it yourself if you wanted to, using straight up digital I2C calls to the sensor.

willishf wrote:
Need to go back and check where I think sending a 0 to the Winch Servo will cause continuous rotation in one direction and a 255 in the other direction. The challenge is how to make it stop rotating when you have reached your desired position. Would be great to hold the current position or at minimum have it not rotate. This is how the HSR-1425CR works.

I believe what you might be referring to is the issues documented in this thread on the FTC forum. It seems like you might be able to set it to 0 and have it continue to rotate, and then set it to a value somewhere around 10 to make it stay put. There might be similar behavior at the other end of the scale, depending on your particular servo. There's no guarantees, though. Most of the values for this servo specify a position.
The reason you specify power values instead of positions for the HSR-1425CR is because it is specifically designed as a continuous rotation servo (that's what the CR stands for). Continuous rotation servos and standard servos (like the HS-785HB) are actually a little bit different internally, which is why they behave differently. They cannot be used interchangeably.

willishf wrote:
For the servo programmer details at https://www.servocity.com/html/hfp-25_s ... GzBb_nF-5o

OK, I see what it is now. The servo programmer only works with digital servos. The HS-785HB is an analog servo, so the programmer won't work with it. And I'm not sure if digital servos work with the HiTechnic servo controller or not.

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://bluechariotsoffire.com/.


Wed Nov 19, 2014 8:58 pm
Profile
Novice

Joined: Tue Dec 11, 2012 9:19 pm
Posts: 53
Post Re: Quarter Scale Winch Servo Control
willishf wrote:
Based on some additional searching it appears to be a missing API in robotc that would allow you to disable the entire servo controller so that all servos on that controller would be "turned off".



From the datasheet http://www.cougarrobot.com/attachments/ ... 20v1.2.pdf setting the PWM field to 255 disables PWM output which I assume would match the power on characteristics that servos can be moved manually until you send your first position command. It appears to be a feature in labview. Should be easy enough for RobotC to add it in as a API to allow for a driver controlled option via a button to disable the servos if they are mechanically unable to move.

Need to go back and check where I think sending a 0 to the Winch Servo will cause continuous rotation in one direction and a 255 in the other direction. The challenge is how to make it stop rotating when you have reached your desired position. Would be great to hold the current position or at minimum have it not rotate. This is how the HSR-1425CR works.

For the servo programmer details at https://www.servocity.com/html/hfp-25_s ... GzBb_nF-5o


The winch servo has a 3.5 rotation period which makes it difficult to figure
out what servo setting equals what position. In addition, it's not all that
accurate when told to go to position x from position y and then told to go
back to position x. You will likely be off by a greater degree than you would
expect with a normal hitecnic servo.

However it does work similarly to a normal servo once you understand
how it interacts with the controller and the limitations therein.

The hitechnic controller has a PWM range of 750usecs to 2500usecs, but the winch servo
accepts a range of 1000-2000usecs. Ergo the hitechnic controller will operate over a wider range
than the servo, so send it a PWM frequency outside that range and you observe the slow continual
movement as if it's gone into a zombie state.

Given that the HiTechic Servo Controller allows setting of the PWM output from 750 to 2250 microseconds
with a step resolution of 5.88 microseconds anything under servo[foo] = 42 puts the servo into the zombie state.
The math is the same for the other end of the scale (212).

Anything in between those two values will fall somewhere within the 1260 degree rotation of the servo.


Thu Nov 27, 2014 3:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.