Arnov Sharma
Published © LGPL

MicroBot V1 ESP32 Robot

Micro Gear Motor based small robot powered by a Wemos D32 Pro and controlled by Blynk app.

BeginnerFull instructions provided2 hours2,356

Things used in this project

Hardware components

Wemos D32 pro
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
×1
micro gear motors
×2
Dual H-Bridge motor drivers L293D
Texas Instruments Dual H-Bridge motor drivers L293D
×1
ESP32S
Espressif ESP32S
×1

Software apps and online services

Fusion
Autodesk Fusion
Blynk
Blynk

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Mounting Pillar

base body

Motor Mount

Gerber data for PCB

Schematics

sch for pcb

Code

Chaser sketch

C/C++
int pinsCount=3;                        // declaring the integer variable pinsCount
int pins[] = {15,2,0};          // declaring the array pins[]


void setup() {
  pinMode(15, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(0, OUTPUT);
                  
}

 
void loop() {
  for (int i=0; i<pinsCount; i=i+1){    // chasing right
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(50);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
  for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(50);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }

}

Motor Test Sketch

C/C++
int motor1Pin1 = 13; //in1
int motor1Pin2 = 12; //in2
int motor1Pin3 = 14; //in3
int motor1Pin4 = 27; //in4
int enable1Pin = 26; //en1
int enable2Pin = 25; //en2


 
void setup() {
  // sets the pins as outputs:
  pinMode(motor1Pin1, OUTPUT);
  pinMode(motor1Pin2, OUTPUT);
  pinMode(motor1Pin3, OUTPUT);
  pinMode(motor1Pin4, OUTPUT);  
  pinMode(enable1Pin, OUTPUT);
  pinMode(enable2Pin, OUTPUT);  
  Serial.begin(115200);
 
  // testing
  Serial.print("Testing DC Motor...");
}
 
void loop() {
  // Move the DC motor forward at maximum speed
  Serial.println("Moving Forward");

    
  digitalWrite(enable1Pin, HIGH);
  digitalWrite(enable2Pin, HIGH);
  
  digitalWrite(motor1Pin1, LOW);
  digitalWrite(motor1Pin2, HIGH); 
  digitalWrite(motor1Pin3, LOW);
  digitalWrite(motor1Pin4, HIGH); 
  delay(2000);
 

 
  // Stop the DC motor
  Serial.println("Motor stopped");


  digitalWrite(enable1Pin, LOW);
  digitalWrite(enable2Pin, LOW);
  
  digitalWrite(motor1Pin1, LOW);
  digitalWrite(motor1Pin2, LOW);
  digitalWrite(motor1Pin3, LOW);
  digitalWrite(motor1Pin4, LOW);  
  delay(2000);
 
}

ESP32 WIFI

C/C++
/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example runs directly on ESP32 chip.

  Note: This requires ESP32 support package:
    https://github.com/espressif/arduino-esp32

  Please be sure to select the right ESP32 module
  in the Tools -> Board menu!

  Change WiFi ssid, pass, and Blynk auth token to run :)
  Feel free to apply it to any other example. It's simple!
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

Credits

Arnov Sharma

Arnov Sharma

310 projects • 307 followers
Just your average MAKER

Comments