Maker Pro
Maker Pro

Stepper motor control

seagull369

Nov 30, 2014
11
Joined
Nov 30, 2014
Messages
11
I need to control a stepper motor in a similar fashion to the one shown in this youtube vid.

In my case, the motor only needs to move in 3 positions (12 o'clock, 6 o'clock, 8 o'clock). 3 buttons would be used, each bringing the motor its respective location and then hold it there. In this project, the motor can't be traveling anywhere in the area between 8 and 12,

I don't have much experience in doing this sort of thing, so I was hoping some kind soul wouldn't mind help pointing me in the right direction. Although the video I posted didn't explain how it all worked, similar youtube videos used Arduinos.

Any ideas?
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
Appears to be controlled with μP of some kind.
This would probably the easiest for a custom set up, are you familiar with any of the Arduino Picmicro products etc?
Roman has a few steppers circuits here https://www.romanblack.com/
M.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
The principle is straightforward in that you know the distance travelled in one 'step' of the motor and that a single pulse makes the motor 'jump' that far therefore 'x' pulses get it to the specified position.

A circuit to produce the pulse string(s) to move it where it's required and the same number of pulses in the reverse direction to return it to the starting point.

There are dedicated stepper motor driver chips that have inputs such as 'step' and 'direction' and connect straight to a stepper motor. As @Minder states, a simple Ardunio circuit that counts and recalls the count (therefore position) would be required. It could be done with discrete logic but in a far more complicated manner.

Many Arduino tutorials exist that offer the learning experince with steppers but there's no getting away from the fact that you will need to get your hands on one and start to learn the basics of Arduino porgramming.
 

seagull369

Nov 30, 2014
11
Joined
Nov 30, 2014
Messages
11
are you familiar with any of the Arduino Picmicro products etc?

No, unfortunately I don't. Could you recommend one that might be appropriate for the project?

I don't mind starting from scratch on this, kellys. The idea has actually interested me ever since I took a Visual Basic class some years ago. I actually purchased a Basic Stamp at one point, but I guess since I never really had an actual need for it, I never got around to playing with it. .

Would you know of a good place to start to learning about Arduino and the programming?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Ardunio's own website isn't too bad a place to start:

https://www.arduino.cc/

and you'll need to go there to download the IDE (programming environment) anyway. Arduino uses a lot of 'libraries' - code packages for specific purposes - and one such library (or 'sketch' as they are known) is written specifically for controlling stepper motors:

https://www.arduino.cc/en/Reference/Stepper

Have a look for yourself and explore the very good tutorials associated with them.
 

Irv

Jun 7, 2017
112
Joined
Jun 7, 2017
Messages
112
This would make an interesting series of engineering assignments. After the solutions using stepper motors are presented, next week we'll do the same without steppers - 1930's style. The week after that, without electricity, steampunk style.

Back on topic, have you considered how you are going to know how many steps and which direction to move the pointer after the power has been cut off and later restored?
 

seagull369

Nov 30, 2014
11
Joined
Nov 30, 2014
Messages
11
have you considered how you are going to know how many steps and which direction to move the pointer after the power has been cut off and later restored?

That's a very good point. I suppose once the power is off, the Arduino wouldn't remember where the motor's position is once power is restored,

I should probably explain what my end goal here is. This project is for my truck, specifically to engage/disengage the 4wd system. The positions fn the clock mentioned earlier represent the 2wd, 4wd high and 4wd low positions of a shaft on the transfer case. 12 is 2wd, 6 is 4wd high and 8 is 4wd low range. The current setup isn't working and is notorious for being problematic, so that's why I wanted to replace it.

Instead of going the Arduino route, I've been thinking about possibly using something simpler like this instead and was curious what you guys thought of it. It's a blend door actuator (motor) which is controlled by the rotary temperature knob (which apparently is a potentiometer) on the dash. When you move the temp knob from, say, hot to cold, The motor mirrors that movement and moves a door its connected to to let cold air in. In the old days, a simple push/pull cable was used to accomplish this. This actuator is supposed to be able to hold its position even after power to it is shut off then turned on again.

Anyway, instead of using push buttons, as I suggested earlier, I guess I could just use a rotary pot to change positions. I could just put some marks on the dash to know how far to turn. The only concern I have with this is idea that the actuator wont have enough twisting force to move the shaft on the t-case. The shaft doesn't require much effort to move, but it's more than the heater door. The gears inside the actuator are only light plastic.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
I suppose once the power is off, the Arduino wouldn't remember where the motor's position is once power is restored,
Quoted from the Arduino site:

"The microcontroller on the Arduino and Genuino AVR based board has EEPROM: memory whose values are kept when the board is turned off (like a tiny hard drive). This library enables you to read and write those bytes."

But for a simple positional control actuator controlled by a potentiomenter then a simple servo actuator will do.
 

Irv

Jun 7, 2017
112
Joined
Jun 7, 2017
Messages
112
Yes a heavy duty servo would work. He asked about steppers, however, which do not "remember" where they are, and have no concept of a zero or reset position. Your servo idea is more suitable, now that the problem has been explained.
 

seagull369

Nov 30, 2014
11
Joined
Nov 30, 2014
Messages
11
If the blend door actuator proves not beefy enough to turn the shaft, where might I find a servo motor that has some decent turning force? The ones I've been finding appear pretty light duty, more suitable for small r/c cars.

If I ever need to use it in the future, it's good to know the Arduino 'remembers' things even when the power goes off

My apologies for the late reply. I didn't notice there were new comments since posting my last message until now.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
You need to search using 'high torque servo' to get the right one.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
If the blend door actuator proves not beefy enough to turn the shaft, where might I find a servo motor that has some decent turning force? The ones I've been finding appear pretty light duty, more suitable for small r/c cars.

.

A prime decision on selecting a motion controller or servo, is generally based on the final rpm or positioning rate required, if relatively very slow positioning is required, some system of gearing is used in order to economically size a motor and drive, IOW, It is Pointless to select a powerful motor and drive to run direct drive when just a few rpm is required.
Gearing obviously economically allows a very small motor to achieve the desired function at a much lower price and size.
A door actuator hardly requires very fast operation!
M..
 

seagull369

Nov 30, 2014
11
Joined
Nov 30, 2014
Messages
11
I'll give the "high torque" one a try. I searched 'heavy duty' last time, but most every servo listing, it seemed, claimed to be that.

The speed isnt really an issue for this application and, you're right, the door actuator is pretty darn slow. Only problem is uses plastic gears internally, so it may not be the best option.

Thank you all for the great help.
 

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
You can get high torque modeller's servos with metal gears. Measure the force you need to move the shaft, Specify the rate at which you need the shaft to move and the distance involved.
 
Top