I am trying to set up a code to be able to maintain an input rpm while I vary a voltage supply from 0-12v. I am using an L293D motor controller chip and a Pololu 2823 motor and an arduino micro. Any advice would be great THANKS!
Any advice would be great
Do NOT input 12V into the Arduino.
How do you expect to maintain a constant RPM when you supply 0V? Unless the constant is 0.
You need to try again to explain what you are doing. Schematics are in order. Post your code!
The L293D is extremely inefficient and won't work at all when the supply voltage is below 4.5V.
To control RPM you have to have some way to measure it. What is your plan?
Perhaps you can explain what you mean by "input rpm"? Motors produce rpm output not input.
But what it sounds like you want to do is impossible. No DC motor can maintain a fixed rpm with input voltage varying from 0 to 12V.
Steve
The L293D has an absolute max rating of 2Amp (<=600mA continious).
The 2823 motor has a stall (startup) current of 5Amp.
See the problem?
A slightly bigger brother of the L293D is the L298.
Two channels of that chip in parallel would just be able to handle that stall current...
But it's equally inefficient as the L293D ('looses' ~3volt and gets hot).
Wise to get a modern mosfet based motor driver that can handle the 5Amp for that motor.
Unless you only want to spin the motor in one direction.
Then a simple mosfet could be enough.
What is your project.
Leo..
HI, sorry for the confusion. Basically i have the L293D wires based on its schematic. I have it going to pwm pin 5 on my arduino micro. I have the Pololu 2823 motor encoder to 5v. And I have Vss on the L293d to my varying voltage. i realize that realistically this only varies between about 5 -10v, so as i change that voltage I wan the motor to adjust and maintain and rpm that i tell it to. Right now i just have it hardwired and i have a code that its displaying the rpms i have on the serial monitor...these vary depending on voltage, I want it to stay constant(ish)
Running that motor on an L293 you will surely burn out the L293, as it cannot handle the stall current. So, first, you need an H-bridge with a much higher current rating. Second, to control that motor without cooking it, you MUST have a means of monitoring and limiting current. That means using a motor driver that gives you a current feedback signal. Those motors will go up in smoke after a VERY short time at max current. Ask me how I know...
The only way you can reasonably achieve anything close to constant RPM is to use a PID controller to regulate the speed. Even then there will be a significant minimum voltage required to achieve ANY rotation, much less your target speed. The motor will not even begin to turn until it sees something on the order of 3-5V, as both the motor and gearbox have considerable internal friction.
Regards,
Ray L.
ggillcrist:
And I have Vss on the L293d to my varying voltage. i realize that realistically this only varies between about 5 -10v, so as i change that voltage I wan the motor to adjust and maintain and rpm that i tell it to.
Do you mean that the voltage that is being used to power the motor varies from 5v to 10v and you want the motor to maintain a constant RPM?
That is a very strange requirement. Why is the voltage changing?
...R
RayLivingston:
So, first, you need an H-bridge with a much higher current rating.
OP did not say the motor has to go forwards/reverse.
An H-bridge might not be needed.
Leo..