Good & bad Arduino info - Stepper Motors

Graphics Cards, Sound Cards, Joysticks, Computers, etc. Ask or advise here!

Good & bad Arduino info - Stepper Motors

Postby OldAirmail » Wed Aug 31, 2016 11:01 pm

I know that some are following my learning process. Hopefully some of you are in the process of learning too.


I can not emphasize enough how important it is to actually try out the various projects, no matter how small or simple they may seem. Even if you do it wrong, you're learning. And problem solving is a very important skill.

It's not enough to watch a YouTube video, or read the steps to a project. If you stop and say "that makes sense" then you'll actually learn very little.


Take Stepper Motors. - One good solution, one not so good solution.

Most of the books and videos show this way of connecting it all up.

Image

The Arduino board is on the right, all of the stuff on the left is just an illustration. It really looks like this -

Image



The important point is that after following the instructions from an online source, the motor did more buzzing than turning.

OBVIOUSLY I had gotten a bad motor. :evil:



But what else might be the problem?

The problem was that it was pulling 5 volts from the Arduino board, through the USB cable, but it just didn't have enough current to move the motor very much.

Once I figured that out I used a separate "power supply" that came with one of my kits.

Image . . Image

Much better. But, boy, do those motors suck the power out of the batteries!


OK....dig..dig.digdig - Found it! a wall wart to power the motor.

But how to wire it in? :think:

Not a problem, I connected it directly to the plus & negative on the motor controller board. Now the motor had more than enough power to work correctly. But it didn't. Work correctly, that is.

Oh, it did work better than just the 9 volt battery, but not very well.



It's gotta be the program! Right? :shifty:

So off I went to the internet, searching for a better program.

And I got lucky. Very lucky as it turns out. I found this video. It may contain more details than most want to know, but as I said - problem solving is an important skill.

[youtube]http://www.youtube.com/watch?v=B86nqDRskVU[/youtube]

Watch the video in it's entirety if you want, or just pay VERY close attention to this picture from the video. And I mean VERY close attention. Build it until you have it right. This IS the solution.

Image

I know that I get very long winded and can pound a subject to death, Sorry.



Remember when I said that I thought that a better program might be needed?

Well this video shows someone who thought the same thing. He even gets some improvement by changing the code.

He also figured that a part of the problem was that the motor was very cheap. Wrong. Inexpensive, yes. But not cheaply made.

[youtube]http://www.youtube.com/watch?v=I8XsE6Bb99s[/youtube]


All I know for sure is that if you connect a separate power supply to the controller board, and connect it to the ground on the Arduino board it WILL work perfectly.

But if I had only looked at the sample project, and not actually tried it, I would never have learned what I needed to know.

Before long I'd just say "This STUPID stuff don't work!", and give up.
.. .
Get the most out of your controls - SPAD.neXt

Image
. . . . . .Any time, any plane, any weather.
. . . . . . . . . . . . . Prepar3d V4
User avatar
OldAirmail
Major
Major
 
Posts: 4814
Joined: Sun Feb 17, 2013 3:06 pm
Location: Concrete, WA ICAO - 3W5

Re: Good & bad Arduino info - Stepper Motors

Postby Sinkrate » Thu Sep 01, 2016 2:57 am

Great work OAM; keep it coming. :D
User avatar
Sinkrate
1st Lieutenant
1st Lieutenant
 
Posts: 400
Joined: Wed Jul 29, 2015 4:08 am
Location: UK

Re: Good & bad Arduino info - Stepper Motors

Postby Sprocket » Fri Sep 02, 2016 12:05 pm

OldAirmail wrote:I know that some are following my learning process. Hopefully some of you are in the process of learning too..


Hi OAM, If I may chip in here.
True, it is a learning curve, but when it comes to stepper motors, please allow me to put you on a totally different path.

The examples that you have been playing and experimenting with are all good and well, but have many shortcomings.

1. Resolution: Not all steppers are the same, they have different current requirements, different holding torque etc, and different step angles.
The step angle is very important , for it sets the smallest resolution that you can obtain from your stepper.

