Hi everyone,
I am working on a project and I am basically stumped.
I'm trying to design and program my UNO to operate two motors at the same time. They only need to spin in one direction but they needs to spin at a rate related to one another. For instant; if DC PWM motor A is at 90% speed, motor B needs to be at 10%. If A is at 30% B needs to be at 70%.
The trouble i'm having is finding a way to program this so I can control the rates of the motors with hardware. I would like to have the whole system be able to turn on and have a button or sensor that tells the motors to turn on in tandem. Then when the button or sensor is turned off the motors stop. Also I am wanting to figure out how to control their relative speeds with out reprogramming every time.
Ideally I would like to be able to click through options on an LCD screen changing the speeds of the motor A, while B's speed would equal 100%-A's%. So either buttons that can click through 0-100% or a dial/toggle switch to control the speed of the motors while running.
That's basically it, I'm trying to learn each component individually right now in the hopes of tying it all together in the end, but it's been such a slow process trying to self teach myself this right now. Therefore I've decided to reach out to the community for help.
Any advice is welcome.
Thank you for your help.
Hi,
Welcome to the forum.
What is the application?
If all that is needed is 30- 70 20- 80 relationship then
PWM MOTOR1 = 100 - PWM MOTOR2
Do you have you written any code to try and control the motors?
Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html
What size are the motors and how are you controlling the current through them.
We need more info on what controls you need and the motors, but mainly what is the overall application.
Thanks.. Tom..
I'm trying to control two peristaltic pumps, and control the ratio of fluids they can pump based on motor speed.
I'm planning on using two pumps that are powered by DC 12 v motors.
As far as writing any code, not any that is useful. I'm still trying to get one motor to work first...
For controls, it is still up in the air. I would like to be able to scroll through options on an LCD screen. So I figure buttons to click threw programmed options of speeds that could be displayed on the LCD would work or a toggle switch that could display the output on the LCD.
Hope this helps Tom!