PDA

View Full Version : 16F870A, ULN2803, Stepper motor = very low torque, any problems with code?



CuriousOne
- 18th June 2015, 15:44
Hello.

I'm using this schematic for connection:

https://graigroup.files.wordpress.com/2008/04/uln2803.jpg

And code from here:

http://cornerstonerobotics.org/code/16F877A_step_mot_hi_torque.pbp

It works, by reversing the code direction, I can reverse motor rotation, but, the torque is very weak, even if I adjust the DELAY variable, it can be easily stopped with one finger, much more weaker than standard servos for example. The motor is NEMA17 stepper, which should not be so weak. Power voltage is as required. So I guess there are some problems with code?

HenrikOlsson
- 18th June 2015, 18:14
Hi,
A unipolar step motor with a 12V winding running on a 12V supply won't give you much torque.
Usually, with steppers, you want to use a voltage much much higher than the windings rated voltage and then actively limit the current to the windings rated current. Decades ago when unipolar motors was "common" it was usually done by inserting BIG power resistors in series with the winding. Today it's done by sensing and regulating - much more effective.

I think you'll see that the torque is much higher when the motor is stationary compared to when it's turning. A motor with a high inductance winding may have an impressive holding torque for a given current but the running torque falls off much more rapidly compared to motor with a lower inductance/higher current winding. The cure for it is more voltage, much more voltage,

Do you have any data on the motor?

/Henrik.

Demon
- 18th June 2015, 22:27
This was my GoTo reference for steppers:

https://groups.yahoo.com/neo/groups/DIY-CNC/info

Robert

CuriousOne
- 19th June 2015, 06:01
Yes, motor is rated 12VDC, 0.17A each coil current.

I also tried 28BYJ-48, cheaper and weaker 5VDC stepper from ebay. Surprisingly, they perform equally bad!
I've double checked circuit - everything is ok. Any more ideas?

CuriousOne
- 19th June 2015, 06:03
Forgot to mention, even at rated voltage, motor gets noticeably warm, even when rotating without load.

HenrikOlsson
- 19th June 2015, 07:10
Again, a motor driven with such a rudimentary drive method will have terrible performance!

As a test, take your 5V motor, use it with the ULN28xx system but use 24V as the supply voltage. I Googled the model number and found a figure of 60ohm phase resistance which would equal a current of 83mA. With a 24V supply you need to insert a 200ohm >2W resistor in each of the four wires going to the ULN chip.

If you don't have any power resistors at hand just take a bunch of ordinary 1/4W and parallel (or series) them up. 10 2k 1/4W resistors in parallell will be 200ohm 2.5W for example.

For reference, my bipolar NEMA34 motors are rated at something like 2.7V, 4.5A. I'm running those with bipolar drives from a 65V supply. Had I used a 2.7V supply their torque would fall off so fast they'd be unusable.

The motor will get warm, with or without a load - that's just how they work. A DC motor for example, running unloaded, will only PULL as much current as is needed to overcome the friction losses of the bearings and brushes etc. With a step motor you are PUSHING the motors rated current into the winding(s) (or at least you're trying to) no matter what the actual load on the motor is.

Look at Roberts link or Google Jones on stepping motor (or something like that).

/Henrik.

Ioannis
- 19th June 2015, 09:31
Although the idea of current limiting with a chopper is more appropriate in a bipolar motor, the PIC16HV616 has a comparator that can be used to measure the current of the coils through a small value resistor.

Also chips like L297/298 are designed to do just that.

Ioannis

CuriousOne
- 19th June 2015, 10:36
Applied 24V

It get a bit powerful, but still something is not OK. Motor is said to have 200 steps per rotation, but I can see with naked eye how it moves with larger steps.

I have L298 too, is this schematic correct?

http://forums.parallax.com/attachment.php?attachmentid=109674&d=1405729108

I mean, will it work with above code?

Ioannis
- 19th June 2015, 11:00
No it won't. That is for two simple motors.

Search for the L297/L298 pair and see how it is done.

https://www.google.co.uk/search?q=l297&biw=1435&bih=918&tbm=isch&imgil=rNiTt0urj0L6hM%253A%253BEkIWQI8EGHWScM%253Bh ttp%25253A%25252F%25252Fprobyte.fi%25252Foscom%252 52Fproduct_info.php%25253Fproducts_id%2525253D645% 25252526language%2525253Den&source=iu&pf=m&fir=rNiTt0urj0L6hM%253A%252CEkIWQI8EGHWScM%252C_&usg=__Bh8K3NWQUDbk-HCbR2Pir3Oo2DU%3D&ved=0CDkQyjc&ei=uOeDVbrtLcv2UveHgIgD#imgrc=rNiTt0urj0L6hM%253A% 3BEkIWQI8EGHWScM%3Bhttp%253A%252F%252Fwww.probyte. fi%252Fimages%252FL298_L297.jpg%3Bhttp%253A%252F%2 52Fprobyte.fi%252Foscom%252Fproduct_info.php%253Fp roducts_id%253D645%2526language%253Den%3B916%3B515&usg=__Bh8K3NWQUDbk-HCbR2Pir3Oo2DU%3D

Ioannis

elcrcp
- 20th June 2015, 11:46
You won't need L297 since you already controlling it with PIC. L298 is enough. Check this link: http://www.hoelscher-hi.de/hendrik/light/stepper/bistp.gif
But remember , control commands probably will change from your first one. Recheck it.