Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Servo motor control...

Status
Not open for further replies.

JimB

Super Moderator
Most Helpful Member
OMG WTF!!
What happens in that video is so wrong on so many levels.
JimB
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
You should know yourself whats happening here.... You need to learn how to control the servo... You are turning the servo completely on, but your arm is preventing it going the full movement, thus this is the result..

If you monitored the current and then back off when the arm is in the correct place it will work okay...
 

jpanhalt

Well-Known Member
Most Helpful Member
Thank you for the video. That was helpful.

Some simple questions:
1) I assume you are driving the servo at 50Hz refresh rate. Is that correct? (I have seen such oscillations when I tried higher refresh rates.)
2) Are you running the servo at 4.8 volts (+/-) or 6 volts? (I assume 4.8V to 5V.)
3) Can you set an electronic "stop." That is, set a minimum pulse width that is just a little past what is needed to close on the object. (I am assuming longer pulses give clockwise/right hand movement.)
4) Put a small resistor (=<1 ohm) in the V+ line to the servo and monitor the current.
5) Check what is happening to the supply voltage to your MCU when the servo stalls. Maybe this is just a simple matter of better decoupling the MCU supply from the servo or using separate supplies.

Finally, after you get this problem solved, you might want to consider adding a current monitor to your program and keeping the small resistor so that the gripping servo is not constantly being run in a stalled condition. That is, when the current increases by a set amount, hold that pulse width or slightly more/less, as appropriate.

John

Sorry for duplications, I took a long time typing.
 

large_ghostman

Well-Known Member
Most Helpful Member
so my guess was correct!! way hay first for me lol. seriously tho if you look at the end of the video you can see where it drops whatever it is but still closes, so your asking the servo to move past the point it's actually gripped.
me i would use ADC to monitor current and take readings when it grips to get a rough idea how much current is drawn with a good tight grip, then back it off slightly, probably best to take say 16 readings each time and average them when you use ADC. or use a comparator and set current draw that way so when the draw trips comparator output high have the chip stop the servo
 

ghostman11

Well-Known Member
is this for a product to sell or just messing about and learning stuff? i find it hard to grasp that you couldn't see the problem, or more likely i think Ritesh you need to step back a little, it's almost like a habit for you now that when something dose not do as you expect then you post on here for help, instead i think on this occasion a little time examining your video and thinking about how your project works would have at least told you what was wrong. Then of course there is no harm coming here saying ok guys this is the problem i have any advice on how i could solve it, but the fact you didn't spend time to see what the problem was tells me your getting too reliant.
as my son LG pointed out, if you watch your video right at the end you see the bottle slip from the grip and the jaws close fully. you don't need an education to understand that a motor/servo will be strained and complain in a situation like this. Seriously Ritesh think more before posting,i am starting to see why some are getting fed up

regards
Jason
 

ghostman11

Well-Known Member
i dont like to be negative, so i thought i would try and add something constructive.
what is the gripper for? by this i mean does it have a purpose? if so is it picking up one object of fixed size only,or is it for picking up objects of differing size?

is that the final prototype of the gripper design? or just a test bed?
I know little of engineering as such but i am a scientist by training and have many experiments under my belt, i mention this because there is often detail lacking in your posts. Detail is everything in experiments and prototypes, for example if your gripper is only picking up a fixed sized object then the solution to the problem is very simple.....you just adjust the angle that the servo needs to travel too. if its going to be picking up different sized objects then you need to use something like current sensing to stop once the grip is enough to hold but no more than that.
Also it needs to operate a little slower in my opinion unless speed of grip matters alot. simply because it will grasp better if you slow down the speed of closure, at the moment it just grabs full speed and the object jumps a little, with a slower speed you can have more control with the current sensing.
Slowing down the speed is easy you just move a fraction......small delay move a little more.....small delay and so on until you reach final position, we are not talking creeping kind of slow but more a steady controlled closure instead of a rapid grab.

