Asked — Edited

Rotating A Servo

I recently got my EZ-B and have started working on some of my planned projects. One thing that I noticed is that when rotating a servo (a standard servo) from EZ_B.Servo.SERVO_MIN to EZ_B.Servo.SERVO_MAX, it is not exactly 180 degrees that it rotates (I noticed this with ARC also). I have several questions about using the servos:

  1. How many degrees is an increment of 1 when using the SetServoPosition method?
  2. When I attach the servo attachment (before connecting the EZ-B to the servo and computer), how do I know what position it is in? I need to know this so that I know what position to attact the attachment in.

I am asking these questions because my software needs to know the start and current positions of each servo are, as well as what angles to attach the servo attachments at. Thanks.


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

#1  
  1. Depends on the amount of rotation your servo allows and your min max settings. ARC allows for a Max of 100 steps and a Min of 1 step thus 100 steps per rotation. If you had a servo that went 100 degs with in its rotation then you would have a 1deg per step however if you have a 180 deg rotation servo the deg per step is different so ((number of deg per step)/(max servo rotation)) = (min)/(max)

2)You can set the beginning position as a defined home state if you wish so when you start the program it moves to that state. I am not sure if the method still exists but I do believe there was one in the SDK for the servo position read.

#2  

What do you mean by min/max settings? In the SDK, EZ_B.Servo.SERVO_MIN and EZ_B.Servo.SERVO_MAX are constants, not settings. And how am I supposed to know the amount of rotation my servos allow? I think what I am basically saying and asking how to do is that my robot needs to know the position it's servos are starting at and where they are moving to in order to successfully accomplish a task. (NOTE: Don't forget that this forum is the SDK: Visual Basic forum, so what ARC allows is not important, and if there are any extra values need to be (and can be) calculated, that is not a problem because everything is being done using VB.NET, not ARC)

PRO
Synthiam
#3  

There's a tutorial section that can explain how a servo works here: https://synthiam.com/Tutorials/Hardware.aspx?id=4

Servos are not 180 degrees - they are the number of degrees supported by each servo. every servo and every servo model are different. Rarely are they 180 degrees.. in fact, I don't think I've ever seen one do exactly 180 degrees:)

#4  

Does that mean I need to manually measure how many degrees each of my servos rotates when I rotate it from EZ_B.Servo.SERVO_MIN to EZ_B.Servo.SERVO_MAX and then do the math to determine the number of degrees supported by each servo and calculate how much each step is? The math is pretty simple, and I suppose I could do the measuring, I was just hoping there was a better way, but I guess if manual measurement is the only way, then maybe I should just see it as another step in the project. Thanks.

PRO
Synthiam
#5  

How come you need to know how many degrees the servo moves?

you don't need to measure for each servo, only between servo models.

#6  

So if I measure the number of degrees allowed by one of the standard servos that came with my EZ-Robot Complete Kit, it will be the same for all the EZ-Robot standard servos, and I just need to do the math?

I need to this because many of the projects I have planned involve calculating certain things. For example, one of my projects is stacking blocks. Depending on how many blocks have already been stacked, it needs to calculate how high to move the gripper before letting go. I would think that you would need to know this information for almost every servo (at least the standard servos) in almost every project, otherwise, how do you know what value to specify when using methods like SetServoPosition? For projects that are more of a "follow the ball around" type thing that use modified servos (the wheels) or a "turn until you see this" type thing (the head or looking around) that does something until they are told to stop (the camera sees something) by an input device or other source, I agree, you don't really need to know how many degrees the servo turns, but for other things, I would think you would normally need to know.

I'm sorry to ask so many questions, I just never really had any education in hardware, only in software, so I'm still learning a lot of the stuff I need to know for my robot projects. Thanks.

PRO
Synthiam
#7  

Don't ever apologize for asking questions:)

Stacking blocks will be a fun project:)

If you know the height of each block, you can use the Auto Position Control. Create an action for the final position of each row and column of the blocks. That way, it doesn't matter what position the block is picked up in, it will be able to Auto Position the servos into the specific Column and Row:)

#8  

I'm sure the AutoPosition control would work great for the block project, but I think what I was trying to get at was that I want to have complete control. Being a developer, I like to be able to have the option of manually calculating things, because I expect that some of my future projects will require doing things less straightforward than determining the position of a block. But back to my original idea, if I measure the degrees allowed and do the math it will work? Thanks.