Stepper Motor Advice

08 Dec 2009

Hi everyone, I'm using the mbed as a first forray into digital circuitry (beyond electronics training way back at school) and I'm unsure as to whether my next purchases will be right for the job - any advice would be more than welcome!

I need to be able to both read and set the rotation of two gears, so I figure I need stepper motors? I've picked out these stepper motors and these I2C stepper motor controllors - do they seem up to the task? Overkill? Each of the gears will be holding a weight ~ 0.5kg, I shouldn't have any slipping as the stepper motors are rated to 8N cm.

Is this the right approach with the mbed? Thanks for your time!

09 Dec 2009

One thing to consider is what precision control you need in your project. Look at the step angle of the motors as well as how many microsteps your controller supports. I2C interface should be good to go.

What is the project?

09 Dec 2009

In brief, checking twitter for geotagged updates and then moving a magnifying glass over the appropriate place on a world map (or any map for that matter). Essentially it'll be a steampunk-esque real-world Google Latitude :P

Thanks for your tips about the stepper motor, the controllors aren't cheap, so I was a little hesitant about buying, its tricky to know what's right to get! While accuracy is obviously important, speed is not a particularly important issue so I can always alter gear ratios to get more accurate control over the position of the magnifying glass.

09 Dec 2009

Just a thought but why are you purchasing the stepper motor controller board? Why not use the standard L293D  ( http://www.maplin.co.uk/Module.aspx?ModuleNo=2940 ) and control the motors in software? Ok, you'll use up more pins from the mbed but you'll save yourself around EUR 60.00 (taking into account components needed instead).

 

09 Dec 2009

JP - sounds like a cool project. Would love to see a video when it's working

09 Dec 2009

I was wondering if there was a solution like that! It does seem like I much cheaper solution however I have some questions...

  1. I saw somewhere that the mbed has 4 counters, I guess these would be used to store the number of steps the stepper motor is currently at, how do I access them? Are they persistent across resets? or would I need to write to a file instead?
  2. How many outputs would one motor require for this? I have two stepper motors in my project and I also need to control the brightness of 4 lamps and have two digital outs, can I fit all of these on?
  3. The two stepper motors will be up to 2m apart, will I run into trouble if the cables to the stepper motors from the control circuitry is that long?

I'm sorry to ask so much when I'm sure the data sheet has all the answers, but I'm a little lost as to what I should be looking for!

09 Dec 2009

 

Alex Louden wrote:

JP - sounds like a cool project. Would love to see a video when it's working

Cheers! Don't worry it'll be fully documented - videos, code and all, but my design skills are even rustier than my electronics knowledge so it may be a few weeks before I have something physical to video! :P

 

09 Dec 2009 . Edited: 09 Dec 2009

Wait!

I've just checked your stepper motor and it's a six lead type, the L293D and your chosen I2C stepper motor controller board only controls the 4 lead types.

I think you'll find that the lead number represents the minimum possible angular rotation step i.e. 1.8deg or 7.5 deg etc..

You'll need to identify specifically what your stepper motor requirements are i.e. what is the minimum angle required? Then we can proceed in help you out.

To answer your remaining questions;

1) The number of pins required;

Assuming a 6 lead stepper motor.

4 Lamps (suggest using the PWM outputs (p21..p24) via transistor)

2 Digital outputs

+ 12 Discrete drives (MOSFET's) to stepper motor (6 per motor)

= 16 pins required, the mbed provided

Assuming a 4 lead stepper motor using L293D

Lamps and digital output as above + 8 Discrete drives (or two L293D) = 14 pins

Assuming a 4 lead stepper motor using Stepper Motor Control Board

Lamps and digitial output as above + 4 I2C pins (2 per board) = 10 pins.

2) The 2 metre distance shouldn't be a problem providing the stepper motor driving circuit can drive into the capacitance of the leads (which it should be able to do!)

 

 

09 Dec 2009

Thanks Chris - that's really helpful! Half the problem is I don't really know the design spec of the rest of the project yet! (In particular I aim to have chains attached to the magnifying glass going to the gears driven by the stepper motors, so the accuracy I need in degrees depends entirely on the size of the map I use and the radius of the cogs I will eventually buy - I sketched out my design a while ago, it might help clarify what I mean)

Lets say I'm okay with ~7.5º worth of accuracy - that's likely to be a 4 lead setup if I understand you correctly - how would I go about choosing a stepper motor from a company like RS? (I'm based in the UK so if you have a recommendation for another company that I can order from without import taxes/delays I'm all ears!)

Obviously I'd like to keep cost to a minimum, but I'd rather spend a little more and have a system too good for the task than one that underperforms (within reason :P).

So lets get some numbers out there, if the magnifying glass weighs in at half a kilo, with two ~quarter kilo counterweights on each side, I can guesstimate that the stepper motor driven gears will have to deal with a maximum mass of about 0.75kg at a radius of about 5cm (a guessed radius of the controlled gears). I'm thinking the stepper motors should be attached to these controlled gears by a worm gear to stop accidental damage.

This motor is one I've picked out (almost at random, I'm not sure what kind of torques I should prepare for) - its data sheet says it has a max holding torque of 100Ncm and a recommended working torque of 65Ncm - does this sound right? Overkill again? What does a 'Rated Current Per Phase' of 0.55A mean -- what kind of current draw should I prepare for?

I picked the one above for having a voltage within the mbed's accepted range, my A Level electronics is a bit rusty, am I commiting electronic suicide by planning on powering both the motors and the mbed from the same lines?

You've been such a help, I can't thank you enough for your time - its really good to see such a willing community here!

09 Dec 2009

That stepper's expensive, try here:

http://www.slidesandballscrews.com/sy42sth471684b-p-255.html?cPath=45_80&osCsid=d5f2722118433419e607c52f4f2a2c1f

For the driver, something like this may be better:

http://www.coolcomponents.co.uk/catalog/product_info.php?cPath=46&products_id=358 (link buttons are disabled and I'm not faffing about with HTML)

Ok this isn't I2C, but its a third of the price and higher current capacity.

 save yourself a few pennies for a beer! :)

09 Dec 2009

If my maths is correct 65Ncm working torque works out for a 5cm radius to 1.32kg. Which suggests a stepper motor with a working torque of 65Ncm should be able to control 0.75kg load.

Looking at your sketch, I don't see how the magnifying glass will pan across the map, assuming that's what it's meant to do! Have a look at XY plotter arrangements.

Rated current per phase means the current needed to drive the phase coil, therefore if you have two coil (phases) then 0.55A x 2 = 1.10 Amperes + 0.4A (mbed) = 1.5A

Always add a little extra for powering transitions @ 33% gives a total of 2.0 Amperes, at 5V means you're after a 10W system.

Generally it's advisable to keep the supplies to motors/analogue circuit well away from digital circuitry i.e. mbed. This is due to problems with ground bounce and inductive noises induced in the supply rails. If they had to share the same supply rail then make sure you place plenty of decoupling caps and perhaps LC components between the supply going to the motors and that going to the mbed.

Alternatively run the system of a 12V supply and generate (DCDC converters) separate supplies for each and bring the grounds for each to a star point.

Chris.

www.ideas2realisation.co.uk

 

 

09 Dec 2009

Chris,

One note, correct me if wrong, a four phase coil will have two phases active at once, a two phase coil will have one phase active at once, and thus the total current through the motor is rated current x active phases ?

09 Dec 2009

 

Andrew Harpin wrote:

That stepper's expensive, try here:

http://www.slidesandballscrews.com/sy42sth471684b-p-255.html?cPath=45_80&osCsid=d5f2722118433419e607c52f4f2a2c1f

For the driver, something like this may be better:

http://www.coolcomponents.co.uk/catalog/product_info.php?cPath=46&products_id=358 (link buttons are disabled and I'm not faffing about with HTML)

Ok this isn't I2C, but its a third of the price and higher current capacity.

save yourself a few pennies for a beer! :)

Will that driver be able to deal with a 2.8V stepper motor? That page says "and a motor supply voltage of (8 – 35 V)" - that combo does seem to be perfect though!

Hmmm beer…

09 Dec 2009

If you look at the datasheet, the torque curve is listed with 24v supply

Read here (search for voltage)

The key is current, basically you set the driver circuit to below the motors current rating (theres a pot on the board to do this)

10 Dec 2009

Well, the stepper motors are on their way, I'll everyone know how it pans out once I've had a play next week!

13 Dec 2009

So the stepper motors have arrived and I've just had enough time this weekend to solder the driver boards together (based on the a4983) but I have a few questions - if anyone is up for a bit of a crash course in stepper motors?

I've yet to find myself a power supply that can give me ~5V and 4A - Andrew, I think I've understood from your reference that I can use a 5V source with this driver board, provided I set the pot to the correct value - though I don't know how to find out what this right value is! Will a suitably powerful wall-wart do the trick? Given the regulators on the driver board do I need to add some DCDC converters to separate the digital electronics from my motors?

I'm a little nervous about hooking everything up, but its all begining to come together! Thanks everyone for your help so far!

14 Dec 2009

The driver board is not going to pull 4A. From the website given: The driver requires a logic supply voltage (3 – 5.5 V) to be connected across the VDD and GND pins and a motor supply voltage of (8 – 35 V) to be connected across VMOT and GND.

That means the motor power supply is not going to be 5V. The 5V rail is used to determine logic functions and states of the driver, but not acutally supplying power to the stepper motors, thats VMOT job.

Now the pot will control the max amperage that the driver will provide tot he motors. If the motor needs less, it will provide less. Set it as low as it can and turn it up till your motor works 100% of the time then turn it up a bit more for a transient fudge factor.

Determine how much power your motor will draw and you will know how much power you will need from a wallwart to VMOT.