Asked — Edited

Continuous Rotation Servo With Absolute Position

I'm pretty new to EZ-Robot, so I apologize if this is a basic question... I've got a couple of Turnigy servos and a linear actuator working with EZ-B, but I'd like to add a continuous rotation servo with position feedback. I'm working on an R2-D2 project and this servo would be used to rotate the periscope that comes out of the droid's dome. As it's kind of pie shaped, ensuring it's back in the proper position prior to retraction is important.

I came across this Parallax Feedback 360 High-Speed Servo which seems to fit the bill. In addition to the normal three wires, there's a fourth with position information from the built-in Hall effect sensor. Where would I plug that fourth wire into and what bit of the EZ-B software will let me read it?

Thank you.


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

#1  

It's a little hard to tell. It would be best to ask Parallax on their message board how you control the servo with different controllers (I wouldn't ask how do I control this with an EZB because they will point you back to EZ-Robot) because if you go to their website or look at their product document for that servo, it only includes a C source code for their Prop controller library, making it hard to tell how the feed back works.

Usually Parallax includes source code for all their controllers like the Basic Stamp, Prop and Arduino, so it might be new or just an over sight to not include those examples as well on the site.

But the product does say > "internal Hall effect sensor system that provides digital angular position feedback"

When I read that I take it to mean it should work like any other hall effect sensors which would mean you could connect it to a digital port and make a script to count the digital on/off signals (highs and lows).

I'm thinking you'll need a bit of math in your script as well which I think is what their C library in the Prop code does to match the speed of the servo with the pulses in order to make it easy to control on their Prop controller based products.

That's a good find. That should be fun to experiment with.

PRO
USA
#4  

@ Justin Yes you did, I don't always read everything I guess, I will have to work on that.

My take on what I read in the datasheet (again I didn't read it all) was that the pulse width gets wider as the angle gets larger. At 0 degrees or Origin as they call it the pulse is 2.9% of the square wave (Duty cycle) and 97.1% as it approaches 359 degrees this is in a clockwise rotation.

#5  

...I take that way as well like it is getting a PWM signal back from the sensor instead of a digital count (on/offs). In a BasicStamp you could do pulseIN and pluseOUT and the Prop carried that command set as well so...

This might not work as just a digital sensor after all, I'm not sure now. I wonder if "GetPWM" in ARC would do the trick for reading the data.

PRO
USA
#6  

That is a good question for DJ. I thought that the digital ports (white signal pin) are output only. To get status one would have to use an analog input and I don't think the GETPWM command works on analog inputs.

If not one could tie d1 white pin to d2 white pin.

Do I smell SMOKE!



Servo(D1,100)
$A = GetPWM(D2)


#7  

No digital pins can work as a digital input. https://synthiam.com/Tutorials/Help.aspx?id=21

I've connected switches as inputs that way to digital pin.

The example in ARC manual does say: GetPWM (digitalPort) Gets the PWM (Pulse Width Modulation) of specified port PWM is between 0 and 100 Example: $x = GetPWM(D14)

But you might be on to something, an ADC pin might read the data just as well. https://synthiam.com/Support?id=30

It should work - not work - or smoke, lol :P

PRO
USA
#8  

I assumed it worked like the GetServo command that does not actually check the port just returns the last value it was set to. So I assumed the GetPWM would just compute the PWM for the current position.

So


Servo(D1,90)
$A = GetPWM(D1)

$A would = 50 for 50% duty cycle.

That is saying that 0% duty cycle is 0 degrees, 100% duty cycle is 180 degrees

I hope this makes sense.

PRO
USA
#9  

Quote:

assumed it worked like the GetServo command that does not actually check the port just returns the last value it was set to. So I assumed the GetPWM would just compute the PWM for the current position.

GetPWM is analogous to GetServo: does not compute the PWM instead returns the last/current PWM value.

PRO
USA
#10  

To obtain Parallax servo 360's feedback you will need an extra controller:

  1. measure the duty cycle and translate to servo position

  2. track the servo's position in real time (not in ARC) and implement a closed loop code (PID) to control the current position and the desired position, basically is what a servo PCB does.

Last year i started to develop a plugin to use with ARC and to interface EZB with the external controller (Parallax Propeller).

The initial idea was to use with Cube Machine, allowing the Gripper to rotate 360 degrees and multiple times.

I detected some issues with the Parallax library code, so i started my firmware version in C and i found some other issues too. Propeller has 8 cores but no interrupts, timers etc, so everything needs to run with your code, so the next step was to use some spin/assembler code and redo the firmware.

I was running out of time (Cube plugin Project), busy at work too so Bob convinced me to use EZR HD servos (Strong/Silent).

I end up using the Parallax servos in another project (not an ARC) and the plugin is on hold waiting for better days:)

Plugin create date:

User-inserted image

wow! almost a year ago

User-inserted image

User-inserted image

User-inserted image

I can't promise when, but, I'll come back to finish the plugin.

PRO
USA
#11  

Thank you PTP for the update. I was sort of close with my assumption, as it does not read the port.

#13  

Thank you all for your feedback. Does anyone have experience with any other continuous rotation servos with position feedback?