OK, new to all things Arduino and I am going to start working on a project that requires a programmable motor controller for a 12v motor that I will use to wind in an outdoor rug.
I need the controller to have current sensing and be able to command the motor to reverse for xx rotation(s) when a certain level is reached. The motor I have is equipped with a Hall Sensor as well.
What should I be looking at acquiring as far as hardware to start this project? I am not a programmer by any means but am familiar with it enough to begin learning on here. Ideally I would have a rugged motor controller that can be enclosed in a weather proof case or something similar. I know I am leaving out details that you might have but this is me getting started!
That's not the correct way to stop and reverse a motor, nor would it be easy to implement. You need to use limit swtches, either optical or mechanical.
Thanks, Jim-p! My intent is that the motor would stop if an overcurrent situation was detected and then would reverse for 1/2 a rotation. The reason why an overcurrent situation may happen is if the rug were to get caught on something or, say if somebody was standing on the rug it would cause the motor to draw an increased current level so I would then like it to sense this and stop, and then reverse for a half of a rotation to remove any tension on the rug. I am guessing that I could program the controller to detect this and then react?
The problem is that the motor will also draw the stall current when it starts, so the only way to detect a stuck rug is to let the motor burn for a while in order to distinguish it from a start condition.
Ah, I see. Makes perfect sense! This is why I am here... :-) Already learning. So I would have to allow for the stall current at startup and then determine the nominal as well. So, how would you recommend going about this?
You already have enough components to begin writing programs to learn. Your motor has a rotation sensor. Learn how to detect motor rotation when you turn to motor by hand. Somewhere along, learn how to determine a 1/2 rotation. Don't get to far into the project before learning to use what you have.
So, if you have a sensor, which reads the current, plot some curves for different scenarios. What curve do you get in normal start? Probably a short peak for the initial stall current, then it goes down to normal current. What curve do you get when a person stands on the rug? Steeper raise, then it stays high? Create a program flow chart, where you figure out the logics. Measure conditions, make decisions.
Right now it is a 50 RPM direct drive to the roller shaft but I plan to reduce it down to a 2:1 ratio and will further determine the best speed for each instance
To avoid that potential then would I first need to determine the stall current draw and back off from that a bit for my initial setting where I would have the motor stop at a max current draw which is lower than the stall current?
Remember! You are always doing things with your program after that fact. Once you measure a current, that is always the value that happened an instant in the past.