Pololu Dual MC33926 Motor Driver with Arduino Mega 2560

Hello Friends,

I recently bought Pololu Dual MC33926 Motor Driver Shield for Arduino to run with Arduino Mega 2560 to drive 2 DC motors.
I ran the demo program that comes with the library. The motors are running well but there was some alarm. I don’t know why.
I ran the driver with Arduino Uno and there is no alarm… the motors are running well…

Please let me know how to solve the alarm problem. Thank you.

Hello.

Can you give more details about what happens when you use the shield with the Arduino Mega? I’m not sure what you mean when you say there was some alarm. Is a fault being indicated? The demo program should print “fault” to the serial monitor if this happens. Do the motors continue to run?

-Brandon

there is no fault indicated at the serial monitor and the motors are turning back and ford. However, there seem to be more current flowing using Mega than Uno. And the alarm like sound seems to come from the two motors.

I have no idea why it is working without sound in Arduino Uno and there is some sound using Mega.

Thank you for your support

Here are some data from my monitor

When using Arduino Mega 2560
Dual MC33926 Motor Shield

M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M2 current: 0
M2 current: 0
M2 current: 0
M2 current: 954
M2 current: 657
M2 current: 1188
M2 current: 216
M2 current: 1602
M1 current: 909
M1 current: 1728
M1 current: 324
M1 current: 711
M1 current: 1332
M1 current: 2178
M1 current: 387
M1 current: 180
M2 current: 1611
M2 current: 2556
M2 current: 459
M2 current: 45
M2 current: 2142
M2 current: 3195
M2 current: 675
M2 current: 72
M1 current: 1107
M1 current: 3240
M1 current: 1143
M1 current: 99
M1 current: 351
M1 current: 2727
M1 current: 1422
M1 current: 144
M2 current: 81
M2 current: 1656
M2 current: 1656
M2 current: 216
M2 current: 126
M2 current: 1350
M2 current: 1458
M2 current: 315
M1 current: 198
M1 current: 1242
M1 current: 1368
M1 current: 405
M1 current: 252
M1 current: 1017
M1 current: 1161
M1 current: 531
M2 current: 279
M2 current: 603
M2 current: 405
M2 current: 693
M2 current: 486
M2 current: 891
M2 current: 162
M2 current: 1422
M1 current: 819
M1 current: 1485
M1 current: 270
M1 current: 1026
M1 current: 1035
M1 current: 1539
M1 current: 261
M1 current: 873
M2 current: 1134
M2 current: 1863
M2 current: 369
M2 current: 81
M2 current: 1728
M2 current: 2520
M2 current: 477
M2 current: 36
fault

“fault” means I switched off the power…

When using with Arduino Uno
Dual MC33926 Motor Shield

M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M1 current: 0
M2 current: 243
M2 current: 900
M2 current: 0
M2 current: 0
M2 current: 243
M2 current: 891
M2 current: 0
M2 current: 0
M1 current: 279
M1 current: 1350
M1 current: 0
M1 current: 0
M1 current: 279
M1 current: 1179
M1 current: 0
M1 current: 0
M2 current: 216
M2 current: 882
M2 current: 0
M2 current: 0
M2 current: 216
M2 current: 855
M2 current: 0
M2 current: 0
M1 current: 297
M1 current: 1251
M1 current: 0
M1 current: 0
M1 current: 279
M1 current: 1188
M1 current: 0
M1 current: 0
M2 current: 225
M2 current: 945
M2 current: 0
M2 current: 0
M2 current: 225
M2 current: 891
M2 current: 0
M2 current: 0
M1 current: 279
M1 current: 1233
M1 current: 0
M1 current: 0
fault

Hello.

Could you post a video of your setup with the Arduino Mega so we can try to hear the noise? If not, could you describe the noise? I suspect the sound you are hearing is the PWM frequency. When using our Arduino library for the MC33926 shield on an Arduino Uno, the PWM frequency gets configured to 20kHz, which is above the range of human hearing. Our library does not configure the PWM frequency this way when using the Arduino Mega.

As far as the current draw difference, is everything else the same between your two setups except the Arduino board (e.g. the same motors, same power supply, and using the same unmodified demo code on both)?

-Brandon

This one is with Mega

And This one is with Uno

All the settings are the same.

Thank you for your support.

It sounds like that noise is probably from the default 490Hz PWM output from the Mega. This forum post by Claire shows how the Arduino library for the VNH5019 shield can be modified to use 20kHz PWM signals with the Arduino Mega; you might try making similar modifications to the Arduino library for the MC33926 shield.

By the way, it looks like you are using two 12V batteries to power the MC33926 shield. Please note that this shield’s maximum operating voltage rating is 28V, and when fully changed, two 12V batteries could exceed this voltage. Also, the MC33926 shield is rated for a continuous output current per channel of 3A (with a peak of 5A). From the look of those motors, the MC33926 shield might be underpowered for your application. You might want to double check that they fall within the current ratings of the shield when using 24V.

-Brandon