-1

I have a project involving stepper motors, in which I want to manage electronic equipment. What I'd like is a system allowing me to run the stepper motor continuously forward as long as I step on a floor pedal. I'd like to control the rotation speed with a variable pot if possible.

Next, I'd like the motor to automatically reverse once I release the foot pedal. I'd like to control the reverse rotation speed with a variable pot if possible, and to control how long the motor runs in reverse before stopping. That time may range from 1 ms to 10 sec. If possible, I would love to use pushwheel switches to control the reversing time.

  • 3
    I wish you luck in your endeavours. However, I fail to see a question here regarding a problem you are having with an Arduino. If you are wanting to know if it can be done, yes it can. Can it be done with an Arduino? Yes it can. Will we do it for you? No, we won't. – Majenko Nov 19 '15 at 10:36
  • Are you looking for suggestions on how to get started or warnings of obvious pitfalls? – dlu Nov 19 '15 at 21:47
  • This is a very trivial control project to implement once you understand from any of the tutorials what stepper motor signals look like. The greater challenge is coming up with a suitable chopping current driver circuit to delivery the necessary power. – Chris Stratton Nov 21 '15 at 2:49
0

I might suggest looking at 3D printing firmware such as Repetier and Marlin, and the Arduino Playground for smaller projects such as simple stepper control, reading and debouncing switches, and digital rotary and Analog pots. I bought a cheap (wired USB) PS3 controller to get some ideas. It has a wide variety of input options. And the local hardware store comes in handy along the way.

I'd also recommend moving up from the Arduino native IDE to something like the free version of Microsoft Visual Studio with the Visual Micro add-in for Arduino. This will give you breakpoints, variable access, and handy formatting enhancements.

Getting to where you want will take a while, but the end result will be lots of learning, and an end project that does exactly what you want, which no one else sells or even has.

  • Have to disagree with most of that. The applicable part of 3d printer technology is the power driver modules, but the control scheme will be very different. And there's no need to mess with visual studio - this is a very straightforward software project for which serial output debugging should be entirely sufficient, and a good exercise in building critical thinking skills. – Chris Stratton Nov 21 '15 at 2:51
  • @Chris Stratton -- No problem. If 35 years of engineering has taught me anything, it's that there is NEVER only one good answer to a tech question. Getting a RAMPS board set to work with Arduino is a significant part. I personally thought that the software / firmware / configuration schemes required for the Repetier firmware to work with multiple sets of hardware and host software possibilities was a fascinating study of interlocking #defines as well. Lastly, if the native Arduino environment has the capabilities I outlined above, I haven't found them yet. – Lou Geezer Nov 21 '15 at 3:59
  • 1
    Seems like you might be making the problem a bit harder than it needs to be - the poster is trying to run one motor and read one potentiometer and a switch. They don't need a whole printer electronics and multi-axis G code interpreter to do that - just about any MCU board, including an Uno and a single stepper driver should do it. One digital input, one analog input, and depending on the driver chosen two to four digital outputs. That said, it could be worth putting some thought into ramp up and down of the motor speed if the load is non-trivial... but this can be done by counting. – Chris Stratton Nov 21 '15 at 5:17
0

As most others mentioned there isn't much of a question here but I would like to hopefully be able to point you in the right direction if possible.

First off, the continuous running of the stepper motor, as long as your foot is depressing the pedal, can be done relatively simply. For example, a quick if-statement, could quickly allow you to tell the Arduino, if the switch is closed (foot is pressing the pedal), run the stepper motor at whatever speed you desire. As for controlling with the potentiometer, there are plenty of tutorials online of how to control them with potentiometers, such as this one, https://www.youtube.com/watch?v=RakXequOrSY, which uses a NEMA motor.

Secondly, as for the, "returning to position" qualm, I highly reccomend looking into the accelstepper.h library. There you could potentially use a function such as set stepper.setCurrentPosition() and put a 0 between the () to tell it to return to the home position once you release your foot (add this into your if-statment if you choose to go that route. This same library could also be quite useful for the initial running of the motor, maybe using a function such as stepper.runToNewPosition(), among many other possibilities.

Lastly, as for the pushwheels, I do not have much experience using those so maybe someone else could help you on that front. Hope this helped a bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.