ESP32 PD Line Following Robot with Maker Line

ESP32 PD Line Following Robot with Maker Line

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 TerminalRight Motor  
  M2B TerminalRight Motor  
  5V RAW 
  GND GNDGND
  M1A Pin GPIO33 
  M1B Pin GPIO25 
  M2A Pin GPIO26 
  M2B Pin GPIO27 
    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.

Related Products