I am considering controlling the position of a A/C motor with a Photo Interrupter and Encoder Disc mounted to the back side of the motor. Is their any reason why this shouldn't work? Any how to's on similar projects would be great.
There must be at least 100 things you have not told us.
Yes you can use a rotary encoder to identify the movement of a motor shaft. But do you need absolute or relative positioning? (Absolute is more expensive).
How fast will the motor be rotating? Reading a rotary encoder can use up a lot of Arduino CPU cycles.
Do you want to be able to stop the motor at a particular position? That is far beyond my knowledge.
...R
1500 rpm motor
It will be programed to stop a certain spots yes.
All positions would be relative to a starting point. It would be told it is at the starting point by a switch, position restarting at 0 every time the switch is triggered.
The only problem in my mind is that the Optical encoder is going to have to be on 24 hours a day 7 days a week. It needs to know it the motor is bumped even a little bit to keep track of the position.
Right now I have a working system with an Arduino but using a mechanical switch at each position that it needs to stop. My fear is that if a switch fails or it fails to read the switch trigger. The motor will keep going until it hit a physical point that it jambs and can't go any further. Their is no way to tell it to stop when it hits that point, it will just go until something burns up. One faulty switch can cause a big problem.
I find it hard to visualize your system. How can a motor stop instantly from 1500 RPM when it triggers a switch?
Perhaps you can post a diagram of the system. It would also be helpful if you post your existing Arduino code. And please use the code button </>
so your code looks like this
and is easy to copy to a text editor
No matter what system you use there will be a possibility of failure resulting in a crash. If that is a serious problem you should install a separate system to deal with it - perhaps a limit switch that just disconnects all power to the motor.
...R
Maybe a separate system would be better. Actually the optic encoder could be used just to see if the motor is spinning. If it gets to the end of its travel and jambs up it would sense no RPM's and shut the motor down. The motor is actually a gear motor that has a final drive of 14 rpms, so it does stop pretty instant when you cut the power.
What kind of ac motor? It matters.
Hi,
Can you tell us the application that all this is operating for.
I have;
- AC (alternating current not A/C aircon motor) 1500rpm motor.
- It has a gearbox connected to it 14rpm.
- I want to put an encoder on the GEARBOX output shaft to program stopping points for the output shaft.
- I currently have a working system with switches at the stopping points.
- I want t use an encoder as it might be more reliable than the switch arrangement, should a switch fail.
I think that is what you wanted to say.
Tom.... ![]()
mopar_mudder:
If it gets to the end of its travel and jambs up
You should not be relying on a microprocessor to solve that problem. You need a BIG RED SWITCH.
...R
Robin2:
You should not be relying on a microprocessor to solve that problem. You need a BIG RED SWITCH....R
I Like you way of thinking !! I do have an over ride button that cuts all the power, problem is that if something were to go wrong when no one is around stuff could happen. It should blow the fuse feeding the motor if all works as it should.
mopar_mudder:
It should blow the fuse feeding the motor if all works as it should.
You need to know that it will blow the fuse.
I meant a BIG RED SWITCH that is pushed by the motor in a crash situation. But a proven working fuse would be a satisfactory alternative.
And if there is a safety fuse why do you need the Arduino to deal with the problem?
...R
The Arduino is controlling the positioning of it now, and doing a wonderful job.
mopar_mudder:
The Arduino is controlling the positioning of it now, and doing a wonderful job.
That does not seem to make sense as a response to Reply #9
...R