I make an simple robot arm, utilizing just servo brackets. There are to be three joints each using there own servo. I must be able to set a desired angle for each joint(pivot) on a gui and have the arm move to these desired angles.
Secondly, I must be able to show that if I move the robotic arm downward with my own hand that it will go back to the desired position.
EDIT: Secondly I must be able to get position control such that if a weight or any force causes the servo's arm to move out of position then it should be able to go back to that position.
The easiest GUI for control would probably be a web page, which would require yout to also get a $10 ethernet shield. The second part of your requirement probably won't work. The servos may break when you to force them into another position.
Yea, the servos send continuous signals to hold it in position. However I was thinking: lets say i set the servo to a particular angle X degrees, then I attach a load sensor to the arm in such a way that when the force exceeds some value F Newtons, the load sensor will send a signal to turn off the power [ or better yet (turn off/break the line) of the control signal] to the servo. Then having the power/control line off will allow me to physically turn the servo arm to an angle other than the desired say Y degrees. and when I release my hand from the load sensor the load sensor will read a value lower than the value F Newtons and switch back on the power to the servo, thus causing it to go back to the original intended angle X degrees. Will this work? Will the arm go back to the desired angle after I release?
Izzy92:
Will this work? Will the arm go back to the desired angle after I release?
There would be no problem getting the servos to go back to a position - just the same code that put them in that position the first time.
Your idea of a load sensor seems very complicated for what seems intended to be a very basic project. Why not just have a push-button or microswitch to tell the Arduino to detach the servos temporarily ?
Actually its more complex. Its a control system engineering final year project. I have to show digital control by applying z-transform etc and using matlab/simulink to create a joystick to select precise angles to set the robot and ensure that if it stays in its position See " EDIT "
Ill be needing to use Simulink to achieve this control of the servo.
EDIT: Secondly I must be able to get position control such that if a weight or any force causes the servo's arm to move out of position then it should be able to go back to that position.
For this you will need to have some method of feedback of the actual arm position. Typical hobby servos don't provide any position feedback.
Izzy92:
Actually its more complex. Its a control system engineering final year project. I have to show digital control by applying z-transform etc and using matlab/simulink to create a joystick to select precise angles to set the robot and ensure that if it stays in its position
I wonder if servos are suitable for an assignment like that. In effect all of the stuff you are being asked to create is already embodied within the servo's electronics.
To demonstrate your ability to design that sort of control system I suspect you would need to discard the electronics within a servo and build your own control system directly connected to the servo's motor and potentiometer. This also gives you the option of deliberately under-powering the motor so you can manually push the servo out of position without risk of mechanical damage.
For a more complex system you could build a control system for a DC motor with an encoder - but they don't come in neat packages like servos do.
@Robin2
The idea of discarding the electronics inside was exactly what I had in mind
@zoomkat
Doesn't the pot in the hobby servo provide a voltage as the arm of the servo rotates? cuz thats what I kinda had in mind to provide position feedback. It does right ? lol
Izzy92:
The idea of discarding the electronics inside was exactly what I had in mind
Now, he tells us ....
Did it not occur to you that that is important information ?
It feels like you are asking me to fight with my hands in my pockets - only Jack Reacher can do that !
If you take out the electronics you can connect the pot to to an analog input on the Arduino - just like any normal pot.
@zoomkat
Doesn't the pot in the hobby servo provide a voltage as the arm of the servo rotates? cuz thats what I kinda had in mind to provide position feedback. It does right ? lol
You can tap off of the servo pot wiper to get a voltage that is representative of the servo's current position. I've done this in the past (below) and it is not too difficult. You really need to get a metal gear servo and do some testing to see if the servo will withstand being moved out of position without stripping the gears. You may want to make an arduino based servo setup for your project.
EDIT: Secondly I must be able to get position control such that if a weight or any force causes the servo's arm to move out of position then it should be able to go back to that position.
Instead of connecting the servo directly to the arm (which most likely won't work for your project), you might connect the servo to the arm via an elastic component like a rubber band or spring. The elastic material connected between the arm and servo would support the arm. The pivot of the arm could be a pot or have a pot attached for arm position reading. When the arn has weight added, it would sag down, causing the output of the pivot pot to change. The arduino would read the pivot pot and tell the servo to increase force on the elastic material until the arm returned to its original position as indicated by the pivot pot output. When the weight is removed from the arm, it would move up, changing the pivot pot output again. The arduino would have the servo reduce the force on the elastic until the arm lowers back to its initial position. Mot much would be needed to construct a demo setup.
@Robin2
I wanted to hear other ideas. I thought that if i had said that idea at first then no one will input anymore ideas of getting this task done. They will take it that was what i was going with and that i just need fine tuning.
@Zk
I figure the gears wont move, since there will be a constant pwm signal sent to the motor and Turning off the control signal to the hobby servo motor to allow movement of the gears out of its desired position is a non/engineering way out of this project. I need to have it automatically reach that point using PID control.
Also thanks i like that idea on attaching the pot on the joint for feedback. Also I am leaning towards using a DC Servo motor for my setup because I need to have a mathematical model(transfer function) of the plant (servo motor) and in this case there is no research done on modelling those hobby servo motors whereas there are data and information on modelling DC servo motors which can be done quite easily. note: I will still dig into to the hobby servos but for now my mind is tending towards the DC servo....
@raschemmel
Was thinking more of teh DC Servo motor. The mass could range from 50-100 grams.
Izzy92:
Do you all think a stepper motor will be more applicable in my project? i.e could move out of position and be controlled to go back to that position?
I thought you were going to use a servo and replace its electronics with you Arduino code?
Both mechanically and programatically that would be very much easier than using a stepper motor which would also need an encoder and/or limit switches.