Asking for a code

Good day ma’am/sir! I’am having a problem searching for this specific code and no where else to go. Clearly this is my last resort. I hope you guys will help me and be gentle because obviously i’am still an amateur and a a student.

Here is my problem. My project is to control its torque Of the sevo motor by using potentiometer, lcd and servo motor and i don’t have any idea if how would i set things up with the code, because i want to know the percentage if how much torque(tweak) i i’applied on the potentiometer and will reflect to the lcd in percentage accordingly.

How are you sensing the torque?

If you mean you want some specific code to run on your unspecified computing hardware interfaced via your unspecified circuit to your barely specified motor then that's easy; it doesn't exist.

Do you want to learn to do this yourself? If so get an Arduino starter kit and work through the various tutorials on this web site, in the Arduino IDE and elsewhere, and come back when you don't understand something.

If you want someone else to do it for you click on 'report to moderator' and ask them to move this to 'gigs and collaborations' and give some indication of how much you are willing to pay.

Is this what you mean? Knob example from Servo library.

I'm not sure how this would be done. Most servos will work at a range of voltages, and I assume that the torque varies with voltage, so maybe that could be a way. To Awol's point though, you'll need to be able to measure so you can calibrate.

It may be that torque varies depending on whether you do one contiguous move or lots of little ones. Again, experimentation would be necessary.

Why do you want to do such a thing?

One suspects that the OP does not mean "torque" at all!

It's an XY problem! :grinning:

So, torque is a calculation of mass x distance, so if controlling a servo via a potentiometer.

firstly understand that at 0 degrees we would have no torque, then at the potentiometer being turned and results in the servo being at 30 degrees a calculation of ((weight *9.81) * (COS(30)*length))

Without more detail it is pretty impossible to answer.

Paul__B:
It's an XY problem! :grinning:

You could mount a servo on the edge of a table with a ruler attached midpoint to the servo horn. At a selected distance on the ruler attach a known weight. Then you can calculate the torque by measuring the horizontal distance from the servo horn center line to the weight center line. This times the weight of the weight should give some idea of the torque on the servo horn shaft.

Paul__B:
One suspects that the OP does not mean "torque" at all!

I also suspect they don't mean servo motor. It's possible, but about 90% of requests here don't differentiate between an (R/C) servo and a servomotor. Big difference on all levels.

Not only that but most of the respondents here are saying how to measure torque not control it.

The OP sounds like a student who has misunderstood what he has been asked to do. I am not aware that you can control the torque of a servo motor in any way.

" I am not aware that you can control the torque of a servo motor in any way."

It has been a while, but in the past tinkering with continuous rotation servos, that there is a variable rotation speed range as the control commands diverge from the neutral non rotation command point. Within this speed control band the torque output of the motor is probably being varied to control the rotation speed of the servo drive train.

OK, 10 replies already to a "one-hit wonder". Good troll, eh? :roll_eyes:


24 hours on, no response from OP but 16 and counting. :astonished:

Just adding a comment without adding to the count. :grinning:

Within this speed control band the torque output of the motor is probably being varied

Fine but how? What do you change to bring this about?

That makes 12.

"Fine but how? What do you change to bring this about?"

As previously mentioned, a variation of the "knob" example could be used using a pot. As best as I remember the controllable range on a typical servo is +-100us commands from the neutral command position.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Can you tell us your electronics, programming, arduino, hardware experience?

Is this a school/college/university project?

We are not here to provide you with an instant complete solution, we are here to provide guidance and advice.
This will help you develop your sketch, so that you understand how it works and you can debug any problems that may develop.

Thanks... Tom.. :slight_smile:
PS, I think torque is missing in translation, I think the OP means turning of the pot and turning of the servo.

zoomkat:
"Fine but how? What do you change to bring this about?"

As previously mentioned, a variation of the "knob" example could be used using a pot. As best as I remember the controllable range on a typical servo is +-100us commands from the neutral command position.

I don’t mean a knob, I mean what do you do to a motor to make the torque change?

"I don't mean a knob, I mean what do you do to a motor to make the torque change?"

I think in actuality you control the average amount of current supplied to the motor in a given amount of time.