Go Down

Topic: Servo Control (Read 4 times) previous topic - next topic

MobileWill

They do stay in position when they are off. So you are saying use transistor to turn them off and on?

This is for a pan/tilt camera on a robot.

The servo are from dfrobot.com

http://www.dfrobot.com/index.php?route=product/product&keyword=pan&category_id=0&product_id=146

DF05BB is the servo model.

If I don't attach till I need them, it still doesn't work.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

retrolefty

#6
Jan 28, 2011, 03:24 am Last Edit: Jan 28, 2011, 03:33 am by retrolefty Reason: 1
Quote
They do stay in position when they are off.


In the overall context of servo usage, a servo is designed to be powered continuously and have a continuous ppm control signal applied. If a servo is powered off by removing it's Vcc voltage, or by detaching in software thus removing command pulses, the servo loses all ability to respond to external mechanical forces that may be trying to move it from it's present position. As long as it has power and control signals it can generate maximum torque to overcome mechanical forces that might be trying to move the output wheel. So un-powered or detached it only offers mechanical torque resistance equal to it's internal gear train friction, higher then that and it will move to a un-commanded position.

Easy test, take a unpowered servo and grab and turn it's output wheel, does it turn? Now power the servo up and give it a fixed continuous position command. Now try and turn the output wheel. Different, no?

So in many applications where there is little mechanical force working against the servo then you can unpower when not needing a change of position. I think the average current draw of a servo a rest with no external mechanical forces is around 7ma, but that of course varies on size and design of your specific servo.

That make sense?

Lefty

MobileWill

Yes it does but most of the time my robot will be idle, it won't matter where the camera is pointing when the camera is off. Either way shouldn't the software be able to attach as needed? I saw a example somewhere but doesn't work for me. There isn't much more to the code. I enter a command on the serial and it moves it that position.

I am using Arduino IDE 21.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

retrolefty

Quote
Either way shouldn't the software be able to attach as needed? I saw a example somewhere but doesn't work for me. There isn't much more to the code.


Of course it would better if you posted your full sketch, my bet is that your is not allowing the servo time to reach it's new position before it performs the detach command. Servos don't move as fast as code does.  :)

As an experiment, try adding a delay(2000) command just before you detach command and see if that doesn't tell you whats going on.
Lefty

MobileWill

I tired 1000 delay after the attach, I should do that after the command to, didn't try that.

I will try thanks.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

Go Up