Show Posts
Pages: [1] 2 3 ... 15
1  Using Arduino / Motors, Mechanics, and Power / Re: Unwanted servo travel on: August 12, 2011, 12:16:15 pm
Perhaps you are getting an input signal of 0
Can you track what the input signals are?
Perhaps you are telling the servo to go to zero
Can you track what servo commands you are sending to the servo?

I think that some debug statements showing the input and output signals might help identify the problem.
2  Using Arduino / Motors, Mechanics, and Power / Re: Wish list for Servo library enhancements on: August 05, 2011, 01:38:17 pm
Personally I never liked the arduino abstraction of servo 'degrees' and have always used the "myservo.writeMicroseconds(1500);  // set servo to mid-point" command

Me too!

Yes, they are standard features on an RC transmitter, but I wonder if the ease of adding a map function to get this capability into a sketch is one reason why more people don't request this feature. How many bytes of RAM did you use for the trim functions.

My recollection is that the trim added 1 byte.  I also used the 4microsecond accuracy to trade some resolution for range.  The reverse flag was in the pinout attribute so used an otherwise unused bit.

One way of implementing trim without using and RAM is to modify the min and max values that can be set in the attach method. The resolution of these values is currently 4 microseconds, I wonder if that would be fine enough for trim settings?

I do not see how modifying the end points changes where the servo centers.  Servo horn attachment leaves the horn connected at a somewhat random angle (within a fraction of the spline angle)  Trim is used so that when everything else says for a servo to be centered, the horn is actually centered.  Adding the trim feature keeps the logic in the code clean.  Tell the servo to go straight, and the servo is straight.

I know that this results in telling the servo to go to position 1500, and the resulting servo.writemicroseconds sends a value different than 1500.  But this is a servo class, using methods that make working with servos convenient.
Trim and Reverse are features that are so convenient, they have been included in most systems using servos for ages.

Not a concrete wish list item but i find myself struggling with the mismatch between real servos and the model. E.G. Many servos can't really rotate 180 and can't take pulses from 644 to 2400. If i set the limits to protect the servo i have to map the angle for Accuracy.

This brings up another feature I added to my version of the library.  Scaling.  I have 30 of the same servos that I ordered at the same time.  I tested each, and there is deviation in the servo movement per uS.  I used a protractor to measure difference in servo movement with two pulses that differed by 1600uS.  I expected 160 degrees of servo movement.  What I got was 164 degrees through 174 degrees.  I am also using 6 higher torque servos.  They gave me 160 degrees.
Since I want a predictable amount of movement for a given command, I want to assign a scaling factor to each servo.  I can use the same map command I use to reverse the servo, but just modify the range by the scaling factor, and get the results I am looking for.  This feature adds another byte to the servo structure.

This particular scaling feature is less critical in my mind that trim and reversing.
3  Using Arduino / Motors, Mechanics, and Power / Re: Wish list for Servo library enhancements on: August 05, 2011, 07:28:12 am
Trim and Reversing are features in most RC transmitters.
I added those features to the servo library (a few versions old) for my own use.
4  Using Arduino / Programming Questions / Re: How to copy the signals from input to output??? on: June 22, 2011, 11:23:24 am
I also like the idea of attachinterrupt to read the output of the RC receiver.
I would then use the duration information from that to write to the servos, using the servo library.
5  Using Arduino / Programming Questions / Re: Servo Problem - Is there a problem with the Library? on: June 14, 2011, 03:24:19 pm
As is often the case, posting your code will help us troubleshoot.
6  Using Arduino / Motors, Mechanics, and Power / Re: Low budget motors for quadcopter on: June 14, 2011, 03:19:17 pm
Or, maybe
7  Using Arduino / Motors, Mechanics, and Power / Re: Servo burnt out? on: May 31, 2011, 08:33:08 am
Thanks guys. Any use for servos with no fuctioning electronics?
Add better electronics!
8  Using Arduino / Programming Questions / Re: WOW .....what's going on with my servo? on: May 02, 2011, 10:33:21 pm
Any time that you write to the servo and immediately detach it, you stop the servo before it has a chance to move.

That explains a lot of the funniness you are seeing.

As for going to 90 degrees first, that is the default powerup position.  As I understand, you can change this by writing to the servo before you attach.

I do not know what brand and model of servo you are using.  My servos do not quite go to 0 and 180 degrees.  Usually something like 10-170, or even less range.
9  Using Arduino / Motors, Mechanics, and Power / Re: SERVO+ARDUINO HELP on: April 27, 2011, 12:08:39 pm
I second the thought to run the sweep tutorial on each individual servo.
Preferably with it removed/disconnected from the arm to remove load.
10  Using Arduino / Programming Questions / Re: What have I done right/wrong? on: April 26, 2011, 11:11:28 am
I wanted to figure it out for myself before I asked for help

So many come here stating that they want to make a space shuttle, can we show them how.
You have read up ahead of time, and actually TRIED something before posting.  Good on you!

Huh, reading further, I see you have the device behaving the way you want it to.  Another Bravo for you!

So now you are looking for a critique of you coding methods.
My first comment would be - Why aren't you using the servo library?  It does a lot of the work for you.  It sends out signals to the servo about 50 times per second, which is what the typical RC servo expects.

With your direct handling of the servo signal, you are not sending signals in the frame rate the servo expects.  It likely works for your servo, but others might not be as happy.

You might moving the call to the power() function in to the setup function.  Since you only want it to happen once, at the start of the execution, that is a good place for it.  It will clean up your loop a bit.

Something to keep in mind - the Millis function overflows back to zero after about 50 days.  This might be relevant to you if you are running a long series.

11  Using Arduino / Motors, Mechanics, and Power / Re: Is this motor shield sufficent for controlling 2 (formerly) rc heli motors? on: April 24, 2011, 05:27:35 pm
There are RC ESCs for brushed motors.  Old school, but they exist.

Those would run one of those motors just fine.
12  Using Arduino / Motors, Mechanics, and Power / Re: Servo Controllers and Arduino on: April 18, 2011, 05:20:25 pm
It might help your search if you look for servo shield as well as servo controller.

The ones I looked at had a very simple interface.  A few functions that did the same thing as the servo writes from the Arduino servo library.

But rather than using a shield, I went with a Mega, which can directly drive the 18 servos I wanted to talk to.  I did also purchase a generic prototyping shield and solder up connections to plug the servos in and provide power.

One example of a shield:

13  Using Arduino / Programming Questions / Re: number of rotations: servo motor on: April 18, 2011, 09:54:52 am
here i want the servo to stop after 1 rotation until another case is called.

Did you read the post immediately before yours?  Let me quote it for you.

You realise an ex-servo can't be commanded to a set position?
It can be told to rotate in one direction or another (possibly with a degree of speed control), or stop, but not turn to a specified angle, without the addition of external hardware.

So, a servo that has been modified to continuous rotation cannot be controlled in a way that will make it stop at a specific location.

When you state that you want the servo to stop after 1 rotation, you are describing a specific location.


You will need to add an encoder to replace the position sensitive pot that was disabled/removed when the servo was modified for continuous rotation.
14  Using Arduino / Programming Questions / Re: Beginner needs help with a simple servo script on: April 14, 2011, 12:17:15 pm
Currently the two pairs of servos rotate at different times which is fine. However, if i set the rotation 'pos' to '180' it rotates fully about 8 times. If I change this number to 90 they rotate about 8 times, pause, and then rotate in the same direction 8 more times. It seems the input rotation angle of '180' doesn't correspond with half a full rotation.

Have you read any of the posts above this?

If the servo has been modified for continuous rotation, then it is no longer a servo, in that it can not be commanded to go to a specific position and stay there.

I'd be very suspicious of anything that calls itself a "robot servo".
I think that what you've got there is an ex-servo.

As PaulS said, modded servos are no longer servos and cannot be commanded to a set position without the addition of external hardware like an encoder or a limit switch.

Do you understand this?

A typical RC servo has a range of motion of about 180 degrees or maybe a little less.  It will move to a specified position and stay there.

RC servos that have been modified for continuous rotation can only be commanded to rotate forward, rotate backward and stop.  They know nothing of their absolute position, and cannot be made to stop at a specific position without adding additional hardware like an encoder.

15  Using Arduino / Motors, Mechanics, and Power / Re: Arduino + Servo Help on: April 14, 2011, 09:15:42 am
Do you have another servo you can try?
Do you have and RC transmitter/receiver that you can hook the servo to to test it for proper operation?
Pages: [1] 2 3 ... 15