Join us in Chat. Click link in menu bar to join. Unofficial chat day is every Friday night (US time).
0 Members and 1 Guest are viewing this topic.
servo.connect(); //connect servoservo.setSpeed(20); //send servo to a certain speeddelay_ms(# of miliseconds calculated to get to that angle at that speed) // go for as long as it will take at that speed to get to desired angleservo.disconnect(); //stop servo.
By any chance You want to use an encoder, so no matter what voltage You get, servo achieves required velocity.
Sounds to me like you've taken a servo, modified it (ie turned it into a motor), and now you want to know how to use a motor as a servo Think you would be better with an (unmodified) servo - whereby the setSpeed command will cause the servo to move to a fixed location
if you have an unmodified servo, is there anyway to control speed?
they only travel in one direction right?
Quoteif you have an unmodified servo, is there anyway to control speed?In a word 'No'. Servos are normally instructed to move from position A to position B - their on board controller then tends to ramp up the acceleration and deceleration to get there quickly. By 'modifying' the servo it no longer knows what position it is currently at. So larger changes in position (ie the difference in setSpeed command) will tend to make it turn faster and, since it never thinks it actually gets there, it carries on moving. So the actual speed is often linked to the difference between the previous setSpeed and the new setSpeed. BUT - all servo models work very differently - some have a very flat response ie they are either at rest or they are at full speed. Others are more responsive. It will also vary from one servo to another of the same make/model.A previous poster mentioned an Encoder. No this is not a transistor - its like a complicated potentiometer - that is used to work out how many degrees the shaft has rotated. Bit like the thing you cut out when you modified the servo !!Quotethey only travel in one direction right?. No - if you use the example code generated from WebbotStudio it will turn your servo oner way and then the other way over about a 10 second cycle time.
You could add a potentiometer to the mechanism (just like the servo had) and use that for feedback. Without feedback, any change in load on the arm, or whatever, will cause you to miss your target position. The question becomes, can you write a better closed loop control algorithm than the one that came with the servo?
Voltage regulators are also troublesome. An innocent looking servo can consume 1 Amp if you put it under load. Which is the Axon(s) and $50 have an unregulated supply (ie straight from the battery) for servos. The 74'05 regulator on the $50 can only supply 1 Amp max - so you may kill it with just one servo.Perhaps you could go back to the drawing board and state what you are trying to 'achieve' (rather than saying what hardware you've done/got). Folk may then be able to recommend a better solution to achieve your goal.
When servo gets loaded, it tends to "jitter", stepper motors - do not, have You considered them? Using steppers will involve building some control and feedback electronics.
You need to consider the 'load' that the servos/motors will be under. There is a tutorial on this site regarding 'limbs' and the physics/maths involved - don't expect a small Hitec servo to be able to lift anything heavy.
Quote from: newInRobotics on August 03, 2012, 04:31:26 PMWhen servo gets loaded, it tends to "jitter", stepper motors - do not, have You considered them? Using steppers will involve building some control and feedback electronics.I am actually considering steppers. I have read Webbot's and Admin's tutorial on them and they seem very intriguing.Thanks!
The Dynamixel servos IMHO are brilliant. Great torque, you can even modify them into continuous rotation via software and back again, and you can control them all (well up to to about 250 of them!) via a single serial port. But as Gertlex says - they don't come cheap.
That is pretty fascinating that you can use software to modify them and back again.Just out of curiosity, how can you control so many with a serial port? I am assuming you would need to make/buy some type of servo controller?