Motor connected straight to an Arduino pin
- DC motor
- Pump
- Arduino
Stay safe: Connecting a motor straight to a pin can destroy the pin or the board.
Why it happens
- An Uno pin should give 20 mA, and never more than 40 mA. Small motors and pumps want 70 to 500 mA or more.
How to fix it
- Put a transistor with a diode, a relay module or a motor driver (L298N, L293D) between the pin and the motor.
- Power the motor from its own supply and join the grounds.
It worked if: The motor runs and the pin's wire stays cool.
Related errors
Tutorials where it can happen
- Automated Plant Watering System with LCD Feedback
- Automatic Blinds Control Based On Light Intensity
- Automatic Pet Feeder with Arduino and Servo
- Building a Smart Plant Watering System with Soil Moisture Sensor
- Building an Automated Plant Watering System using ESP32
- Creating a Touchless Hand Sanitizer Dispenser with LCD Display
19 more
- Distance Measurement and Stepper Motor Control with LCD Output
- Home Hydroponics System with Arduino
- How to use the BLE on the ESP32?
- Light Sensitive Blinds Control System with LCD Output
- Line Following Robot with LCD Display
- Liquid Level Detection and Pump Control
- Motor Speed Control Based on Temperature with LCD Output
- Obstacle Avoiding Robot Car with Arduino and LCD
- Obstacle-Avoiding Robot Arm with Arduino and LCD
- Plant Monitoring System with Arduino: Soil Moisture and DHT22
- Raindrop Detection and Automatic Wiper Control with LCD Output
- Rainwater Harvesting and Recharge: a Project for Kids
- Smart Plant Pot with ESP32 (IoT)
- Smoke Detection and Fire Sprinkler Control with LCD Display
- Soil Moisture Monitoring and Irrigation System with Arduino Uno
- Soil Moisture-Based Plant Watering System with LCD Feedback
- Temperature-Controlled Fan with Arduino and LM35
- Water Level Monitoring and Fish Tank Pump Control with Arduino
- Water Level Monitoring and Pump Control System with Arduino
From the official documentation. Pin limits from Arduino's documentation. Sources: Arduino: digital pins.
Didn't help? Search another error or ask us.

