Motor Control with D1 Mini

I want to make a rc car.

The car should have 4 motors in summary which should be individually controlable.

As controller i will use the Wemos D1 Mini.

I tried a solution with the Wemos Motor Shield v1, but i didnt make it running.

What could be a easy solution to control these motors?

Thank you.

Post your annotated schematic, not a frizzy and include links to technical information on all the hardware devices. Posting your code will also help. Read the specifications on the motor driver you chose, it will just get hot and fry. Also determine what batteries yo will need. I have a feeling you fried the motor shield. Each motor requires: 28 watts at 6 volts. That works out at (28/6) *4 = 18.4 Amps.

Thank you for your ideas. I made a little test circuit, which i sketched here:

Then i tried it with this code but it didnt made any reaction.

To add code please click this link;

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Sorry :slight_smile: this code i used:

#include <Wire.h>


#include "WEMOS_Motor.h"



//Motor shield default I2C Address: 0x30
//PWM frequency: 1000Hz(1kHz)
Motor M1(0x30, _MOTOR_A, 1000); //Motor A
Motor M2(0x30, _MOTOR_B, 1000); //Motor B


void setup() {
  
  
  Serial.begin(57600);
  Serial.println("Starting demo");

  
}

void loop() {

  int pwm;

  for (pwm = 0; pwm <= 100; pwm++)
  {
    M1.setmotor( _CW, pwm);
    M2.setmotor(_CW, pwm);
    Serial.print("Clockwise PWM: ");
    Serial.println(pwm);
    delay(100);
  }

  Serial.println("Motor STOP");
  M1.setmotor(_STOP);
  M2.setmotor( _STOP);

  delay(1000);

  
  for (pwm = 0; pwm <= 100; pwm++)
  {
    M1.setmotor(_CCW, pwm);
    //delay(1);
    M2.setmotor(_CCW, pwm);
    Serial.print("Counterclockwise PWM: ");
    Serial.println(pwm);
    delay(100);

  }

  Serial.println("Motor A&B STANDBY");
  M1.setmotor(_STANDBY);
  M2.setmotor( _STANDBY);
  delay(1000);

}

Hi,
From the documentation.

There are more than just D1 and D2 connections.

Tom.. :smiley: :+1: :coffee: :australia:

I tried that too, but nothing changed :sweat_smile:

So you have added wires for GND, 3V3 and RST?

What is our power supply?

Can you please post images of your project so we can see your component layout?

Have you read the Firmware Upgrade and the symptoms of the old firmware?
https://espeasy.readthedocs.io/en/latest/Plugin/P079_WemosMotorshield.html

Tom.. :smiley: :+1: :coffee: :australia:

I tried that firmware upgrade too, but my pc didnt detect the shield.

Beside that, do you have any other solution to control the motors with a d1 mini? It has not to be exactly that shield. What would you use for something like that?

A 9V battery does not do well with motors use a line powered power supply until finished debugging the code.

i have a 12v power supply connected to it for testing no worries

hello, sorry if this is not helping because i'm a noob to here
but , from what i know , in the void setup you have to define or add the pinMode to output no ?

ex. void setup
pinMode( D1, OUTPUT);
pinMode( D2, OUTPUT);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.