Motor shield on Arduino constantly driving motor1 problem

Thread Starter

Canbo68

Joined Feb 24, 2022
6
I have a pololu dual mc33926 motor driver shield sitting on top of an arduino mega 2560 driving 2 maxon 363789 motors. The arduino is powered by usb serial and the motor driver is powered by lityum ion battery pack. This works fine on one side of my robot. Additionally the other side has exactly the same setup to drive 2 other maxon motors. However for some reason when power is given to both the driver and arduino on that side , motor1 constantly and at full speed turns. I replaced the arduino with a new one and also the driver with a new one but the problem persists. The shields motor1 led is constantly green. I also uploaded an empty code into the arduino and with power given the motor still constantly turns. (Note: the side that has this problem; there is a nrf24l01 connected to the arduino) when uploading a code that publishes ros topics, the topics are published without problem. This doesnt look like a code problem as the motor still turns with empty code. To verify the motor1 problem i swapped the two motor's cables therefore the other motor connected to motor1 port of the motor driver is now turning.
 

djsfantasi

Joined Apr 11, 2010
8,323
Do you have a schematic or wiring diagram so we can see your circuit?
Or more important a link to the particular motor shield you are using or a link to the documentation and library pages?

Most likely, you won’t be able to find a schematic. A shield connects to all the Arduino GPIO pins. Which tells me nothing.

I need the two documents mentioned to determine the GPIO pins in use, potential conflicts and recommended hardware (shield) modifications to select the desired pin configuration. Such as hardware addresses…
 

Thread Starter

Canbo68

Joined Feb 24, 2022
6
Does the problem change sides if you switch the motor shields but keep the motors and megas on the same sides?
Hi, No it does not. I switched only the motor shields and the same problem on the same side persists. I then switched the megas and the same problem on the same side persists. I then swapped motor1 and motor2 and the past motor2 (now connected to motor1) has started driving continously. The motor one green led on the driver is constantly on as soon as i give power to both the mega and driver.
 

Thread Starter

Canbo68

Joined Feb 24, 2022
6
Or more important a link to the particular motor shield you are using or a link to the documentation and library pages?

Most likely, you won’t be able to find a schematic. A shield connects to all the Arduino GPIO pins. Which tells me nothing.

I need the two documents mentioned to determine the GPIO pins in use, potential conflicts and recommended hardware (shield) modifications to select the desired pin configuration. Such as hardware addresses…
Polulu Motor Driver: https://www.pololu.com/product/2503
This shows the way the motor driver sits on top of an Arduino Uno.
The attached image shows how the driver sits on top of my arduino megas.
The only pins nrf24l01 is using on the shield is the 3v3 (red jumper) and ground pin (green jumper).
 

Attachments

Thread Starter

Canbo68

Joined Feb 24, 2022
6
So there are no connections to the SPI interface of the nrf24l01?
There is. They are connected to digital pins 50, 51, 52. The nrf24l01 has no problems sending data or recieving data. The arduino mega handles the code to recieve nrf data even with the motor problem.
 

KeithWalker

Joined Jul 10, 2017
2,351
If the nrf24I01 and the motor driver use different pins on the mega, then the problem is being caused by the software. There is a conflict between the libraries of the two devices. They must be both accessing the same registers on the mega.
 

Thread Starter

Canbo68

Joined Feb 24, 2022
6
If the nrf24I01 and the motor driver use different pins on the mega, then the problem is being caused by the software. There is a conflict between the libraries of the two devices. They must be both accessing the same registers on the mega.
Thank you first of all for everyones replies. İ uploaded an empty sketch into the mega and the problem persists. There is no code or software libraries running. İ then uploaded code to set the motor speeds to zero but no luck... Nothing has changed. I researched that the motor driver library has a function to check if the motor driver has a fault. Therefore i called that function in an empty sketch and it returned true. Accordijg to the documentation; when there is a fault the motor outputs are automaticly zero. Therefore this is an electrical problem. İ checked all ground connections and they are succesfully connected.
 
Top