Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

read servo-moteur position microcontroller

Status
Not open for further replies.

yassin.kraouch

Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,094
hi,

i have a futaba s3003 and i need to know the position of thhis servo, have anyone an idea about this ?
 

Can you eloborate the question? Don't you trust the servo in tracking the position set by the control pulsewidth? Or is the servo disabled by setting an out-of-range pulsewidth? A possible option is to open the servo and tap the potentiometer signal.
 

i know that the servo is controlled by a PWM from the MCU, what i want is to block the position of the servo if someone try manually to do this, so i need to read the position of the servo in order to block the servo in the position in order to fix the servo in that position

---------- Post added at 16:55 ---------- Previous post was at 16:51 ----------

i need just to read the position and save it and after i will send this position to the servo
 

The only way you can achive this is to read the pulse being feed to the servo. You can no interrogate the servo for it position.
 

Only by mutilating the servo and connecting to the pot as you say but, I would not trust the accuracy of the pot.
 

i need just to block the servo on the position where it was stopped, is this possible ?
 

What controls the servos position? and then decides that it has stopped.
 

The present problem, as far as understood, is to detect a deviation between setpoint and actual position due to a blocked servoc drive. Montoring the potentiometer voltage would help in this situation, otherwise you need to implement an external position encoder.

Looking at the problem more generally, the requirement is obviously exceeding the capability of a standard RC servo drive. So either you can manage to modify or supplement it somehow or have to go for a different solution.

P.S.:
i need just to block the servo on the position where it was stopped, is this possible
It's not a feature of the said standard servos. As said there are options to implement it.

As another (less accurate) option, you can detect blocking state by monitoring the servo's supply current. You will roughly know the position by holding the last non-blocked setpoint.
 
Last edited:

I have used a servo to control retracts on a model. Here is how it works,

The servo moves the retract until is in the up state, detected by a micro switch to a pin input. Then no matter what the pulse does, it hold this position unless the pulse changes to move the retract to a down state, this is the detected by another micro swith and it is held there until the change of direction is requested. The micro switch limit the position the servo until it is allowed to change direction.


Is this like what you are looking for?
 

now when i stop the servo manually, it will be stopped successfully but the problem is that i need that this position is fixed and with our hand we can't move into other position,

---------- Post added at 20:34 ---------- Previous post was at 20:25 ----------

I have used a servo to control retracts on a model. Here is how it works,

The servo moves the retract until is in the up state, detected by a micro switch to a pin input. Then no matter what the pulse does, it hold this position unless the pulse changes to move the retract to a down state, this is the detected by another micro swith and it is held there until the change of direction is requested. The micro switch limit the position the servo until it is allowed to change direction.


Is this like what you are looking for?

Yes it is something like this, how to hold and keep the position ???
 

You need to feed the servo a continuous pulse to hold its position. I assume you are moving it using some kind of variable pulse, to get it into its final position. The 3003 provides 3.2kg of torque at 4.8v and 4.1kg at 6.0v.
 

what do yo mean by a continus pulse ?? and how to know the pulse that i sould send to keep this position? beacause the position is not fix ?
 

Consider the s3003 servo, this servo has a centre position pulse of 1.52ms, a pulse of this width needs to be provided approx every 18ms - 20ms.

How my controlled worked is like this.

On the radio tramsmitter it used a 2 position switch. up or down.

When the the switch was set to the up position the servo started to move to the up position.
When the micro switch triggered, the pulse width was stored in a register.
As long as the micro switch was active and the Rx switch was set to up. it feed the store pulse width to the servo.
If the RX switch was changed to the opposite direction, then the servo was allowed to move in the opposite direction until the second micro switch activated.
This position was stored in a register and used, until the RX switch changed direction.

remembering the above the pulse needs to feed continuously to the servo, to maintain its position.

Hope that explains it.

check out these links about servos

**broken link removed**
**broken link removed**
 

ok thank you but there something that i didn't understand : what is a micr switch ?? and have you a reference of a micro switch that can help me ? you said that the pulse was stored in a register : did you mean a register in the mcu ? and what do you mean by Rx switch ?

thank you for your help

---------- Post added at 20:59 ---------- Previous post was at 20:54 ----------

check out these links about servos

**broken link removed**
**broken link removed**

thank you for this two link, but the problem is that i know how a servo work just i need to block it in an arbitrary position :(
 

A micro switch is just a small switch, that the retract activated when it was in position.

The value was store in the mcu and was only created at the point the switch activated, this allowed for a very small variance in the pulse.

RX switch this is a switch on the radio control transmiter used to control the aircraft the retracts were installed on.

When the rx switch's position was changed it would change the pulse width to move the servo from one extreme to the other ie +/- 90 degrees of centre.
 

Here is a very clever solution to reading a servo position. Go down to post #14 by bigdogguru.

John
 

  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
@yassin.kraouch: I reviewed your statements in this thread. Honestly, I don't understand why you need to read the servo position. I was previously under the assumption, that you wanted to detect a position, where the servo has been manually stopped. But you didn't actually tell that. You just said, you want to block it in particular position. This is done by continuously sending the respectively pulsewidth. If the servo is manually forced to a different position, there's nothing else you can do against it.
 

The video does not actually explain anything.

The post explains the method. It is the concept that is really important. Bigdogguru has a version of the program. If you are really interested, try contacting him.

John
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top