Servo Motor Probem for making both Move Opposite ways

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

The servos you are using are continuous rotation servos. That means you do not have any control over how far they move. You can only control the speed.

You can make them move slower or move for a shorter amount of time. But you cannot control the exact position where they will stop.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Oh. Ok. That is great info. If servo motors don’t let me control their position, then what motor should I use that are kind of small like those that I can control their position?

Do you also have any better idea of how to make a small blind connected to my arduino through my code other than the way I am trying to do it now?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

Actual servos do let you control position. So called "Continuous Rotation Servos" are really just intentionally 'broken' servos: https://learn.adafruit.com/adafruit-mot ... ion-servos

So you could use a (non continuous rotation) servo. However, these are typically limited to about 180 degrees of rotation.

"Sail Winch" servos typically have position control over several rotations. Stepper motors or a gearmotor with an encoder are other options.

For more information, see this guide: https://learn.adafruit.com/adafruit-mot ... tion-guide

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Hello.

Sorry I didn't text you back until now.

I was busy because it was the end of my school.

But now that school is over I should be able to text back more frequently.

I have some questions.

One of my questions is this:

Why do I need to use a gear motor or stepper motor with an encoder?

Why can't I just go without an encoder on a stepper motor or gear motor?

I looked up an article that tells the difference between a stepper motor with an encoder between a stepper motor without one.

But I still don't get the difference.

Can you explain the difference to me?

Here is the link:

https://community.parker.com/technologi ... th-encoder

I also don't get why I would want a Sail Winch servo as opposed to the stepper motor or gear motor?

Can you answer me those questions?

If you do, that would be great.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

I looked up an article that tells the difference between a stepper motor with an encoder between a stepper motor without one.

But I still don't get the difference.

Can you explain the difference to me?
The difference is the position feedback. A simple stepper has no position feedback. You can tell the motor to move a certain number of steps, but you have no way to know if it actually moved. If the stepper is overloaded or the power fails, it may not complete all of the steps you ask it to do.

With an encoder attached to the stepper, you will get signals back from the encoder telling you how much the motor actually moved.
I also don't get why I would want a Sail Winch servo as opposed to the stepper motor or gear motor?
Say for example you need a motor that will precisely move 1 1/2 turns then stop.

With a sail-winch servo, you can tell it to move to that position. As long as it has power and is not overloaded, it will seek to that position all by itself.

With a stepper, you can tell it to move the right number of steps. As long as it has power and is not overloaded, it will make exactly the number of steps that you tell it to do.

With a gear motor, you can tell it to run for a certain length of time. But you have no control over how much it turns in that time. It may run faster or slower depending on the battery level or the load. Without an encoder, you can only guess.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Ok. Thanks for all that info.
I think I will go with the Sail Winch servo sense it seems the easiest to use.

But is the Sail Winch servo programmed like a normal servo?

According to the forum I found, it looks like it is programmed like a normal servo
,but the difference is that it spins more times than the code for a normal servo.

So to get it to turn less I would need to to use way smaller numbers for the code that tells how much of a rotation it should spin.

Is that information correct?

Here is the link that I based that info off of:

https://forum.arduino.cc/t/how-to-contr ... o/682280/2

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

A sail-winch servo is controlled in the same way as a regular servo (Not a continuous rotation servo). The difference is that instead of moving in the range of 0 to 180 degrees, it can be moved over a wider range. The HiTec HS-785 sail-winch servo will move between 0 and 1260 degrees (3 1/2 rotations)

https://www.towerhobbies.com/product/hs ... 3785S.html

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Ok. That sounds great.

Just so you know I did not get the HiTec HS-785 sail winch servo.

Instead I got the :

JX W4505-4T Plastic Gears Standard Size Sail Servo Winch

Will this servo still work the same as the other one you just mentioned?

Or do I need to get the HiTec instead?
Attachments
16476F84-4670-44BA-B738-90F5A29AAED2.png
16476F84-4670-44BA-B738-90F5A29AAED2.png (610.67 KiB) Viewed 345 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

There are many different sail-winch servos. They differ mostly in the amount of torque and the range of motion. You just need to find one that meets the requirements of your project.

Compared to the HS-785, the JX W4505-4T is a little less powerful, but has a wider range of motion. According to the specs, the JX W4505-4T can move in the range of 0 to 1620 degrees. That is 4 1/2 rotations.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Ok. Thanks for the info. It sounds like there isn’t much difference, and I don’t need much torque anyways. So it looks like a bought a good choice.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Hello Bill. This is Neal. This has nothing to do with my Sail Winch servos.

I am using this other device right now called the Geared Pager Spring Motor because it may be better for my project.

And I was wondering how I would control it and hook it up on the Arduino?

I can't find many references to tell me how to control it and hook it up on the Arduino.

I also asked someone and they sent me a Python code for how to control it, so I tried to convert that code to Arduino code.
The problem about that, is that I can't download Pyserial
And how I tried to download it like this:

I go to this website:
https://pypi.org/project/pyserial/#modal-close

I click on "Download files"

I click on this download:
pyserial-3.5.tar.gz

The problem is that whenever I try to download it, it pops up with "where would you like to open the app?"
And then I choose Microsoft store and it says that it can't find that app.

I don't know what else to do for downloading that.

Can you tell me good instructions on how to download Pyserial or just how to control my Geared Pager Spring Motor on the Arduino and how to hook it up?

If you could that would be great.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

You will need a motor controller that is capable of reversing a DC motor. We have several that will work well with that motor. If you can tell us what processor you are using, we can suggest some motor controllers that will also work with your processor using Arduino code.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

I am using an Arduino Uno right now while I test it on the breadboard and than I will be using an Arduino Nano for when I solder it.

Is that what you mean by processors?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo Motor Probem for making both Move Opposite ways

Post by adafruit_support_bill »

The DRV8833 would be a good match for those processors and the geared spring motor. https://www.adafruit.com/product/3297

It has 2 channels, A & B. You will just need one channel per motor.

If you connect your motor to AOUT 1 & 2, you can control it with the AIN1 and AIN2 pins.

To make it run in one direction, use digitalWrite to set AIN1 LOW and AIN2 HIGH.
To make it run in reverse, set AIN2 HIGH and AIN1 LOW.

User avatar
animefruit
 
Posts: 332
Joined: Tue Feb 25, 2020 1:04 pm

Re: Servo Motor Probem for making both Move Opposite ways

Post by animefruit »

Ok. Thankyou for that info.

I may buy that later and hook it up.

But right now, I was just wanting to test things out with a normal servo motor

Right now I am trying to make my new Sail Winch motor to turn 180 degrees and back.

But it seems to NOT be turning 180 degrees and back when I use the normal sweep code for my Arduino.

How do I make it to turn exactly 180 degrees and back?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”