You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Raspberry Pi zero w running the program and a PCA9685 as the controller to run a DC motor and a Servo motor. When the Servo motor is initialised first, followed by the DC motor, the DC motor rotates at twice the RPM it would if it was initialised first. I checked the voltage coming out of the pins 10 and 9 and the difference would double up for the same speed if the DC motor was initialised second.
Here is the code and the circuit diagram(Fritzing) has been attached.
Here is the code wherein the DC motor works fine, i.e it gives a low RPM at speed 30 as opposed to the previous wherein it was double the RPM for the same speed.
Servos operate in a small section of the possible PWM range but a motor will use 100% of the range. The PCA9685 Expander in Johnny-Five configures a single PWM range for the device rather than a PWM range for each pin. It's not a limitation of the PCA9685, but rather a result of a design decision in Johnny-Five.
I think it's possible to change this, but I wouldn't expect it to happen anytime soon (Unless you're interested in taking it on).
You could always hook either the motor or servo up to GPIO on the Pi.
I have a Raspberry Pi zero w running the program and a PCA9685 as the controller to run a DC motor and a Servo motor. When the Servo motor is initialised first, followed by the DC motor, the DC motor rotates at twice the RPM it would if it was initialised first. I checked the voltage coming out of the pins 10 and 9 and the difference would double up for the same speed if the DC motor was initialised second.
Here is the code and the circuit diagram(Fritzing) has been attached.
Here is the code wherein the DC motor works fine, i.e it gives a low RPM at speed 30 as opposed to the previous wherein it was double the RPM for the same speed.
Fritzing:
The text was updated successfully, but these errors were encountered: