Sign in to follow this  
CProgrammer

robotics - servos problem

Recommended Posts

Im trying to get my futaba servo to work with my USB-Controller. Basically the servo has three wires (red, black, white). Additionall I have a battery and a USB-Controller that has an PWM-out(or also a digital out if thats better) and GND(ground). Now Ive tryed several possible ways of attaching the servo with no luck. Perhaps someone could tell me the definite right way. Another question: As far as I know PWM lets you output a signal with a given length(like 1.5ms). Now my controller allows me to output PWM with 0-100% whats that mean? -CProgrammer

Share this post


Link to post
Share on other sites
so, i know next to nothing about robotics but here's some help anyway. :p

as far as determining which wire on the servo to use, find and check the documentation for the servo here:
http://www.futaba-rc.com/servos/futm0029.html

the next thing to do is discover what _exactly_ are the power requirements for that servo. then you need to tune the output from your USB wire to _exactly_ match those requirements. if you can't match the power requirements you'll need intermediary hardware to "translate" the USB signal into something that the servo can use. from there, hook up your trusty voltmeter/ammeter to your USB cable and tune it to a setting that will make the servo work. then hook it up and you should be good to go. trying to just iterativly connect wires to wires when you aren't sure that the signal you're sending will even work will not get you to your solution.

-me

Share this post


Link to post
Share on other sites
Well Im not working from the USB directly. I have an interface board which has a PWM outlet. My problem however is that the analog output and PWM seem to be linked together. And the dll hat supplies me with functions can only output to analog, which I assume means it outputs to both. Now my documentation only says it can be set from 0-100%. But what does that mean.

And concerning the power. IU want the servo to use the battery. So I figured atach red to plus, black to minus and white to PWM, as I found in the net.
But it could also be black to GND dont know.

-CProgrammer

Share this post


Link to post
Share on other sites
Damn I found something on the PWM thing. It seems that the procentage is the amount of high time compared to the period length.
Its a new system. Now I just have to find out what the period ime is.
And offcourse how to hook things up.

-CProgrammer

Share this post


Link to post
Share on other sites
Servo motors don't work on PWM signals, DC motors do.

In PWM, you have a set period, say one second. If you want your motor to go full speed, you have the PWM signal stay high for that whole second. If you want it to go half speed, the PWM signal stays high for half a second before going low. In theory, the period can be as long as you want, but in reality motors have certain ranges they can operate in, and it'll be much faster than one second. And the pulse-length to speed relationship is rarely linear.

Servo motors take more specific commands. Basically, you send it pulses that very between two set lengths, say ten and twenty milliseconds [I don't know how realistic this is]. To turn to full left, you send it a ten millisecond pulse every second [again, not realistic]. To turn to full right, you send it a twenty millisecond pulse every second. Dead center would be fifteen milliseconds. If you want the motor to spin all the way, like a DC motor, you hack the thing so that it doesn't know where its actually located, and full right/full left become full forward/full back.

I don't believe it'll be possible to hack a PWM signal to work with a servo motor. Either a servo controller, or a DC motor is probably needed. If you get the specs on both the motor and the controller, maybe something can be worked out in software to save you some money, but its definitely not the ideal solution.

CM

Share this post


Link to post
Share on other sites
The way servo motors work is the red and black wires provide power. The white wire is your signal to the servo telling it which way to move (CW or CCW and also what speed). Now you can't really easily adjust the PWM signal to the servo signal.

However what I do with servo motors all the time, is I pull them apart and take out the circuit board inside of the servo. This then turns the servo motor into a regular DC gearhead motor with only two wires (red and black). Doing a google search for "modifying servo motors" or something like that will probably help you out there.

Share this post


Link to post
Share on other sites
Ok, servo motors are nice to work with, but a bit complicated sometimes :)
The signal a normal model-servo (which i assume this is) works with is pulsed. The total pulse-length is 3ms (time between two "clock cycles" so to say). The high-time is between 1ms and 2ms, where 1ms means that the servo will go to one of the extremes, 2ms is the other and 1.5ms is neutral. Let me try to draw some..


Timing(ms): 0 . . . 1 . . . 2 . . . 3 . . . 4 . . . 5
_____________ _____________
Neutral: | |___________| |____....
_________ ________
Extreme1: | |_______________| |_________....
________________ _________________
Extreme2: | |_______| |....


Ok, hope this was some help

-M

Share this post


Link to post
Share on other sites
Yes Ive read something like this. However my chip has a 20ms processing time. So to turn a digital signal on and off takes 20ms in between or am I mistaken.

-What to do now?

Is the chip just not suited. But it has 6 MHZ more than many other standard chips.

-CProgrammer

Share this post


Link to post
Share on other sites
This is it:
http://www1.conrad.de/scripts/wgate/zcop_b2c/~flN0YXRlPTEzOTE0Njk2ODk=?~template=PCAT_AREA_S_BROWSE&glb_user_js=Y&shop=B2C&p_init_ipc=X&~cookies=1

Sorry its german but i think you may get it anyway.

Somebody told me that the signals may actually overlap. Meaning that every signal is 20ms delayed but that doesnt mean I have to wait 20ms to give the next command.
Could this be right?

-CProgrammer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this