Turning a motor into a servo

@ jackrae:

I have a mechanical setup in mind that is quite compact and simple.
I have some problems with using accelerometers:

  • I need the orientation (and not the movement) of my head relative to my torso. If I move my whole body (running in all directions) the accelerometer will give values while I keep my head still relative to my torso.
  • The accuracy is not great, I would like to have about 1,5° of accuracy. I think it is not the case with acelerometers.
  • I need a sensor that detects the horizontal plane and measures the difference with its plane relative to the horizontal. I don't know if accelerometers can do that. Which sensors can measure the deviation from the horizontal plane? I know that an Iphone can sense the horizontal.
  • I would like to try mechanical feedback (if you can't move your robot head it should give you the feeling you can't move your head).
  • I must convert the accelerometers data into angles. With my mechanical approach I must only copy-paste the absolute position of the encoder to the robot head. OK once you got the code this is not an issue.

Correct me if I'am wrong, judging with falls information is not a good judge.

UPDATE:

When I use PWM signals at 10kHz the motor makes a small noise but doesn't move. I guess 10kHz is too much for my DC motor?? If that is the case my motors are not good for precision positioning (http://www.pololu.com/catalog/product/1107) and I need other ones, perhaps with a larger gearing? Or what else can make precision positioning possible?? The motor driver can handle 20kHz PWM pulses so no problem with that.