ESP32 PD Line Following Robot with Maker Line

Let's try to build line following robot using ESP32.

Introduction

Last week I have shared Raspberry Pi Line Following Robot with Maker Line tutorial. This time I would like to try another 3.3V controller which is ESP32. Plus, instead of using digital pins, I will use analog signal from Maker Line and implement simple PD (proportional and derivative) technique to control mobile robot. Before we start, I recommend you to understand the basic of line following robot. You can refer to this tutorial:

Video

This video is about ESP32 PD line following robot with Maker Line sensor.

Hardware Preparation

This is the list of items used in the video.

Wiring connection table.

18650 BATTERYCHARGER MODULEMAKER DRIVEDC MOTORNODE32 LITEMAKER LINE
PositiveB+
NegativeB-
OUT+VB+
OUT-VB-
M1A TerminalLeft Motor
M1B TerminalLeft Motor
M2A Terminal Right Motor
M2B TerminalRight Motor
5VRAW
GNDGNDGND
M1A PinGPIO33
M1B PinGPIO25
M2A PinGPIO26
M2B PinGPIO27
3.3VVCC
GPIO36AN

Sample Program

This is Arduino sample code for ESP32 PD line following robot with Maker Line. Please install ESP32 package in order to upload this code into your board. You may need to tune the gain (try and error) based on your hardware.

Thank You

References:

  1. ESP32 Pinout References
  2. Maker Line Datasheet
  3. Maker Drive Datasheet

Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorail

Display Temperature and Humidity on OLED using DHT22 and Arduino
Getting Started With Teensy Using Arduino IDE
Night Light
Arduino Device Tracker Using GSM GPS SIM7600E Module
Chocolate Box with Touch Sensor and Arduino
Scroll to Top