Go | New | Find | Notify | Tools | Reply |
Member |
Good evening, all. I've been handed a project that involves a small stepper motor (probably a NEMA 23, bipolar) and a "cradle," for lack of a better description. The motor's job will be to rock this cradle, so to speak, smoothly between +30° and -30° at some stated rate (degrees per second, I guess? steps per second?), for some period each day. The rate and the time period may end up being variable. In order to keep the end user from having to reprogram for the variables, I think the rate could be controlled by a potentiometer (analog input), and the time could be set using a timer such as Automation Direct's MS4SM series. Basic example: * Start at "position zero" * rotate at one degree/step per second to +30°. * pause for 1 second * rotate back to zero and then to -30°. * pause for 1 second * rotate back to zero * repeat for 30 minutes, ending at position zero. I have a stepper driver on order, but prior to it getting here I have wondered if I can run this using an Arduino. I have an Arduino on hand, and at least one Seeed Studios motor shield. I have a stepper on hand. I have a power supply. What I don't have is experience programming Arduino or using steppers. Anyone here used an Arduino with a stepper before? Can you help me? Thank you very much. God bless America. | ||
|
Shaman |
You'll need an encoder somewhere. He who fights with monsters might take care lest he thereby become a monster. | |||
|
The success of a solution usually depends upon your point of view |
Is this an existing design you are trying to automate or is it something new you are designing? How is the motor's output applied to the cradle and what weight are you dealing with in the cradle and the cradle's contents? SC is correct that you will need an encoder to do it the way you stated it unless you go with a bunch of sensors instead and then you'll need a PLC to run it. “We truly live in a wondrous age of stupid.” - 83v45magna "I think it's important that people understand free speech doesn't mean free from consequences societally or politically or culturally." -Pranjit Kalita, founder and CIO of Birkoa Capital Management | |||
|
Member |
Arduino's & NEMA stepper motors power most 3D printers. There's a ton of code samples, hell, if you bought a $10 chinese RAMPS, you could probably load 3D printer firmware & just do it in gcode (steps/mm converted to steps per degree) How accurate do you need the 30*? endstops or just commanding the motor to move X steps would negate the need & complexity of an encoder. | |||
|
Member |
Spinzone: The design exists, I just have to duplicate it. Thing is, I can't get my hands on an original, so duplicating is much more difficult to do. The output shaft will go directly to the cradle's pivot point, sort of a "direct drive" mechanism. I don't have a weight calculation yet, for two reasons: 1) my client hasn't given me the parts that go in the cradle yet, and 2) as a result, I still need to design the cradle. As a wild guess, I don't believe it will weigh even 5 pounds. Snidera: I'm hoping the simplicity you imply is available. If the 30° accuracy isn't terribly precise then with a 200-pulse stepper I think I could simply give it 17 pulses in each direction. (360/200 = 1.8 --> 30/1.8 = ~17) I'm beginning to wonder now how smoothly I can make it travel, though. I don't need for those pulses to be "jumpy."This message has been edited. Last edited by: vthoky, God bless America. | |||
|
Legalize the Constitution |
Probably not [laughing out loud] _______________________________________________________ despite them | |||
|
Cold Ass Honkey |
If the 'steps' were reliably repeatable in degrees of rotation per pulse you could use a timer that was capable of resetting itself (possibly one with two dials, or knobs, for setting ON time and OFF time) then use a counter to keep track of the number of pulses (degrees of rotation) until it counts out, resets itself, and changes direction. This would allow adjustments to be made with a minimum of training. However, if it tends to gain (or lose) counts at end-of-travel, then you will need to add switches or the aforementioned encoder. ' ------------------------------ Never fully gruntled. | |||
|
Powered by Social Strata |
Please Wait. Your request is being processed... |