Most steppers are rated at 200 steps/revolution. That is a step angle of 1.8 degrees. No good for making a compass for example. (Full step)

NOW..stepper motors can be made to do smaller steps, and this is done by electronic phasing by manipulating the holding currents within each of the stepper coils.
For this you need a dedicated stepper driver board.

A good driver board will offer you the ability to "select" a range of step angles, normally 1/2 step, 1/4 step, 1/6th step etc.

(You may be surprised if I told you that in most applications, full step is to be avoided. It is low resolution, it is noisy and not smooth.)

May I suggest you look at this stepper driver, widely used by the Arduino community:
https://www.pololu.com/product/1182

I have a couple of these, they are very nifty, can do "microstepping - 1/2, 1/4, 1/8th and 1/16th" and can deliver a whopping 1A . But they are mainly suited for "Bipolar" type of steppers, ie 4 wires.

Now you need to look for Arduino sketches specific for stepper boards, which outputs the required steps and directions. Everything else is taken care of by the stepper driver board.

2. Current/voltage: The current load and voltage need to be taken way from the Arduino, and taken care of by the stepper board. It is never a good idea to drive a stepper directly off the Arduino outputs. (The ULN 2003 helps I know, but you are still stuck in full step mode.)
It is common practise with steppers to run at somewhat higher voltage ratings. (With steppers, Voltage is much more important than Amps. Higher voltages allows for faster operating speed. All within reason though).

A good source for small stepper motors? Salvage them out of old inkjet printers and/or flatbed scanners.

Jan
User avatar
Sprocket
1st Lieutenant
1st Lieutenant
 
Posts: 309
Joined: Wed Oct 30, 2013 12:10 pm

Re: Good & bad Arduino info - Stepper Motors

Postby OldAirmail » Fri Sep 02, 2016 11:40 pm

Thanks, Jan. It all helps.


As to the "learning curve", I don't mind. I feel more like a kid in a candy store - I can't get to all of the candy fast enough. :D

Sadly, work and life keep me from "playing" as much as I want to.


So I learn a little bit, and then get diverted in one direction, only to get diverted again in different direction later.

But I learn a some here, and a bit more there, but never in a linear way. It's all fun. And over time it adds to my total knowledge.


If you have a recommendation for a stepper motor that could work well enough to make a "wet" compass, I'd appreciate the help. Although I'm nowhere near that stage yet.

I'd like something like this above my center monitor.

[youtube]http://www.youtube.com/watch?v=UzukCwwCTXw[/youtube]


BTW - At the moment I'm torn between developing a monitoring system for electronic locks, and building a water fountain amusement for a cat. :lol:

There's just so much that's possible with these boards, it's incredible.
.. .
Get the most out of your controls - SPAD.neXt

Image
. . . . . .Any time, any plane, any weather.
. . . . . . . . . . . . . Prepar3d V4
User avatar
OldAirmail
Major
Major
 
Posts: 4814
Joined: Sun Feb 17, 2013 3:06 pm
Location: Concrete, WA ICAO - 3W5

Re: Good & bad Arduino info - Stepper Motors

Postby zeus981 » Sun Nov 13, 2016 5:11 pm

OldAirmail wrote:It's not enough to watch a YouTube video
-from 31 Aug
I am of the generation well before mobiles and other portable screens beaming photons into our brain all day long.
Anyways my point is, I am of the generation that did not think it abnormal as a teenager to go down to the local hobby store and buy a DIY electronics project and try to make something that was not just a toy and actually worked.
Why not use wisdom acquired and buy one for a teenage grand kid and if it works buy it off them .. (but dont let them fleece you)..and they might actually use the cash to go buy another project.
zeus981
Ground hog
Ground hog
 
Posts: 26
Joined: Sat Sep 26, 2015 4:19 am
Location: Geelong, Vic., Aust.


Return to Hardware

Who is online

Users browsing this forum: No registered users and 192 guests