fix the gripper so it doesn't fall apart!! what exactly is it for picking up anyway? if it's tubs like on the video then in my opinion the gripper needs to be thicker at the ends and maybe have some kind of rubber lining to improve grip.
you need to post much more detail rather than just ask for code, people are really trying to help you but you are not making it easy, mistakes in advice happen because you cant be bothered to outline properly the object you wish to achieve.
the way it stands at the moment it's getting very close to a situation like the LED sign, where you are given a task i assume being paid for? then come here and get the solution and dev work done for free. that is a little unfair, asking for help is no problem, but you need to show you are the one doing the work.
you are being given heaps of help but showing little progress in learning so time to ask yourself if this kind of work is for you. if its just fun projects for the sake of learning then read the replies more carefully and take time to understand what you are being told. and if its paid work your doing then give up until you at least have the minimum basic equipment to be able to develop the products you are asked too.
just a few thoughts and ideas not having a go at you but i am concerned that your current attitude will affect others ability to get help in the future. please think about this.

so lets see how much you read, please answer the questions i have asked and also list the equipment you have for development

best regards
Jason
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
OK, this my last post on ETO.
bye.
I hope not either.... I enjoy helping you.... Sometimes gets me fired up but, I'm a man, I can take it..

I have spent quite a few hours, neigh days, don't let it go to waste....
 

koolguy

Active Member
I hope not either.... I enjoy helping you.... Sometimes gets me fired up but, I'm a man, I can take it..

I have spent quite a few hours, neigh days, don't let it go to waste....


Everything is fine i have no problem with any one.
 

large_ghostman

Well-Known Member
Most Helpful Member
hows the servo going Ritesh?? not heard anything for a while??? or you found help elsewhere? was looking forward to an update
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
all you need to do is turn off the PWM after arm has gripped,
Yes! This is exactly whats needed... A simple current detector on the motor supply, linked to the ADC and you can use feedback to position the arm....

Or a tiny micro switch om the gripper to ascertain it's grip...
 

jpanhalt

Well-Known Member
Most Helpful Member
I think the current sensor is the better way to go. The microswitch could be falsely triggered before a solid grip; current will indicate stalling. I have doubts about turning off the PWM vs. setting it to the proper grip value based on current. A small spring incorporated in the gripper might help keep tension. Commercially, they are called "servo savers."

Going back to Ritesh's video, the first attempt at gripping is confounded by the instability of the gripper. In the second attempt, at about the 32 sec mark (+/- 1 sec), the gripper appears to release, I have never seen that behavior from a stalled servo. In theory, it might happen if the supply failed/glitched -- either with or without the MCU resetting. That is why I suggested Ritesh check the supply out. A simple test for resetting would be to use a separate supply for the MCU. Ritesh also has an oscilloscope that he could use to monitor the supply voltage.

BTW: Is there a way to slow down or step through the frames of these videos? I am using Windows 7 Pro default install.

John

Edit: I wanted to confirm with an actual HS311 servo the behavior with power, but no pulse (i.e., signal floats or is grounded). It is "dead." That is, there is no holding power. So, I think the proper PWM needs to be applied to keep grip.
 
Last edited:

tvtech

Well-Known Member
Most Helpful Member
Stop punishing yourself Ritesh...

You were here today online @12.53 SA time. Looking at user profiles.
But you will not post...

NOBODY here dislikes you. You must stand up and be a Man when people criticize...and find faults in stuff you do.

Remember, if nobody cared, we would not try to correct you. And help you.

I am have been criticized many times in my life. I have grown and learned from criticism.

You should only worry when all loose interest in you and walk away. ETO have never lost interest in you or walked away....you decided to do that.

And it's killing you. Otherwise you would not have been here looking @ 12.53 SA time at user profiles.

Think about what I have said above.

Regards,
tvtech
 

koolguy

Active Member
Believe me every thing is fine...i was watching my first uc thread on assembly lang..
actually i am trying to Learn from basic arch reading data sheet and Google.
 
Last edited by a moderator:

jpanhalt

Well-Known Member
Most Helpful Member
Hi Ritesh,
It is good you are back. If you are interested in Assembly, I highly recommend Nigel Goodwin's tutorials. The link is in his signature.

The other day, I was searching on something else and came across a pre-made gripper at Servo City. Shipping might be expensive, but the small unit is low priced: **broken link removed**

If you search that site for "gripper' or "stacker" you will find larger units suitable for objects the size of beverage cans. Unfortunately, they are much more expensive.

John
 
Status
Not open for further replies.

Latest threads

Top