Hello everyone. I'm a light artist and I work mainly with LEDs and basic electronics. when it comes to motors I almost always use continuous ones, without electronic control.
but now I'm helping in a project that I really like and I'm planning the execution, and it involves programming some things that move in a certain way.
basically what I need to develop is this:
3 motors with a stick attached that turns 45º and comes back to the beginning (almost no weight attached to it)
each one with a different speed
each one with different timing of movement
almost zero budget
I was thinking of stepper motors (nema17) but I don't know if it is what I need and if I can control 3 independently with one driver or if I need 3 drivers...
can you help me out to figure the easiest and cheapest way to solve this?
That sounds more like servos. Servos are very good at going from one position to another and back. They need no additional drivers just an Arduino and some power.
Which servos you need will depend on the size and weight of the stick.
Normally servos operate at full speed but you can get them to work more slowly by making them move a little at a time as in the ServoSweep example that comes with the Arduino IDE and as in the demo Several Things at a Time which may be more appropriate if you want a few servos operating at different speeds.
Stepper motors don't know where they are so you need a limit switch and a piece of code in setup() to make them trigger the limit switch and thus identify their HOME or ZERO position. And, of course, each stepper motor needs a stepper motor driver.
If you conclude that you really do need stepper motors on a tight budget and the load on the motors will be low then the cheap 28BYJ-48 stepper motors may be perfectly adequate. You can buy them with a ULN2003 driver. But note that they require 4 Arduino pins per driver whereas an DRV8825 driver (for a Nema 17 motor) only needs 2 I/O pins. (A servo only needs 1 I/O pin)
mmoro:
can you recommend me the components that could do what I need to do?
I'm not sure what was in your mind when you wrote that.
Basically you need the 3 servos, any Arduino board, a power supply for the servos and your Arduino program.
If you are just moving a sheet of paper then the small SG90 size servos should be fine. It may be best to get "digital" servos. They are slightly more expensive but they don't move when power is applied. The analogue servos usually move a few degrees (clockwise ?) when power is applied which can bring them up against their internal end-stops and cause damage to the gears. Metal gear servos will have a longer life than those with plastic gears.
An Arduino Uno or nano will be perfectly suitable. The main difference is their size.
Servos usually need a power supply in the range 4.5v to 6v and they should NOT be powered from the Arduino 5v pin - it cannot provide enough current. If you get a regulated 5v supply that can provide at least 2 amps you should be able to power the servos and the Arduino from it - connect the 5v power supply to the Arduino 5v pin. Of course if the Arduino will always be connected to a PC it won't need any other power supply.
Make sure that the GND for the servo power supply is connected to the Arduino GND.
You will find plenty of code examples of Arduinos driving servos independently. Most will use the standard Servo.h library but if you need to control the speed at which the servos move I would recommend using the VarSpeedServo.h library instead. As the name suggests that allows you more easily to vary the speed of the servos.
Robin2:
connect the 5v power supply to the Arduino 5v pin.
I think the 6V minimum for Arduino refers to the barrel jack, since it loses a bit in the internal regulator. You can put regulated 5V in the 5V pin which is downstream from the internal regulator. That's the pin next to the ground in your pic.
If you use a 5V power supply it can supply both the servos and the Arduino via its 5V pin. If you already have the 12V supply then connect it to a 5V output DC-DC (buck) converter which can supply 3A and you're sorted for power.