Hey, I've been working on a drone project for a while now, trying to make a really cheap programmable drone with an arduino at its heart. I'm encountering an issue where two of my motors are moving at different speeds than the rest. I'm using MOFSETS and pwm to control them, and I've been stumped as to why they are moving differently. I recently discovered that the 5 and 6 pins of arduino have a different pwm frequency than the rest. Could that explain the discrepancy in motor speeds. I haven't found anything to suggest that it would, but those are the two motors that are acting strange.
Note: I know that the frequencies of the pins can be changed, but they can never be made equal to the other pins, so it doesn't help.
That does not allow for a known speed. Use BLDC motors or get revolution feedback from each motor.
they can. i mean you can make them equal , but i don't think it very helps.
4 of PWM pins are equal. how much do you need?
How do you get revolution feedback? Also wdym I can't set the speed with pwm? analogWrite() gives the motors a speed between 0 and 255.
Also, trying to use inexpensive components, so brushless motors won't work
I mean that 5 and 6 can't be made to pwm at 490 hz. I've already got it soldered up, don't want to redo everything if the pins aren't the issue.
You have go to move something around to do a test to see if the problem follows the pin or the motor.
On first thought, I don't see why a difference in frequency between 490Hz and 980Hz would affect the speed of the motors.
I'm encountering an issue where two of my motors are moving at different speeds than the rest.
How have you determined that? How much difference in speed? Are they faster or slower?
You can set the output on 5 and 6 to match the other timers, but it will also change the millis() and micros() timing.
I'm using MOFSETS and pwm to control them, and I've been stumped as to why they are moving differently
What mosfets are you using? Since its the faster pwm which appears to be at a different motor speed, are your mosfets switching fast enough?
3,9,10,11 pins are equal.
It gives a kick but the resulting speed depends on many factors.
that's the problem. I know that they're moving at different speeds because the drone capsizes every time I try to fly it. Messing with the timer functions would screw up the nrf24lo1 I'm using to communicate with it, right? It's pretty timing dependent. I am thinking about starting over and just avoiding the 5 and 6 pins, I just wanted to see if that could possibly affect the speeds before i did that.
how do you tell if they're switching fast enough? I'm using Irlb8721 mofsets.
ok, how do you tell what the speed is? I'm guessing its not possible with brushed motors, let me know if I'm wrong tho.
With BLDC or stepper motors the speed is determined by the driver. Brushed motors deserve a feedback for RPM determination: rotational encoders.
The mosfets look OK.
I know that they're moving at different speeds because the drone capsizes every time I try to fly it
I'm not certain this is a good test. You really need to get some sort of strobe tachometer on the rotors, when they are running at the same analogWrite() values.
I know you said that things are soldered in place, but the most basic test is to switch around the the driver circuits for the slow and fast motors and and see if the problem follows the motors or the drivers.
oh, the problem is definitely not the motors. I've switched those areound and gotten the same result. The question is whether or not its the pins itself or my circuit.
Can you provide some information on the motors you are using?
If they are like the ones in the links below they are directional and wont run at the same speed in both directions. Are the motors positioned correctly on the frame for the direction they are supposed to be turning?
https://www.micronwings.com/HintsAndTips/BrushedMotorGuide/index.shtml
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.