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?
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?