• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

My motor shield is overheating when I run a DC motor

hcy

New Member
Joined
Mar 10, 2023
Messages
1
Likes
0
I'm a stranger to Arduino. I want to run a 6-12 volt DC motor from my Arduino Uno Rev 3. I've put the Arduino Motor Shield Rev 3 on Uno and tried a few Settings. I am writing and uploading code using Arduino 1.8.13 software. I used a 9-volt battery pack connected to the power port to power the Arduino Uno.




First, I connect a 9 volt battery pack to the Vin and Gnd on the Motor Shield and upload this code to the Arduino Uno, then I run the code and the Arduino is still connected to the PC:




Invalid setting () {


}




Invalid loop () {


Number write (12, high);


// Establish the forward direction of channel A


Digit write (9, low); // Disconnect the brake in channel A


Analog write (3, 255); // Rotate the motor in channel A at full speed


Delay (3000); //


}




Motor rotation is very weak, motor guard smell burnt (definitely not from the motor). I disconnected everything. I thought it might be the burnt smell because the battery pack and PC were powering, and I read that the motor was running weakly because I wasn't using enough power.




I got a 12 volt battery pack and connected it to the Vin and Gnd on the motor guard. I uploaded the following code to the Arduino with the battery pack and the motor guard disconnected:




bool fHasLooped = false;




Invalid setting () {


Pin mode (12, output);


Pin mode (9, output);


Pin mode (3, output);


If (fHasLooped == false)


{


For (integer x = 0; x < 10; x++)


{


Number write (12, high); // Establish the forward direction of channel A


Digit write (9, low); // Disconnect the brake in channel A


Analog write (3, 255); // Rotate the motor in channel A at full speed


Delay (3000); //


}




fHasLooped = true;


}


}




Invalid loop () {




}




It uploaded properly and the code was running, there was no burning smell, but when I connected the 9 volt battery pack to the Arduino Uno and connected the Arduino Uno to the motor guard (it connected to the 12 volt battery pack and 12 volt DC motor), I smelled a burning smell again.




I smelled and felt the hardware to determine where it was overheating, it was hot and smelled burnt near the 3.3V, 5V, Vin and Gnd pins on the motor guard.




To check a few things, I removed the Arduino from the motor shield and uploaded a working flicker program. I tried to connect the Arduino to the motor shield during the flashing run. The motor guard has been connected to the 12v battery pack and the motor, but there is not any burnt smell, so I guess this is my code is there a problem?
 

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,660
Likes
5,820
Location
US East
Very interesting that you chose a forum for audio enthusiasts to ask a question on motor control.

Anyhow, the Arduino motor shield documentation say PWM value should be 0-100. Have you tried 30 as suggested in their tutorial? I don't have an Arduino with me so that is about as much as I can help.

motor.png
 

restorer-john

Grand Contributor
Joined
Mar 1, 2018
Messages
12,586
Likes
38,284
Location
Gold Coast, Queensland, Australia
You need to determine what current the motor requires at the voltage you intend to drive it. Also, the capability of the driver circuitry on the shield and the power supply you are using.

You say a 6-12V motor- what exactly is it? A small hobby motor like for use in a child's toy or something larger, like a drill motor? The difference in current draw is astronomical- the drill motor may require 10A+ under load whereas a small DC hobby motor may only pull 100-200mA.
 
Top Bottom