Hi im working on a project and i need to move some bars in a precise angles(Using Arduino mega) ,i thought of using PWM pins ,the issue is that i need more PWM pins.
Is there a way to expand PWM pins?if not is there any other way to give a presice pulse? maybe digital pins with timers?(Each bar gonna move separately) Im new with using arduino thanks in advance
Welcome to the forum
How many PWM outputs do you need in total ?
20 PWM Pins
Welcome to the forum.
Could you tell more about the project ?
How many bars are there, and do you have modules to drive those bars ?
What kind of angles are they ? For example from a spirit level or from encoders ?
How precise do you need the angles ? For example 1 degree accurate or 0.1 degree.
A drawing or picture will be helpful to understand what you want to make.
The microcontroller on the Arduino Mega board is made to generate all kind of pulses. With Arduino it is often easier to use a extra module. I think you will end up with the Arduino Mega and a number of extra modules.
Angle is 18 degrees,i have 20 bars and im trying to make a helix
control a DC motor which rotates some bars
PWM is poor at precise control of a simple DC motor. The PWM verses speed control is very dependent on the load on the motors.
Or maybe you do not mean DC motors, instead do you mean servo motors?
No im planning to use DC motors to control the bars
You might be, but I am telling you you can't.
Best of luck with your project. Goodbye.
Is it the motor position or motor speed that you are planning to control ?
You will have a hard (impossible) time controlling the position of a DC motor if there is no position feedback and I have seen no mention of that
Thats sad i really thought i can get precise angles without using an encoder,anyway is it possible to expand PWM output pins?Thanks for all the info
Yes, it is possible. See reply #6.
So basically you want stepper motors.
They will rotate a precise amount, but you need a "home" position. While you can use a sensor to provide the "home" position, a simple mechanical stop is easier and will cause no damage if it is sufficiently sturdy. ![]()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

