Hello,
Im very new to working with arduinos, though have admired arduino projects from afar for a long time now. Put simply, I'm diving in at the deep end.
In essence, I plan to run 18x 2 Phase 4 Wire stepper motors ( Phase resistance : 12 Ohms, Current : 0.25A) individually with live inputs, as well as the possibility to create presets for the positions of each motor. 18 motors may sound like a lot, but ideally the project would use around 25 stepper motors, though im starting off small. Ability to scale up in amount of motors is definitely of interest in this solution. Ideally, I'd like the set of 18 to be running through one main board which takes input from something like a windows pc, smartphone, joypad controller, etc.
Despite how in the dark i am, ive done research and to my knowledge I must source some 2 Phase stepper motor drivers. I have found the - A3967 EasyDriver Stepper Motor Driver V44 - which I blindly believe to be suitable. Please correct me if I am wrong. Furthermore, it is my understanding that each motor will require one of these EasyDriver boards to ensure the correct signal is given to give full 360 rotation. Each EasyDriver board will in turn be connected to the arduino board which tells it direction and steps. Is this correct so far?
Assuming I wasn't horrifically wrong in my previous paragraphs, I now face the question of can I connect all 18 of these EasyDriver boards into one arduino board? Will it physically have space to connect? Will I have to resort to using multiple arduino boards? Physical space is of the essence in this project, so the more minimalist the better.
I greatly appreciate any time spent helping me find a solution, feel free to scold for bad questions but please show me where im wrong
Thanks,
Wolvyr.
Wolvyr:
Despite how in the dark i am, ive done research and to my knowledge I must source some 2 Phase stepper motor drivers. I have found the - A3967 EasyDriver Stepper Motor Driver V44 - which I blindly believe to be suitable. Please correct me if I am wrong. Furthermore, it is my understanding that each motor will require one of these EasyDriver boards to ensure the correct signal is given to give full 360 rotation. Each EasyDriver board will in turn be connected to the arduino board which tells it direction and steps. Is this correct so far?
That all sounds correct. You could also use the BigEasydriver, the PololuA4988 or the Pololu DRV8825. I would choose between them based on price. AFAIK the both Easydriver boards default to microstepping whereas the Pololu boards default to full steps.
If you need to control the direction of each motor then each driver will need to connect to 2 Arduino pins (step and direction) and for 18 drivers that immediately suggests an Arduino Mega.
One thing you need to take into account is the total number of pulses per second required when all the motors are operating. it is possible that a 16MHz Arduino might not be able to keep up.
Robin2:
If you need to control the direction of each motor then each driver will need to connect to 2 Arduino pins (step and direction) and for 18 drivers that immediately suggests an Arduino Mega.
One thing you need to take into account is the total number of pulses per second required when all the motors are operating. it is possible that a 16MHz Arduino might not be able to keep up.
I did a little research on the Mega. The 54 digital input/output pins would mean a theoretical maximum of 27 motors, right? 54 pins / 2 (1x step, 1xdirection) = 27 motors. This is, of course, ignoring the 16MHz crystal oscillator. Not all motors will be running at once. I'd imagine a maximum of 11 at one time would be required, though something like 5 or 6 at once would be more common. That should keep the whole thing below the 16MHz limit, right?
Though, this statement : "Stepper motors pretty much draw their full current all the time, even when they are stationary - that is how they resist being moved from their present position. This means they are very inefficient." makes me wonder if, as far as the clock is concerned, all 18 will be permanently engaged.
Micro stepping would be a great advantage, so I assume it would be safe to stick with the EasyDriver, since it's capable of microstepping, and the motors are rated at a quarter of an amp, so the BigEasyDriver would surely be overkill with 2A?
You need to keep digital pins 0 and 1 free for communication with the PC. But you can use the analog pins as digital pins.
If you tell us what your project is all about you may even get some useful advice
I'd imagine a maximum of 11 at one time would be required, though something like 5 or 6 at once would be more common. That should keep the whole thing below the 16MHz limit, right?
As you have not said how many steps per second are required by each motor I cannot answer that. And I presume you will want the Arduino to do some other stuff in addition to generating step pulses - for example, keeping count of the positions of the motors.
Robin2:
You need to keep digital pins 0 and 1 free for communication with the PC. But you can use the analog pins as digital pins.
If you tell us what your project is all about you may even get some useful advice
As you have not said how many steps per second are required by each motor I cannot answer that. And I presume you will want the Arduino to do some other stuff in addition to generating step pulses - for example, keeping count of the positions of the motors.
...R
I see. Only 15 of the 54 pins on the arduino mega can be used as PWM outputs, which I'm guessing limits me to 15 motors if I want to vary the speed? I would dedicate the 15 PWM pins to the step outputs, 15 of the 16 analogue outputs for direction, 2 digital pins (0 and 1) for communication with the PC.
You're definitely right that i'd need the board to count steps to estimate the positions of each motor - I had forgotten about that :s. That would require limit switches for each motor, taking up 15 more of the digital pins, right?
My project involves using the following motors to power a robotic hand, with the goal of achieving the same, if not better, strength and degrees of freedom as a real human hand. Obviously, these small motors wont achieve the strength, but I'm starting off small for proof of concept. I've got the majority of the mechanical designs down, just need to make a concrete plan on how the electronics will work.
I estimate that i'd never need to exceed any more than 60 steps per second. This is based on how one full rotation is 20 steps (step angle 18, 360/18= 20), and by doing some rough calculations based on the images, a 360 rotation will create 15mm of linear motion. I cant see a scenario id need more than 45mm/s, though I may be proven wrong in practice.
You do NOT need PWM pins for a stepper motor - any of the I/O pins can be used.
PWM is for controlling the speed of a DC motor or the brightness of an LED.
I wonder if those small motors have physical end-stops that prevent the motor from turning without causing any damage. If so you could probably eliminate the limit switches (rather crudely) by driving every motor for more steps than it could ever need to reach an end stop and then assume it is at the ZERO position.
60 steps per second for 11 motors would amount to 660 steps per second. My guess is that an Arduino should be able to provide 2000 steps per second or more and have lots of CPU cycles to spare.
Are you sure those motors need 250 mA - I have some NEMA 17 motors that only require 350 mA. However I don't know of any smaller stepper drivers. They might work with something like a ULN2003 - but that would need 4 Arduino connections per motor AND put a much higher computation load on the Arduino.
Be sure to start your experiments / learning with one motor, then two etc.
Robin2:
I wonder if those small motors have physical end-stops that prevent the motor from turning without causing any damage. If so you could probably eliminate the limit switches (rather crudely) by driving every motor for more steps than it could ever need to reach an end stop and then assume it is at the ZERO position.
60 steps per second for 11 motors would amount to 660 steps per second. My guess is that an Arduino should be able to provide 2000 steps per second or more and have lots of CPU cycles to spare.
Are you sure those motors need 250 mA - I have some NEMA 17 motors that only require 350 mA. However I don't know of any smaller stepper drivers. They might work with something like a ULN2003 - but that would need 4 Arduino connections per motor AND put a much higher computation load on the Arduino.
That's good to hear about the PWM and clock speed!
The motors themselves do not have slide screws. I plan to 3D print a screw connected to an arm that drives a hydraulic cylinder. I'd imagine that running the motor beyond the length of the slide rod to crudely reset to zero would result in one of two scenarios: 1) the 3D printed part will snap at the threads, or 2) the printed part will withstand the force and the coils of the stepper motor will suffer and over time become damaged. Im not too sure about scenario 2, however.
As for the current rating, the Ebay listing states "Current: 0.25A". Here's the link so you can inspect if you'd like.
The A3967 EasyDriver Stepper Motor Driver V44 has "Adjustable current control from 150mA/phase to 700mA/phase" so wouldn't that work just fine for the 250mA rating of the motors instead of the ULN2003 which takes 4 pins and a higher CPU load?
Wolvyr:
The A3967 EasyDriver Stepper Motor Driver V44 has "Adjustable current control from 150mA/phase to 700mA/phase" so wouldn't that work just fine for the 250mA rating of the motors instead of the ULN2003 which takes 4 pins and a higher CPU load?
The A3967 would be ideal. I did not mean to suggest otherwise - sorry if I caused confusion.
Assuming the 0.25A is the correct current then the motor should be able to withstand that indefinitely without damage - that's what stepper motors do.
I don't know much about 3D printing but I wonder can it produce screws with sufficiently low friction for the sort of mechanism you envisage. My sense of it is that 3D printing has a very crude surface finish compared with finely machined steel.
Why not buy complete motors and screws like in the picture.
Post a drawing of the sort of mechanism you are proposing to make.
Robin2:
I don't know much about 3D printing but I wonder can it produce screws with sufficiently low friction for the sort of mechanism you envisage. My sense of it is that 3D printing has a very crude surface finish compared with finely machined steel.
Why not buy complete motors and screws like in the picture.
Post a drawing of the sort of mechanism you are proposing to make.
Its certainly true that a machined steel screw would work far better than any 3d printed counterpart, but I believe a 3d printed part will do the job well enough for an early assembly. The threads are very widely spaced and the valleys of the threads appear at least 1.5mm wide. This tells me that a 3d printed screw should work, even if a metal screw would outperform it. In terms of surface finish, the parts will be rough, but some pieces can be sanded and filed to smoother finishes within tolerance. Others will just be compromised. If the printed parts turn out horribly poor I'll go on to machining the pieces from steel.
This is a simple sketch of the mechanism i hope to use the motors to drive.
Concerning the powering of the motors, each motor's 4 wires will connect to the A3967 board. The board takes on signals for step and direction, but also takes +5V. Each of the 11 boards will take +5V, how would I go about powering the boards? I'm struggling to find information on the current draw of the boards. Assuming it requires 0.25A, and I'm running 11 of them, does that mean I need to supply 5V@2.75A and have each board connected in parallel to the power supply?
Wolvyr:
Its certainly true that a machined steel screw would work far better than any 3d printed counterpart, but I believe a 3d printed part will do the job well enough for an early assembly. The threads are very widely spaced and the valleys of the threads appear at least 1.5mm wide. This tells me that a 3d printed screw should work, even if a metal screw would outperform it. In terms of surface finish, the parts will be rough, but some pieces can be sanded and filed to smoother finishes within tolerance. Others will just be compromised. If the printed parts turn out horribly poor I'll go on to machining the pieces from steel.
...
After you 3D print your screw, run it through a rethreading die. It should come out clean and smooth.
Wolvyr:
The threads are very widely spaced and the valleys of the threads appear at least 1.5mm wide.
"Wide" is a relative term... but very wide to me means 100mm
It depends on your printer, for a cheap FDM hobby type printer I very much doubt that will work (speaking from experience). Even for an industrial SLA or SLS it might be a stretch to work even for a prototype.
For these small features sizes, I think you will quickly find you need a metal screw, and maybe machined POM or something for the other parts.
Assuming it requires 0.25A, and I'm running 11 of them, does that mean I need to supply 5V@2.75A and have each board connected in parallel to the power supply?
Yes it is N x 0.25 A, but remember each stepper draws power whether moving or not. PSUs are quite cheap though, so even 25 motors would not really be a problem.
Wolvyr:
Concerning the powering of the motors, each motor's 4 wires will connect to the A3967 board. The board takes on signals for step and direction, but also takes +5V. Each of the 11 boards will take +5V, how would I go about powering the boards? I'm struggling to find information on the current draw of the boards. Assuming it requires 0.25A, and I'm running 11 of them, does that mean I need to supply 5V@2.75A and have each board connected in parallel to the power supply?
Hold on a moment ... a Sparkfun Easydriver (which uses the A3967) has a MINIMUM voltage of 6v and it is normal to run steppers at much higher voltages for better performance - the driver can go up to 30v. The purpose of the current limiter is to protect the motor when higher voltages are use.
Yes, each motor will be connected in parallel to the power supply. And remember that each motor has 2 coils each drawing about 0.25 amps.
If you are using a higher voltage supply you need to figure out the total watts required. The link for your motor says 12 ohms and 0.25 amps which implies a nominal 3v. With two coils that amounts to (very roughly) 2 * 0.25 * 3 = 1.5 watts per motor.