You need to.keep a var with the old output state just before you turned them off. Then restore that before moving. On Apr 28, 2013 10:50 AM, "Bernie" <berniemcintosh@yahoo.es> wrote: > Hi, > > I have implemented a project using an ATMega328 to drive a stepper motor. > Once the motor has reached the position required, I don't need it to move > any more for say, 10 minutes at a time. > > The motor is taking current 100% of the time of course. > > I'd like to turn the power to the motor off, then the next time I need to > move the load, start it up again without having lost the position > information. Holding torque is not a concern. > > I've tried this using the simple means of bringing the four outputs from > the AVR low. When it comes to step the motor again, the first few pulses do > not have any effect on the motor, so I lose steps and now don't know where > the motor is - necessitating a reset cycle to bring it back to a limit > switch. > > On making that first step after its been switch off, I've tried every > possible beginning step sequence but can't get the right result. > > I'm coming to the conslusion that it can't be done. If you want to keep > position intact, then don't turn off the outputs. If you do turn off the > outputs you have to find its position again by sending it off to the limit > switch. > > There may be other approaches by using more sophisticated hardware but at > the moment the question relates to using this simple means of control as it > has the lowest component costs. > > I'd be grateful if anyone here could comment. Apologies if its more a > stepper question than an AVR question but I'm thinking that its relevant to > many AVR users. > > Regards > > Bernie McIntosh > > > > > > > > > ------------------------------------ > > Yahoo! Groups Links > > > > [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] Stepper / AVR Project
2013-04-28 by David VanHorn
Attachments
- No local attachments were found for this message.