Your shopping cart is empty!
ESP32 PD Line Following Robot with Maker Line
- Idris Zainal Abidin
- 21 Aug 2019
- 3361
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.
- Node32 Lite
- Maker Drive
- 3.7V 2000mAh Li-Ion Battery
- 40 Ways Male to Female Jumper Wire
- Maker Line
- 2WD Smart Robot Car Chassis
- 1x18650 Battery Holder
- Breadboard 8.5x5.5cm
Wiring connection table.
18650 BATTERY | CHARGER MODULE | MAKER DRIVE | DC MOTOR | NODE32 LITE | MAKER LINE |
Positive | B+ | ||||
Negative | B- | ||||
OUT+ | VB+ | ||||
OUT- | VB- | ||||
M1A Terminal | Left Motor | ||||
M1B Terminal | Left Motor | ||||
M2A Terminal | Right Motor | ||||
M2B Terminal | Right Motor | ||||
5V | RAW | ||||
GND | GND | GND | |||
M1A Pin | GPIO33 | ||||
M1B Pin | GPIO25 | ||||
M2A Pin | GPIO26 | ||||
M2B Pin | GPIO27 | ||||
3.3V | VCC | ||||
GPIO36 | AN |
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:
- ESP32 Pinout References
- Maker Line Datasheet
- Maker Drive Datasheet
Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.