help with motors

hi,

i need to build a system based on arduino. the system will mange 4 motors (like the one's in the starter kit) and every motor has 8 point to go to. i need to control on each motors separtly, and sometimes to get from the motors the exact point that it is in.
i need to know from where to start....

thank U!!

Itay

I've never had a starter kit so haven't a clue what kind of motors you're talking about. Controlling motors is such a vague concept. What are these 8 points you talk of? Maybe if you could give some more detail about your planned project it we would have half a chance of giving you some relevant advice.

Each motor has 8 pins or 4 of them together have 2 pins ?
Do you need direction control ?
How much current is needed ?

hi,

this is the motor :

8 points mean : 360 deg / 8 = 45 deg from point to point. when the user select a number (for example : '4'), the moror turns 180 deg (4*45).

the motor work on 5v from the arduino, the system will be installed on a car so i can input it 12v.

thanks

Itay

picture was broken (this new site is still being fixed) can you post a link instead ?

there are three basis motors we use. the first is a 2 wire motor. it runs things like fans. just continuous rotation. fans, pumps, that sort of thing. connect the 2 wires to a battery and it spins.

the second type is a stepper. this has 4 or more wires, usually not more than 10. each pair (or 3) go to a coil and you move this type with pulses. the faster the pulses, the faster the movement. the beauty of the stepper is that they have a specific steps per rotation. so, if you need to move 90° you give it the correct number of pulses (steps)

the third is a hobby servo. these are more like a module. the motor has internal circuitry and will take a signal then move to a point. a small value, small movement, large value, large movement. think tail rudder on a plane. these typically do not spin all the away around.

there is a industrial servo. that is a regular motor (usually DC) that is connected to a device called an encoder. the encoder is a position indicator. think threaded rod. you can spin it 500 revolutions and the nut moves on the rod to some calculated distance. you can spin it a fraction of a revolution to move the nut an exact distance.

this very simple description should offer some insight to your needs. the stepper, the DC motor and the hobby servo are all common for the arduino. you need to tell us what you have. a link to a photo should work.

new forum, not as user friendly. go to the quick reply box on the bottom. type in some text, then hit the preview button on the bottom . you will find a new screen that offers Attachent and other options below the text box.

use that to add your photo. you cannot embed it in the text.

please re-size it so that it is not huge.

OK

its a steeper motor with 5 wires - 4 phases.

5 wire... uni-polar with common center connection.

if you ohm out the lead and find one lead is common to all, then you connect that to your mains 5volt, and then bring each lead to ground to pulse. do NOT feed the motor from the Arduino. it will burn it up.

the motor should have some numbers. might be 200 steps per rotation. you cannot power this easily for things like microsteping nor can you use a simple h-bridge.

if you have not bought the motors, I would highly recommend you get 4 wire motors.

if you want to use this now, 4 transistors, (or FET's )
4 resistors between the pins and the base of the transistors.

connect the common to 5 volts
and connect each of the remaining 4 wires to the collector of the transistors.

then control the transistors one at a time.

if the motor does not spin swap any two of the pins, if not, then swap a different two pins.

since you are controlling the base of the transistor, you bring it high and it will activate that coil.

bring one pin high,
delay(5)
bring that pin low
delay(5)
second pin high
delay(5)
second pin low
delay(5)
(repeat for the other two pins)

repeat for all 4 pins. this simple test should get your motor spinning. and probably jumping around a bit.
delay is not the best, but for testing it is fine.

if the motor does not spin, just shakes, then swap 2 pins. if the does not work, swap the next two pins. you are trying to get the coils to alternate.

this crude operation will have most steppers rotating and shaking quite a bit.

a 4 wire, bi-polar stepper can be run in half step mode and will run more smoothly.
using as microstepper driver and the motor will purr smoothly when spinning.

thanks.

i think that in that case, it will be more easy and more shock-resistant to work with a servo - i just need to find one with metal gear and 360 deg rotation. can i get from the servo, when the arduino reboot, what is the servo position and put its position in a variable ?

Itay

itayobt:
can i get from the servo, when the arduino reboot, what is the servo position and put its position in a variable ?

No. But you can't with a stepper motor either.

What exactly are you trying to do?

...R

Those motors are usually sold with a ULN2003 dartlington driver board and are as noted above 4 phase unipolar stepper motors.

If you got 1 in a starter kit, you already know how to drive one, your only problem is that you now wish to drive 4, presumably independently which means using 16 digital IO pins which may be a problem.

Hi, if you are going to use the stepper motors, you unfortunately have no way of knowing their position at start up.
So you will need to have a switch that will operate with the servo in say its zero position, thatway you have a reference from which to count your pulses.
This means on start up you check the zero switch for each motor and if the stepper is not at zero, drive it around until it is.
Tom..... :slight_smile:

hi,

thanks for the answers!

i took a picture to explaine more clearly the system :

i have axle attached to a motor- i need to run the axle between 8 points. in the arduino startup, i need to get from "some where" where is the indicator (the yellow in the pic) point to.

Itay.

12121.jpg

I just typed a reply to this and then it disappeared - can I remember it?

A servo is the easiest one to work with because you can direct it to a specific position whereas with a stepper you can only tell it to move X steps.

With either sort of motor if the shaft is rotated while the Arduino is switched off the Arduino won't be able to tell where it is when it restarts. However it could easily direct the servo to the "home" position. With a stepper motor it would be necessary to have an external limit switch to identify the home position.

If you need 360 deg of rotation a standard 180 deg servo will not be suitable and you will need a sail-winch servo which can do about 3 full turns with position control.

...R

OK

the shaft wont turn when the arduino will be in off state.
i need a servo with a 360 deg rotation.
how can i take from the servo reading when the arduino starts in order to know on which point the indicator (the servo arm) is in ?

Itay

With an ordinary servo, you can't - there's no feedback to tell you what position the servo is in. You can tell it where you'd like it to be at startup, before you do the attach and it will move there from wherever it was at power up.

itayobt:
how can i take from the servo reading when the arduino starts in order to know on which point the indicator (the servo arm) is in ?

I'm beginning to think I'm wasting my time here.

I just told you in the Post immediately before yours that you cannot to that. Why are you still asking about it?

I also told you that, although you cannot determine where the servo is, you can make it go to a specific start position.

And, of course, if it did not move while the Arduino was switched off it will still be in the position it was last sent to.

You have not explained why you need to read the position.

...R

i need to know where the last position was because when the user starts the system again, i want that the old state will be remember.

i thoght about somthing else : after the user select a point to turn the shaft to, can i store it in the arduino memory ? and when the arduino starts again, it will move the servo to "home" position and then take from the memory the last known position ?

i know that i can use a SD card as a memory bank, but does the arduino has one on its chip ?
i dont want to use a SD card becuase it will be more expensive for me....

Robin2, dont be mad. we are all here to learn.....

Itay.

itayobt:
i need to know where the last position was because when the user starts the system again, i want that the old state will be remember

That does not explain WHY.

For example why not just have code in setup() that moves the servo to a start position?

...R