Search on AEQ-WEB

AEQ-WEB | Blog

Arduino Motorshield - How to controll a DC Motor

Arduino DC Motor Control

5 Jahre AEQ-WEB - Zeig dein Projekt

There is also a video on YouTube for this article: Arduino DC Motor Controller - Motorshield

The Arduino Motor Shield can be used to control servo, stepper and DC motors. Because multiple pins are used to control the driver, a library is recommended. Adafruit offers a good library, which is also compatible with non-original shields. For most shields, the first version is needed because the second version works only with i2c.  The software can control the Moter as with PWM signals from 0-255. The shield requires an external voltage supply for the motors, which must also be suitable for the motors. The Arduino gets the power from the shield.

How the motor is controlled

The shield can be used to control up to four DC motors. Each motor connection has two pins, depending on the direction of rotation (forward, backward) one of the pins has energy.  The ground-pin is always used by two motors. To allow a simple DC motor to rotate in both directions, the motor must be reversed. Beginners can reverse the motor with a relay-card.

Arduino DC Motor Controller - Motorshield

#include <AFMotor.h>

AF_DCMotor motor(1); //Set Motor (1 = M1, 2 = M2, 3 = M3, 4 = M4)

void setup() {

void loop() {
  int i;; //FORWARD = PIN A / BACKWARD = PIN B
  motor.setSpeed(50); //Set motor speed

Info: This page was automatically translated and may contain errors
Arduino CC1101 Transceiver

On this page we will show you how to make a data transfer with the CC1101 and an Arduino. Wiring plan and libraries are available on AEQ-WEB

Alex @ AEQ-WEB
SIM800 Arduino GPRS

On this page, we will show you how to use the SIM800 GSM module to make an HTTP post request via GPRS. You can find more information at AEQ-WEB

Alex @ AEQ-WEB