Go Down

Topic: 360 servo, help with some code please (Read 1 time) previous topic - next topic

matt8190

Feb 07, 2017, 02:38 pm Last Edit: Feb 07, 2017, 02:44 pm by matt8190
HI
is it possible to do the following with some code and a 360 servo?
Basically I am using a 360 servo as a winch,
is it possible so enter some code into the servo so that
when the servo is turned on and the winch cable is out 4" or what ever it thinks its at the top.
and will not be able to retract the cable in any further than 4" or what ever length the winch cable was out at.
The winch lowers to 18ft no problem but its the auto stopping the servo on the raising up I don't understand.

if you get what I mean.

I have had a number of servo motors pack in because when the servo pulls up the winch too far
and cant go any further, I think its over heating the motor and burning out.

I have attached a couple of pictures for info so you know what it is am doing and want to achieve

any help would be most welcome.


PaulS

Quote
is it possible so enter some code into the servo
No. The not-really-a-servo is not a microcontroller, so you can't enter code into it.

Quote
if you get what I mean.
No, and the pictures do not really help. I seriously doubt, for instance, that there is a servo in that device. I'd guess that it is a geared electric motor.
The art of getting good answers lies in asking good questions.

matt8190

No. The not-really-a-servo is not a microcontroller, so you can't enter code into it.
No, and the pictures do not really help. I seriously doubt, for instance, that there is a servo in that device. I'd guess that it is a geared electric motor.
I should know pal, I have built the thing!
It has a MG996R Digital servo modified for 360 continuous rotation that raises and lowers the winch.
I can program the servo with Arduino. So any advice to my initial post would be helpful as opposed to questioning how I have made something.
thanks

PaulS

So, you have a variable speed electric motor. Using the Servo library, you can control the speed of the motor, but not the position. You have no way of knowing the position of the motor at any given time, including startup. You either need to add some position-detection hardware, such as an absolute encoder (expensive and may be difficult to fit in your completed assembly) or you need a limit switch to know when to stop the motor.
The art of getting good answers lies in asking good questions.

Go Up