pidgin
New Member
Hi there.
I am new to the forum. so.. Hi everyone
I am trying to control several DC 3-5v motor/pump with Arduino, using PCA9685 PWM expander.
I have connected one such motor, with a rectifying diode (IN4007), to 5V using a BC337 transistor, 2.2K resistor, the PCA9685 module, Arduino Due and 3.3V and 5V sources (with common ground). as in the diagram below.
The program on it runs a sweep on 0-100% and back on port 0.
Now..
IF I do NOT connect the motor, but instead put some random resistor load, everything works fine. I can measure across the load resistor a voltage going up from 0 to 5 and back down. All works 100% fine.
HOWEVER..
IF instead, I connected the motor where it should be, the program goes crazy as soon as the load across the motor gets to about 2-3 volts (or about 1.5V on the port 0 PWM).
The PWM stops updating and the serial console debugging clearly shows that something drags down the Arduino (the console stats updating slowly instead of the regular speed), due to I2C communication issues apparently (which hints that the PWM expander module went crazy). The Arduino can't seem to communicate with it anymore.
Disconnecting the motor at this stage doesn't help. Even then, the PWM doesn't update. The voltage on the 0 port remains stuck at the same level.. same for the motor. Things just get stuck.
Resetting the Arduino doesn't help.
If I disconnect the PWM module, the console logging goes back to regular speed (again, hinting that the PWM module went "crazy" and it is what is causing the console log drag).
Also, plugging the PWM module back in, doesn't solve the issue right away all the time, even at the beginning. It sometimes needs to "rest" for a bit. Then, once plugged in again it resumes working again like before.. meaning, only for the first second or so, until it goes crazy again.
I have no idea what is going on.
At first, I thought it has to do with a voltage created by the engine.. so I've added the rectifying diode. But that didn't help. Same issue.
I've also added a diode on the base, thinking maybe for some reason there is a current trying to flow back into the PWM module through the (orange) PWM port. But that also didn't help.
I am kind of lost here :/
Why would the PWM module go crazy like that?
What causes it?
How do I fix it?
Would greatly appreciate any help.
I am new to the forum. so.. Hi everyone
I am trying to control several DC 3-5v motor/pump with Arduino, using PCA9685 PWM expander.
I have connected one such motor, with a rectifying diode (IN4007), to 5V using a BC337 transistor, 2.2K resistor, the PCA9685 module, Arduino Due and 3.3V and 5V sources (with common ground). as in the diagram below.
The program on it runs a sweep on 0-100% and back on port 0.
Now..
IF I do NOT connect the motor, but instead put some random resistor load, everything works fine. I can measure across the load resistor a voltage going up from 0 to 5 and back down. All works 100% fine.
HOWEVER..
IF instead, I connected the motor where it should be, the program goes crazy as soon as the load across the motor gets to about 2-3 volts (or about 1.5V on the port 0 PWM).
The PWM stops updating and the serial console debugging clearly shows that something drags down the Arduino (the console stats updating slowly instead of the regular speed), due to I2C communication issues apparently (which hints that the PWM expander module went crazy). The Arduino can't seem to communicate with it anymore.
Disconnecting the motor at this stage doesn't help. Even then, the PWM doesn't update. The voltage on the 0 port remains stuck at the same level.. same for the motor. Things just get stuck.
Resetting the Arduino doesn't help.
If I disconnect the PWM module, the console logging goes back to regular speed (again, hinting that the PWM module went "crazy" and it is what is causing the console log drag).
Also, plugging the PWM module back in, doesn't solve the issue right away all the time, even at the beginning. It sometimes needs to "rest" for a bit. Then, once plugged in again it resumes working again like before.. meaning, only for the first second or so, until it goes crazy again.
I have no idea what is going on.
At first, I thought it has to do with a voltage created by the engine.. so I've added the rectifying diode. But that didn't help. Same issue.
I've also added a diode on the base, thinking maybe for some reason there is a current trying to flow back into the PWM module through the (orange) PWM port. But that also didn't help.
I am kind of lost here :/
Why would the PWM module go crazy like that?
What causes it?
How do I fix it?
Would greatly appreciate any help.
Last edited: