Idea: Add Servo Feedback

Hi,

I’ve found a tutorial ( http://forums.trossenrobotics.com/tutorials/how-to-diy-128/get-position-feedback-from-a-standard-hobby-servo-3279/) how to get position feedback of an analog servo.
This could give us a simple ground detection, allows calibration and error handling, … :slight_smile:

Which pins of the Servotor32 Board can be used as input pins, if it’s possible? ( I have not enough skills to ‘read’ the Servotor32.pdf)

Regards Yggdrasil

P.S. Some of you guys has already replaced the original servos with metal geared ones. This could be a nice playground for the original ones :wink:

[quote=“Yggdrasil”]Which pins of the Servotor32 Board can be used as input pins, if it’s possible?
[/quote]

I found it now in the atmega references:

The Pins PF0 and PF1 (Pin 4&6 of the GPIO header) provides analog input/output.

All the pins that start with an “A” on the back of the board will be analog inputs:
flickr.com/photos/68797310@N05/8174194897/

Hi Josef,

thanks. I has modify one servo and will try out how fast I can measure the poti values (in a interrupt of the second 16-bit timer). I hope it is possible to use this values for a simple ground detection.

Hi,

I soldered a cable to the potiometer of a knee servo (the middle one) and measured the voltage on Pin 4 (FP1).

The measured values are close to the linear function f(x) = x/5 + 25, x∈[500,2500]

After some tests I found a satisfying measure setting: I save the measured servo positions every 200 microseconds and throw away values with small changes. Just one servo was powered:

This plot show three kinds of movement:
Red - Free Leg movement, small amount of oscillation.
Green - Same movement, but foot touched the ground. Oscillation around desired end value.
Blue - Leg touched obstacle. Oscillation on an other position.

The oscillation should be equivalent to the model vibration. Thus, the movement of other servos can interfere.

As next step I will try to implement a method to detect this three cases in the firmware and stop the movement on obstacles. :slight_smile:

Hi, I’ve uploaded here a video. http://www.youtube.com/watch?feature=player_detailpage&v=mnudZlsNklI

The knee servo stops if an obstacle will hit.
But it’s still a long way to use this for real moves of hexy… We need an abstract model of hexy and adapt the movements on the fly. This require an other approach for the moves. :nerd:

This is some pretty cool stuff! I doubt they would do it, but I want to talk to the servo manufacturer and see if they’d sell 4-prong servos that would give the position feedback. You start getting some sway when you’re buying 50,000 servos a year :wink:

This would be really nice, even for Consumers without Hexy.
I mod 16 servos today and it was a really boring task :wink:
Moreover, I solder a multiplexer board to get enough analog inputs for 18 servos. The backside looks funny. :mrgreen: