Stepper Motor with AA batteries

So basically my project is a panning timelapse rig, which moves a DSLR camera. After moving the camera, the Arduino triggers the shutter via a transistor at intervals.

The rig works fine and I got the results out of it. But right now it is AC powered. I wanted to make it portable so that I can take it outdoors.

The basic hardware are:

  1. Arduino Uno
  2. Adafruit Motor controller shield V1.0 (L293D drivers) (http://www.adafruit.com/products/81)
  3. Phidget 3319 Stepper motor (NEMA-17 Bipolar 99.51:1 Planetary Gearbox Stepper - 3319_1 at Phidgets)
  4. Housing, transistor, etc

I'm using this motor more because of it's smaller step angles than it's torque. The weight of my camera is much lower, so a smaller motor could have handled it, but I couldn't find anything offering the same smaller step angles.
I realize the stepper motor requires high end chopper controllers and the Adafruit controller is not made for such ratings. However the motor only needs to move a few steps at a time, and atleast at 15 second intervals. So this gives enough time for the shield to cool down. The stepper motor is released after every step so power doesn't go through it.

I've been supplying either 12v or 9v to the rig (powering the shield, which powers the Arduino underneath) and it works fine. However, if I start using AA batteries, what can I expect? Will there be a high current draw since it's unregulated? In theory rechargeable batteries can last a few hours, and that's pretty much all I need. Can I get by using 6 AA's for the 9V?

Any help is appreciated.

PS: 1) I can get the Arduino Motor shield with L298 driver if that is safer/best practice.
2) The motor works fine down to 7v. At 5v (USB powered) it starts to slip/skip random steps.

This is a "road to Killarney" problem.

There are so many ways to have made this easier before starting, but seriously the easiest way to solve this is to run the rig from a 12V sealed lead acid battery.

I have considered a SLA battery. But the rig is tripod mountable, so I wanted it to be as small as possible.
But yes, if AA doesn't work at all, I may have to go to with SLA.

I see the stepper motor you're using is rated at 1.7A at 12V. Based on the amount of time that it's going to be powered on and how long you need the battery to last, can you estimate the total charge (in Amp-hours) that your battery will need to supply, assuming you stick with a 12V supply?

Okay, in reverse order of apparent difficulty:

  1. Use a cable to connect the tripod-mounted rig to the SLA on the floor;

  2. Try the AAs, but be prepared to abandon the idea if it doesn't work;

  3. Reduce the stepper motor current until it no longer keeps synchronised, slowly increase it until it moves reliably, then increase it by a further 33% for safety;

  4. Calculate the largest acceptable angle you can move and still have the motion imperceptible in the final footage, then change the stepper and gearbox to the lowest current pair such that this angle is moved by 4 full steps of the motor;

  5. Go back to the drawing board and design in a tiny geared servo motor with an encoder, which will draw only the current required to make the move.

That's the part I'm confused about.
So after steps, the motor is released (not holding the torque). There are 450 steps in total which is stretched across about 4 hours or so. So essentially the motor is active for less than a second, 450 times across 4 hours. So at 12v, I should be good with 3Ah or so power supply, assuming the board itself will drain a lot over the hours.

@Billysugger: this motor shield doesn't seem to have any current limiter. Is there something I'm missing? And yea, in a hindsight, it should have been a smart servo motor. But I got this stepper for free!

Even rounding all the numbers up, the motor is only going to need a fraction of an amp-hour per session based on those numbers. If you keep the UNO itself powered up throughout the whole four hour session, that would use roughly an additional 200 milliamp-hours. A set of ten NiMH AA cells in series giving 12V and 2AH capacity ought to be ample for that application. You could reduce the number of cells if you feel that the stepper may not need the full 12V, but that's the recommended voltage so I would suggest sticking with that. Use bigger capacity cells if you want it to be able to last multiple sessions without recharging.

12V rechargable GEL CELL BATTERY.
[ http://www.batterymart.com/c-gel-cell-batteries.html?gclid=CJP1y4_9mr4CFQVsfgodtYkA0A ](http:// http://www.batterymart.com/c-gel-cell-batteries.html?gclid=CJP1y4_9mr4CFQVsfgodtYkA0A)

So after steps, the motor is released (not holding the torque). There are 450 steps in total which is stretched across about 4 hours or so. So essentially the motor is active for less than a second, 450 times across 4 hours.

Well 4 hours is 14,400 seconds. So you're moving just one step every 32 seconds. then cutting the motor current? Is that right?

Yep, that is correct.
The only thing that worries me is the current draw. I have no control over this, so just wanted to make sure using AAs are ok.

Well what's worrying me is that when you power off a stepper motor, it doesn't hold position. What's worse, is that the unpowered detent torque positions are not aligned with the step positions. Perhaps, in some cases, when you power up the motor again, the rotor will move to the previous position. But if you power up ans step without any delay, the chances of losing position increase considerably. And it makes no difference if you increase the current, this is not lost position due to desynchronising at speed, it's the lack of alignment between the step positions and the rest positions.

The solution to this is to use a "wave drive" current profile, which has only one motor winding on at a time, at positions which are more closely aligned with the unpowered detent positions. Whether this is possible with your stepper shield I can't say, it depends on which shield you are using, and whether you have control of the current in each winding, or whether you send it step and direction signals.

Going back to the easy solutions: the easiest may be not to power off at all, and use a hulking big car battery. Sorry the news isn't better, all I seem to bring you is grief :frowning:

Thanks for all your input, I really appreciate it!

I'm actually using wave drive profile (only a single phase on). I've noticed the missteps when I was using both the coils, but now it's better. Thanks for confirming that this is indeed the actual theory, and not just my observation!

I'll give it a shot, and I'll let you know what happens.

You might consider going with a smaller stepper motor like below. The offset output shaft indicates the motors have internal reduction gears (the gearing should prevent rotation drift when not energized). If the SLR cam has a good bearing mount, the motor probably can rotate it. Also the smaller size should make for a lower profile mount.

http://www.ebay.com/itm/5V-Stepper-Step-Motor-Driver-Board-ULN2003-28BYJ-48-For-Arduino-High-Quality-/271473069262?pt=LH_DefaultDomain_2&hash=item3f350e4cce

I'm actually using wave drive profile (only a single phase on)

Aha, then you've already cracked the biggest problem. Now that's out of the way, let's return to your original question.

We need to find the phase current of the motor, and that's not straightforward. From the website spec, your motor has a phase resistance of 1.7 ohms, rated current of 1.7A and a recommended drive voltage of 12V. This means it is not suitable for direct drive with an L293D because Ohm's Law does not fit these values. Such a motor is intended to be used with a chopping drive. We can get around this by adding series resistance to the phase connections to limit the current, but it does raise the question of how you've managed to run your rig at 12V without killing your L293D, because the L293D data sheet shows a peak current maximum of 1.2A, and Ohm's Law shows your motor phase to have been taking over 3A.

So, have you killed a bunch of shields? Can you measure and report the actual phase resistance? Have you done anything else to limit the phase current?

The good news is, if we can solve the current control issues, it's looking much more likely that you can use AAs.

One last thing for the calculations, (assuming we get the current issues resolved): you energise the motor, wait some time t1 (which may be zero), advance the phase excitation to the new position, wait some time t2, then de-energise the motor. What are the times t1 and t2?