Canada
Asked — Edited

Rotary Encoders - Looking For Suggestions

I think I'm going to bite the bullet and get a rotary encoder for my full-size R2 dome.

Anyone have some suggestions for one that will integrate with the EZ-B easily?

I basically want the dome to be able to return to center.

Let me know.

** Edit ** I have 3 places to mount. Slip-ring center / Motor / Main Gear.

Kris


ARC Pro

Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

#17  

Hi Lumpy,

Saw your post in my other thread where we were discussing this same thing. Yes, I am using Andy's large gear for my waist. You said that you were sorry to restart this thread but don't worry! I'd love to help and share what I've done and how I did it. I had the same question and needed to stop rotation at certain points for the waist and radar on my B9. I also came up with a pretty good way to ramp the start-up and slow-down of the DC motor that's running through am H-Bridge.

There was so much discussed in those threads that I'm not sure if it can or should all be covered here. Also it was spread across a few different threads and many group members added ideas and helped me to get the desired results. I'll try to gather some links and edit them into your thread here. ......

Robotmaker keep insisting I should get a magnetic encoder, saying it has unlimited turns and it's more accurate. Sometimes he's hard to understand but I think he was trying to tell me that it worked the same as a wiper pot (like I linked to) and would last longer. Unlike the optical encoders that were commonly used in the old days. The optical ones are the ones I think DJ is referencing to above and says not to use.

In the meantime I'll try to cover some important points:

As mentioned I wanted to control speed, ramping and horizontal positioning of DC motors and H-bridges. I ended up using multi-turn pots for feedback to an ADC port on the EZB. They can turn 10 full turns (if centered that would be 5 one way and 5 the other) unlike common 1 turn pots. On my large waist gear I have one multi-turn pot mounted inline with the motor and it only needs about 3 turns one way and 3 the other to let the waist rotate a full 180 degrees. If you want to rotate a full 360 then perhaps Robotmakers suggestion of a magnetic encoder would be the way to go. Those have no stops at all. Actually I wish I had tried the magnetic pots just to see how they worked but I don't know what type of readings they would return to EZB. On a side note; once I did rotate past the limits of a one turn pot and I it actually caught fire. I had flames shooting out of it. eek

I bought the mulct-turn pots from the Robot Shop. They sell two brands; one for about $30 USD and one for about $6. I got the cheaper one and it seems to work properly. I really don't want or need real accrete poisoning. As long as I can get B9 to center relativity close to center. Look here for where I bought the pots: http://www.robotshop.com/dfrobot-rotation-sensor-v2.html

Here's a couple pics of how I built both the waist and radar:

User-inserted image

User-inserted image

User-inserted image

Getting it all to work was all in the EZ Code. I have a movement script setup that accepts variable values sent from other scripts. Those value numbers are the GetACD() value returned from the inline pot. Best way to see it is to look at my project. Here it is:

B9RobotControl.EZB

You'll be looking at the main movement scripts: Move Waist Waist Center Radar Center Move Radar

A couple Call Scripts are: Waist Rutine 1 Radar Rutine 1 Look in the INT Script Look in the Speech Recognition in the "Start Animation" script

Hope this helps. Let me know if I can help more. I'll try to bring all the threads together I mentioned above later. Dave Mo

Canada
#18  

Awesome thanks Dave!

Just grabbed your project file to browse.

PRO
Synthiam
#19  

Consider how a servo works. It has a POT that rotates with the output of a servo. Each position of the output shaft is a different voltage on the POT.

  1. Your Microcontroller (i.e. EZ-B) sends a signal to the servo PCB with desired output shaft position

  2. The job of the PCB within the servo is to keep the shaft within the specified position from the controller. Now remember, the POT and the SHAFT are connected - so the voltage on the POT determines the position of the SHAFT. So the PCB tries to keep the POT at the specified position by referencing the voltage.

So, if you replace the motor of the servo with an HBridge, you now have a large powerful motor. If you replace the POT within the servo with your HotPot, you now have a way for the servo to measure positioning.

With that above "Very very very very very very very simple" modification, you now have made a very awesome and powerful servo. It will only require soldering a total of 5 wires.

  1. HBridge Trigger A
  2. HBridge Trigger B
  3. HotPot Pin #1
  4. HotPot Pin #2
  5. HotPot Pin #3

That's it:)

*Note: the POT within the servo is not 10% off, as stated by RobotMaker. Please ignore his comment. If a POT was 10% incorrect, a servo would be hilariously jerky and always have bizarre positioning. Additionally, every volume control in your home would be different volumes every time you touch it. 10% is a large number and fabricated by RobotMaker.

Canada
#20  

I'm all in. I will sacrifice a servo to the EZ-B gods this weekend.

#21  

YES thats a good setup DAVE,,its easy to check the accuracy of a magnetic encoder verses any type of pot design including hotpot

SO many dont check the specs is the problem ,all pots are at 5% and 10% on magnet encoder it better then 1% ,but mostly they are for speed and distance because thats where the accuracy is needed.

ON a pan design it not needed ,only using to adjust the degree -180 to +180 ,thats why a pot will do just fine

On the neato xv-11 that used at one optical encoder then the change to a magnetic encoders for high accuracy distance and speed .

NOW on optical encoders are better in certain ways,depending on the CPR higher the CPR better the accuracy is and can be a lot better then magnetic encoders some as high as 2000 counts and more plus they mostly are quadrature with meens there are 2 optical sensors at 90 angle to each other for checking speed forward or backward ,where on magnetic encoders cant on some.

I know my tech stuff is hard for most guy here.

Canada
#22  

DJ,

I'm following a little better now. In all my years of R/C I've never really torn a servo apart.

Took some quick pics (Maybe others are more visual like me).

I see the pot and motor wires now.

User-inserted image

User-inserted image

I get the pot replacement side of things. You have me stumped (I know I'm dumb) on the trigger A / B and how that would translate to the H-bridge side of things. In particular I'm hoping it will work with the Syren10 I have already.

Obviously the servo motor connections would be +/- reversible. My Syren10 has 0v (Neg) and a S1 (Signal) for input. How would that work or would I need a different setup?

I guess Robotmaker is right, my Electronics 30 education just isn't up to par with the rest of ya.;)

#23  

i desin my own gear boxes and the most common is futaba s3003 servo to use,since its the only one that has a schematic.

LUMPY make shore you use 5k type of pot ,hotpot or regular pot and set the center of the pot to 0 deg witch is robot head looking forward.

If USING gears like DAVE did witch is the correct way to goyou need a 1-1 ratio witch meens each tooth gear needs to be both have the same teeth.

PRO
Synthiam
#24  

The HBridge should have 2 triggers per channel.:) You may need to read the HBridge tutorial to find out how they work.

Essentially, the motor wires of the servo PCB connect to the HBridge trigger wires